zaoqi-unsafe / Gibbous

Basic implementation of Scheme in Lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A very basic Scheme implementation hosted on Lua, with basic Scheme to Lua
interoperability.

Although it does not do so yet, it may at some point conform to
the R*RS specifications.

Lazy overview:

Implemented:
 * Language primitves:
   - let, let*, if, cond, define, lambda, quote, begin

 * Basic functions (cons, car, cdr, type testing, math operations, ...)

 * File I/O, console I/O
   - Input: open-input-file, call-with-input-file, read, read-char, read-line
   - Output: open-output-file, call-with-output-file, write, write-char,
             display, newline

 * Lua interoperability
   - `lua_var` evaluates to `lua_var` translated to Scheme value
   - `(lua_func ...)` evaluates to the return value of `lua_func(...)` with the
       necessary type conversions.
   - `(:method t ...)` is translated to `t:method(...)` with the necessary
     conversions.
   - `(.field t)` is translated to `t.field`

Not implemented yet but planned:
 * Language primitives:
   - letrec, and possiblity a few I don't know yet.

 * Macros

Not implemented:
 * call/cc

May work:
 * Proper tail calls

About

Basic implementation of Scheme in Lua

License:BSD 2-Clause "Simplified" License


Languages

Language:Lua 93.8%Language:Scheme 4.9%Language:C 1.0%Language:Terra 0.4%