Re: [Haskell-cafe] Trouble understanding records and existential typesy

2007-01-26 Thread Chris Kuklewicz
John Meacham wrote: On Wed, Jan 24, 2007 at 05:03:18PM -0800, Stefan O'Rear wrote: Haskell-98 style records are widely acknowledged as sucking, and there are something like half a dozen proposals all of which are widely acknowledged as vastly superior. Expect to be stuck with H98 records for

Re: [Haskell-cafe] Re: IO in lists

2007-01-26 Thread Magnus Therning
You are suggesting later in this thread that the old ListT could be used to solve my initial problem. I don't see how, so I'm wondering if you'd mind sorting some things out for me? On Tue, Jan 23, 2007 at 11:59:58 +0200, Yitzchak Gale wrote: [..] test = do a - liftIO getChar guard $ a /= 'q'

Re: [Haskell-cafe] Trouble understanding records and existential types

2007-01-26 Thread Udo Stenzel
John Ky wrote: On 1/25/07, BBrraannddoonn SS.. AAllllbbeerryy KKFF88NNHH [EMAIL PROTECTED] wrote: I'm probably missing something, but: (a) Why not: data ANode = Branch { name :: String, description :: String, children :: [AnyNode] }

RE: [Haskell-cafe] proposal: HaBench, a Haskell Benchmark Suite

2007-01-26 Thread Simon Peyton-Jones
| Following up and the threads on haskell and haskell-cafe, I'd like to | gather ideas, comments and suggestions for a standarized Haskell | Benchmark Suite. Great idea. Maybe this can subsume nofib. I recommend reading the nofib paper though:

RE: [Haskell-cafe] Type infer

2007-01-26 Thread Marco Túlio Gontijo e Silva
Em Qui, 2007-01-25 às 16:58 +, Simon Peyton-Jones escreveu: | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marco | Túlio Gontijo e Silva | Sent: 25 January 2007 12:57 | To: haskell-cafe | Subject: Re: [Haskell-cafe] Type infer | | Em Qua,

Re: [Haskell-cafe] Re: ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Joel Reymont
On Jan 26, 2007, at 2:40 PM, Arie Peterson wrote: Using DrIFT would probably automate the deriving just as well, but in my particular situation TH support is easier to maintain than DrIFT support. May I ask why TH is easier to maintain than DrIFT? I'm not familiar with DrIFT. Why would

Re: [Haskell-cafe] Re: ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Dougal Stanton
Quoth Arie Peterson, nevermore, I also fear that the existing script does not handle types with more than 256 constructors correctly. While uncommon, those are not unrealistic. 256 constructors ought to be enough for anybody? ;-) Seriously though, the thought of a type definition that

[Haskell-cafe] Re: ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Arie Peterson
Joel Reymont wrote: May I ask why TH is easier to maintain than DrIFT? I'm not familiar with DrIFT. The reason is personal, and very silly. I only use ghc, so TH is available automatically. Like you, I have never used DrIFT, so I would have to get to know it, and install it everywhere I want

[Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

2007-01-26 Thread Al Falloon
Kenneth Hoste wrote: The idea is to gather a bunch of programs written in Haskell, and which are representative for the Haskell community (i.e. apps, libraries, ...). A While ago I tried to write a Haskell version of John Harrops ray-tracer benchmark

Re: [Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

2007-01-26 Thread David Roundy
On Fri, Jan 26, 2007 at 10:17:28AM -0500, Al Falloon wrote: Kenneth Hoste wrote: The idea is to gather a bunch of programs written in Haskell, and which are representative for the Haskell community (i.e. apps, libraries, ...). A While ago I tried to write a Haskell version of John Harrops

Re: [Haskell-cafe] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Henning Thielemann
On Fri, 26 Jan 2007, Donald Bruce Stewart wrote: Binary: high performance, pure binary serialisation for Haskell -- The Binary Strike Team is pleased to announce the release of a new, pure, efficient binary

Re: [Haskell-cafe] Re: ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Tomasz Zielonka
On Fri, Jan 26, 2007 at 03:12:29PM +, Dougal Stanton wrote: Quoth Arie Peterson, nevermore, I also fear that the existing script does not handle types with more than 256 constructors correctly. While uncommon, those are not unrealistic. 256 constructors ought to be enough for anybody?

[Haskell-cafe] Re: GHC concurrency runtime breaks every 497 (and a bit) days

2007-01-26 Thread Simon Marlow
Neil Davies wrote: I've prototyped a fix for this issue which will now only wrap every 585,000 years or so. It also removes the 1/50th of a second timer resolution for the runtime. This means that the additional 20ms (or thereabouts) of delay in the wakeup has gone. This means that GHC is now

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Tomasz Zielonka
On Fri, Jan 26, 2007 at 02:16:22PM +1100, Donald Bruce Stewart wrote: We believe so, and its a bug if this is not the case. The src documents the encoding format used for each type (we were unable to attach haddocks to instances.. grr.) All data is encoded in Network order, and extended to

Re: [Haskell-cafe] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Tomasz Zielonka
On Fri, Jan 26, 2007 at 04:31:28PM +0100, Henning Thielemann wrote: On Fri, 26 Jan 2007, Donald Bruce Stewart wrote: Binary: high performance, pure binary serialisation for Haskell -- The Binary Strike

[Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

2007-01-26 Thread Al Falloon
David Roundy wrote: On Fri, Jan 26, 2007 at 10:17:28AM -0500, Al Falloon wrote: Kenneth Hoste wrote: The idea is to gather a bunch of programs written in Haskell, and which are representative for the Haskell community (i.e. apps, libraries, ...). A While ago I tried to write a Haskell version

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Malcolm Wallace
Tomasz Zielonka [EMAIL PROTECTED] wrote: Did you consider using an encoding which uses variable number of bytes? If yes, I would be interested to know your reason for not choosing such an encoding. Efficiency? My Binary implementation (from 1998) used a type-specific number of bits to encode

[Haskell-cafe] Channel9 Interview: Software Composability and the Future of Languages

2007-01-26 Thread Neil Bartlett
No doubt many of you will have seen the interview[1] on Channel9 with Anders Hejlsberg, Herb Sutter, Erik Meijer and Brian Beckman. These are some of Microsoft's top language gurus, and they discuss the future evolution of programming languages. In particular they identify composability,

Re: [Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

2007-01-26 Thread Chris Kuklewicz
Al Falloon wrote: David Roundy wrote: On Fri, Jan 26, 2007 at 10:17:28AM -0500, Al Falloon wrote: Kenneth Hoste wrote: The idea is to gather a bunch of programs written in Haskell, and which are representative for the Haskell community (i.e. apps, libraries, ...). A While ago I tried to

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Neil Davies
existing ecoding system - both the BER (Basic Encoding Rules) and the PER (Packed Encoding Rules). If you are looking to target a well supported standard - this would be the one. Neil On 26/01/07, Malcolm Wallace [EMAIL PROTECTED] wrote: Tomasz Zielonka [EMAIL PROTECTED] wrote: Did you

[Haskell-cafe] Re: [Haskell] FW: A history of Haskell

2007-01-26 Thread Justin Bailey
On 1/25/07, Simon Peyton-Jones [EMAIL PROTECTED] wrote: Many of you will know that Paul Hudak, John Hughes, Phil Wadler and I have been working on a paper called A History of Haskell: being lazy with class Just wanted to say this paper is excellent, and actually a great tool for

Re: [Haskell-cafe] Channel9 Interview: Software Composability and theFu ture of Languages

2007-01-26 Thread Steve Schafer
On Fri, 26 Jan 2007 17:13:43 - (GMT), you wrote: world. It also highlights some of the misconceptions that still exist and need to be challenged, e.g. the idea that Haskell is too hard or is impractical for real work. Haskell _is_ hard, although I don't think it's _too_ hard, or I wouldn't

[Haskell-cafe] newTArrayIO

2007-01-26 Thread Chad Scherrer
This seems like a natural thing to have around, but it's not in GHC 6.6... newTArrayIO :: (Enum i, Ix i) = (i, i) - a - IO (TArray i a) newTArrayIO (a,b) = liftM (TArray . listArray (a,b)) . sequence . zipWith ignore [a..b] . repeat . newTVarIO where ignore = flip const I haven't done any

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread John Meacham
On Fri, Jan 26, 2007 at 04:36:50PM +0100, Tomasz Zielonka wrote: Did you consider using an encoding which uses variable number of bytes? If yes, I would be interested to know your reason for not choosing such an encoding. Efficiency? I am testing/benchmarking one right now I wrote for

Re: [Haskell-cafe] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread John Meacham
On Fri, Jan 26, 2007 at 04:42:48PM +0100, Tomasz Zielonka wrote: I also have to use a specific serialisation format. I guess we could both simply use putWord8, but then we'll probably lose most of the benefits of using the library. Perhaps we could think about introducing some encoding

[Haskell-cafe] Re: Channel9 Interview: Software Composability and theFu ture of Languages

2007-01-26 Thread Benjamin Franksen
Steve Schafer wrote: Neil Bartlett wrote: It also highlights some of the misconceptions that still exist and need to be challenged, e.g. the idea that Haskell is too hard or is impractical for real work. Haskell _is_ hard, although I don't think it's _too_ hard, or I wouldn't be here,

Re: [Haskell-cafe] Re: Channel9 Interview: Software Composability and theFu ture of Languages

2007-01-26 Thread Andrew Wagner
I thought it was very telling that, at the end of the interview, when the interview asked, In general, where is programming going?, the responses were all things that haskell is good at. Shame it's such an impractical language. On 1/26/07, Benjamin Franksen [EMAIL PROTECTED] wrote: Steve

Re: [Haskell-cafe] Re: ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread John Meacham
On Fri, Jan 26, 2007 at 03:40:42PM +0100, Arie Peterson wrote: Using DrIFT would probably automate the deriving just as well, but in my particular situation TH support is easier to maintain than DrIFT support. DrIFT as of 2.2.1 now supports binary for this package. using it is as simple as

Re: [Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

2007-01-26 Thread Jeremy Shaw
At Fri, 26 Jan 2007 07:23:26 -0800, David Roundy wrote: I would think that what we'd want to benchmark would be clean, optimized actually-used code. Maybe there should be two versions of each benchmark: 1) an clean, simple, idiomatic version, aka the code we would like to write if

Re: [Haskell-cafe] newTArrayIO

2007-01-26 Thread Mattias Bengtsson
On Fri, 2007-01-26 at 11:34 -0800, Chad Scherrer wrote: This seems like a natural thing to have around, but it's not in GHC 6.6... newTArrayIO :: (Enum i, Ix i) = (i, i) - a - IO (TArray i a) newTArrayIO (a,b) = liftM (TArray . listArray (a,b)) . sequence . zipWith ignore [a..b] . repeat .

Re: [Haskell-cafe] newTArrayIO

2007-01-26 Thread Mattias Bengtsson
On Fri, 2007-01-26 at 23:26 +0100, Mattias Bengtsson wrote: On Fri, 2007-01-26 at 11:34 -0800, Chad Scherrer wrote: This seems like a natural thing to have around, but it's not in GHC 6.6... newTArrayIO :: (Enum i, Ix i) = (i, i) - a - IO (TArray i a) newTArrayIO (a,b) = liftM (TArray

[Haskell-cafe] newbie timing question

2007-01-26 Thread Sean McLaughlin
Hello, I'm trying to write a simple function to time an application. -- this doesn't work time f x = do n1 - CPUTime.getCPUTime let res = f x in do n2 - CPUTime.getCPUTime return (res,n2 - n1) On a function that takes 8 seconds to complete, returns (True,4600)

Re: [Haskell-cafe] newbie timing question

2007-01-26 Thread Donald Bruce Stewart
seanmcl: Hello, I'm trying to write a simple function to time an application. -- this doesn't work time f x = do n1 - CPUTime.getCPUTime let res = f x in do n2 - CPUTime.getCPUTime return (res,n2 - n1) On a function that takes 8 seconds to complete,

Re: [Haskell-cafe] newbie timing question

2007-01-26 Thread Spencer Janssen
On Jan 26, 2007, at 4:56 PM, Sean McLaughlin wrote: Hello, I'm trying to write a simple function to time an application. -- this doesn't work time f x = do n1 - CPUTime.getCPUTime let res = f x in do n2 - CPUTime.getCPUTime return (res,n2 - n1) On a function that

Re: [Haskell-cafe] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Donald Bruce Stewart
lemming: On Fri, 26 Jan 2007, Donald Bruce Stewart wrote: Binary: high performance, pure binary serialisation for Haskell -- The Binary Strike Team is pleased to announce the release of a new,

Re: [Haskell-cafe] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Donald Bruce Stewart
tomasz.zielonka: On Fri, Jan 26, 2007 at 04:31:28PM +0100, Henning Thielemann wrote: On Fri, 26 Jan 2007, Donald Bruce Stewart wrote: Binary: high performance, pure binary serialisation for Haskell

Re: [Haskell-cafe] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Donald Bruce Stewart
john: On Fri, Jan 26, 2007 at 04:42:48PM +0100, Tomasz Zielonka wrote: I also have to use a specific serialisation format. I guess we could both simply use putWord8, but then we'll probably lose most of the benefits of using the library. Perhaps we could think about introducing some

Re: [Haskell-cafe] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Chris Kuklewicz
Donald Bruce Stewart wrote: lemming: On Fri, 26 Jan 2007, Donald Bruce Stewart wrote: Binary: high performance, pure binary serialisation for Haskell -- The Binary Strike Team is pleased to announce the

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: binary: high performance, pure binary serialisation

2007-01-26 Thread Donald Bruce Stewart
tomasz.zielonka: On Fri, Jan 26, 2007 at 02:16:22PM +1100, Donald Bruce Stewart wrote: We believe so, and its a bug if this is not the case. The src documents the encoding format used for each type (we were unable to attach haddocks to instances.. grr.) All data is encoded in

Re: [Haskell-cafe] newbie timing question

2007-01-26 Thread Cale Gibbard
On 26/01/07, Sean McLaughlin [EMAIL PROTECTED] wrote: Hello, I'm trying to write a simple function to time an application. -- this doesn't work time f x = do n1 - CPUTime.getCPUTime let res = f x in do n2 - CPUTime.getCPUTime return (res,n2 - n1) On a function

Re: [Haskell-cafe] Concurrency in Haskell

2007-01-26 Thread Alexy Khrabrov
Well, I'm a bit suspicious if the top references on Haskell concurrency are either research papers or compiler manual sections. How about some good ol' bundles of them codes to peruse and take example from? E.g., dining philosophers? Cheers, Alexy ___

Re: [Haskell-cafe] Concurrency in Haskell

2007-01-26 Thread Donald Bruce Stewart
deliverable: Well, I'm a bit suspicious if the top references on Haskell concurrency are either research papers or compiler manual sections. How about some good ol' bundles of them codes to peruse and take example from? E.g., dining philosophers? The point was that there are *lots* of

Re: [Haskell-cafe] Channel9 Interview: Software Composability and the Future of Languages

2007-01-26 Thread Tim Newsham
impractical language, only useful for research. Erik Meijer at one point states that programming in Haskell is too hard and compares it to assembly programming! He brings up a very good point. Using a monad lets you deal with side effects but also forces the programmer to specify an exact

Re: [Haskell-cafe] Channel9 Interview: Software Composability and theFu ture of Languages

2007-01-26 Thread Collin Winter
On 1/26/07, Steve Schafer [EMAIL PROTECTED] wrote: On Fri, 26 Jan 2007 17:13:43 - (GMT), you wrote: world. It also highlights some of the misconceptions that still exist and need to be challenged, e.g. the idea that Haskell is too hard or is impractical for real work. Haskell _is_ hard,

Re: [Haskell-cafe] Channel9 Interview: Software Composability and theFu ture of Languages

2007-01-26 Thread Kirsten Chevalier
On 1/26/07, Collin Winter [EMAIL PROTECTED] wrote: You have a PhD in computer science from Princeton, so your measure of what's hard and what isn't in this regard is nearly worthless. I find it incredibly insulting for you to assert that people who complain about Haskell's difficulty are too

Re: [Haskell-cafe] Channel9 Interview: Software Composability and theFu ture of Languages

2007-01-26 Thread Donald Bruce Stewart
catamorphism: On 1/26/07, Collin Winter [EMAIL PROTECTED] wrote: You have a PhD in computer science from Princeton, so your measure of what's hard and what isn't in this regard is nearly worthless. I find it incredibly insulting for you to assert that people who complain about Haskell's