Extensible Embeddable Language

Last updated
EEL
Paradigm Multi-paradigm: scripting, imperative, functional, object-oriented
Designed by David Olofson
First appeared2005;18 years ago (2005)
Stable release
0.3.6 / February 4, 2014;9 years ago (2014-02-04)
Typing discipline Dynamic
OS Cross-platform
License GNU Lesser General Public License
Filename extensions eel
Website eel.olofson.net
Influenced by
Lua, C, Pascal

The Extensible Embeddable Language (EEL) is a scripting and programming language in development by David Olofson. EEL is intended for scripting in realtime systems with cycle rates in the kHz range, such as musical synthesizers and industrial control systems, but also aspires to be usable as a platform independent general purpose programming language.

Contents

Philosophy

As to the language design, the general idea is to strike a practical balance between power, ease of use and safety. The intention is to help avoiding many typical programming mistakes without resorting to overly wordy syntax or restricted functionality.

History

The first incarnation of EEL was in the form of a simple parser for structured audio definitions, used in the sound engine of the Free and Open Source game Kobo Deluxe, an SDL port of the X11 game XKobo. This was a simple interpreter with very limited flow control, and a syntax that's quite different from that of current versions. This initial branch of EEL was first released in 2002, and is still used in Kobo Deluxe as of version 0.5.1.

In December 2003, EEL was split off into a stand-alone project and subject to a major rewrite, in order to be used for real time scripting in an embedded rheology application. This is where the switch from interpreter to compiler/VM was made, and the actual programming language EEL materialized. The first official release was in January 2005. Since then, EEL has evolved slowly, driven mostly by the personal and professional needs of its author.

Features

General

The language is not strictly designed for any particular programming paradigm, but supports object oriented programming, or more specifically, prototype-based programming, through a minimal set of syntax sugar features. Other styles and paradigms of programming, such as functional, modular and metaprogramming are also supported.

As a result of avoiding pointers and providing fully managed structured data types, EEL is "safe" in the sense that EEL programs should not be able to crash the virtual machine or the host application.

Highlights

Example code

The classic hello world program can be written as follows:

export function main<args> {     print("Hello, world!\n");     return 0; }

The following is an example of a recursive function:

export function main<args> {     print("Recursion test 1:\n");          procedure recurse(arg)     {         print("arg = ", arg, "\n");         if arg             recurse(arg - 1);     }          recurse(10);          print("Recursion test 2; Mutual Recursion:\n");          procedure mrecurse2(arg);          procedure mrecurse1(arg)     {         print("arg = ", arg, "\n");         if arg             mrecurse2(arg);     }procedure mrecurse2(arg)     {         mrecurse1(arg - 1);     };          mrecurse1(10);          print("Recursion test 2; Mutual Recursion with Function Reference:\n");          procedure mrrecurse1(arg, fn)     {         print("arg = ", arg, "\n");         if arg             fn(arg, fn);     }local mrr2 = procedure (arg, fn)     {         mrrecurse1(arg - 1, fn);     };          mrrecurse1(10, mrr2);          print(Recursion tests done.\n);     return 0; }

Internals

EEL source code is compiled into bytecode for a custom VM, which has a relatively high level instruction set designed to minimize instruction count and thus overhead. The EEL VM is register based and "stackless", as in not relying on the C call stack for managing VM contexts.

The basic memory management method is reference counting, which allows automatic memory management with deterministic timing, without the need for concurrent garbage collection.

The VM uses "limbo lists" to keep track of intermediate objects created inside expressions and the like, which greatly simplifies exception handling, and eliminates the need for active reference counting in every single operation.

Applications

Kobo Deluxe

Kobo Deluxe is an application of EEL. [1]

Related Research Articles

<span class="mw-page-title-main">Lua (programming language)</span> Lightweight programming language

Lua is a lightweight, high-level, multi-paradigm programming language designed primarily for embedded use in applications. Lua is cross-platform, since the interpreter of compiled bytecode is written in ANSI C, and Lua has a relatively simple C API to embed it into applications.

In programming languages, a closure, also lexical closure or function closure, is a technique for implementing lexically scoped name binding in a language with first-class functions. Operationally, a closure is a record storing a function together with an environment. The environment is a mapping associating each free variable of the function with the value or reference to which the name was bound when the closure was created. Unlike a plain function, a closure allows the function to access those captured variables through the closure's copies of their values or references, even when the function is invoked outside their scope.

<span class="mw-page-title-main">D (programming language)</span> Multi-paradigm system programming language

D, also known as dlang, is a multi-paradigm system programming language created by Walter Bright at Digital Mars and released in 2001. Andrei Alexandrescu joined the design and development effort in 2007. Though it originated as a re-engineering of C++, D is a profoundly different language —features of D can be considered streamlined and expanded-upon ideas from C++, however D also draws inspiration from other high-level programming languages, notably Java, Python, Ruby, C#, and Eiffel.

