Wednesday, June 21, 2006

It has long been a popular pastime in the Lisp community to reminisce about "the good ol' days" when Symbolics and LMI were healthy, growing companies and Lisp machines were a growth industry. Indeed, from every one of the Lisp machine videos I have ever seen, the development environment was super.

Recently, I decided to start work on a new test tool for Vyatta. After considering the alternatives, I decided to write this tool in Emacs Lisp, using Emacs as a UI for the program. While Emacs Lisp is not Common Lisp and suffers from a number of deficiencies (no lexical closures!), it's still Lisp and there are some advantages to developing an application this way:

You get a fairly-good full-screen text UI almost for free. Emacs takes care of redrawing the screen, handling keystrokes, and all that. Yes, it's a little bit clunky working with buffers of linear text, but once you get over that, things work great.

There are a lot of Emacs Lisp libraries to choose from. In my case, I hacked something on top of Emacs' terminal mode. Rather simple and it works well.

The code is portable. Because Emacs runs on just about everything, so does all the Elisp code I'm writing. There are some problems when it comes to interfacing with the underlying OS, but as long as you write higher-level code that doesn't expect much from the OS, things will work fine. In my particular case, I use some Unix/Linux OS utilities and so my program isn't portable to Windows, but it is portable to any environment that has those utilities available (which should be everything from Linux to BSD to OS-X).

Finally, the development environment is great. When your editor, your Lisp system, and your application are all the same thing, work goes quickly and easily. You can be hacking your source in one Emacs window, running it in another window, and things just work. With Eldoc Mode providing parameter prompts for me as I learn the backwaters of Emacs Lisp, and Emacs Info right at my fingertips, I have all the assistance I can ask for.

That last point should not be skimmed over quickly. Having everything integrated, editor, Lisp system, and application, is powerful. While it can't quite match up to the power of a full Lisp machine, you can begin to realize some of the potential.

So, the next time you're wanting to reminisce about the days gone by of Lisp machines, remember that you probably have a pretty powerful Lisp machine already sitting on your desktop PC: Emacs.

Regarding Lisp Machines, the following post by António Leitão gives a very interesting overview about what was like to work with one. Picking on his own hands-on experience with Lisp Machines, António also gives some thoughts about an hypothetical LispOS. Good reading, altough slightly outdated.