Source code for the EYG language and Overlay harness.
Try them out on the website or install the CLI locally:
curl -fsSL https://eyg.run/install | bashJoin the discussion on discord
Building better languages and tools; for some measure of better.
"Eat Your Greens" is a reference to the idea that eating vegetables is good for you, however the benefit is only realised at some later time.
All the projects in this repository exist to increase the guarantees available when you build on them.
Projects in this repo introduce extra contraints, over regular programming languages and tools. By doing so more guarantees about the system built on them can be given.
- For the full CLI reference see
packages/gleam_cli/README.md. - To create, protect, and use publishing identities see
guides/managing_signatories.md. - The language syntax is described in
guides/syntax.md. - Every
!builtinis catalogued inguides/builtins_reference.md. - Full effect reference is in
./guides/cli_effects_reference.md. - Write assertions and ordered effect expectations with aok.
- File and import path resolution is explained in
guides/file_resolution.md. - To install from source see
./guides/install_from_source.md.
The intermediate representation (IR) of EYG is a minimal tree and is the stable interface for writing EYG programs. Type checking, syntax, evaluation or compilation are optional components built on this foundation.
This repository contains the language definition, implementation, website and package hub.
EYG makes it easy to swap out components of the toolchain. A sensible reason could be to create a runtime with a unique set of effects, i.e. embed EYG in a game or website. Another reason could be to imagine your own syntax, or even visual editor, and reuse the EYG interpreter and packages.
- spec A JSON spec of all evaluation rules. Compiler and interpreter implementations should use this as their test suite.
- gleam_analysis Type inference for expressions, effects and scope variables in EYG programs.
- gleam_cli The CLI for running EYG programs and interacting with the EYG hub.
- gleam_hub Schemas, encoders and decoders for the EYG Hub API. (Unpublished)
- gleam_ir Data structures for the EYG IR. This is the original implementation of EYG.
- gleam_interpreter A Gleam interpreter for EYG targeting JavaScript. Runs in the browser and on the server.
- gleam_parser Parser for a curly braces syntax for EYG IR.
- hub Backend application for eyg.run. Stores modules, packages and signatories.
- morph Higher level AST and transformation functions for structural edits. (Unpublished)
- touch_grass Common effect definitions (types, decoders and encoders) for your Eat Your Greens (EYG) runtime.
- untethered Location independent datastructures to immutably record decisions. Foundation of EYG hub package signing. (Unpublished)
- vscode-eyg VS Code extension and canonical TextMate grammar, also used by the web guides.
- website Website for documentation, guides and introduction on eyg.run.
The source for packages maintained as a standard library i.e. standard and json.
The aok package provides assertions, ordered computer-effect
expectations, and test runners.
The overlay package contains policy and skills helpers for overlay agents.
Other packages in this collection are for demo purposes i.e. catfact
Over the last few years the Eat Greens Principle to build actor systems, datalog engines. A record of these experiments is at https://petersaxton.uk/log/. The code for these experiments is no longer available if you want to ask more about them reach out to me in the discord
