| examples | ||
| exe | ||
| lib | ||
| test | ||
| util | ||
| vim | ||
| .editorconfig | ||
| .gitignore | ||
| .ocamlformat | ||
| dune-project | ||
| justfile | ||
| LICENSE | ||
| primitives.md | ||
| README.md | ||
Growl
Growl is my test-bed for writing a statically typed concatenative language.
The upstream repository is located at https://git.rhzm.org/lobo/growl. Repositories in GitHub and, Codeberg are kept mirrored.
It currently features a type system and inference engine based on Robert Kleffner's "A Foundation for Typed Concatenative Languages" thesis.
Executing the interpreter can be done like so:
$ dune exec -- ./exe/main.exe run examples/uncons.grr
([2 3 4] some)
Without any arguments it defaults to reading from standard input.
Building
Install the dependencies first:
$ opam install cmdliner sexplib
$ opam install alcotest # to run tests
Then execute dune build or dune runtest to run the tests.
While it hasn't been implemented yet, the main thing I want to explore with Growl is what I call "latent execution", a technique that allows for a more flexible syntax while keeping the type system and execution semantics sound by using type information to defer and execute words when their dependencies are satisfied; for instance:
println if (1 + 2 = 3) {"True"} {"False"}
# Should be identical to:
1 2 + 3 = {"True"} {"False"} if println