Egel is a very small toy language based on untyped eager combinator rewriting.
Possible uses are:
Egel roughly falls in the same category as Q/Pure and conceptually predates Miranda, ML, or Haskell.
The programming style is similar to functional programming though the operational semantics is slightly novel.
To get a taste for the language, an example is shown below.
namespace Fibonacci ( using System def fib = [ 0 -> 1 | 1 -> 1 | N -> fib (N - 2) + fib (N - 1) ] ) using Fibonacci def main = fib 5
Want to know more? Then read the following short introduction.
Or try Egel online! Try it online!
The Egel interpreter is implemented in C++ and designed to swiftly go from reading the sources to evaluation, though these goals are somewhat at odds which each other.
The interpreter is mostly written to explore how far you can push an implementation of a term rewrite system based on directed acyclic graphs in idiomatic C++. Combinators and the evaluation graphs are implemented with reference counted objects and most of the implementation is written with utter disregard for performance. That has drawbacks but it also gives a highly robust system which can be seamlessly integrated into other C/C++ programs. Lastly, the interpreter employs bytecode in a small instruction set for maximal portability.
The interpreter seems to have something between a naive Lisp and Python performance. A REPL and batch mode evaluation is supported.
The interpreter is in an alpha state. It can symbolically rewrite but small bugs are still regularly discovered.
Egel is developed as a hobby project to explore some ideas the author has. The intention is to grow the language to support different math libraries and then move towards making the code mobile.
I would like to thank Linus Torvalds for Linux, the GNU team for their command line tools and compiler chain, Bram Molenaar for VIM, GNOME for their desktop, and Redhat for providing me with a great operating system for the last twenty years.
And of course, the Milis distribution maintainers for supplying the Egel binary package!