The Language of AI

14 Sep 2025

John McCarthy is credited with two major contributions to Computer Science. The first is the term “Artificial Intelligence”, and the second is the programming language LISP. In part due to this entwined history, and in part due to its particular strength, LISP was long though of as the language of AI, but it’s more than that — it’s not an exaggeration to say that pretty much every programming language in use today borrows from LISP to a greater or lesser degree, and LISP itself is still in alive and well in various forms. There’s a lot of history to delve into, but recently I decided to try out something almost equidistant from today and LISP’s origin in 1960: LISP on the Acorn Electron.

This isn’t actually the first time I’ve used that particular implementation. As a child in the 80s, I remember being intrigued and picking up a copy on cassette from a market stall for a few pounds. Unfortunately, the experiment was short-lived, as the software didn’t come with any documentation. I fumbled around trying to get the enigmatic “Evaluate:” prompt to do something useful, but didn’t get anywhere, and soon moved on to less obtuse pursuits.

A few decades later, and I’m returning to it better prepared. Not only do I have both a reasonable grasp of the theoretical foundations and a degree of practical experience with a variety of LISPs, I also managed to find a decent second-hand copy of LISP on the BBC Microcomputer by Arthur Norman and Gillian Cattell, the very documentation I was missing the first time round. So, with the barriers out of the way, what is LISP on an 80s micro actually like?

To my surprise, pretty good. The Electron is a far cry from the Lisp Machines that were its contemporaries, or the mainframes and minicomputers that LISP grew up on. In particular, it has little RAM, and a CPU built around bytes rather than words. To fit inside these constraints, Acornsoft LISP is an interpreter rather than a compiler (as more fully-fledged LISPs tend to be), and it only includes the essentials — so no arbitrary-precision arithmetic, no macros, no conditions. What’s left, however, is a flexible and well-thought-through environment that captures the flavour of LISP, especially for learning and exploration.

This environment is both interactive and transparent, in the best traditions of the REPL1. This provides the immediacy of BASIC with a far more structured and powerful underpinning. An upside of the interpreter approach is that it puts the equivalence of code and data, one of LISP’s strengths, front and centre. Functions are just lists starting with the symbol LAMBDA, and can be manipulated as such with no intermediaries.2

This transparency forms the basis of one of the more interesting aspects of the system: the interactive code editor. For most people familiar with LISP, “editor” immediately conjures up the image of Emacs and similar editors, but this isn’t that. It’s more akin to the long-obsolete concept of interactive line editors such as ed3 and ex4. Instead of moving a cursor around a visible display of the source code, you issue a series of commands to manipulate it, and then print out some or all of the modified text.

What makes the Acornsoft LISP editor different is that, unlike ed and ex, it’s a structured editor — instead of manipulating lines of text, the commands manipulate lists. As functions are, like pretty much everything else, just nested lists, this provides an immensely powerful way to both navigate and edit the code, with the added bonus that introducing syntax errors is impossible. It’s somewhat akin to block-based programming languages like Scratch, and while it takes a little getting used to it’s a great interface when it does click, so much so that I find myself wondering what a modern take would be.

The documentation is equally inspiring. Norman and Cattell start with a thorough and well-paced walk through the fundamentals, and then move on to some more substantial examples. The first, as is required by law in any book on LISP, is a LISP interpreter, followed by some other LISP-related facilities such as a pretty printer, a correct-but-slow implementation of arbitrary precision integer arithmetic, and the internals of the aforementioned structured editor. They then broaden out to more general parsing, evaluation and generation of machine code, demonstrating the suitability of LISP for building compilers (and the authors’ interest in that field). The chapter is rounded off with a bare-bones implementation of a text adventure. This is clear, general and extensible, and shows off the expressiveness and power of LISP.

So, after all that, is Acornsoft LISP a good choice for programming the Electron? If your aim is to produce something for others to use, probably not — aside from the fact that they’d also need to have the interpreter, the overhead is likely to be too much. With such limited resources, you usually want to squeeze as much performance out of the hardware as possible, and that’s not where LISP’s strength lies. However, if you’re programming a one-off solution for yourself, or exploring a problem interactively, it seems like an excellent choice. A modern analogue would be something like Jupyter notebooks. Not bad for a little computer from the early 80s, even if I didn’t realise it at the time. I’m glad I revisited it.


