
MakerLisp: Embedded Lisp Machine - tosh
https://makerlisp.com/
======
KirinDave
This is exceptionally cool, but even for someone like me who has disposable
income, a deep love of retrocomputing and several years of Lisp experience...
it's just very expensive. For the machine, GPIO headers and USB keyboard
support (really the bare minimum for interesting things) its over $300.

You have to really, REALLY love offbeat baremetal lisp machines to throw down
that kind of cache for a system where your USB controller is probably more
robust and powerful than the entire rest of the system put together. Hell, I'm
pretty sure my TV's remote control clocks faster when it's on...

~~~
MakerLisp
The price will come down, soon, as soon as I can build a batch of about 50.
I'm thinking of creating a mass buy sign-up, so I can put in a big order and
offer them at a reduced price. Or some sort of credit on future purchases for
those who buy now. I'm open to suggestions, and ideas on what is an
attractive/competitive target price.

~~~
KirinDave
I appreciate that you're doing small batch SBCs and that adds up. As an
artistic accomplishment, I love your work.

I think that for me personally, the outer envelope for a SBA (with the ability
to use a USB keyboard and some sort of minimal display attachment) is $150.

The GPIO expansion and the cute case are fine as secondary things and I
wouldn't mind giving over for that.

I don't know if there is some sort of uart option for serial comms on the
board, I didn't see that called out. But if there is you perhaps want to
mention it is your option for folks buying on a tighter budget.

~~~
MakerLisp
Yes, there is a USB/UART on the CPU card, I think I do mention it, but not as
directly as I should. Once you have the expansion board, then real terminals
or computers with serial ports are possible too.

