Learning Haskell

10 04 2009

To get my mind off Ruby I recently started dabbling in Haskell. I really like what I’ve seen so far and it seems I’m finally starting to understand functional programming (my two attempts with Practical Common Lisp never got past the first few chapters).

In case you are interested in Haskell too, here’s a list of the resources I use:


  • Haskell :: Functional Programming with Types: A very nice Wikibook covering a wide range of topics from the very basics to Monads, Arrows and Zippers.

  • Learn You a Haskell for Great Good: A nice and colorful tutorial in the spirit of Why’s (Poignant) Guide to Ruby

  • Real World Haskell: Yes, the entire book can be read online (including per paragraph comments!) for free! I’ve only just started reading this, since I first want to brush up my basic Haskell a bit, but once I’m past the Project Euler stage this is probably gonna be very nice.

  • Write Yourself a Scheme in 48 Hours: Now that I’m slowly getting the hang of this functional programming thing, why not write an interpreter for one functional language in another? “Along the way, you’ll learn Haskell’s I/O, mutable state, dynamic typing, error handling, and parsing features. By the time you finish, you should be fairly fluent in both Haskell and Scheme”. Sounds good to me! :-)


Ruby's Lisp features

01 05 2006

Not too long ago, Edward Kenworthy inquired about ‘Ruby’s lisp features’ on ruby-talk. Matz’ answer was as follows:

Ruby is a language designed in the following steps:

take a simple lisp language (like one prior to CL).
remove macros, s-expression.
add simple object system (much simpler than CLOS).
add blocks, inspired by higher order functions.
add methods found in Smalltalk.
add functionality found in Perl (in OO way).
So, Ruby was a Lisp originally, in theory.
Let’s call it MatzLisp from now on. ;-)

Is it just me, or does that really sound like “I took a Lisp dialect, removed most of the cool stuff and added some things from other languages”? Don’t get me wrong, I still think Matz has done a really amazing job when he created Ruby, and it still is one of my favourite programming languages. I just find it amazing how Lisp doesn’t have more exposure, when apparently some of the “cool” languages of today are trying hard to incorporate some of its (less powerful) features.

Further references:
Why Ruby is an acceptable Lisp
‘Ruby aka MatzLisp’ on comp.lang.lisp

Sweetmorn, Discord 48, 3172 YOLD