2009/3/4 R J rj248...@hotmail.com:
Could someone provide an elegant solution to Bird problem 4.2.13?
Here are the problem and my inelegant solution:
Problem
---
Since concatenation seems such a basic operation on lists, we can try to
construct a data type that captures
concatenation
Hello cafe,
I've just followed the instructions at
http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program
to create my first library project on haskell.org, using darcs.
I tried using the darcs setpref test command to execute:
runhaskell tests/*.hs
(which works locally)
but it
I have just attempted Cabal-izing my program (splitting it into a
library and main program as well), and I'm mystified by some problems
I am having.
First, when I try to build the library I get:
[co...@susannah game-tree]$ runhaskell Setup build
Preprocessing library game-tree-1.0.0.0...
On Sat, Mar 7, 2009 at 6:18 PM, Colin Paul Adams
co...@colina.demon.co.uk wrote:
I have just attempted Cabal-izing my program (splitting it into a
library and main program as well), and I'm mystified by some problems
I am having.
First, when I try to build the library I get:
[co...@susannah
Svein == Svein Ove Aas svein@aas.no writes:
Preprocessing library game-tree-1.0.0.0... Building
game-tree-1.0.0.0...
Data/Tree/Game/Negascout.hs:31:0: Unrecognised pragma [1 of 2]
Compiling Data.Tree.Game.Tree ( Data/Tree/Game/Tree.hs,
On Fri, Mar 6, 2009 at 10:39 PM, Roman Cheplyaka r...@ro-che.info wrote:
The blog
seems to be inactive since december 2008; has development ceased?
Sort of. One reason is that DPH does not seem to be ready for hpysics
yet, another one is that I don't see any potential users around (read: I
Hello Colin,
Saturday, March 7, 2009, 8:30:43 PM, you wrote:
Data/Tree/Game/Tree.hs:1:0: Failed to load interface for
`Prelude': it is a member of package base-3.0.3.0, which
is hidden
build-depends: base = 4
and which ghc version you are running? :)
--
Best
On Sat, 07 Mar 2009 17:30:43 +
Colin Paul Adams co...@colina.demon.co.uk wrote:
Svein == Svein Ove Aas svein@aas.no writes:
Preprocessing library game-tree-1.0.0.0... Building
game-tree-1.0.0.0...
Data/Tree/Game/Negascout.hs:31:0: Unrecognised pragma [1 of 2]
Robin == Robin Green gree...@greenrd.org writes:
Robin The build-depends line needs to go in the Library section,
Robin I think. It doesn't seem to be having any effect in its
Robin current location. Likewise for ghc-options.
Thanks everyone - it's working now.
--
Colin Adams
2009/3/6 Peter Verswyvelen bugf...@gmail.com:
Do alternatives exist? Maybe good wrappers (hopefully pure...) around
existing engines?
There's Hipmunk, but it is not pure and not that good ;). But if you
don't mess with the global variables (which you normally wouldn't mess
anyway) then you can
* Peter Verswyvelen bugf...@gmail.com [2009-03-07 18:34:10+0100]
On Fri, Mar 6, 2009 at 10:39 PM, Roman Cheplyaka r...@ro-che.info wrote:
The blog
seems to be inactive since december 2008; has development ceased?
Sort of. One reason is that DPH does not seem to be ready for hpysics
colin:
I have just attempted Cabal-izing my program (splitting it into a
library and main program as well), and I'm mystified by some problems
I am having.
First, when I try to build the library I get:
[co...@susannah game-tree]$ runhaskell Setup build
Preprocessing library
Cristiano Paris wrote:
Heinrich Apfelmus wrote:
...
Such self-reference is usually called tying the knot, see also
http://www.haskell.org/haskellwiki/Tying_the_Knot
I didn't know. Would you call this Tying the knot as well?
Hi,
When reading this code in ghci, I get an
ambiguous type at last line:
{-# LANGUAGE PolymorphicComponents #-}
{-# LANGUAGE RankNTypes #-}
import Graphics.UI.Gtk
data Test = Test (forall w. WidgetClass w = w)
toAction (Test w) = toWidget w
It's interesting that if I replace 'Integral' for
Hi again,
I wanted to echo Iavor's comment that you shouldn't feel 'obliged' to
use darcs out of Haskell brand loyalty.
Try both systems out and see how they feel. My enthusiasm is really
about what I find to be a great and very comfortable workflow. You'll
have to see for yourself what suits
I'm playing around with Netflix, implementing a simple KNN-algorithm, I will
later try SVD which seems to be the most successful approach.
Using a database like Postgresqk is to slow so I want to serialize a
datastructure containing the ratings. I'm not sure about the
representation I will use
Increase the stack size, or use a different serialiser (they're only a
half dozen lines to write), or different data structure?
-- Don
frigginfriggins:
I'm playing around with Netflix, implementing a simple KNN-algorithm, I will
later try SVD which seems to be the most successful approach.
import Data.Binary and then write a variant of something like how
Maps are currently serialised:
instance (Ord k, Binary k, Binary e) = Binary (Map.Map k e) where
put m = put (Map.size m) mapM_ put (Map.toAscList m)
get = liftM Map.fromDistinctAscList get
So you might
Am Samstag, 7. März 2009 20:28 schrieb Maurício:
Hi,
When reading this code in ghci, I get an
ambiguous type at last line:
{-# LANGUAGE PolymorphicComponents #-}
{-# LANGUAGE RankNTypes #-}
import Graphics.UI.Gtk
data Test = Test (forall w. WidgetClass w = w)
toAction (Test w) =
Hello friggin,
Saturday, March 7, 2009, 10:57:04 PM, you wrote:
dec = B.decodeFile C:/users/saftarn/desktop/bintest.txt = \a -
return $ (a :: M.Map (Int,Int) Int)
just a quick style hack:
dec = B.decodeFile C:/users/saftarn/desktop/bintest.txt :: IO (M.Map
(Int,Int) Int)
--
Best
(...)
When you have
data Test = Test (forall w. (C1 w, C2 w, ..., Cn w) = w)
and
function (Test w) = classmethod w,
there is no way to decide which instance to use, hence the type variable is
ambiguous.
(...)
But, then, how can I reach the data inside a
polymorphic component? Or,
Am Samstag, 7. März 2009 21:48 schrieb Maurício:
(...)
When you have
data Test = Test (forall w. (C1 w, C2 w, ..., Cn w) = w)
and
function (Test w) = classmethod w,
there is no way to decide which instance to use, hence the type variable
is ambiguous.
(...)
But, then,
Can anyone help with this problem from Bird:
a. Convert the following list comprehensions to combinatory style:
i. [(x, y) | x - [1..n], odd x, y - [1..n]]
ii. [(x, y) | x - [1..n], y - [1..n], odd x]
b. Are they equal?
c. Compare the costs of evaluating the two expressions.
I
Derek Elkins wrote:
Both are poorish style.
reader - forkIO $ forever $ do (nr', line) - readChan; when (nr /= nr') $
putStrLn hdl line
This is fine assuming you always want to re-enter the loop. If you want
to loop conditionally (which is most often the case), forever isn't
going to work,
Here's another Bird problem that's stymied me:
The function inits computes the list of initial segments of a list; its type
is inits :: [a] - [[a]]. What is the appropriate naturality condition for
inits?
The only discussion in the text concerning naturality conditions concerns map,
where
On Sat, 2009-03-07 at 23:12 +0100, Martijn van Steenbergen wrote:
Derek Elkins wrote:
Both are poorish style.
reader - forkIO $ forever $ do (nr', line) - readChan; when (nr /= nr') $
putStrLn hdl line
This is fine assuming you always want to re-enter the loop. If you want
to loop
Derek Elkins wrote:
If you are doing something else, use something else. This makes it
clear that you -aren't- going to break out (non-exceptionally), i.e. the
control flow is more obvious in this code than in the other versions.
Oh yes, of course! I wasn't saying forever is bad; in fact I
Am Samstag, 7. März 2009 23:06 schrieb R J:
Can anyone help with this problem from Bird:
a. Convert the following list comprehensions to combinatory style:
i. [(x, y) | x - [1..n], odd x, y - [1..n]]
ii. [(x, y) | x - [1..n], y - [1..n], odd x]
b. Are they equal?
c. Compare the
On Sat, 2009-03-07 at 22:18 +, R J wrote:
Here's another Bird problem that's stymied me:
The function inits computes the list of initial segments of a list;
its type is inits :: [a] - [[a]]. What is the appropriate naturality
condition for inits?
A natural transformation is between two
Am Samstag, 7. März 2009 23:18 schrieb R J:
Here's another Bird problem that's stymied me:
The function inits computes the list of initial segments of a list; its
type is inits :: [a] - [[a]]. What is the appropriate naturality
condition for inits?
The only discussion in the text
Hi,
is the above mentioned book still *the* authority on the subject?
I bought the book, read about 10 pages and then put it back on the
shelf. Um.
In my app I have to deal with 4 csv files, each between 5 - 10 mb, and
some static data.
I had put all that data into an Sqlite3 database and
gue.schmidt:
Hi,
is the above mentioned book still *the* authority on the subject?
I bought the book, read about 10 pages and then put it back on the
shelf. Um.
In my app I have to deal with 4 csv files, each between 5 - 10 mb, and
some static data.
I had put all that data into an
Hi Don,
damn, that was quick!
And thx, I'll look into that. The reading it in wasn't much of a
problem, I had been able to use MS-ODBC for that, there's a driver for
ODBC files. The problem is more the type of data structure I'd be
reading it into. In SQL I would have the data indexed by
Eric Kow ko...@darcs.net writes:
One of the darcs team members, Thorkil Naur, felt that in my enthusiasm I
was not being sufficiently forthright about darcs's shortcomings.
As for me, I tend to start any review with a list of all the problems I
have with technology, on the basis that it's a
---
Haskell Weekly News
http://sequence.complete.org/hwn/20090307
Issue 108 - March 07, 2009
---
Welcome to issue 108 of HWN, a newsletter covering
This is a homework question. I am mainly looking for guidance or
pointers. Source code, even. (Not GHC's, though, it is too complicated
for me right now. The AST of STG is fine, but the rest kinda scares
me.)
Ideally, I would very much like to compile to C.
The requirements are easily stated. My
http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours
Not sure if this is exactly what you want, but you could certainly fufill
all of your requirements using this as a baseline. Instead of evaluating the
actual statements in your eval function, you could simply render them to C.
As
At Sun, 08 Mar 2009 00:13:14 +0100,
G?uenther Schmidt wrote:
In SQL I would have the data indexed by several
different columns, if I use maps I'd only have one key, so if I need to
lookup data in the map by a value that is not the key the lookups will
become quite expensive.
Hello,
This book is pretty good IMO:
http://research.microsoft.com/en-us/um/people/simonpj/papers/slpj-book-1987/
It does not cover STG, but it does cover a ton of useful stuff and is
very well written.
I can say from experience that the spineless-tagless-gmachine paper
you referenced does
Hi Jeremy,
I had used HAppS-IxSet before and was very happy with it, it offered
pretty much everything I needed. I switched (back) to SQL once I had hit
a bump in the road that I wasn't able to fix, a stack-overflow that
occurred once I ran the code against the largest sample data I had. It
Hi,
(Please note this is coming from my own experience working with the LHC haskell
compiler, as well as a compiler I'm currently working on in SML. I'm
not an authority, but as another greenhorn compiler hacker I thought I
might give some advice.)
Excerpts from Loup Vaillant's message of Sat
Dear Haskellers and especially who are working on cabal-install
and debian packaging,
I sometimes clean up .ghc and .cabal in my home directory to start from
scratch because of dependency loopholes (cabal-install does not have
remove option yet, so it's hard to fix when such loophole happens).
Ahn, Ki Yung 쓴 글:
Dear Haskellers and especially who are working on cabal-install
and debian packaging,
I sometimes clean up .ghc and .cabal in my home directory to start from
scratch because of dependency loopholes (cabal-install does not have
remove option yet, so it's hard to fix when
At Sun, 08 Mar 2009 02:28:43 +0100,
G?uenther Schmidt wrote:
[1 text/plain; windows-1252 (quoted-printable)]
Hi Jeremy,
I had used HAppS-IxSet before and was very happy with it, it offered
pretty much everything I needed. I switched (back) to SQL once I had hit
a bump in the road that
Loup Vaillant wrote:
- support algebraic data types and case expressions (unless I can get
away with encoding them as functions),
Which you always can,
data Foo = A a1...an | B b1...bn |...
==
type Foo :: forall r.
(a1-...-an - r) -
(b1-...-bn - r)
Hi all,
For a while now, we have had Data.ByteString[.Lazy][.Char8] for our
fast strings. Now we also have Data.Text, which does the same for
Unicode. These seem to be the standard for dealing with lists of bytes
and characters.
Now we also have the storablevector, uvector, and vector packages.
On Sat, Mar 7, 2009 at 10:23 PM, Alexander Dunlap
alexander.dun...@gmail.com wrote:
Hi all,
For a while now, we have had Data.ByteString[.Lazy][.Char8] for our
fast strings. Now we also have Data.Text, which does the same for
Unicode. These seem to be the standard for dealing with lists of
Excerpts from Alexander Dunlap's message of Sun Mar 08 00:23:01 -0600 2009:
For a while now, we have had Data.ByteString[.Lazy][.Char8] for our
fast strings. Now we also have Data.Text, which does the same for
Unicode. These seem to be the standard for dealing with lists of bytes
and
Excerpts from Bryan O'Sullivan's message of Sun Mar 08 00:45:03 -0600 2009:
uvector is, if my memory serves me correctly, a fork of the vector library.
It uses modern stream fusion, but is under active development and is a
little scary. I'm a little unclear on the exact difference between
bos:
On Sat, Mar 7, 2009 at 10:23 PM, Alexander Dunlap alexander.dun...@gmail.com
wrote:
Hi all,
For a while now, we have had Data.ByteString[.Lazy][.Char8] for our
fast strings. Now we also have Data.Text, which does the same for
Unicode. These seem to be the standard
50 matches
Mail list logo