I like zig and hence the bytecode VM will be in zig. Friendship ended with make, now build.zig is my best friend.
- Functional interpreter with support for:
- function calls
- operator precedence
- closures
- higher order functions
- primitive data structures with builtin functionality:
- string
- boolean
- integers
- hashmaps
- arrays
output_file.mp4
- If you are not using an x86 64 machine, change the
TARGET
value in the makefile accordingly
make compile
./bin/mc # for repl
./bin/mc <path-to-file> # for executing a file
let fib = fn(x){
if(x == 0){
return 1;
}
if(x == 1){
return 1;
}
return fib(x-1)+fib(x-2);
};
fib(15);
- adding support for strings and arrays
- adding support for hashmaps/hashtables
- build a bytecode compiler