The original photograph behind the Distracted Boyfriend meme is by Antonio Guillem. The books pictured are LISP on the BBC Microcomputer by Arthur Norman and Gillian Cattell, referenced in the text, and Understanding Deep Learning by Simon J. D. Prince, a somewhat more recent take on AI.

  1. REPL: Read-Eval-Print Loop, the interface by which you can type in an expression and see the result of evaluating it. This is nearly ubiquitous for modern languages, but was pioneered in LISP, and and name comes from the implementation in early LISP: (loop (print (eval (read)))) (read it from the inside out). [back]

  2. Interestingly, Acornsoft LISP is a Lisp1 like Scheme, rather than a Lisp2 like Common LISP and its immediate ancestors. [back]

  3. ed is the standard text editor. [back]

  4. Now better known for the visual editing mode that was built on top of it, vi[back]

A Customisable Cable Clip

3 Sep 2025
A cable clip model in OpenSACD Customizer

This design came about because I wanted a clip to attach a car-charging cable to the wall. You can, of course, easily buy these, but I only needed one, and for an unusually thick cable. 3D printing means I can get exactly the part I want, in the quantity I want, and saves a trip to a DIY store or a wait for the postman.

As this is probably not the last time I’ll want to secure a cable somewhere, I decided to do something a bit more general. OpenSCAD’s built-in Customizer allows you to define parameters for your model, which can then be easily and interactively tweaked as shown in the image above.

More importantly, this has become a de facto standard of sorts, and sites such as MakerWorld directly support it. If you upload an OpenSCAD file alongside your finished project, users can customise the model right there on the site before downloading it.

Providing this UI for your model is almost comically easy. You just add appropriate comments to your top-level variables like so:

// Diameter of the cable
Bore      = 15;

// Width of the clip (parallel to the cable)
Width     = 15;

// Thickness of the clip
Thickness = 5;

(In fact, it’s marginally harder to stop things being customisable; you need to add a special /* [Hidden] */ comment. I didn’t originally plan to coffee cup sleeve design customisable, but it was a little effort to tidy up and document the variables as it would have been to prevent it.)

The effortless way this falls out of normal use of OpenSCAD is incredibly powerful, and demonstrates the benefits of rich representations. Rather than just being, say, a list of triangles, like an STL file, an OpenSCAD file is a program to produce your design. More importantly, it’s a declarative program, which lends itself to reuse in contexts other than the one in which it was originally created. OpenSCAD itself looks a lot like a traditional programming environment, with a syntax-highlighted text editor and a “run” button, but there’s no reason that this needs to be the case. With a bit of thought, all sorts of formats could have this level of abstraction, and benefit from the flexibility that it provides.

A thick cable attached to a brick wall by a 3D-printed clip

Miniature, Maxiature

10 Aug 2025

A 3D printed 25mm miniature and a 400% scaled up version, in front of the 1983 D&D Basic Set

I’ve been running a traditional Dungeons & Dragons game with my daughters1. The fundamentals of table-top roleplaying haven’t changed very much since I was doing it at their age, but we came across one thing that definitely wasn’t available back then: HeroForge. It’s a website (we didn’t have those in the 80s) where you can create a 3D model of your character (would be a push on the Electron) and download a file for your 3D printer (we definitely didn’t have those in the 80s).

Imagine a character customiser from a game like Skyrim and you have the basic idea, but the thing that makes it is the breadth and quality of the execution. You could select a few basic attributes, costume items and equipment, but you can also customise every detail, including minutiae of pose and expression. Once you’re happy, you can buy the STL file for printing for about $8 (£6) — costly if you want to build an army2, but for a few player characters it’s a very fair price for what you’re getting.

The girls each made a miniature of their character, and we’ve been pretty pleased with the 25mm scale ones for actual play. I printed these on the Bambu A1 with a 0.2mm nozzle; I’m sure I could get better detail with resin printing, but it’s pretty good and to be frank I’ve seen worse in commercially produced metal ones back in the day. Last week, they asked for bigger versions, so I printed them out at 400%. Worked a treat (after a bit of experimenting with supports), and really shows off the models.

Custom miniatures aren’t going to change the game that much, but they’re definitely add an extra point of enjoyment, and aren’t something I’d have even imagined being able to do forty years ago. Living in the future isn’t all bad.

A 3D printed 25mm miniature and a 400% scaled up version, in front of the 1983 D&D Expert Set

  1. Using the one true version from 1983, of course. I’m not (yet) giving money to those Johny-come-lately Magic the Gathering upstarts. [back]

  2. At least, if you want build an army of unique individuals. Once you have the file you can print out as many copies as you want. [back]

