[Haskell-cafe] Haskell Speed Myth

2008-08-23 Thread Thomas Davie
Lo guys, I thought you'd like to know about this result. I've been playing with the debian language shootout programs under OS X, looking at how fast Haskell code is compared to C on OS X, rather than linux. Interestingly, Haskell comes out rather better on OS X than it did on Linux.

[Haskell-cafe] Re: [Haskell] Another First course in Haskell

2008-08-23 Thread Johannes Waldmann
Piyush P Kurur wrote: ( http://article.gmane.org/gmane.comp.lang.haskell.general/16390 ) I am planing a haskell based functional programming course. It is supposed to be a first course and I intend to show how real world applications can be built quite easily in haskell. Any feed back

Re: [Haskell-cafe] Real World Haskell hits a milestone

2008-08-23 Thread Bryan O'Sullivan
On Fri, Aug 22, 2008 at 1:46 PM, Daryoush Mehrtash [EMAIL PROTECTED] wrote: Are the book's sample code available for download? Not yet. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Type family fun

2008-08-23 Thread Chris Eidhof
Hey all, I was playing around with type families, and I have a strange problem. Suppose we have an alternative to an Either datatype: data (:|:) a b = Inl a | Inr b and a class Ix: class Ix i where type IxMap i :: * - * empty :: IxMap i [Int] Now I want to give an instance for (a

Re: [Haskell-cafe] Haskell Speed Myth

2008-08-23 Thread Luke Palmer
2008/8/23 Thomas Davie [EMAIL PROTECTED]: Finally, that threading example... WOW! 65 times faster, and the code is *really* simple. The C on the other hand is a massive mess. I've been wondering about this, but I can't check because I don't have a multi core cpu. I've heard GHC's single

Re: [Haskell-cafe] Type family fun

2008-08-23 Thread Alexander Dunlap
On Sat, Aug 23, 2008 at 7:55 AM, Chris Eidhof [EMAIL PROTECTED] wrote: Hey all, I was playing around with type families, and I have a strange problem. Suppose we have an alternative to an Either datatype: data (:|:) a b = Inl a | Inr b and a class Ix: class Ix i where type IxMap i ::

Re: [Haskell-cafe] Haskell Speed Myth

2008-08-23 Thread Thomas Davie
On 23 Aug 2008, at 20:01, Luke Palmer wrote: 2008/8/23 Thomas Davie [EMAIL PROTECTED]: Finally, that threading example... WOW! 65 times faster, and the code is *really* simple. The C on the other hand is a massive mess. I've been wondering about this, but I can't check because I don't

[Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Thomas Davie
Today I made an interesting discovery. We all know the benefits of a strong type system, and often tout it as a major advantage of using Haskell. The discovery I made, was that C programmer don't realise the implications of that, as this comment highlights:

Re: [Haskell-cafe] Re: [Haskell] Another First course in Haskell

2008-08-23 Thread Don Stewart
It seems to me we should condense this thread into a series of new entires on the Haskell in Education page? People seem to be doing new courses, and new kinds of courses, in Haskell, so reflecting that online is a good idea. http://haskell.org/haskellwiki/Haskell_in_education waldmann:

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Matus Tejiscak
On So, 2008-08-23 at 22:16 +0200, Thomas Davie wrote: Today I made an interesting discovery. We all know the benefits of a strong type system, and often tout it as a major advantage of using Haskell. The discovery I made, was that C programmer don't realise the implications of that, as

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Thomas Davie
On 23 Aug 2008, at 22:36, Matus Tejiscak wrote: On So, 2008-08-23 at 22:16 +0200, Thomas Davie wrote: Today I made an interesting discovery. We all know the benefits of a strong type system, and often tout it as a major advantage of using Haskell. The discovery I made, was that C

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Tim Newsham
I guess I didn't express my point very clearly... That C programmers apparently don't realise that a type system that's sound will give them something -- i.e. their programmer won't ever segfault. I wonder when we try to advertise Haskell if we should be saying we can give you programs that

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Don Stewart
newsham: I guess I didn't express my point very clearly... That C programmers apparently don't realise that a type system that's sound will give them something -- i.e. their programmer won't ever segfault. I wonder when we try to advertise Haskell if we should be saying we can give you

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Thomas Davie
On 23 Aug 2008, at 23:10, Tim Newsham wrote: I guess I didn't express my point very clearly... That C programmers apparently don't realise that a type system that's sound will give them something -- i.e. their programmer won't ever segfault. I wonder when we try to advertise Haskell if

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Maarten Hazewinkel
On 23 Aug 2008, at 23:10, Tim Newsham wrote: I guess I didn't express my point very clearly... That C programmers apparently don't realise that a type system that's sound will give them something -- i.e. their programmer won't ever segfault. I wonder when we try to advertise Haskell if

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread C.M.Brown
I guess I didn't express my point very clearly... That C programmers apparently don't realise that a type system that's sound will give them something -- i.e. their programmer won't ever segfault. I wonder when we try to advertise Haskell if we should be saying we can give you programs that

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Tim Newsham
As a day-time java programmer, I can say from experience that sometimes (100% pure) Java programs DO segfault. I've had it happen to me, and while you can justifiably say it's an error in the JVM somehow triggered by your program behaviour/timing, that doesn't help you very much at the time.

Re: [Haskell-cafe] Haskell Speed Myth

2008-08-23 Thread Brandon S. Allbery KF8NH
On 2008 Aug 23, at 18:34, Krzysztof Skrzętnicki wrote: Recently I wrote computation intensive program that could easily utilize both cores. However, there was overhead just from compiling with -threaded and making some forkIO's. Still, the overhead was not larger than 50% and with 4 cores I

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Niels Aan de Brugh
Thomas Davie wrote: http://games.slashdot.org/comments.pl?sid=654821cid=24716845 Apparently, no one realises that a SEGFAULT is a type error, just not a very helpful one. Right, so here's an action plan for a clueless C-programmer: - Recompile program in debug mode. - Start application in

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Brandon S. Allbery KF8NH
On 2008 Aug 23, at 17:29, C.M.Brown wrote: I wonder whether seg faults are the true analogue to errors such as error: head empty list. or pattern match errors. Not really; while laziness does introduce a certain amount of spooky action at a difference to such errors, it's not nearly as bad

[Haskell-cafe] parsec, hGetContents

2008-08-23 Thread brian
I'm writing an NNTP client API. When I connect with connectTo, I get a Handle 'h'. I immediately hGetContents h to get a string 'c' that I hope contains all the data the server will ever send. I put h and c in a data Connection and pass it to the functions that send or receive. I send a command

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Niels Aan de Brugh
brian wrote: Here's an error the Haskell run-time system might throw: *** Exception: Prelude.head: empty list (or whatever) So now what? Action plan = []. http://cgi.cse.unsw.edu.au/~dons/blog/2007/11/14 Thank you for the URL, but I'm aware of the work in GHC(i). As I've mentioned

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Thomas M. DuBuisson
wrt head [], Niels said: So now what? Action plan = [] Oh come now. Between ghci, hpc, and manual analysis I've never hit a Haskell error and thrown my hands up, I can't go any further, I'm at a complete loss! Also it helps that I run into this extremely rarely - I have a larger habit of

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread ajb
G'day all. Quoting Don Stewart [EMAIL PROTECTED]: We promise both safety and efficiency. We also provide (though don't promise) modularity, robustness and correctness, which is not something that Java gives you out of the box. Cheers, Andrew Bromage

Re: [Haskell-cafe] Haskell Speed Myth

2008-08-23 Thread Thomas M. DuBuisson
That's really interesting -- I just tried this. Compiling not using -threaded: 1.289 seconds Compiling using -threaded, but not running with -N2: 3.403 seconds Compiling using -threaded, and using -N2: 55.072 seconds I was hoping to see a relative improvement when introducting an

Re: [Haskell-cafe] multi-core programming in Haskell

2008-08-23 Thread Galchin, Vasili
Thank you Murray. My post was not so clear I was referring to automatic parellelization vs manual parallelization. By automatic I mean the programmer doesn't have to indicate where to parallelize ... instead the compiler decides how to parallize! Vasili On Sat, Aug 23, 2008 at 12:58 AM,

Re: [Haskell-cafe] Haskell Propeganda

2008-08-23 Thread Gwern Branwen
On 2008.08.24 01:29:18 +0200, Niels Aan de Brugh [EMAIL PROTECTED] scribbled 1.0K characters: Thomas Davie wrote: http://games.slashdot.org/comments.pl?sid=654821cid=24716845 Apparently, no one realises that a SEGFAULT is a type error, just not a very helpful one. Right, so here's an action