forked from baguette/lemma
-
Notifications
You must be signed in to change notification settings - Fork 0
A Lisp designed to integrate with Lua.
avansc/lemma
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Lemma is a Lisp dialect inspired by several other languages, the most obvious ones being Scheme, Arc, and Clojure. Lemma is also highly experimental and in a constant state of change. Lemma is currently a work in progress and as such is incomplete and inefficient. The idea is to create a modern version of Lisp that integrates with the Lua virtual machine. Currently, there is a slow, ugly interpreter that supports a handful of special forms, lexical scope, directly calling Lua functions, and macros. There is also some preliminary syntactic sugar for dealing with Lua tables. To reiterate: Lemma the language as well as lemma the interpreter are works in progress. The language is experimental while the interpreter provides a playground for the experimentation. The interpreter is also very slow. My plan is to continue modifying the interpreter until it accepts a language that I'm satisfied with. After the language becomes fairly stable, I plan to begin work on a self-hosting compiler that targets the LVM. Any file with the .lma extension in this repository is a Lemma source file. There are quite a few located in the example/ directory, plus some macros in lib/std.lma. Have a look if you're curious. To use the interpreter, you need to have Lua installed (http://lua.org/). It was developed with version 5.1 but might work with 5.2. First, cd to the directory containing the Lemma source files. Make sure the lemma script is executable: $ chmod +x lemma Then execute it: $ ./lemma # start a REPL $ ./lemma file.lma # evaluate the contents of file.lma To be able to execute from other directories, some environment variables need to be set. This depends on where lemma resides on your file system, but it will typically be something along these lines: LEMMA_PATH=$HOME/Workspace/lemma PATH=$PATH:$LEMMA_PATH LUA_PATH="$LEMMA_PATH/?.lua;$LEMMA_PATH/?/?.lua;./?.lua;;" export LEMMA_PATH PATH LUA_PATH That's all for now...
About
A Lisp designed to integrate with Lua.
Resources
Stars
Watchers
Forks
Packages 0
No packages published