[Haskell] Probably a trivial thing for people knowing Haskell

2008-10-18 Thread Friedrich
I've written just a few programs in Haskell one in a comparison for a task I had "nearly daily". The code analyzes Apache logs and picks some certain stuff from it and after that calculates a bit around with it. Here's the code module Main where import System import System.IO import System.Direct

Re: [Haskell] Probably a trivial thing for people knowing Haskell

2008-10-18 Thread Chris Kuklewicz
H mm.. The totals in "sum" and "count" are not computed until printed. This is too lazy. You start with '0' and (+) things to it, but never examine or force the value, so man many (+) thunks are built up in memory. If you use bang patterns then the change can be made here, to !sum !count:

[Haskell] Haskell Weekly News: Issue 89 - October 18, 2008

2008-10-18 Thread Brent Yorgey
--- Haskell Weekly News http://sequence.complete.org/hwn/20081018 Issue 89 - October 18, 2008 --- Welcome to issue 89 of HWN, a newsletter covering

Re: [Haskell] Probably a trivial thing for people knowing Haskell

2008-10-18 Thread Paul Johnson
Friedrich wrote: I've written just a few programs in Haskell one in a comparison for a task I had "nearly daily". The first thing I notice is that this is clearly a direct translation from something like Perl. Thats understandable, but I'd suggest rewriting it with something like this (unte

Re: [Haskell] Abusing quickcheck to check existential properties

2008-10-18 Thread Norman Ramsey
> The answer is that QuickCheck can't correctly constructively verify an > existential condition without a constructive mechanism to generate the > existential (i.e. the Skolem function mentioned before). I agree but don't think it's relevant. QuickCheck can't verify a universal either. > If

Re: [Haskell] Probably a trivial thing for people knowing Haskell

2008-10-18 Thread Friedrich
Marshall Beddoe <[EMAIL PROTECTED]> writes: > Also, read some chapters from here: > http://book.realworldhaskell.org/read/ > > Indispensable examples for writing higher performance log processing > code. I hope this book will soon be send out. I ordered my copy of course ;-) Howerver even if Stri

Re: [Haskell] Probably a trivial thing for people knowing Haskell

2008-10-18 Thread Friedrich
Paul Johnson <[EMAIL PROTECTED]> writes: > Friedrich wrote: >> I've written just a few programs in Haskell one in a comparison for a >> task I had "nearly daily". >> > The first thing I notice is that this is clearly a direct translation >> From something like Perl. Thats understandable, but I'd