2021-08-27 03:25:39 +00:00
|
|
|
# Ginger
|
2017-07-12 00:52:07 +00:00
|
|
|
|
2021-12-30 22:29:38 +00:00
|
|
|
A programming language utilizing a graph datastructure for syntax. Currently in
|
|
|
|
super-early-alpha-don't-actually-use-this-for-anything development.
|
2021-12-29 19:32:53 +00:00
|
|
|
|
|
|
|
## Development
|
|
|
|
|
|
|
|
Current efforts on ginger are focused on a golang-based virtual machine, which
|
2023-10-14 13:44:57 +00:00
|
|
|
will then be used to bootstrap the language.
|
2021-12-29 19:32:53 +00:00
|
|
|
|
2023-10-14 13:44:57 +00:00
|
|
|
If you are on a machine with nix installed, you can run:
|
2021-12-29 19:32:53 +00:00
|
|
|
|
|
|
|
```
|
2023-10-14 13:44:57 +00:00
|
|
|
nix develop
|
2021-08-27 03:25:39 +00:00
|
|
|
```
|
2021-12-29 19:32:53 +00:00
|
|
|
|
|
|
|
from the repo root and you will be dropped into a shell with all dependencies
|
2023-10-14 13:44:57 +00:00
|
|
|
(including the correct go version) in your PATH, ready to use.
|
2021-12-30 22:29:38 +00:00
|
|
|
|
|
|
|
## 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
|
|
|
|
```
|
|
|
|
|
2022-03-31 15:18:02 +00:00
|
|
|
Where you can replace `5` with any number.
|