A Taste of Haskell, A Taste of C

by chromatic

At OSCON last week, my favorite tutorial was Simon Peyton-Jones's A Taste of Haskell (A Taste of Haskell presentation materials (PDF)). I've dabbled with the language before (and pair programmed with Audrey Tang once to find and fix a bug in Pugs), but I've never really felt comfortable with the language.

It's nice to report that function composition actually makes sense to me now. (At Foo Camp, I spent ten minutes explaining to Brian O'Sullivan why and how it tripped me up every other time I tried to figure it out, so hopefully Real World Haskell will smooth out that path for other people.

Most of my work these days is in C, though. As a junior language designer, I spend a lot of time considering the differences between languages (and, yes, rarely at the syntactic level).


Keith Fahlgren
2007-08-01 09:59:42
Here's the first part of the video: http://blip.tv/file/324976
Greg Donald
2007-08-02 10:45:43
Haskell is _too_ functional for me personally.

I rather enjoy a hybrid functional/procedural language called Ruby. You may have heard of it. It's a pleasure to work with.

2007-08-03 11:28:11
It shouldn't be harder to write a garbage collector in Haskell. You might be bothered a bit that the Haskell code will run in a little heap managed by the garbage collector of your favorite Haskell implementation, but you can tightly control the size of that heap, and use Foreign.Ptr to do whatever you like to the C heap living in the rest of memory. I'll get there eventually, as I rewrite some toy interpreters to rely less and less on features of the host language.
2007-08-06 14:14:27
I'm guessing that last statement was intended to be humorous, but if you're actually having trouble figuring something out, try #haskell on freenode irc. Incredibly helpful people there--one of the best things about the language, actually.
2007-08-06 14:30:58
@msouth, thanks for the reminder. Haskell is probably a no-go for this project for various reasons completely unrelated to the quality of the technology, but it's a tempting thought. (The main issues are deployment and finding future maintainers, though the latter is much less of an issue as I'm only doing this because we can't find anyone else.)
2007-08-09 14:06:53
Haskell is _too_ functional for me personally.

Ruby isn't really functional, though it supports a subset of the features of those languages, it lacks referential transparency which is absolutely essential to functional languages (or at least a clear separation between pure and impure worlds). Thus chromatic wouldn't get such an automatic fine division of the code with Ruby..
And using anonymous functions or higher order function isn't really natural beyond the "block".
Beside that static typing and inference makes quite a difference between Ruby and Haskell...
And GHC is much faster than Ruby.