[Haskell-cafe] Seeking reference(s) relating to FP performance

2004-09-29 Thread Graham Klyne
I've taken it as an article of faith that performance of FP language implementations has been improving quite steadily over the past few years. I'd like to assert this, but I can't find any clear evidence to support such an assertion. I note that the about Haskell page makes a similar

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

2004-09-29 Thread Graham Klyne
At 10:55 28/09/04 +0100, Malcolm Wallace wrote: Keith Wansbrough [EMAIL PROTECTED] writes: I can't believe that a simple wc implementation should be 570 times slower in Haskell than OCaml - could someone investigate and fix the test? With code like this, I'm not surprised! main =

Re: [Haskell-cafe] Question about function on data type

2004-09-29 Thread Mike Gunter
There's the following alternative. mike data TermOp = TermAnd | TermOr deriving (Show, Eq) data Term = Not Term | Op Term TermOp Term | Literal Char deriving Show assoc (Op (Op t1 op1_2 t2) op12_3 t3) | op1_2 == op12_3 = Op t1 op1_2 (Op t2

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

2004-09-29 Thread Tomasz Zielonka
On Wed, Sep 29, 2004 at 01:41:03PM +0100, Graham Klyne wrote: With code like this, I'm not surprised! main = do file - getContents putStrLn $ show (length $ lines file) ++ ++ show (length $ words file) ++ ++ show

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

2004-09-29 Thread Aaron Denney
On 2004-09-29, Tomasz Zielonka [EMAIL PROTECTED] wrote: I remember SPJ's motto: ,,Avoid success at all cost''. Is this motto still valid? Maybe. The existing user-base is being used as an argument for not doing the right thing with regards to binary-IO, strings, localization and text IO. --

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

2004-09-29 Thread Malcolm Wallace
Graham Klyne [EMAIL PROTECTED] writes: main = do file - getContents putStrLn $ show (length $ lines file) ++ ++ show (length $ words file) ++ ++ show (length file) Space-leak or what? I can see that this

[Haskell-cafe] Re: Seeking reference(s) relating to FP performance

2004-09-29 Thread John Goerzen
On 2004-09-29, Graham Klyne [EMAIL PROTECTED] wrote: I've taken it as an article of faith that performance of FP language implementations has been improving quite steadily over the past few years. I'd like to assert this, but I can't find any clear evidence to One place to start is the

[Haskell-cafe] Rethinking OO idioms

2004-09-29 Thread John Goerzen
I've worked with languages with object-oriented features for awhile now. Python and OCaml, the two with which I work the most, both have OO. One of my first projects in Haskell would be to write a Haskell version of Python's ConfigParser[1] class. I wrote[2],[3] a version of this for OCaml that

Re: [Haskell-cafe] Rethinking OO idioms

2004-09-29 Thread Ben . Yu
You can use state monad to mimic mutation. Also, take a look at the recursive decent monadic parsec library. It may have done what you are trying to do. Regards, Ben.

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

2004-09-29 Thread Sam Mason
Greg Buchholz wrote: The algorithm isn't correct (it counts spaces instead of words), but anyone have advice for improving its performance? You probably want some strictness annotations in there. . . When I tried the same thing, I came up with something like: import Char; cclass c | isSpace

[Haskell-cafe] Re: Rethinking OO idioms

2004-09-29 Thread John Goerzen
On 2004-09-29, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: You can use state monad to mimic mutation. Is that really what I want? In other words, is there a completely different, more Haskellish, way to look at this? Also, take a look at the recursive decent monadic parsec library. It may

Re: [Haskell-cafe] Compiling GHC for AIX5.1L

2004-09-29 Thread Donald Bruce Stewart
jgoerzen: Hello, Following the directions at http://www.haskell.org/ghc/docs/6.2.1/html/building/sec-porting-ghc.html#UNREGISTERISED-PORTING... I have a Debian unstable system on i386 as the host machine and an IBM PowerPC system as the target. I have configured the files as specified

[Haskell-cafe] Re: Seeking reference(s) relating to FP performance

2004-09-29 Thread Einar Karttunen
On 29.09 19:00, John Goerzen wrote: 3. ghc doesn't seem to do very well in terms of performance, though it does at least beat out Java in many cases. Please note that many of the GHC programs are not posed for performance, but rather elegance. E.g. the nestedloop got seven times faster with