Re: [Haskell-cafe] maybe IO doesn't suck, but my code does...

2004-12-05 Thread Georg Martius
Hi, you probably need to compile it with -O. You can use -Wall as well to see some hint from ghc that prevents you from making silly mistakes. Georg On Sat, 4 Dec 2004 22:44:49 +0100, FrÃdÃric Gobry <[EMAIL PROTECTED]> wrote: I'll maybe perform the actual processing I need to get the job done firs

Re: [Haskell-cafe] maybe IO doesn't suck, but my code does...

2004-12-04 Thread Frédéric Gobry
> I'll maybe perform the actual processing I need to get the job done > first, and come back to the mailing list once I'll be stuck with > blockwise IO :-) Arg, I tested the version with strict Stat and and no explicit IO, but it still explodes on my log file (stack space overflow after a lot of s

Re: [Haskell-cafe] maybe IO doesn't suck, but my code does...

2004-12-04 Thread Jeremy Shaw
At Sat, 4 Dec 2004 22:18:38 +0100, Frédéric Gobry wrote: > > Since Haskell is lazy it won't evaluate the (+) so in it keeps all copies > > of the Stat until the very end when you actually print it. The ! annotation > > in the record definition doesn't allow Haskell to store closures in the > >

Re: [Haskell-cafe] maybe IO doesn't suck, but my code does...

2004-12-04 Thread Frédéric Gobry
> how I think one should program in Haskell. However I have changed it to the > style I would recomment and now it runs in constant space. I'm certainly interested in general remarks about style. Consider this a my first program in Haskell, coming from object / imperative background. > First of

Re: [Haskell-cafe] maybe IO doesn't suck, but my code does...

2004-12-03 Thread Georg Martius
Hi FrÃdÃric, I took a look at you program. To be honest I have to admit that it is not how I think one should program in Haskell. However I have changed it to the style I would recomment and now it runs in constant space. First of all I thought it is enough to strictify the members of your record

Re: [Haskell-cafe] maybe IO doesn't suck, but my code does...

2004-12-03 Thread Scott Turner
On 2004 December 03 Friday 05:33, Frédéric Gobry wrote: > important memory usage problems (in fact, at each attempt, I > Alternatively, if I took the wrong direction, please refocus my search http://haskell.org/hawiki/ForcingEagerEvaluation and especially follow the link and look at "Strict datat

[Haskell-cafe] maybe IO doesn't suck, but my code does...

2004-12-03 Thread Frédéric Gobry
Hello, I'm a haskell beginner, and I'm struggling with the following problem: I've started writing a simple apache log file analyzer, but I cannot get rid of important memory usage problems (in fact, at each attempt, I fear I won't be able to unlock my box as my linux 2.6.9 kernel is on its knees,