Egel is an untyped concurrent functional scripting language based on eager combinator rewriting with a concise but remarkably powerful syntax.
Possible uses are:
Egel roughly falls in the same category as SASL/KRC and conceptually predates Miranda, ML, or Haskell; it combines a large number of ideas and is an esoteric language exploring dynamic functional programming through relaxing a maximal number of constraints while showcasing a novel means of calculation. Egel is also a useful language for software engineering in the small and easily combines with C/C++.
Egel’s long-term goal is to use mobile code to shoot any combinator anywhere transparently.
namespace Fibonacci (
using System
def fib =
[ 0 -> 1
| 1 -> 1
| N -> fib (N - 2) + fib (N - 1) ]
)
using Fibonacci
def main = fib 5
The Egel interpreter is implemented in C++ and designed to go swiftly from reading the sources to evaluation, though these goals are somewhat at odds with each other. Egel is primarily about exploiting a trivialized operational model, a program (state) can be represented as a directed acyclic graph solely and program evaluation corresponds to trampolining the combinator at the root of that graph.
Combinators and evaluation graphs are implemented with standard reference counted objects and the implementation is written with utter disregard for performance.
A REPL, batch mode, and command mode evaluation are supported.
The interpreter is in an alpha state, everything is still subject to possible change.
The sources are on github, author’s thoughts on blogger, or in the FAQ. There is a provisional website. Read the fine manual. The operational semantics are discussed in a small technical note. For a list of builtin combinators look here. Or read the following short introduction.
The interpreter and associated documentation are distributed under the MIT License, © 2017 Marco Devillers.
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 Red Hat for providing me with a great operating system for the last twenty years.
And of course, CFarm for their gracious support in supplying access to the compile farm.