The Haskell Rabbit Hole
Author: Duane Johnson
7
Mar
As a programmer, curiosity is most often a helpful asset that leads to a grander and more unified understanding of computer science. With Ruby, for example, I quickly learned about the usefulness of closures because the array methods like “map” and “select” were so helpful. Closures became a new tool in my toolbox–something I could apply almost everywhere.
Haskell is teaching me things, but not in the same innocent way that Ruby did. It is definitely pushing me to my limits–recently I feel like a wet-behind-the-ears programmer more often than I can remember.
I’m building a little game in Haskell using OpenGL. Innocently, I found out about
Functional Reactive Programming and suddenly I’m on a trail learning about a “generalization of Monads called Arrows”, as well as combinators and functional composition in “lifted” spaces. I’m not even sure I’m using the right words to describe what I don’t understand

Next, I decided I’d try loading a
VRML file that I had created in
Wings3D. Haskell doesn’t have a VRML (”.wrl”) parser that I know of… so I started looking up parsers in Haskell. ”Hmmm,” I wondered, “What’s this ‘
parsec‘ thing everyone is talking about?” Oh, it’s a “monadic parser combinator in Haskell” that other languages have apparently tried to emulate.
All I can say at this point is, “Wow.” There is so much out there that I do not understand. I thought I knew a lot about programming through 6 years of university. It turns out I had only scratched the surface. Beware, there’s a rabbit hole underneath that grassy knoll!
Posted via email from Duane’s Quick Posts
3 Responses for "The Haskell Rabbit Hole"
While I was studying computer science functional programming was that syntax nightmare called Lisp. Ruby had enough functional programming beauty to move myself to explore that world again. I would describe Erlang as the rude bully brother of Haskell, and this is the one we are learning now.
I agree, it’s a big rabbit hole. While working on one thing you can often come across a snippet of something else, which leads to you to forgetting what you were doing originally and reading/practicing the new thing for a couple of hours.
At my Uni, we were taught Haskell in second year for 3 months. It wasn’t in depth at all, the exercises were all basic list functions etc, but it was enough to spark enough interest in me and trigger the thought “This is a cool way to program, I might do my third year project in it…”, which I have done and am hoping to do my fourth year project too!
M
When you write “I quickly learned about the usefulness of closures…”, it seems from the context that you are referring to lambda functions, not real closures. Although a lambda looks a lot like a closure, a closure does so much more: it carries around with it the entire environment of its point of construction. It’s like calling back to what the stack looked like in the past at a future time. Regular lambdas (such as are so often used with map) just embody a function without a name, with convenient syntax.
Leave a reply