- Announcement about May 10th, 2018 update and your password.
On another thread we were discussing scripting languages that could be hooked up to C, and I suggested my Tinyscript
language, which is a very simple scripting language parsed directly out of the string provided. Tinyscript is very simple and has a nice (I think) syntax, but it does have a number of limitations, including no user defined functions, no string datatype, no arrays, and subroutines cannot have parameters.
So I've written another scripting language: Proplisp
. (I hope the name isn't taken!). As you can guess, it's based on Lisp. It's a very simple, cut down version of Lisp, but it is certainly Turing complete. Unlike Tinyscript you can define functions: in fact you can define anonymous functions, and functions are first class objects. The C interface is similar to Tinyscript's, and the code footprint is about the same. I had hoped to make it smaller, but although the parser is much simpler than Tinyscript's the garbage collector and more complicated eval pretty much canceled that out. As with Tinyscript the data footprint is strictly bounded; Proplisp only uses the block of RAM you give it at startup. It does need more stack than Tinyscript, and it can use up the provided RAM pretty fast, although the garbage collector helps (Tinyscript has no dynamic allocation so it doesn't need GC).
The code is primarily intended as an embedded scripting language for other C applications, but I did write a simple test framework with a read-eval-print loop.
I've uploaded the binary for those who want to play with Lisp on the Propeller, but since there's no way to load/save it's not really very practical. It would be great if someone could do a proper editor and/or interface with the SD card (the SD reader on my C3 board doesn't work, so I can't really try this; I guess saving to EEPROM might also be feasible, does anyone have code to do that?)