Re: [Haskell-cafe] strictness and the simple continued fraction

2004-10-11 Thread William Lee Irwin III
On Mon, Oct 11, 2004 at 09:53:16PM -0400, Scott Turner wrote: > I tried using continued fractions in a "spiffy lazy list" implementation a > while ago. Never got them working as well as expected. > Evenutally I realized that calculating with lazy lists is not as > smooth as you might expect. > Fo

Re: [Haskell-cafe] strictness and the simple continued fraction

2004-10-11 Thread Scott Turner
On 2004 October 09 Saturday 15:33, William Lee Irwin III wrote: > So, I discovered that simple continued fractions are supposed to be > spiffy lazy lists and thought I'd bang out some continued fraction code. > But then I discovered ContFrac.hs and couldn't really better it. Of > course, I went abo

Re: [Haskell-cafe] Re: OCaml list sees abysmal Language Shootout results

2004-10-11 Thread Greg Buchholz
Malcolm Wallace wrote: > For instance, the shootout often requires that a task be carried out N > times, to make the timings large enough to measure. In all the naive > Haskell implementations of these tasks, Haskell wins by a mile. Why? > Because the language quite reasonably says that if you mu

Re: [Haskell-cafe] Re: OCaml list sees abysmal Language Shootout results

2004-10-11 Thread Brian Smith
On Mon, 11 Oct 2004 14:16:36 -0700, John Meacham <[EMAIL PROTECTED]> wrote: > n Mon, Oct 11, 2004 at 12:22:13PM +0100, Malcolm Wallace wrote: > > So is it fair to compare the default lazy Haskell solution with all > > the eager solutions out there that laboriously do all this unnecessary > > work?

Re: [Haskell-cafe] Re: OCaml list sees abysmal Language Shootout results

2004-10-11 Thread John Meacham
n Mon, Oct 11, 2004 at 12:22:13PM +0100, Malcolm Wallace wrote: > "karczma" <[EMAIL PROTECTED]> writes: > > > > I think the Haskell community has just been a bit slower in understanding > > > the importance of strictness :) > > > > OK, I admit that I will never understand these complaints about t

Re: [Haskell-cafe] Being Compatible

2004-10-11 Thread Graham Klyne
At 10:47 08/10/04 +0100, Malcolm Wallace wrote: John Goerzen <[EMAIL PROTECTED]> writes: > My initial thought was to use the cpp-style ifdefs I've seen elsewhere > to mask those unsupported features on those particular systems. But > Hugs at least doesn't support that, and I've found it extremely

[Haskell-cafe] Re: Tutorial about low-level I/O in Haskell

2004-10-11 Thread Ferenc Wagner
Peter Simons <[EMAIL PROTECTED]> writes: > http://cryp.to/blockio/docs/tutorial.html Pretty neat. Wouldn't it be a nice addition to the Tutorials section on the Haskell Bookshelf? Note: as I gather, GHC's lists are not doubly linked. -- Feri. ___ H

Re: [Haskell-cafe] Re: OCaml list sees abysmal Language Shootout results

2004-10-11 Thread Ronny Wichers Schreur
Jerzy Karczmarczuk writes (in the Haskell cafe): OK, I admit that I will never understand these complaints about the inefficiency of non-strict computations, since what I *require* in most of my work is laziness. Had I needed strictness for the sake of efficiency, I would use a different language i

Re: [Haskell-cafe] Re: OCaml list sees abysmal Language Shootout results

2004-10-11 Thread Malcolm Wallace
"karczma" <[EMAIL PROTECTED]> writes: > > I think the Haskell community has just been a bit slower in understanding > > the importance of strictness :) > > OK, I admit that I will never understand these complaints about the > inefficiency of non-strict computations, since what I *require* in most

Re: [Haskell-cafe] Re: OCaml list sees abysmalLanguage Shootoutresults

2004-10-11 Thread MR K P SCHUPKE
>No, you still have to copy "" so you can change the tail pointer Do you? If "" is treated as a single buffer contents (IE implemented as a UArray Int Char for example) then as our 'new' list implementation# can have cells which are single elements of buffers of elements, we simply 'cons'

RE: [Haskell-cafe] empty Array?

2004-10-11 Thread Josef Svenningsson
> It is, of course, trivial to implement this for lists. I've run into > a snag, however, when trying to implement this for Arrays (as in > Data.Array) - I can't seem to find a way to represent an empty array, > which makes implementing 'empty' and 'null' impossible. Suggestions? > Empty arrays

Re: [Haskell-cafe] Re: OCaml list sees abysmalLanguage Shootoutresults

2004-10-11 Thread Keith Wansbrough
> This would also benefit string processing... Imagine: > > test = "" ++ "" > > This could be implented as two list cells, one for each string, anf > the cost of the "++" becomes the same as the cost of ":" No, you still have to copy "" so you can change the tail pointer - but at lea