Re: [Haskell-cafe] Where do you use Haskell?

2005-05-04 Thread Ben Lippmeier
Many aspects of functional programming are generalisations of what goes on in imperative languages. Huh? In which sense is that? All senses? examples: * I would say that let-polymorphic HM style type inference (with type classes) is a generalisation of C/C++/Java style type checking + operator o

Re: [Haskell-cafe] Where do you use Haskell?

2005-05-04 Thread Michael Walter
On 5/3/05, Ben Lippmeier <[EMAIL PROTECTED]> wrote: > Many aspects of functional programming are generalisations of what goes > on in imperative languages. Huh? In which sense is that? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.has

Re: [Haskell-cafe] NumberTheory library

2005-05-04 Thread ajb
G'day all. Quoting Bo Herlin <[EMAIL PROTECTED]>: > But there are functions that I cant find and that I assume others before > me must have missed and then perhaps also implemented them. > Is there any standard library with functions like: > > binomial > isCatalan > nthCatalan > nextCatalan > isP

Re: [Haskell-cafe] Conal Elliott's Vertigo, anyone get it to run?

2005-05-04 Thread Sebastian Sylvan
On 5/5/05, Atwood, John Wesley <[EMAIL PROTECTED]> wrote: > I tried to run Conal Elliott's Vertigo demos, on 3 diffferent XP boxes; > it ran on none. The error is "Common Language Runtime Services - > Appication has generated an exception that could not be handled. > Process id=, Thread id=xx

Re: [Haskell-cafe] resolving missing class instances @ compile time

2005-05-04 Thread Bernard Pope
On Wed, 2005-05-04 at 17:18 -0700, Greg Buchholz wrote: > Here's a little quirk I ran into recently. While making a little > vector data type in class Num (code below), I didn't implement an > instance of "fromInteger" (thinking I didn't need it). Well as you can > probably guess, it turns ou

[Haskell-cafe] Conal Elliott's Vertigo, anyone get it to run?

2005-05-04 Thread Atwood, John Wesley
I tried to run Conal Elliott's Vertigo demos, on 3 diffferent XP boxes; it ran on none. The error is "Common Language Runtime Services - Appication has generated an exception that could not be handled. Process id=, Thread id=". Any suggestions? http://conal.net/Vertigo/ John A

[Haskell-cafe] resolving missing class instances @ compile time

2005-05-04 Thread Greg Buchholz
Here's a little quirk I ran into recently. While making a little vector data type in class Num (code below), I didn't implement an instance of "fromInteger" (thinking I didn't need it). Well as you can probably guess, it turns out I did need it, and subsequently got a run time exception. Wh

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Benjamin Franksen
On Wednesday 04 May 2005 23:24, [EMAIL PROTECTED] wrote: > Benjamin Franksen writes: > > [EMAIL PROTECTED] wrote: > >> Bryce Bockman writes: > >> > >> Don't confuse categories please. SICP doesn't say how to make a lazy > >> variant of Scheme. Applicative protocol is not normal protocol, the > >> r

Re: [Haskell-cafe] Re: Haskell vs OCaml

2005-05-04 Thread Jacques Carette
There is also Template Haskell vs MetaOCaml. For the life of me, I still cannot fathom why Template Haskell is untyped, while MetaOCaml is fully typed. Which is the main reason I write meta-program in MetaOCaml and 'other' programs in Haskell. There is the additional aspect that my meta-programs

Re: [Haskell-cafe] Re: Speed comparison?

2005-05-04 Thread David Roundy
On Wed, May 04, 2005 at 07:20:20PM +, Aaron Denney wrote: > On 2005-05-03, David Roundy <[EMAIL PROTECTED]> wrote: > > An interesting challenge would be to rewrite fftw in haskell, and see how > > close one could come to the performance of the original... :) > > What precisely do you mean by t

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread karczma
Benjamin Franksen writes: [EMAIL PROTECTED] wrote: Bryce Bockman writes: Don't confuse categories please. SICP doesn't say how to make a lazy variant of Scheme. Applicative protocol is not normal protocol, the reduction is, as it is. We may have a different copy of SICP, but in mine (2nd editio

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Jacob Nelson
On Wed, 4 May 2005, Benjamin Franksen wrote: We may have a different copy of SICP, but in mine (2nd edition) there is Chapter 4.2 "Variantions on a Scheme -- Lazy Evaluation" and in particular 4.2.2 "An Interpreter with Lazy Evaluation". Here's the direct link: http://mitpress.mit.edu/sicp/full-te

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Michael Vanier
> From: Benjamin Franksen <[EMAIL PROTECTED]> > Date: Wed, 4 May 2005 22:47:21 +0200 > > On Wednesday 04 May 2005 22:22, [EMAIL PROTECTED] wrote: > > Bryce Bockman writes: > > > Scheme is strict, so it lacks some of the flexibility (and drawbacks) > > > that come from Laziness, but in the book the

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Bryce Bockman
I was trying to draw an analogy between imperitive and functional language development over time. In both cases we seem to have a progression towards More complicated type systems etc. That was really my only point. To say C is to Imperative languages as Scheme is to functional languages does

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Benjamin Franksen
On Wednesday 04 May 2005 22:22, [EMAIL PROTECTED] wrote: > Bryce Bockman writes: > > Scheme is strict, so it lacks some of the flexibility (and drawbacks) > > that come from Laziness, but in the book they teach you how to build a > > Lazy version of Scheme, which is instructive in understanding wha

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread karczma
Bryce Bockman writes: If it is syntactical simplicity that you like you might want to learn Scheme as an introduction to FP. I'm no expert on either Scheme or Haskell, but we all have to agree it is an elegant language. I'm currently teaching myself the two in parallel, and I find that schem

Re: [Haskell-cafe] Re: Speed comparison?

2005-05-04 Thread Greg Buchholz
Aaron Denney wrote: > On 2005-05-03, David Roundy <[EMAIL PROTECTED]> wrote: > > An interesting challenge would be to rewrite fftw in haskell, and see how > > close one could come to the performance of the original... :) > > What precisely do you mean by that? FFTW is C code generated by OCaml? >

[Haskell-cafe] Re: Speed comparison?

2005-05-04 Thread Aaron Denney
On 2005-05-03, David Roundy <[EMAIL PROTECTED]> wrote: > An interesting challenge would be to rewrite fftw in haskell, and see how > close one could come to the performance of the original... :) What precisely do you mean by that? FFTW is C code generated by OCaml? Do you want to retarget ti so t

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Bryce Bockman
Daniel, If it is syntactical simplicity that you like you might want to learn Scheme as an introduction to FP. I'm no expert on either Scheme or Haskell, but we all have to agree it is an elegant language. I'm currently teaching myself the two in parallel, and I find that scheme is sort of th