Plus 1 Mini

9 Aug 2025
An Acorn Electron with a Plus 1 Mini expansion connected to the back.

In a recent post, I alluded to my “newly tricked-out Electron”, and promised more detail in a future post. This is that post, and pictured above is the Electron in question, with its new friend the Plus 1 Mini.

While of course dear to my heart, the Acorn Electron was never what you’d call a powerhouse. Its 32K of RAM wasn’t terrible on paper, but the lack of a true text mode meant that much of it was given over to the screen. Moreover, the base unit had limited connectivity, only video (RF, composite and RGB) and a cassette interface for mass storage. What there was was an expansion slot on the back of the machine that gave access to almost all of the internals, and this offered a way forward.

Due to the Electron’s limited success in the market, and the more general problems they were facing, Acorn only released two expansions (the multi-purpose Plus 1 — more on that below — and the Plus 3 disc drive). However, third parties such as Slogger and Cumana picked up the mantle, producing a wider range of peripherals and keeping the ecosystem going for a few years longer than it might have.

More recently, the retro community (such as the fine people on StarDot) have continued this tradition, and there are numerous more modern options that open up interesting possibilities. I’d been eyeing up various of these for a while, but was inspired to take the plunge by this post from Mark Moxon (who’s work on Elite is well worth checking out if you haven’t already).

The Plus 1 Mini, unlike some other options, doesn’t exactly ape the physical form of the Acorn Plus 1 — as you can see in the photo, it’s not quite as wide as the Electron itself — but is similar in spirit in that it offers a grab-bag of useful capabilities in a single package. There are the obvious and characteristic dual cartridge slots, and a joystick port (Atari-style, rather than analogue). Inside are headers to connect a Raspberry Pi Zero to emulate the Tube second processor interface, which is definitely something I want to try out in the future. However, there are two items in particular that make a night-and-day difference to the capability of the machine: 128K of sideways RAM, and an SD card slot.

What makes the RAM sideways is a whole topic in itself, but suffice to say that it’s not just more of the same. The 16-bit address bus means the 6502 can only reference a 64K address space, which needs to cover both RAM and ROM, including the OS. To make use of more than 64K, a fair amount of bank switching is required. Fortunately, Acorn MOS provides a well developed system for doing this. An added bonus is that the sideways RAM isn’t subject to the compromises the Electron makes to share the main RAM with video, and so access is twice as fast.

The biggest benefit, though, is the SD card slot, which essentially emulates a stack of floppy disks1. Previously I’d been using the excellent PlayUEF to load cassette images, which allows you to pick from a vast library of software and load it with a great facsimile of my 1980s experience. However, I never figured out a good way to get the reverse process working, and thus never had a way to save work from the Electron. This severely limits the kind of experimentation you can do with the machine.

With the Plus 1 Mini, I can not only try out an even wider range of software (including ROM images, which can be loaded into sideways RAM), but can actually do things that last across multiple sessions. I’m excited to see what possibilities this opens up. I’ve already found that the expanded Electron is a significantly more capable (even useful) machine, and it seems clear that it could indeed have been the basis for a thriving ecosystem if history had gone a little differently.

  1. Not far from the BlueSCSI I used to resurrect the Mac SE last year [back]

Coffee Cup Sleeve

18 Jul 2025
Starbucks reusable coffee cups with 3D printed sleeves

I’ve just got round to uploading a quick model I made a few weeks ago: sleeves for reusable coffee cups. We have a couple of these basic cups in the car for when we get coffee on long journeys, but they can get a bit hot, and it’s not always clear whose drink is whose. Printing a couple of these in different colours makes them both easier to identify and more comfortable to hold. Not exactly earth-shattering, but a tiny quality of life improvement.

This site is maintained by me, Rob Hague. The opinions here are my own, and not those of my employer or anyone else. You can mail me at rob@rho.org.uk, and I'm @robhague@mas.to on Mastodon and robhague on Twitter. The site has a full-text RSS feed if you're so inclined.

Body text is set in Georgia or the nearest equivalent. Headings and other non-body text is set in Cooper Hewitt Light (© 2014 Cooper Hewitt Smithsonian Design Museum, and used under the SIL Open Font License). BBC BASIC code is set in FontStruction “Acorn Mode 1” by “p1.mark” (licensed under a Creative Commons Attribution Share Alike license).

All content © Rob Hague 2002-2025, except where otherwise noted.