MicroLisp With Matching Parens

Lisp is a supremely elegant programming language, but you won’t find it around much today. That’s a shame; in the 80s and 90s, all the cool kids were using Lisp machines, computers dedicated to the creation and interpretation of Lisp. While the AI renaissance of the 80s is dead, replaced with the machine learning fad of today, Lisp machines have gotten much smaller. Now, they’ll fit in your pocket, and they have parenthesis matching, to boot.

If this build looks familiar, you’re not wrong. A while back, we saw a similar pocket Lisp computer based around the ATMega328 microcontroller with 32k of Flash and 2k of RAM. That’s not a lot by any measure, and a much more suitable processor for an AVR-based pocket Lisp machine would be the big boys of the ATMega family.

The new and improved version of the Tiny Lisp Computer is built around the ATMega1284. If it’s capable enough to run a 3D printer, it should run Lisp very well. With more program space and more RAM come more features including matching parens when entering code, a serial monitor interface, and a program editor – basically a text editor on the chip.

Apart from the larger chip, the circuit remains relatively unchanged. The display is still an OLED that can be had for a few dollars from the usual online retailers, and the other bits of circuitry are still just a handful of resistors, caps, and wire. An off-the-shelf FTDI module (or whatever serial chip you desire) can be added to connect to a serial terminal, and support for a PS/2 keyboard rounds out the board.

14 thoughts on “MicroLisp With Matching Parens

        1. The most obvious thing would be to pick one of the several actively maintained Lisp or Scheme implementations, like SBCL, Chicken, Clojure, or Racket.

          Lisp, even just as a syntax, is really very far from dead.

        2. The most obvious thing to do would be to use one of the several actively maintained Lisp implementations, like SBCL, Clojure, Chicken or Racket. Lisp, even just as a syntactic grouping of languages, is very far from being dead.

        3. Honestly, JavaScript. If you ignore the silly parts and restrict yourself to functions, (including builtins like setTimeout), strings, numbers, arrays, and objects, you end up with a pretty acceptable lisp with an extremely strong ecosystem. With ES6’s string interpolation, you could even use eval sort of comfortably ( because if I’m going to annoy people who hate JS, I may as well annoy people who like it as well)

    1. TinyLisp might be a cute proof of concept, rather than a useful tool and Lisp might not be well suited for embedded systems (if run directly on the MCU, but that would IMHO be a misuse — better use of resources might be to write the compiler for your DSL in Lisp running on a PC, targeting the MCU).

      If you look for a currently used and maintained, mature implementation of Common Lisp, you could head over to http://www.sbcl.org .

  1. A roomie of mine dug a perfectly working Symbolics 3600 Lisp machine out a college dumpster. We both tried forever to so something cool with it, but neither of us new a damned thing about Lisp or the OS/command line. We could boot it and get it to show a little bit about its innards and status, but that was about it. It got traded around various friends for a while, but I have no idea what eventually happened to it. Probably much like my old collection of VAXen, sold off on ebay over the years.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s