Re: [Haskell-cafe] Re: Haskell vs OCaml

2005-05-04 Thread Quinn Dunkan
On 5/3/05, Michael Vanier <[EMAIL PROTECTED]> wrote: > Lazy evaluation does make some kinds of idioms possible that are much > harder to do with strict evaluation. For instance, here is an infinite > list of ones: You get something a lot like backtracking automatically by just having your parser

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Hamilton Richards
At 7:40 AM -0400 2005/5/4, Daniel Carrera wrote: [...] I have a file called Test.hs and load it with ':l Test'. Then I start exprimenting. I make a small change and type ':l Test' again. So it's almost interactive, and not excessively akward. You can get the same result by typing just ':r' (means

[Haskell-cafe] Re: NumberTheory library

2005-05-04 Thread Peter Simons
The list found at http://haskell.org/libraries/#numerics might be a good starting point for finding what you need. I can recommend the "DoCon" library, which is pretty sophisticated. Another good choice might be the crypto library available at: http://www.haskell.org/crypto/ It also includ

[Haskell-cafe] NumberTheory library

2005-05-04 Thread Bo Herlin
Hi I've been running Hugs for a couple of weeks now and I'm slowly starting to get the Haskell idea, and I certanly like it! But there are functions that I cant find and that I assume others before me must have missed and then perhaps also implemented them. Is there any standard library with func

Re: [Haskell-cafe] Re: Haskell vs OCaml

2005-05-04 Thread robert dockins
That leaves one aspect of Haskell vs Ocaml I don't yet understand. What are the advantages of lazy evaluation? I'd recommend this paper (once again): http://www.md.chalmers.se/~rjmh/Papers/whyfp.html One of the main points of the paper is that lazy evaluation enables a new way of modularizing cod

Re: [Haskell-cafe] Speed comparison?

2005-05-04 Thread Daniel Carrera
John Hughes wrote: Benchmarks give a very one-sided view, ignoring the large effect that ease of programming can have on the final system's performance. Good point. Ease of programming helps you make /correct/ programs quicker, and some times allows you to use more advanced algorithms that you w

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Daniel Carrera
Hi Jerzy, Thank you for your thorough response. I will archive it and come back to it as a reference. As I learn more about FP features (e.g. Monads) I'll be able to get more from your description. But just a quick note: 4. A general observation about the use of both languages by a beginner who

Re: [Haskell-cafe] Speed comparison?

2005-05-04 Thread John Hughes
Furthermore, the Haskell page says that ghc produces fast programs. So I would guess that Haskell is faster than Python, but not as fast as C. Would that be correct? Usually yes. In a sense. I think it's important to remember that what matters is performance of a whole application, not of

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Tomasz Zielonka
On Wed, May 04, 2005 at 05:11:37AM -0400, Daniel Carrera wrote: > Hi all, > > Anyone here familiar with the Clean programming language? > > http://www.cs.ru.nl/~clean/ > > It looks /very/ similar to Haskell, both in functionality and syntax. > > I would be grateful for any sort of comparison. I

