A quick and easy Lisp environment in OpenBSD
Your Unix lifeline is only one (ext:run-program "ksh") away

One of my all-time bucket list items (not involving vintage guitars or pin-up girls) is to spend a day sitting at an actual Lisp machine, of either the LMI or Symbolics variety, just to see what would happen. The fly in the proverbial ointment, however, is that should that dream ever be realized, I honestly wouldn’t know what in Sam Hill to do with it.
In fact, I’d probably end up pushing more buttons on the vending machines in the hallway outside the computer lab than the ones on one of those legendary and mysterious workstations, and then spend the rest of my days in a downward spiral of regret and self-loathing.
This conundrum is rooted in the fact that I know my way around Lisp interpreters (such as CLISP and sbcl) just enough to do little more than basic math calculations in Polish notation, such as (/ 36 (* 24.1 8)), and generate error messages. Over the years I’ve made several attempts at learning Lisp from various online resources, but never got deep enough into it to attain a serious level of proficiency. Why this has been the case up to now is beyond me, as my longtime fascination with Lisp seems to have outstripped my wherewithal to stick with it. It reminds me of that Woody Allen line about “a disappointed artist who had to give up her lifetime ambition to become a classical violinist, when she realized it would mean studying the violin.”
But now, in the spirit of “If at first you don’t succeed…”, I’m taking another shot at climbing up the Lisp proficiency ladder, if at least only one or two rungs for now. This time, however, I’m doing it within a desktop environment that defaults to Lisp, with the more familiar Unix shell available only as a fallback where necessary—a Lisp-centric Environment (running on top of OpenBSD) that presents a LISP REPL as the first option for whatever it is you want to do, in case there’s a way to read-eval-print loop your way to the prize. Otherwise, a traditional Unix lifeline is only one (ext:run-program “ksh”) away.
I realize it’s possible to emulate historical Lisp machine desktops in Linux with such projects as Open Genera and Interlisp-D/Medley, and I have indeed kicked the tires on the latter during one of my trysts with Ubuntu. But it seems like it would take a ton of configuration to incorporate those emulated environments into one’s workflow. (I realize I’m speaking from a place of assumption, rather than certainty, so I humbly invite corrections to the above.)
In any case, honest-to-goodness Lisp machines, which by definition are computers in which specialized hardware is designed and optimized specifically to support a Lisp-based operating system, are largely a thing of the past. There’s probably a museum or two with ones to see up close, and there are some dreamers out there looking to create them in the here and now, but for the most part, Elvis has left the building.
(Yes, Luther Johnson’s single-board MakerLisp Machine has my attention, and I would sincerely love to get my hands on one. I’m still figuring out what to make of it, however, so I’ll withhold any comparisons between that project and the Lisp machines of old until I’m better informed.)
I’m at a point now where I’d rather just have a Lisp-driven learning environment up and running with minimal fuss and friction, here and now, rather than dabble in an OS sandbox on a recreational basis, with no productivity to show for it.
One option is to install exwm, which turns Emacs into a full-blown window manager and desktop environment, and that is certainly on my tire-kicking itinerary. For now, however, I’m just looking to keep things simple, without getting lost in whatever configuration hell is involved in getting exwm up and running. (I have already made a few attempts, but quickly found myself lost in the minutae.)
The solution I settled on is to use stumpwm (itself written and hackable in Common Lisp) as the window manager, and CLISP as the default shell. Initially, I wasn’t sure if I was going use CLISP or sbcl as my command line, so I appended both to the list of authorized shells, and then set CLISP as the default shell, as follows:
# which clisp >> /etc/shells
# which sbcl >> /etc/shells
# chsh -s /usr/local/bin/clisp jed
CLISP worked beautifully at the non-graphical login (after executing rcctl disable xenodm and rcctl stop xenodm), and is now in full service in stumpwm as of this writing.
As for sbcl, it worked okay at the non-graphical login, but after logging into xenodm, I was faced with this monstrosity:
Leapin’ lizards! Just because I’m prolific at generating error messages doesn’t mean I can make heads or tails of them. All I know is that with a stream of threatening text like that, and no alternative but to do a hard reboot, something was definitely off. (I don’t know if this is a bug on any project’s part, or if sbcl simply isn’t meant to be invoked like this for some reason that is way beyond your humble Chair-Keyboard Interface.)
So CLISP it is for the command line in this Lisp environment.
And finally, I can get down to working my way though whatever online tutorials I can find in that fully-functional and OS-integrated Lisp environment I’ve been dreaming about for some time, starting with the one shown in the picture at the top of this article, and will share my findings and reflections in this space as they emerge.
Thankfully for my children and my neighbors, I’m determined to conquer Lisp, rather than the violin.