Functional Programming is old. Ancient. Like right after FORTRAN. But it’s the future. Trust me, I’m named after the dude who knew about Jesus 700 years early.

Seriously, it’s not going to take 700 years for FP to go mainstream. Some would argue that it already is. Python, Ruby, and others have adopted a number of FP features. Here’s all you need to get started right now and get ahead of the curve (right after you’ve installed Debian or Ubuntu).

Install Them All

I see tons more interpreters available (apt-get search …) for the main FP languages, but these are the ones that looked most stable and most widely used.

$ sudo apt-get install clisp guile-1.8 erlang ocaml ghc6

What did that just do? Okay, you can probably figure it out. But did you realize that you just put the entirety of mainstream FP and their REPLs at your fingertips? That includes interpreters/compilers for Common Lisp, Scheme, Erlang, OCaml, and Haskell. Vim and Emacs should have editing modes available for all of these.

You can invoke each of the REPLs respectively, like so.

$ clisp # Common Lisp
$ guile # Scheme
$ erl # Erlang
$ ocaml # OCaml
$ ghci # Haskell

Of course you’ll need to learn something about each of the languages to do anything at this point. But I’m just getting you off on the right foot. I’m not going to go into detail here why I chose the interpreters or languages that I did, but if you don’t know any better, these are a great start. I’m only getting started with all of these myself.

Free Online Material

You can check Amazon for books on any of these languages. Most of them are pretty expensive (except Programming Erlang, which I just ordered). But I’ll mention some free resources that all look valuable.

Stay Tuned

You might already be aware of the power of FP, or maybe the Wikipedia link at the top convinced you, or maybe you’ll remain a detractor. Hopefully I’ve at least whetted your appetite by showing how easy it is to get set up. I’ll plan to go into more detail about why I think FP is important in a future post (hint: performance, concurrency, code density, productivity, intelligent communities, mind-expansion, fun). I’m still in the process of discovering all the reasons.

Well, this kicks off my FP journey. Hope you’ll come along for the ride. First stop: erl

Tags: , ,

2 Responses to “A Single Command to Get Started on Functional Programming”

  1. Anonymous says:

    Micah, we should have seen you last week up at the Commercial Users of Functional Programming workshop in Victoria BC – lots of great talks and people using functional programming. All the best

    Jim Grundy

  2. Micah Elliott says:

    Hey Jim — nice to hear from you! Yes, I hope to attend that one of these years. I heard a lot of buzz about it. I’m pretty tied up right now trying to get my business off the ground. So more FP exploration is slightly back-burnered. What’s worse, I’m even more torn about which FPLs to pursue deeply. Erlang is where I’ve spent most of my time, but there are so many reasons to learn Common Lisp. And now Haskell is really compelling with some of my favorite authors (Goerzen and O’Sullivan) putting out the new “Real World Haskell” book, and recent news from BOS on concurrency progress. What to do?!

    Hope you had a great sabbatical! You must be back at Intel now, right?

    Fun to see your messages come up once in a while in the Portland FP group. I’ll try to attend a meetup one of these months.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>