There is no syntax ...

Eat Your Greens

EYG

Create programs that run everywhere

and never crash.


            
click to edit & run

Read the section on Structural editing to learn how to edit the code.

Run everywhere

Eyg programs can be run everywhere, on client and server as well as build scripts and embedded. The Eyg language makes no assumptions about the runtime or platform a program will be run on. All requirements a program has to the outside world are explicit and tracked using effect types.

Universal apps

Every expression of an Eyg program is serializable and can be transmitted. The ability to send functions over the wire allow the full lifecycle of an application to exist in a single program.

Syntax is optional

There are less than 20 different kinds of node in Eyg's abstract syntax tree (AST). Unusually for a language this data structure is canonical format of an Eyg program, Syntaxes are optional.

A simple AST makes implementing new platforms for Eyg very easy.


            
click to edit & run

Never crash

Guarantee that a program will never crash by running the Eyg type checker. The Eyg type checker covers all features of the language, are no zero division errors or missing cases.

Holes are part of the language all features are suggestable


            
click to edit & run

No type declaration


            
click to edit & run

Effect types

All side effects are captured in the type system

Structural editor

Editing with the Eyg code editor is always in command or insert mode.

Insert mode

Insert mode allows you to edit all variables, strings, numbers and label in the program. To enter insert mode press i. To exit press Esc

Command mode

The more powerful is command mode and allows you to create new sections of program faster. In this mode each key press will take the currently targeted element. The target is the item under your cursor and transform it. This list is incomplete.

  • w wrap the current expression as the arguments to a function call
  • e assign the current expression to a variable
  • r Extend a record or create a new one
  • t Tag the current expression
  • y Copy to clip board current selection
  • e Replace current selection with contents of clipboard
  • o Overwrite a field in a record
  • i enter insert mode
  • p Perform an effect with the current expression
  • s Insert a string in place of the current expression
  • d delete the current expression
  • f wrap the current expression as the body of a function
  • g select a record field from the expression
  • h Wrap the current expression as an effect handler
  • x wrap the current expression as the element of list
  • , Add another list element at the position of the cursor
  • z undo the last transformation
  • Z redo any undone transform
  • c call the current expression as a function
  • n Insert a number in place of the current expression
  • m Insert a match statement with the current expression as first branch
  • M Close the current match expression

Features

All the features

Pages to learn about the implementation