------
leoc
There were various Z80 and MOS 6502 microcomputer Lisp implementations written
back in the '80s, some commercially released at the time, some readily
accessible nowadays. [https://www.wisdomandwonder.com/link/3787/how-small-can-
a-sc...](https://www.wisdomandwonder.com/link/3787/how-small-can-a-scheme-
implementation-be#comment-497)
[https://groups.google.com/forum/#!topic/comp.lang.scheme/Z_2...](https://groups.google.com/forum/#!topic/comp.lang.scheme/Z_2fxEuq4wc)

(There's one that I'm horribly, horribly overdue to get back to the authors
about archiving on the Internet, actually. Anyone who's based in North America
and happens to have the hardware and the expertise to recover data from both
5.25" and 8" floppies in some CP/M format?)

~~~
DonHopkins
The first Apple ][ LISP I ever played with was "MICROLISP", written in
APPLESOFT BASIC, included with the Apple Software Bank Volume 3-5, published
in 1978 (despite the Internet Archive listing saying it was published in 1974,
which would have been impossible since the Apple ][ was launched in 1977).

Text APPLESOFT BASIC source code -- It's only 201 lines! Beautiful!:

[http://apple.rscott.org/tools/view.htm?crc=e7d8e947136190aa&...](http://apple.rscott.org/tools/view.htm?crc=e7d8e947136190aa&n=6)

    
    
        60000  HOME : PRINT "MICROLISP/16-JUN-78": PRINT "COPYRIGHT 1978 APPLE COMPUTER INC"
        60010  PRINT "IT WILL TAKE APPROXIMATELY 1.5 MINUTES"
        60027  PRINT "TO INITIALIZE THE ARRAYS."
    

I can't find an MP3 of the original cassette tape it was distributed on ;), so
you'll have to suffer with the DSK image file:

[http://apple.rscott.org/tools/dldsk.htm?crc=e7d8e947136190aa](http://apple.rscott.org/tools/dldsk.htm?crc=e7d8e947136190aa)

HN discussion of 6502 Language Implementation Approaches (dwheeler.com):

[https://news.ycombinator.com/item?id=18376842](https://news.ycombinator.com/item?id=18376842)

[https://dwheeler.com/6502/](https://dwheeler.com/6502/)

Documentation from Apple Software Bank Volume 3-5:

[https://archive.org/details/Apple_Software_Bank_Vol_3-5/page...](https://archive.org/details/Apple_Software_Bank_Vol_3-5/page/n15)

Program Name: MICROLISP

Volume Number: 3

Software Bank Number: 00398

Submitted By: 0le Anderson

Program Language: APPLESOFT II

Minimum Memory Size: 32K Bytes

The following discussion assumes the user is already familiar with the
principles and technical vocabulary of the LISP language.. The user should
consider this document more as reference material on how MICROLISP differs
from other versions of LISP, and what features it implements. A good reference
for learning LISP is Weissman's LISP 1.5 Primer (see Bibliography). We also
can recommend Friedman's The Little LISPer as an enjoyable introduction.

MICROLISP is a cassette-based microprocessor implementation of an interpreter
for LISP, a programming language useful for symbol processing. The MICROLISP
interpreter is written in APPLESOFT II BASIC. More complete documentation will
soon be available when Hayden Press publishes a book on Microlisp by Ole
Anderson. This book will include an annotated source listing of the
interpreter, an explanation of its theory of operation, a detailed reference
manual, an application section describing how to do graphics from MICROLISP
using BASIC, a short LISP primer for the inexperienced user, and a
bibliography of LISP literature useful to the MICROLISP user.

Many programming languages (BASIC for example) have been created to deal
primarily with numerical data, and programs written in those languages can
solve a large range of problems. But there is an equally interesting area of
programming that deals with symbolic data.

If you want to be "in" with the artificial intelligence crowd, you might
consider learning a symbolic manipulation language. Symbolic data might be
chess positions, equations (treated as equations, not as expressions to be
evaluated), or natural-language sentences. LISP is a language for list
processing (hence the name: LISt Processor). Lists are the data items of LISP,
just as numbers are the data items in BASIC. Because list elements are symbols
not restricted to numbers, LISP makes it possible to solve many types of
symbolic manipulation problems as easily as simple numeric problems are solved
in BASIC. LISP is used primarily for artificial intelligence applications such
as processing natural-language input, performing symbolic differentiation and
integration of numerical formulas, and proving mathematical theorems.
MICROLISP is a version of LISP that will allow you to learn the elements of
LISP by writing and executing LISP programs.

BASIC goes a long way toward making the power of the personal computer
available to the average person, but it lacks several critical features found
in many other high-level languages: naming of subroutines and calling them
with parameters, use of variable names with more than the first two characters
significant, recursive subroutines and dynamic allocation of variables. These
features are all found in MICROLISP.

Implementing MICROLISP in BASIC means that LISP programs do not execute very
rapidly. However, it makes it possible to see how the language has been
implemented. On the other hand, APPLESOFT II supports real (floating point)
arithmetic, string functions and trigonometric functions, and these are all
available to the MICROLISP user (often they are not available in larger
versions). Another convenient feature in APPLESOFT II is the ability to PEEK
and POKE memory locations, and to CALL machine-language routines from BASIC.
This is often useful for interfacing special hardware and for applications
where speed is critical. Another reason MICROLISP was written in BASIC is for
tutorial purposes.

Many personal computer users desire to learn about the techniques involved in
implementing high-level computer languages. This program is an example of a
complete language processor which accepts characters typed from the keyboard,
builds symbols from them, and processes these symbols according to the syntax
of the LISP language. Thus, it uses many of the important algorithms employed
by all other interpreters, compilers and language processors. MICROLISP can
also be used as an educational tool for introducing elementary list-processing
concepts.

~~~
DonHopkins
Also from David A. Wheeler's 6502 Language Implementation Approaches
(archive.org-ified to the time the links were written, or best approximation):

[https://web.archive.org/web/20181112182918/https://dwheeler....](https://web.archive.org/web/20181112182918/https://dwheeler.com/6502/)

Lisp/LOGO

The "skimp" page also includes a list of several 8-bit LISP implementations,
including several for the 6502 [1]. This discussion lists more [2]. One useful
implementation discussion (of many!) is R. Kent Dybvig's "Three Implementation
Models for Scheme". University of North Carolina Computer Science Technical
Report 87-011 [Ph.D. Dissertation], April 1987 [3].

neslisp [4] is a small subset of Lisp that generates 6502 code (NES); the as
of version 0.1 it is released under the GPLv2 license (and thus is open source
software). An older version is available via neslisp on Google code [5].

Picobit [6] (GPLv3) looks interesting. You program in Lisp (specifically a
variant of Scheme) on a larger system; it then compiles to a VM that runs on
the target. Currently it does not support the 6502, but the system is designed
to be portable and it looks to me that it'd be relatively easy to port to a
6502.

Lysp [7] (MIT license) is another small implementation of Lisp. It doesn't
directly support 6502 and is in C, but it's small... so it might not be hard
to transliterate. A related program from the same developer is Maru [8], which
can self-host. This could be a reasonable starting point for creating a 6502
Lisp.

Turning the Apple //e into a lisp machine, part 1 [9] refers to this Lisp
interpreter for the Apple //e [10] (MIT license). They also show a clever
bootstrap approach: they send code via the audio jack (!).

There's more that can be done; Lisp was originally developed in 1965, on even
smaller systems. The book "Lisp in Small Pieces", Program Transformation in
Lisp [11], this Scheme page [12] and these details on implementation [13] are
all of interest. R. Kent Dybvig's "Three Implementation Models for Scheme"
[14] shows how to implement Scheme while still keeping most stuff on the
stack. Tagging could be difficult, but an alternative (that I believe was done
for early Lisp implementations) is to partition the memory into regions; to
determine the tag, just check which memory region it is in. It might be
possible to start with PicoLisp [15] to create a 6502 version. There is a
trivial ACL2 implementation of Lisp (GPL) [16] that I converted into Common
Lisp ( compiler [17], run-time [18]; See Wolfgang Goerigk's "Compiler
Verification Revisited" [19] for more).

I know that there was an "InterLISP 65" available for Atari's 6502-based line.

Various full LOGO implementations were available as well.

[1] skimp:
[http://web.archive.org/web/20100131151915/http://www.ip9.org...](http://web.archive.org/web/20100131151915/http://www.ip9.org/munro/skimp/)

[2] discussion: [missing]

[3] Three Implementation Models for Scheme:
[https://web.archive.org/web/20160817185323/http://www.cs.ind...](https://web.archive.org/web/20160817185323/http://www.cs.indiana.edu/~dyb/pubs/3imp-
abstract.html)

[4] neslisp:
[https://web.archive.org/web/20160319025751/http://gomez.yell...](https://web.archive.org/web/20160319025751/http://gomez.yellowcouch.org/lisp/)
sources:
[https://web.archive.org/web/20160619185108/http://gomez.yell...](https://web.archive.org/web/20160619185108/http://gomez.yellowcouch.org/lisp/src/neslisp-0.1.tar.gz)

[5] google code nelisp: [missing]

[6] Picobit:
[https://web.archive.org/web/20150106110223/https://github.co...](https://web.archive.org/web/20150106110223/https://github.com/stamourv/picobit)
current:
[https://github.com/stamourv/picobit](https://github.com/stamourv/picobit)

[7] Lysp:
[https://web.archive.org/web/20180929064442/http://piumarta.c...](https://web.archive.org/web/20180929064442/http://piumarta.com/software/lysp/)
source: browse:
[https://web.archive.org/web/20170507045957/http://www.piumar...](https://web.archive.org/web/20170507045957/http://www.piumarta.com/software/lysp/lysp-1.1/)
download:
[https://web.archive.org/web/20180929064442/http://piumarta.c...](https://web.archive.org/web/20180929064442/http://piumarta.com/software/lysp/lysp-1.1.tar.gz)

[8] Maru:
[https://web.archive.org/web/20181206222700/http://piumarta.c...](https://web.archive.org/web/20181206222700/http://piumarta.com/software/maru/)
source: browse:
[https://web.archive.org/web/20181206222700/http://piumarta.c...](https://web.archive.org/web/20181206222700/http://piumarta.com/software/maru/maru-2.4/)
download:
[https://web.archive.org/web/20181206222700/http://piumarta.c...](https://web.archive.org/web/20181206222700/http://piumarta.com/software/maru/maru-2.4.tar.gz)

[9] Turning the Apple //e into a lisp machine, part 1:
[https://web.archive.org/web/20190109003417/http://blog.nulls...](https://web.archive.org/web/20190109003417/http://blog.nullspace.io/apple-2-lisp-
part-1.html)

[10] google code turtles:
[https://web.archive.org/web/20180611002847/https://github.co...](https://web.archive.org/web/20180611002847/https://github.com/hausdorff/turtles)
current:
[https://github.com/hausdorff/turtles](https://github.com/hausdorff/turtles)

[11] Program Transformation in Lisp:
[http://www.findinglisp.com/blog/2004/06/program-
transformati...](http://www.findinglisp.com/blog/2004/06/program-
transformation-in-lisp.html)

[12] this Scheme page: [missing]

[13] these details on implementation:
[https://web.archive.org/web/20180801195133/http://library.re...](https://web.archive.org/web/20180801195133/http://library.readscheme.org/page8.html)

[14] Three Implementation Models for Scheme:
[https://web.archive.org/web/20190503102138/https://cs.indian...](https://web.archive.org/web/20190503102138/https://cs.indiana.edu/~dyb/papers/3imp.pdf)

[15] PicoLisp:
[https://web.archive.org/web/20181124064229/http://www.softwa...](https://web.archive.org/web/20181124064229/http://www.software-
lab.de/down.html)

[16] ACL2 implementation of Lisp (GPL):
[https://web.archive.org/web/20090217043459/http://www.cs.ute...](https://web.archive.org/web/20090217043459/http://www.cs.utexas.edu/users/moore/acl2/v3-1/distrib/acl2-sources/books/workshops/1999/compiler/)

[17] compiler:
[https://web.archive.org/web/20160320015734/http://www.dwheel...](https://web.archive.org/web/20160320015734/http://www.dwheeler.com/trusting-
trust/lisp-demo/mycompiler.cl)

[18] runtime: [missing]

[19] Compiler Verification Revisited: [missing] citation:
[https://dl.acm.org/citation.cfm?id=369101](https://dl.acm.org/citation.cfm?id=369101)
buy chapter:
[https://link.springer.com/chapter/10.1007/978-1-4757-3188-0_...](https://link.springer.com/chapter/10.1007/978-1-4757-3188-0_15)

------
kristianp
Another 'bare metal lisp' is [http://www.ulisp.com/](http://www.ulisp.com/) ,
which has some fun demos and is supported by different hardware, 16 or 32 bit.
It's also a single .ino file, e.g. [1]

[1] [https://github.com/technoblogy/ulisp-
arm/blob/master/ulisp-a...](https://github.com/technoblogy/ulisp-
arm/blob/master/ulisp-arm.ino)

~~~
opnitro
Just a word of warning, I tried this right now and I'm 55% sure I just broke
the arduino. Upload failed, resetting does nothing.

~~~
johnsondavies
I've never heard of this happening before, and I can't even think of a way in
which uploading uLisp could break an Arduino, but contact me directly (my
email address is on the uLisp site) and I'll try and help you sort it out.

~~~
opnitro
I can't see how that would break it either, hence the low confidence
percentage!

------
neilv
Related impractical fun: you could fit a small Lisp (such as standard R7RS
Scheme) in some PC motherboard flash chips used for the BIOS/bootstrap, using
Coreboot. Maybe ThinkPad X200 or a Coreboot-friendly Chromebook.

~~~
p_l
In the Lisp community, there's an infamous story of a Lisp Machine made out of
Nokia Communicator (the early, DOS-based model with 80186 cpu) by Timo Noko
using Nokolisp.

What happened was that the DOS flash image got corrupted somehow, so Noko
implemented missing bits in his lisp implementation and made the phone boot
directly into it. Since all the software he used was written in his Lisp,
there was not much of a difference in usability :-)

------
rrix2
I played with this thing for like a half hour at Vintage Computer Festival a
few months back, it's a very cool thing. The computer packed fully in to a
case built around a VGA display and usb ortholinear keyboard, and in to a
shoulder bag. The "Lisp Machine" itself speaks serial in/out. The keyboard
plugs in to a USB-to-Serial interface, and the screen in to a serial terminal
to VGA emulator.

Cool stuff, and the creator's goal of creating a machine for interactive
learning with a hand-coded scheme-alike is pretty wonderful.

EDIT: It looks like it went on sale two days ago and the full kit is already
listed as out of stock. Hopefully they can increase stock. I've wanted one of
these since I first put eyes on it.

~~~
MakerLisp
I'll adjust the stock count on Tindie, I have a few more than what is shown
there, but I am getting low and I have to order more parts soon. Thanks for
your interest and positive comments !

~~~
rrix2
Just grabbed one, thanks much

------
st3fan
Super cool. But ... Not a single code example. No GitHub repo. Is there _any_
info available other than those single page PDFs with no info?

~~~
Lowkeyloki
[https://github.com/hww/makerlisp](https://github.com/hww/makerlisp)

~~~
MakerLisp
I didn't make that github repo, I don't know who did. But it's old. The most
recent archive on makerlisp.com is from a few days ago. Go there if you want
the most recent stuff.

~~~
MakerLisp
This is a snapshot of the source preview I put up just before my trip to the
Bay Area Lisp & Scheme Users Group in February, before I had shipped any
products. Apparently someone was just trying to help me get more exposure. I
have no problem with this, the attributions and links are all correct and it
is a proper snapshot. As a reading / demonstration example, to get the feel of
the system, this is fine. But I update the archive on my website every few
days, and that's where you can find the latest version.

------
tosh
Here is a talk about MakerLisp at BALISP (Bay Area Lisp & Scheme Users Group)

[https://www.youtube.com/watch?v=Ad9NtyBCx78](https://www.youtube.com/watch?v=Ad9NtyBCx78)

------
amatic
Waiting for Teensy 4.0 (currently in beta testing[1]). Probably will make an
amazing lisp machine. 600Mhz CPU, usb, all Arduino compatible.

[1] [https://forum.pjrc.com/threads/54711-Teensy-4-0-First-
Beta-T...](https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test)

------
verytrivial
A bit off topic, but does anyone recognise the USB keyboard shown in the
photos?

~~~
galonk
I don’t think it’s a Minivan, could be a Vortex. If you search for “split
spacebar 40 keyboard” you can see similar commercial and custom boards.

It’s what’s called a 40% layout (as in 40% of the keys of a standard 104 key
board). To save space it doesn’t have a number row, you have to use a fn key
to type numbers.

It’s not ortholinear, as another poster claimed. See the Planck keyboard for
an example of that.

(PS If you’re the type of person who can fall down a rabbit hole for a subject
with lots of lore to learn and that allows infinite customization, you should
probably avoid the world of custom mechanical keyboards ;)

~~~
uncletaco
I am that kind of person and have already spent way too much money on this. By
this time next year I’ll have an atomic purple Iris with mito laser keycaps
that light up on individual key presses. I’ll also have an ergo infinity with
symbiosis space cadet 2 keycaps. All that I’ve built myself, hopefully without
issues.

The real kicker is the waiting. If delayed gratification made a noise it would
sound a lot like cherry mx switches.

------
new4thaccount
I like the concept, but does anyone know why the old Z80 was chosen instead of
a newer processor?

~~~
cmrdporcupine
eZ80, not original Z80. Three stage pipeline, higher clock speed, can address
16MB of memory, available up to 50mhz clock speed.

It's a neat processor.

~~~
MakerLisp
I chose this processor because it was available for under $10.00 and had the
capability of addressing at least 1 Mb of external RAM. Regardles of
architecture, when I searched, there were only two processors that I could buy
on Digi-Key or Mouser that had these parameters, and they were both Z80
variants ! And then, bonus, it can also run retro software. It has been an
exceptionally easy and capable processor to use. And although I'd always like
more performance, for the kind of of software experience I'm trying to
recreate, it's plenty.

~~~
cmrdporcupine
Looks like a good platform for Fuzix

~~~
MakerLisp
Yes, I would love to get Fuzix on the platform. Do you know anyone who would
be interested in doing a port ?

~~~
cmrdporcupine
You could probably just send Alan Cox a free board and see what he does with
it :-) I imagine it's not a hard port.

I'm no Z80 coder, and not a Fuzix user. Just watching from a distance.