In mathematics and computer science, a higher-order function (HOF) is a function that does at least one of the following:

<span class="mw-page-title-main">Pointer (computer programming)</span> Object which stores memory addresses in a computer program

In computer science, a pointer is an object in many programming languages that stores a memory address. This can be that of another value located in computer memory, or in some cases, that of memory-mapped computer hardware. A pointer references a location in memory, and obtaining the value stored at that location is known as dereferencing the pointer. As an analogy, a page number in a book's index could be considered a pointer to the corresponding page; dereferencing such a pointer would be done by flipping to the page with the given page number and reading the text found on that page. The actual format and content of a pointer variable is dependent on the underlying computer architecture.

In computer programming, a function object is a construct allowing an object to be invoked or called as if it were an ordinary function, usually with the same syntax. Function objects are often called functors.

A function pointer, also called a subroutine pointer or procedure pointer, is a pointer that points to a function. As opposed to referencing a data value, a function pointer points to executable code within memory. Dereferencing the function pointer yields the referenced function, which can be invoked and passed arguments just as in a normal function call. Such an invocation is also known as an "indirect" call, because the function is being invoked indirectly through a variable instead of directly through a fixed identifier or address.

<span class="mw-page-title-main">Code injection</span> Computer bug exploit caused by invalid data

Code injection is the exploitation of a computer bug that is caused by processing invalid data. The injection is used by an attacker to introduce code into a vulnerable computer program and change the course of execution. The result of successful code injection can be disastrous, for example, by allowing computer viruses or computer worms to propagate.

In computer programming, an entry point is the place in a program where the execution of a program begins, and where the program has access to command line arguments.

In mathematics and in computer programming, a variadic function is a function of indefinite arity, i.e., one which accepts a variable number of arguments. Support for variadic functions differs widely among programming languages.

xHarbour is a free multi-platform extended Clipper compiler, offering multiple graphic terminals (GTs), including console drivers, GUIs, and hybrid console/GUIs. xHarbour is backward-compatible with Clipper and supports many language syntax extensions, greatly extended run-time libraries, and extensive third party support.

The computer programming languages C and Pascal have similar times of origin, influences, and purposes. Both were used to design their own compilers early in their lifetimes. The original Pascal definition appeared in 1969 and a first compiler in 1970. The first version of C appeared in 1972.

this, self, and Me are keywords used in some computer programming languages to refer to the object, class, or other entity of which the currently running code is a part. The entity referred to by these keywords thus depends on the execution context. Different programming languages use these keywords in slightly different ways. In languages where a keyword like "this" is mandatory, the keyword is the only way to access data and methods stored in the current object. Where optional, they can disambiguate variables and functions with the same name.

<span class="mw-page-title-main">Recursion (computer science)</span> Use of functions that call themselves

In computer science, recursion is a method of solving a computational problem where the solution depends on solutions to smaller instances of the same problem. Recursion solves such recursive problems by using functions that call themselves from within their own code. The approach can be applied to many types of problems, and recursion is one of the central ideas of computer science.

The power of recursion evidently lies in the possibility of defining an infinite set of objects by a finite statement. In the same manner, an infinite number of computations can be described by a finite recursive program, even if this program contains no explicit repetitions.

This is an overview of Fortran 95 language features. Included are the additional features of TR-15581:Enhanced Data Type Facilities, which have been universally implemented. Old features that have been superseded by new ones are not described – few of those historic features are used in modern programs although most have been retained in the language to maintain backward compatibility. The current standard is Fortran 2018; many of its new features are still being implemented in compilers. The additional features of Fortran 2003, Fortran 2008 and Fortran 2018 are described by Metcalf, Reid and Cohen.

In computer programming, an anonymous function is a function definition that is not bound to an identifier. Anonymous functions are often arguments being passed to higher-order functions or used for constructing the result of a higher-order function that needs to return a function. If the function is only used once, or a limited number of times, an anonymous function may be syntactically lighter than using a named function. Anonymous functions are ubiquitous in functional programming languages and other languages with first-class functions, where they fulfil the same role for the function type as literals do for other data types.

This article compares a large number of programming languages by tabulating their data types, their expression, statement, and declaration syntax, and some common operating-system interfaces.

<span class="mw-page-title-main">FutureBASIC</span>

FutureBasic is a free BASIC compiler for Apple Inc.'s Macintosh.

The syntax and semantics of PHP, a programming language, form a set of rules that define how a PHP program can be written and interpreted.

<span class="mw-page-title-main">Rexx</span> Command/scripting/programming language

Rexx is a programming language that can be interpreted or compiled. It was developed at IBM by Mike Cowlishaw. It is a structured, high-level programming language designed for ease of learning and reading. Proprietary and open source Rexx interpreters exist for a wide range of computing platforms; compilers exist for IBM mainframe computers.

References

  1. Best of 2013: 31 Years On - Independent Gaming on the Commodore 64 by James Monkman on indiegames.com (December 20, 2013)