I’m not really going to talk about the problem with Lisp, but only a problem. And I’m not really going to talk about Lisp, but Common Lisp. So this post should be called “A problem with Common Lisp”, but the current title is more catchy, isn’t it?

You are still with me? nice. Because I believe I have something important to say. A problem with Common Lisp is that you can’t make programs with it. That may have been another nice catchy title: “You can’t make programs with Lisp”.

You can make libraries just fine, and package them, and distribute them, and re-use them, but not programs. To give meaning to these statements I’ll have to define what a program is. A program is something that you can run from a shell (like bash, csh, tcsh, etc) by typing its name and pressing enter . Or, if you want another definition, something that you can run from a C program using the function exec.

I’ve asked this question several times on #lisp on Freenode and generally the answer is this: SBCL can generate an runable image. Although it may be nice in some cases: like shipping an alpha version of a program to someone who doesn’t have a clue what Lisp is, it is not a good way to ship a program expecting an OS like Debian or Ubuntu to include them: “25MB for a hello-world? you are crazy”. The size is not the only problem, upgrading the libraries get harder, because you have to upgrade the libraries in the image and not only the modules in the file system that the OS can easily upgrade with tools like aptitude or rpm. They are just monolithic. I can imagine ls and cp being written in Lisp, so I can’t imagine them being huge monolithic images. Any other language that I know doesn’t have this problem, be it Python, C, C++, Java, Objective-C, C#, Haskell, Chicken Scheme, Erlang (this one has its problems but I’ve already solved some of them), Perl, PHP, any other?

Other Lispers claim that you can just ship a library and the user would just run a function on it; like (run-checkers) to play checkers. This has various drawbacks. First, not every user is a Lisper. Most computer users don’t even know what Lisp, so they wouldn’t know how to run a lisp. They also wouldn’t be able to have an icon in their desktops to run the program, they’d have to open a terminal. For people that can do all that, finding the right function to run in one of those so-called programs can be a challenge. My wife wouldn’t have even tried to run any of those programs. Yes, I want to write software for my wife, in Lisp. And last, even when they can do all that, they may still search for an alternative that just puts an icon somewhere and they click it.

Yes, long rant. I hope I could convince you of the need to produce programs. It has been said many times that Lisp needs a killer application, like ejabberd for Erlang or darcs for Haskell. Both awesome applications that get people to approach the language (indeed, what made me learn Erlang was ejabberd). Without being able to make programs, you can’t make killer programs.

After pushing this issue a bit on comp.lang.lisp I’ve got pointed to cl-launch by Alex Mizrahi (I actually had to say that I was going to do something about it for someone to say “don’t re-invent the wheel”). I knew there had to be something out there! I couldn’t believe I was the first experiencing this. There’s hope!.

Unfortunately, not a single cl-launch powered Lisp program seems to be out there. Maybe because there’s no build-tool integration for it anywhere. Let’s see if I can do something about it.

Update (2007-09-05): Two possible solutions I posted: Solving Lisp’s problem: a simplistic solution with make, Another simplistic solution, with SCons.

Comments at the original blog