wabi interpreter
** WARNING**
WORK IN PROGRESS DO NOT USE
build
-
install zig version 0.11.0
-
build the interpreter
zig build -Doptimize=ReleaseFast
-
build the repl image
zig build genesis < repl.wabi
-
have (repl)fun
zig-out/bin/wabivm repl.fasl
some principles
-
control is first class through delimited continuations (
prompt/controloperators) -
syntax is first class via fexpressions (see kernel programming language), that implies environments are first class
-
"special" operators are not special (like
iffnfx): They are just builtins. -
All the resources are constrained (i.e. memory, cpu ec...)
State
whatever can be calculuated in the initial allocated memory is ok, there is a bug in the algorithm
that copies active memory in another memory space (i.e. the equivalent of GC for other languages)
that prevents the system to continue.
Missing pieces
-
fix bugs :(
-
use a smarter data structure for lists
-
introduce maps (HAMT)
-
introduce sets (or not? the same of a map to boolean)
-
extend the numeric tower with arbirtrarly big integers, rationals, imaginary (inexact number?)
-
define a (first classs) module system
-
IO using callbacks/continuations
examples
see the tests directory