Saturday, January 6, 2007

A Nice Way to Learn FP

Over the past Christmas break I had some free time available and wanted to use it wisely. I decided that I've been flirting long enough with learning functional programming, like learning OCaml and Common Lisp and all that. This time I was going to just jump right in to Haskell. But, why learn just one FP language? I quickly found a tutorial at:

http://halogen.note.amherst.edu/~jdtang/scheme_in_48/tutorial/overview.html


that covers an implementation of Scheme in Haskell, so you learn both although there's a few features of Scheme that aren't implemented.

One of the nice things is that you have a fully working Scheme interpreter so you can play around with it as much as you like. Plus at the end they even mention catamorphisms and anamorphisms and how to write a whole standard library with mostly folds and unfolds.

I supplemented that along with the book Haskell The Craft of Functional Programming, which is nice for beginners but wasn't as advanced as I hoped it would be. Ultimately I'm not sure I could recommend it to someone who already knows a programming language fairly well. I also checked out the wikibooks Haskell page at http://en.wikibooks.org/wiki/Haskell which was a well-written tutorial.

Sadly I didn't learn enough over the break to be able to write a real program, but I did learn enough where I could think of some solutions to problems in Haskell. The downside is that when I went back to work coding in C++, I'd see a one line solution in Haskell and would have no way to translate that to C++.

Thursday, January 4, 2007

First post

First post! As part of my New Year's resolutions, I've decided that I'm going to get a master's degree in computer science. This means either finishing my thesis or taking some comprehensive exams in 3 areas:
1) Data structures
2) Operating systems OR Numerical analysis (my choice! yea!)
3) Theory
Since my thesis is dragging because of work and I'll need to know the above for the CS GRE, why not just take the exams?

Here's the first place to stop for some CS GRE knowledge:
http://titanium.bits.googlepages.com/

That has a bunch of great info.

Also, if you don't know anything about continuations, check out this page:
http://www.intertwingly.net/blog/2005/04/13/Continuations-for-Curmudgeons

Educate your mind