Re: [Haskell] Laziness and the IO Monad (randomness)

2007-03-01 Thread Paul Johnson
David Brown wrote: Dave Tapley wrote: This code show a trivial case where randomness (and hence the IO monad) is not used and the first 10 elements of the produced list are printed: You don't need the IO monad to achieve pseudy-randomness. Why not use 'randoms' from System.Random (or

Re: [Haskell] Laziness and the IO Monad (randomness)

2007-03-01 Thread Taral
On 3/1/07, Dave Tapley <[EMAIL PROTECTED]> wrote: My question asks why this is the case, when laziness should ensure only the first 10 cases need to be computed. Basically, because the IO monad is strict, not lazy. If you want laziness, don't use the IO monad. -- Taral <[EMAIL PROTECTED]> "You

Re: [Haskell] Laziness and the IO Monad (randomness)

2007-03-01 Thread David Brown
Dave Tapley wrote: > This code show a trivial case where randomness (and hence the IO > monad) is not used and the first 10 elements of the produced list > are printed: You don't need the IO monad to achieve pseudy-randomness. Why not use 'randoms' from System.Random (or 'randomRs' for a range).

[Haskell] Laziness and the IO Monad (randomness)

2007-03-01 Thread Dave Tapley
Hi all, I am having a problem with the implementation of a program (a genetic algorithm) which requires randomness in it. It all hinges on the ability to generate something (in the example below an Int), then provide a function to update it such that the prelude's iteratefunction (or an equivalen

[Haskell] ANNOUNCE: OmegaGB, Haskell Game Boy Emulator

2007-03-01 Thread Bit Connor
OmegaGB is an emulator for the Nintendo Game Boy, written in pure haskell. It's in a very early state, and only barely shows the title screen of a few games. It uses gtk2hs for the user interface, but there is also a version that doesn't require gtk2hs and uses ascii art. The main problem I am ha

[Haskell] GTTSE 2007: 2nd call for participation (02-07 July) (registration open)

2007-03-01 Thread Joost Visser
GTTSE 2007, 02-07 July, 2007, Braga, Portugal 2nd International Summer School on Generative and Transformational Techniques in Software Engineering http://www.di.uminho.pt/GTTSE2007 ** Registration is now open ** SCOPE AND FORMAT The summer school brings together PhD students, lec