You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Brian Picciano 5ab4694c66 I don't know what I was doing here but I probably won't return to this branch anyway 7 months ago
cmd/eval Complete refactor vm to not be as stupid 2 years ago
examples Got basic demo working, ran go fmt 2 years ago
gg Complete refactor vm to not be as stupid 2 years ago
graph Got basic demo working, ran go fmt 2 years ago
rust I don't know what I was doing here but I probably won't return to this branch anyway 7 months ago
sandbox rename Junction to Tuple, update syntax, rename Null to ZeroGraph 3 years ago
vm Complete refactor vm to not be as stupid 2 years ago
.gitignore gitignore 8 years ago
README.md Complete refactor vm to not be as stupid 2 years ago
default.nix Make graph generic 2 years ago
go.mod Make graph generic 2 years ago
go.sum make into a module 3 years ago

README.md

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.