« Irish OpenSolaris Users Group Meeting | Main | Two good articles on LISP »

June 10, 2006

Scheming

I have started learning Scheme for fun and (hopefully) profit. I have been learning from a number of sources. Firstly, I have after learning the basics, I wrote another program to calculate the digits of π. The code is here (pretty printed). The algorithm I used is the same as the one I used for the python program and the two programs look very similar. I haven't yet learned how to code up closures in Scheme, so the method of calculating the Fibonacci terms to use is different, but apart from that they are pretty much the same.

Secondly, I found a few good online resources:

I use Kawa and SISC as scheme interpreters. Both of these run on top of the Java VM and are easy to use and fit in well on UNIX/Linux systems. Running on top of the Java VM opens up some possibilities such as using the Java VM Dtrace probes to observe Scheme programs. I am not sure how well this will work, but it is something I will be investigating.

Why am I learning Scheme? Well, there are a few reasons. I really admire Paul Graham's essays and his essays on LISP and strong advocacy piqued my interest in the language. I also came across an essay describing design patterns supported by LISP. Many of the patterns I use regularly in Java programs, such as the Visitor pattern, Command pattern, and Iterator pattern, are not needed in LISP: they are built in at the language level. Because of this, I wanted to learn more and, although I have just started, I am sure this is going to make me a better programmer.

Posted by JohnC at June 10, 2006 07:57 PM