Yesterday I thought I should try out clisp. It was the reddit controversy that opened my eyes to this language. If you don’t know, the guys behind reddit tried to create the site with clisp but they opted to do it in Python in the end. It’s that decision that caused all the ruccus.
Now why would these people try to do something like that with the help of unproven libraries and so on? I mean it must have been kinda scary given all the more proven alternatives out there that they could be sure to get the job done with. For me, the only answer is that they must have loved the language to such an extent that they didn’t care, they wanted to go for it anyway.
It’s that realization that got me started with setting up an environment and start coding. I wanted to know why clisp is so appealing to these guys. First I ended up at the cliki which is a good site. It was there that I realized the whole implementation jungle thing. So after a few minutes with Google I found this implementation review. Aha, looks like SBCL is the one that rocks at the moment. But what development environment should one use?
It turns out that there is a plugin for eclipse called Cusp. And lo and behold, it comes with a prepacked SBCL, perfect! However, when I tried to work through the Programming In Lisp With Cusp tutorial I soon ran into problems. I added a file to the project just like in that tutorial. When I tried to use a defined function in my added file in main.lisp the debugger complained that the function was undefined. Loading the file explicitly with (load “file”) didn’t work either.
I ended up downloading the install of SBCL for windows and trying this in the command line interpreter:
(load "hslibs.lisp") (defun hello2() (hello))
And in hslibs.lisp:
(defun hello() "hello world")
Running in the REPL:
(load "main.lisp") (hello2) "hello world" *
As you can see, not a single problem whatsoever which means that I only do editing in Cusp at the moment. The Cusp debugger won’t allow the above code, it can’t find the included files. This is similar to my Ruby and Netbeans setup, at the moment I only do the editing itself in Netbeans since I want to debug with the default Ruby interpreter, not JRuby.
I’m totally fine with it though, I’ve got a dual screen setup anyway so the hassle factor is virtually zero
The plan now is to try and create a simple dynamic site and a small desktop application with whatever is out there that I can use to get the job done as quickly as possible with clisp.