[Haskell] ANNOUNCE: colour 0.0.0

2008-10-21 Thread roconnor
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/colour-0.0.0 I hope for this library to become the standard colour library for Haskell. Most software does not properly blend colours because they fail to gamma-correct the colours before blending. Hopefully by using this library, Has

Re: [Haskell] Abusing quickcheck to check existential properties

2008-10-21 Thread Rickard Nilsson
On Sun, 19 Oct 2008 00:39:32 +0200, Norman Ramsey <[EMAIL PROTECTED]> wrote: I guess what I would like is to reuse most of the mechanisms in QuickCheck to have it say one of these two things: 1. Found an satisfying instance after 73 tries: [gives instance] 2. After 100 tries, could not fin

[Haskell] REMINDER: Haskell Communities and Activities Report

2008-10-21 Thread Janis Voigtlaender
Dear Haskellers, The deadline for the November 2008 edition of the Haskell Communities and Activities Report is only ten days away. If you haven't already, please write an entry for your new project, or update your old entry. Please mail your entries to [EMAIL PROTECTED] in plain text or LaTeX f

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

2008-10-21 Thread Simon Peyton-Jones
Folks, I wonder if this worthwhile thread could move from haskell@haskell.org to [EMAIL PROTECTED] The main Haskell list, haskell@haskell.org, is a low-bandwidth list for discussion starters and announcements. The Haskell Cafe, by contrast, is a high-bandwidth list for detailed discussion. W

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

2008-10-21 Thread Friedrich
Well I never have tried to profile here's my first try. I compiled with ghc --make -O -prof -auto-all chk_dwlds.hs I've run the program with: ./chk_dwlds \+RTS -p \-RTS and got this .prof file Tue Oct 21 15:01 2008 Time and Allocation Profiling Report (Final) chk_dwlds +RT

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

2008-10-21 Thread Ketil Malde
Friedrich <[EMAIL PROTECTED]> writes: > Even the ruby solution need just > check_downloads/check_downloads.rb . 1,25s user 0,06s system 99% cpu > 1,322 total [...] > but the haskell solution: > ./chk_dwlds 17,71s user 0,11s system 99% cpu 17,836 total I'm very surprised to see this. Did y

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

2008-10-21 Thread Friedrich
the posted codes runs in constant memory, so yes that make it possible that the stuff runs. That's really nice. Howerver the time is drastically bad Even the ruby solution need just check_downloads/check_downloads.rb . 1,25s user 0,06s system 99% cpu 1,322 total Here's the ruby code #!/usr/bin

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

2008-10-21 Thread apfelmus
Friedrich wrote: > Paul Johnson writes: >> >> -- Concatenate all the files into one big string. File reading is >> lazy, so this won't take all the memory. >> getAllFiles :: [String] -> IO String >> getAllFiles paths = do >> contents <- mapM getFile paths >> return $ concat contents >> >> Then

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

2008-10-21 Thread Friedrich
Udo Stenzel <[EMAIL PROTECTED]> writes: >> Friedrich wrote: >> >Ok to be more concrete is the laziness "hidden" here? >> > >> >check_line line sum count = >> >let match = matchRegex regexp line >> >in case match of >> > Just strs -> (sum + read (head strs) :: Integer,

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

2008-10-21 Thread Friedrich
Udo Stenzel <[EMAIL PROTECTED]> writes: >> Friedrich wrote: >> >Ok to be more concrete is the laziness "hidden" here? >> > >> >check_line line sum count = >> >let match = matchRegex regexp line >> >in case match of >> > Just strs -> (sum + read (head strs) :: Integer,