Friday, November 14, 2014

pLisp Updates

Thought I'd share some updates related to pLisp.
  1. pLisp has been migrated completely to Linux. I was already doing this in a half-assed way by using Cygwin, but faced issues with migrating to GTK 3.0, so a move to Linux made sense. I also wanted to make it completely portable, but one look at the horror that is autoconf/automake made me beat a quick retreat.
  2. I have been working on native code compilation, and it's been a partial success. Most of a closure/macro's code (the assembly Lisp that was being generated for the VM's consumption) is now native, except for the FRAME instruction. This instruction is problematic mainly because of the need to handle continuations. We need to maintain the calling stack even when we're doing native code, so the reliance on the present 'instruction set' (reg_accumulator, reg_current_stack, et al) is still there, making going full-native still some way off. I guess I need to grok Appel's Compiling With Continuations before I can do this. The Tiny C Compiler is used for the native code compilation; we dynamically create function pointers by converting the Lisp assembly code to C and invoking the TCC API to convert the C code to native code.
  3. Command line options have been introduced. Now you can run pLisp in console mode (-c), invoke it with an image (-i) or use it to just evaluate a single expression and quit (-e).
  4. A user manual and FAQ are in the works. I'm also looking for a new descriptive title ("pLisp is a Lisp-1 interpreter" doesn't really do it justice; since the UI draws a lot of inspiration from Smalltalk, maybe I'll change it to "Don't Lisp. Talk". Provocative much?)