ginger/README.md
Brian Picciano 2be865181d Complete refactor vm to not be as stupid
This commit is the result of many days of picking vm apart and putting
it back together again. The result is an implementation which separates
compile and runtime into separate steps, and which functions (more)
correctly in the face of recursion.

Pretty much all aspects of vm have been modified or deleted, so it's not
even really worth it to describe specific changes. Just pretend this is
the original implementaiton and the old one was never done.
2022-03-31 09:27:52 -06:00

958 B

Ginger

A programming language utilizing a graph datastructure for syntax. Currently in super-early-alpha-don't-actually-use-this-for-anything development.

Development

Current efforts on ginger are focused on a golang-based virtual machine, which will then be used to bootstrap the language. go >=1.18 is required for this vm.

If you are on a linux-amd64 machine with nix installed, you can run:

nix-shell -A shell

from the repo root and you will be dropped into a shell with all dependencies (including the correct go version) in your PATH, ready to use. This could probably be expanded to other OSs/architectures easily, if you care to do so please check out the default.nix file and submit a PR!

Demo

An example program which computes the Nth fibonacci number can be found at examples/fib.gg. You can try it out by doing:

go run ./cmd/eval/main.go "$(cat examples/fib.gg)" 5

Where you can replace 5 with any number.