I then came across this tutorial, which teaches you to write a Scheme interpreter in Haskell in 48 hours. Really Cool. I fell in love with Lisp immediately. I googled for Lisp and I discovered that there are many dialects of Lisp. The most popular ones are Common Lisp and Scheme. I decided to go with Common Lisp for some unknown reason. I guess because it had Lisp in its name :-). I then had to find the right implementation for my platform. Being a GNU fan, I picked the GNU CLISP. As it turns out, it is a horrible implementation which does not support threading and is painfully slow. But it was fine for the small programs that I use for learning. I have Ubuntu Feisty on my "home" laptop but I spend most of my time on the office laptop which as you all might have guessed, runs "Windows". There are many good commercial implementations for Windows but I was looking only for open source software. GNU CLISP seems to be the only fully functional Common Lisp implementation. I've worked with SBCL and found that okay too. I did not run into any major issues but their website has an yellow status for SBCL on Windows and a big bold notice saying that it is an experimental implementation. But for learning purposes, I guess it is just fine.
I followed a really cool Lisp tutorial, which is actually a book by a guy called Peter Seibel named Practical Common Lisp. It is a free online resource.
One of my biggest barriers to entry was my text editor. I was a 'vi' guy. As I browsed for help on Lisp, I kept finding these cool emacs extensions for lisp programming. I then took the dive and started using Emacs. It was very painful in the beginning. My fingers automatically pressed the
So this is your startup kit for learning Lisp.
- Common Lisp implementation - CLISP or SBCL
- Lisp Tutorial
Emacs Slime
9 comments:
When your done with Sielbel book take a look at Norvig's "Paradigms of Artifical Intelligence Programming" (a lisp book). You might be able to find or download Paul Graham's excellent "On Lisp" too.
- I went the other way, from Lisp to Haskell :) but each to his or her own path.
Thanks for the tip. Those are definitely on my reading list.
"gj" moves down one "visual line" instead of actual line, for short stuff. For longlines-mode, see this tip; in the comments somebody wraps it into a function.
Also, you find writing functions in vim hard work?
Thanks a lot for the vim tip. But vim script is a little odd when compared to elisp. :-) I dont wish to start a flame war here. It is just my humble opinion.
>it is a horrible implementation
I don't think horrible is the right word... CLISP is more like a scripting variant of LISP. For example it has way better support for calling external programs that SBCL.
Hmm... thats strange. I never thought of it. I understand that common lisp evolved from Lisp Machines where Lisp was itself the operating system. But I believe that Common Lisp should add Process Management as a part of its hyperspec. You can learn a thing or two from Python's subprocess module.
Vagmi -- out of interest, what did you find more productive about Lisp than Haskell?
Strangely, I find Lisp more productive. But there is a BIG catch with Lisp. But libraries are a problem. I guess it is particularly to do with Common Lisp. May be Scheme is better.
As far is absolute productivity is concerned for really important stuff, choose the language you are most comfortable with. My brain is very comfortable with Python AND Ruby. I find myself the most productive using Python.
If it is a pure choice between Haskell and Lisp, I would choose Lisp any day.
If you like moving around the vim way and want the nice lisp features found in emacs you can use the vimpulse and viper modes for emacs. It's not perfect but it's actually pretty nice.
check it out at
http://www.emacswiki.org/emacs/vimpulse.el
Post a Comment