Re: Lazy streams and unsafeInterleaveIO

2002-12-25 Thread Jyrinx
Glynn Clements wrote: Jyrinx wrote: [...] and the inability to handle exceptions (the actual exception won't occur until after e.g. getContents has returned). But how does this differ from strict I/O? I mean, say there's a disk error in the middle of some big file I want to crunch

Space explosion

2002-12-25 Thread Jyrinx
I'm tinkering with a little program I wrote a while back to generate probability distributions and averages for rolling various kinds and quanitities of dice and applying various rules (for instance, roll four six-sided dice, drop the lowest, and add the other three). I'm trying to optimize

Lazy streams and unsafeInterleaveIO

2002-12-22 Thread Jyrinx
As an experiment for a bigger project, I cooked up a simple program: It asks for integers interactively, and after each input, it spits out the running total. The wrinkle is that the function for calculating the total should be a non-monadic stream function (that is, type [Integer] - [Integer]

Re: Lazy streams and unsafeInterleaveIO

2002-12-22 Thread Jyrinx
Remi Turk wrote: On Sun, Dec 22, 2002 at 04:00:45AM -0800, Jyrinx wrote: As an experiment for a bigger project, I cooked up a simple program: It asks for integers interactively, and after each input, it spits out the running total. The wrinkle is that the function for calculating the total

Re: Lazy streams and unsafeInterleaveIO

2002-12-22 Thread Jyrinx
Hal Daume III wrote: BTW, I already found a major problem with the code I attached earlier, using unsafeInterleaveIO: Run in GHCi (as I had done), it works fine; but compiled by GHC and run as an executable, it waits for input and *then* displays the prompt after the user hits Enter ... not

Re: ANNOUNCE: GHC version 5.04.2 released

2002-12-04 Thread Jyrinx
broken; should it be this? http://www.haskell.org/ghc/docs/latest/html/users_guide/release-5-04.html (Seems like the html is missing.) Jyrinx [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman

Re: ANNOUNCE: GHC version 5.04.2 released

2002-12-04 Thread Jyrinx
broken; should it be this? http://www.haskell.org/ghc/docs/latest/html/users_guide/release-5-04.html (Seems like the html is missing.) Jyrinx [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: Isn't this tail recursive?

2002-03-12 Thread Jyrinx
Aha! Gotcha. Thanks for the explanation. I suppose that, in general, for tail recursion to work right, the accumulator has to be evaluated strictly (as is how my code was fixed)? Jyrinx [EMAIL PROTECTED] On Tue, 2002-03-12 at 09:34, Hal Daume III wrote: Here's the basic idea. Suppose we have

Re: Isn't this tail recursive?

2002-03-11 Thread Jyrinx
Hudak's book, but it does everything lazily IIRC) Jyrinx [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Isn't this tail recursive?

2002-03-10 Thread Jyrinx
commentary on my code ...) Thanks! Jyrinx jyrinx_list at mindspring dot com ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell