1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-11-05 02:06:25 +00:00
PLASMA/doc/DRAWL.md

32 lines
1.7 KiB
Markdown
Raw Normal View History

2024-07-09 19:22:20 +00:00
# LISP 1.5 implemented in PLASMA
2024-07-09 21:25:41 +00:00
LISP interpreted on a bytecode VM running on a 1 MHz 6502 is going to be sssllllooooowwwww. So I called this implementation DRAWL in keeping with the speech theme. DRAWL represents an exploration REPL language for the PLASMA environment. It isn't meant to be a full-blown programming language, more of an interactive sandbox for playing with S-expressions.
2024-07-09 19:21:17 +00:00
## Missing features of LISP 1.5 in DRAWL
- The PROG feature isn't present. Programming is limited to interpreting lambda S-expressions
2024-07-09 21:25:41 +00:00
- Number values are limited to 32 bit integers, no floating point
2024-07-09 19:21:17 +00:00
- Deep recursion. The 6502 architecture limits recursion, so don't expect too much here
However, the code is partitioned to allow for easy extension so some of these missing features could be implemented.
## Features of DRAWL
2024-07-09 21:25:41 +00:00
- 32 bit integers and basic math operators. Hey, better than you probably expected
2024-07-09 19:21:17 +00:00
- Recursion handles about nine levels deep. Better than nothing
- Fully garbage collected behind the scenes
- Optionally read LISP source file at startup
2024-07-09 21:25:41 +00:00
- SET and SETQ implemented for setting variables
2024-07-09 19:21:17 +00:00
LISP is one of the earliest computer languages. As such, it holds a special place in the anals of computer science. I've always wanted to learn why LISP is held in such high regard by so many, so I went about learning LISP by actually implementing a LISP interpreter in PLASMA. PLASMA is well suited to implement other languages due to its rich syntax, performance and libraries.
## Links
Here are some links to get you started.
LISP 1.5 Manual: https://archive.org/details/bitsavers_mitrlelisprammersManual2ed1985_9279667
Video showing DRAWL in action:
Preconfigured PLASMA ProDOS boot floppy for DRAWL: https://github.com/dschmenk/PLASMA/blob/master/images/apple/DRAWL.po