No description
Find a file
Scott Wolchok 1058c959d8 remove extra trailing NUL on kSymbols
It wastes a byte this way -- see https://godbolt.org/z/nEj9hc
See diff of hexdump of sectorlisp.bin before/after:

```
*** before.txt  2021-02-27 13:17:47.842081600 -0800
--- after.txt   2021-02-27 13:16:40.789140700 -0800
***************
*** 31,33 ****
  000001e0: 4551 0043 4f4e 4400 4341 5200 4344 5200  EQ.COND.CAR.CDR.
! 000001f0: 434f 4e53 004c 414d 4244 4100 0090 55aa  CONS.LAMBDA...U.
  00000200: f7c7 0100 7509 d1ef 8db5 8641 e9a3 ff53  ....u......A...S
--- 31,33 ----
  000001e0: 4551 0043 4f4e 4400 4341 5200 4344 5200  EQ.COND.CAR.CDR.
! 000001f0: 434f 4e53 004c 414d 4244 4100 6690 55aa  CONS.LAMBDA.f.U.
  00000200: f7c7 0100 7509 d1ef 8db5 8641 e9a3 ff53  ....u......A...S
```

Second zero byte after LAMBDA is now uninitialized.
2021-02-27 22:57:06 -08:00
bin Reduce sectorlisp from 948 to 856 bytes 2020-10-27 13:45:12 -07:00
.gitignore Initial import 2020-10-26 18:21:15 -07:00
lisp.c remove extra trailing NUL on kSymbols 2021-02-27 22:57:06 -08:00
lisp.h Initial import 2020-10-26 18:21:15 -07:00
lisp.lds Reduce sectorlisp from 948 to 856 bytes 2020-10-27 13:45:12 -07:00
lisp.lisp Reduce sectorlisp to 836 bytes 2021-02-04 01:18:34 -08:00
Makefile Reduce sectorlisp from 948 to 856 bytes 2020-10-27 13:45:12 -07:00
NOTICE Initial import 2020-10-26 18:21:15 -07:00
README.md Reduce sectorlisp from 948 to 856 bytes 2020-10-27 13:45:12 -07:00
realify.sed Initial import 2020-10-26 18:21:15 -07:00
realify.sh Initial import 2020-10-26 18:21:15 -07:00
sectorlisp.S remove extra trailing NUL on kSymbols 2021-02-27 22:57:06 -08:00
start.S minor tweaks so the assembly builds with clang 2020-10-27 14:20:22 -07:00

sectorlisp

sectorlisp is an effort to bootstrap John McCarthy's meta-circular evaluator on bare metal from a 512-byte boot sector.

Yo dawg, I heard you like LISP so I put a LISP in your LISP so you can eval while you eval

Motivations

Much of the information about LISP online tends to focus on wild macros, JIT compilation, or its merits as a better XML as well as a better JSON. However there's been comparatively little focus on the primary materials from the 1950's which emphasize the radically simple nature of LISP, as best evidenced by the meta-circular evaluator above.

Binary Footprint Comparison

This project aims to promote the radical simplicity of the essential elements of LISP's original design, by building the tiniest LISP machine possible. With a binary footprint less than one kilobyte, that's capable of running natively without dependencies on modern PCs, sectorlisp might be the tiniest self-hosting LISP interpreter to date.

We're still far off however from reaching our goal, which is to have sectorlisp be small enough to fit in the master boot record of a floppy disk, like sectorforth. If you can help this project reach its goal, please send us a pull request!

Demo

booting sectorlisp in emulator

The video above demonstrates how to boot sectorlisp in the blinkenlights emulator, to bootstrap the meta-circular evaluator, which evaluates a program for finding the first element in a tree.

You can watch the full demo on YouTube.