Re: [Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Jerzy Karczmarczuk
Daniel Carrera wrote: Hi all, Anyone here familiar with the Clean programming language? http://www.cs.ru.nl/~clean/ It looks /very/ similar to Haskell, both in functionality and syntax. I would be grateful for any sort of comparison. I'm trying to decide which language I should try to learn. I se

RE: [Haskell-cafe] Mutual recursive modules with GHC: Classes, instances

2005-05-04 Thread Henning Thielemann
On Wed, 4 May 2005, Simon Peyton-Jones wrote: I'm afraid so, as of today. It's the kind of thing that could get fixed if enough people wanted it, but at the moment it's pretty low on the list. Mutual dependent classes in separate modules are a consequence of rigorously defining exactly one class

[Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Krasimir Angelov
If you want to compare Haskell and Clean then take a look at Object I/O library. It is ported to Haskell and you can learn a lot comparing both implementations. I spent a lot of time translating Clean functions to Haskell and my own impression is that Haskell's do notation is much more easier that

RE: [Haskell-cafe] Mutual recursive modules with GHC: Classes, instances

2005-05-04 Thread Simon Peyton-Jones
I'm afraid so, as of today. It's the kind of thing that could get fixed if enough people wanted it, but at the moment it's pretty low on the list. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | Henning Thielemann | Sent: 04 May 2005 10:31 |

RE: [Haskell-cafe] Mutual recursive modules with GHC: Classes, instances

2005-05-04 Thread Henning Thielemann
On Wed, 4 May 2005, Simon Peyton-Jones wrote: hi-boot files can't contain class declarations. This should be checked, but isn't, hence puzzling message. GHC 6.4 has a better setup. Actually, it still doesn't check for absence of class decls, but it will shortly. This means it is impossible to de

RE: [Haskell-cafe] Mutual recursive modules with GHC: Classes, instances

2005-05-04 Thread Simon Peyton-Jones
hi-boot files can't contain class declarations. This should be checked, but isn't, hence puzzling message. GHC 6.4 has a better setup. Actually, it still doesn't check for absence of class decls, but it will shortly. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [Haskell-cafe] Re: Haskell vs OCaml

2005-05-04 Thread Marcin 'Qrczak' Kowalczyk
Donn Cave <[EMAIL PROTECTED]> writes: > I have been able to build ocaml everywhere I have wanted it, including > the native code compiler. And it builds itself much faster than GHC. (I couldn't measure how much, because GHC didn't build at all, failing to find HsBaseConfig.h.in.) -- __("<

[Haskell-cafe] Comparison with Clean?

2005-05-04 Thread Daniel Carrera
Hi all, Anyone here familiar with the Clean programming language? http://www.cs.ru.nl/~clean/ It looks /very/ similar to Haskell, both in functionality and syntax. I would be grateful for any sort of comparison. I'm trying to decide which language I should try to learn. Cheers, Daniel. __

[Haskell-cafe] Mutual recursive modules with GHC: Classes, instances

2005-05-04 Thread Henning Thielemann
I tried to set up mutual recursive modules according to section 4.6.10. of the manual of GHC-6.2.2. I illustrate my problems with a simple fictitious example. A.hi-boot module A where class GHC.Num.Num a => C a where answer :: a f :: B.T -> GHC.Num.Int A.hs module A where

Re: [Haskell-cafe] Speed comparison?

2005-05-04 Thread Gracjan Polak
Daniel Carrera wrote: > Hi all, > > Thank you for all the information on my previous question. I learned a > lot, and good pointers to more info. > > My next question is about speed. How fast would you consider Haskell? > (say, for computational work). How would you compare it to C, Python and > Ru

Re: [Haskell-cafe] Re: Haskell vs OCaml

2005-05-04 Thread Erik de Castro Lopo
On Wed, 4 May 2005 03:02:58 -0400 [EMAIL PROTECTED] wrote: > Quoting Erik de Castro Lopo <[EMAIL PROTECTED]>: > > > Yes, but only if your functions are impure. > > Wrong. An unevaluated thunk can, in general, be much larger than what > the thunk evaluates to. (Think of "length" of a large lis

Re: [Haskell-cafe] Re: Haskell vs OCaml

2005-05-04 Thread ajb
G'day all. On Tue, 3 May 2005 21:04:46 -0700 Andrew Pimlott <[EMAIL PROTECTED]> wrote: > > The advantage of lazy evaluation is that evaluation order becomes one > > less thing you have to think about. Quoting Erik de Castro Lopo <[EMAIL PROTECTED]>: > Yes, but only if your functions are pure.