I once again saw Ron Garret’s story of Lisp at the JPL trending. I’ve had enough of it. I’ve read the article and variants thereof too many times, now. Ron’s a good guy—nothing against Ron. He’s articulate, well-grounded, and has responded to an email or two of mine in the past. Great guy, but I’m so sick of that article. There are other articles, probably less interesting, that I probably wouldn’t have read, but haven’t seen at all because of the constant reposting of the Lisp in Space article. It is directly reducing my ability to complain about the content of news aggregators, aside from complaining that devolves into meta complaining about how the content of news aggregators is getting repetitive, and that’s bad because I actually like what’s getting reposted, so I can’t complain about it as much. And that’s just a headache. This must be stopped. I have taken it upon myself to fix the problem.

To shut up discussion forums, we need to get Lisp back to space. But how? I was reading an article a few days ago, pointing out how ECMAScript had gotten to space. Not only ECMAScript: It had taken an entire browser with it! In the darkness, a flicker of light.

We Lisp users are nothing if not hip to the latest trends. It is time to return Lisp to its rightful place among the stars. If ECMAScript is powerful enough to drag Chromium into space, then surely Chromium should be powerful enough to drag Lisp into space. Here is my proposal, which I am calling SpaceLisp, or SCL. Rocket Emoji CL if that’s what we need to be modern enough to get back to space.[1] They should be able to load it remotely up there by navigating to this URL from the hardware of the Dragon. Open your browser of choice’s console and turn your eyes to the input box below.

