Re: [Haskell-cafe] performance question

2005-01-18 Thread John Meacham
On Mon, Jan 17, 2005 at 08:54:38PM -0800, Ben Rudiak-Gould wrote: If performance is the main concern, I would flatten the data structure: data Interval = IlII Double Double | IlIE Double Double | IlEI Double Double | IlEE Double Double

[Haskell-cafe] RE: Answers to Exercises in Craft of FP

2005-01-18 Thread David Owen
Gour ([EMAIL PROTECTED]) wrote RE- : Do you know if there are solutions to exersises available somewhere? Have you gone through the whole book, i.e. all the exercises? Sincerely, Gour Hi Gour, Unfortuantely I don't know of anywhere that the exercise answers can be found, even after some google

[Haskell-cafe] Math libraries for Haskell

2005-01-18 Thread Dmitri Pissarenko
Hello! Is there a math library for Haskell, using which one can calculate eigenvalues of matrices? Thanks in advance Dmitri Pissarenko -- Dmitri Pissarenko Software Engineer http://dapissarenko.com ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Math libraries for Haskell

2005-01-18 Thread John Meacham
On Tue, Jan 18, 2005 at 08:25:46PM +0100, Dmitri Pissarenko wrote: Hello! Is there a math library for Haskell, using which one can calculate eigenvalues of matrices? There is a binding to BLAS/LAPACK at http://www.isi.edu/~hdaume/HBlas/ but it might be too heavyweight for just calculating

Re: [Haskell-cafe] Math libraries for Haskell

2005-01-18 Thread Dmitri Pissarenko
Are you interested in seeing Haskell implementation of these algorithms, or are you interested in using eignevalues in some Haskell program? I am interested in using eigenvalues in a Haskell program. This seems like a perfect candidate for using FFI if you're just looking for fast eigenvalue

Re: [Haskell-cafe] Math libraries for Haskell

2005-01-18 Thread Sebastian Sylvan
On Tue, 18 Jan 2005 20:41:28 +0100, Dmitri Pissarenko [EMAIL PROTECTED] wrote: Are you interested in seeing Haskell implementation of these algorithms, or are you interested in using eignevalues in some Haskell program? I am interested in using eigenvalues in a Haskell program. This

[Haskell-cafe] About instance

2005-01-18 Thread Ulises Juarez Martinez
Hi. I have the next definitions: type Ocurrence = (String, Int) type Inside = [Ocurrence] data Pattern = Return Inside | Abort | Filter (Ocurrence - Bool) Pattern beyond :: Pattern - Pattern beyond (Filter pred Abort) = Abort -- more definitions of beyond optimous :: Pattern - Pattern optimous p

Re: [Haskell-cafe] About instance

2005-01-18 Thread Jules Bean
On 18 Jan 2005, at 21:45, Ulises Juarez Martinez wrote: Who can I do an instance of Eq (Ocurrence - Bool)? Is there another option to avoid the error? In general, you can't define one. To define equality on functions you want to check the value on every possible input, and since Ocurrence is

[Haskell-cafe] Re: Why is getArgs in the IO monad?

2005-01-18 Thread Ashley Yakeley
In article [EMAIL PROTECTED], Keean Schupke [EMAIL PROTECTED] wrote: Surely both requirements can be satisfied if the programs arguments are made parameters of main: main :: [String] - IO () Keean. Better yet, it should be an implicit parameter so as not to break existing programs.

Re: [Haskell-cafe] Re: Hugs vs GHC (again)was: Re: Somerandomnewbiequestions

2005-01-18 Thread Duncan Coutts
On Tue, 2005-01-18 at 22:52 +, Glynn Clements wrote: Ben Rudiak-Gould wrote: Essentially, reading data from regular files is always deemed to occur soon, so the usual mechanisms for dealing with slow I/O (i.e. pipes, FIFOs, character devices, sockets) don't work. This applies equally to

[Haskell-cafe] Re: [Haskell] Re: Why is getArgs in the IO monad?

2005-01-18 Thread Marcin 'Qrczak' Kowalczyk
Keean Schupke [EMAIL PROTECTED] writes: Surely both requirements can be satisfied if the programs arguments are made parameters of main: main :: [String] - IO () From info '(libc)Error Messages', about program_invocation_name and program_invocation_short_name: *Portability Note:* These

Re: [Haskell-cafe] Re: Books on Haskell

2005-01-18 Thread Matthew Roberts
Haskell wiki pages for this stuff? I presume you would need the authors/publishers permission. I am 62 pages into Implementing Functional Languages: a tutorial and would be happy to put up the solutions I have so far (with appropriate permission of course). The advantage of the wiki is that

[Haskell-cafe] styles

2005-01-18 Thread Matthew Roberts
Haskell seems to be a language that allows for lots of different programming styles. The most obvious being pointed v.s. point free. As a programmer born and raised on OO - I have found the pointed style to suit me better. However, there are other distinctions. I heavily use let in and

[Haskell-cafe] Re: performance question (John Meacham)

2005-01-18 Thread Stijn De Saeger
thanks Ben and John, your ideas looked like they may speed up things indeed, so i went along with them and reimplemented the whole thing to my surprise, the program got considerably slower even ! here is the new code. data ILtype = II | IE | EI | EE | NII | NIE | NEI | NEE deriving (Eq,