Give it a try. Below is the first set of forms that I entered when I had gotten it working interactively (I was normally using shorter expressions without definitions while testing, but after a week of bug-swatting, I finally got the sense I’d gotten my ducks in order, so my first working interactive function happened to be a touch more celebratory than the simple #’PRINT and following varying list of expletives depending on just how agitated I was feeling with the bugs that occur when you’re writing in-line ECMAScript in C in ECMAScript that I had been using up to that point). If you don’t know Common Lisp, type this in (and I do mean type! I’m too lazy to write a better input box, so right now, you can’t enter newlines, which means that the definition of the function will be swept up in the comments unless you manually type it out without a newline):

(defun add-pi-to-elements-of-a-list (list &AUX (better-pi 3))   ;; in theory, pi is already defined by common lisp
        (map 'list (lambda (x) (+ x better-pi)) list))          ;; but it has too many digits
                                                                ;; i have defined a smaller, simpler pi
(add-pi-to-elements-of-a-list '(3 6 9))                         ;; an elegant pi, for a more modern age.

You might be wondering why I didn’t make a cool little REPL self-contained in the browser window, opting instead to overload the browser console for this. The answer to that is two-fold: UTF-16-8 conversion issues, and the weird happenstance that I couldn’t get a custom stdout to not block the main thread (though, thinking on it now that I have given up on making a fancy self-contained REPL-like experience, I probably know what it was), on top of the fact that I couldn’t actually use abstractions in that part of the code, because for some reason it would without fail blow the stack. It’s still a REPL, just weirder. Which is fitting, for such quaint little piece of software.

You will likely notice, if you do know Common Lisp, that there’s an oft-used function that doesn’t work. It probably will make this crash, or something. Don’t spoil it for everyone else! It only doesn’t work because I am tired of messing around with Emscripten. If you used this with readline, it would work. I’m just too lazy to try and find where to block input in all cases. Sorry. Blame laziness. This whole thing is honestly just hacks piled upon hacks because Emscripten’s default ways of doing things are less than ideal and make me sad, and once again cements the idea in my mind that there is no reason to use any character encoding format outside of ebcdic.

Oh, yeah. If you write an incomplete form, or make a mistake, it’s just going to crash. I haven’t put any error-handling code in, and I disabled the debugger. Sorry, the experience of twenty minute compilation times inherent to pretty much all LLVM compilers on larger projects has left me unmotivated to fix this and far more grateful for the existence of Lisp-style REPLs, even as Ironclad takes like five minutes to compile for the first time. Enjoy.

[1] I was going to call it StarLisp, but I’m not allowed to use that, because anything you ever find cool or independently think of before remembering already existed will eventually be or already is owned by Oracle.

No, this is not an independent implementation of Common Lisp. Yes, it is running entirely in the browser. No, I am not using that x86 emulator that you probably saw trending the other day. This is exactly what you are assuming it is. Unless you’re assuming it’s ECL. I would rather die than use Autotools without pay. You can also rule out a few other implementations by checking the resource usage and seeing that you could fit about seventy of these, running in the browser, into the equivalent memory of one image of those native implementations. Yes, as far as I’m aware, this is the first time CL has run natively, sans emulation or obscure Internet Explorer Plug-Ins, in a browser, aside from my previous efforts which ended up blowing the stack as soon as you tried anything, which sort of count. Yes, I am announcing it via a nonsensical post like this, because I find the idea inherently funny. Yes, I do know “It would have totally been cooler if you put this up with a Swank server and stuff so we could like totally have a rad IDE out of it.” The only client that I might have gotten to work with this requires a user to supplant their package manager, and I’m not a terrorist. I’m also not very competent, so it wouldn’t have worked that well anyway. Also, sockets are tedious in C, and sockets are even more tedious in Emscripten. Yes, I am aware that this paragraph you’re reading is a run-on paragraph. Yes, I do feel unclean from installing the Node ecosystem, but luckily, I had already done it months ago when trying this with Lisps that weren’t the equivalent of doing HLE. I was already outside of the light of God. I did this, Reader, so you don’t have to. Seriously. Please do not do this. I only have a small sample size (= 1 n), but my research suggests that using Emscripten is strongly, strongly correlated with an increase in suicidal thoughts. That is barely an overstatement. Like half of one of those “strongly” uses could be taken off, max. After I had gotten it working, it took roughly three days just to figure out a solution to get it to stop spamming window.prompt without crashing the program, because it demands you do a bunch of nonsense for using stdin as a REPL. The actual solution wasn’t even some fancy emcc flag to get stdin to block, even though it was shown that it was capable of this with the stupid window.prompt thing. The “solution” was adding an Emscripten-specific C extension. Any fashion in which this is “half-working” or “buggy” can be attributed solely to Emscripten wearing me out to the point where I am refusing to look at the program, much less test it. I know it doesn’t print to stderr immediately, and that is fine for now.

In memory of Henry G. Baker.

I don’t have social media to share as I’m terminally uninteresting, or a job to shill as I’m terminally unemployed, or any projects to share as I’m terminally insecure, so instead I’m going to shill the social media of others:

Follow the Following People on Twitter or Mastodon or Subscribe to Them With Your RSS Reader or Something or Don’t:

Lars Brinkhoff - makes new computers run old computers doing new computer things. vice versa. etc.

Shinmera - the mythical lisp programmer of yesteryear, today. seeming 10x human. game engines, games, markup languages, an emacs distro, chat protocols, porting lisp to game consoles, either has done or is doing all of those. can even draw! has a kickstarter for a cool video game written entirely in lisp coming up next month; check it out. mastodon

Zach Beane - used to have a cool blog. still maintains quicklisp, the package manager that more or less caused common lisp’s resurgence, for better or worse.

Rainer Joswig - apparently “done with twitter.” still, his twitter history has enough to entertain you for a while. whenever you look up a cl problem because you haven’t read the hyperspec only to find an answered stackoverflow post, or end up doomscrolling for flames in 1996’s comp.lang.lisp, he will be there.

Robert Smith - the only common lisp twitter that really understands the medium for what it is: a low effort conduit of so-bad-they’re-okay-i-guess-and-i-maybe-smiled jokes. rare as far as tech social media accounts in general go in being actually funny, proving once again that lisp users are hip with the times.

Conrad Barski - makes cool stuff every month. wrote a book once that i haven’t read but have heard is pretty good. doesn’t really do much common lisp anymore. think i saw him use zig a while ago, which is super modern, proving that lisp users are the hippest with the times.