Paradigm | Multi-paradigm: scripting, imperative, functional, object-oriented |
---|---|
Designed by | David Olofson |
First appeared | 2005 |
Stable release | 0.3.6 / February 4, 2014 |
Typing discipline | Dynamic |
OS | Cross-platform |
License | GNU Lesser General Public License |
Filename extensions | eel |
Website | eel |
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.
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.
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.
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.
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; }
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.
Kobo Deluxe is an application of EEL. [1]
Lua is a lightweight, high-level, multi-paradigm programming language designed mainly for embedded use in applications. Lua is cross-platform software, since the interpreter of compiled bytecode is written in ANSI C, and Lua has a relatively simple C application programming interface (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.
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 now a very different language. As it has developed, it has drawn inspiration from other high-level programming languages. Notably, it has been influenced by 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:
The syntax of the C programming language is the set of rules governing writing of software in C. It is designed to allow for programs that are extremely terse, have a close relationship with the resulting object code, and yet provide relatively high-level data abstraction. C was the first widely successful high-level language for portable operating-system development.
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. In some languages, particularly C++, function objects are often called functors.
A function pointer, also called a subroutine pointer or procedure pointer, is a pointer referencing executable code, rather than data. 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.
Code injection is a class of computer security exploit in which vulnerable computer programs or system processes fail to correctly handle external data, such as user input, leading to the program misinterpreting the data as a command that should be executed. An attacker using this method "injects" code into the program while it is running. Successful exploitation of a code injection vulnerability can result in data breaches, access to restricted or critical computer systems, and the spread of malware.
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 which the currently running code is a part of. The entity referred to 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, these keywords can disambiguate variables and functions with the same name.
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.
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.
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.
Nim is a general-purpose, multi-paradigm, statically typed, compiled high-level system programming language, designed and developed by a team around Andreas Rumpf. Nim is designed to be "efficient, expressive, and elegant", supporting metaprogramming, functional, message passing, procedural, and object-oriented programming styles by providing several features such as compile time code generation, algebraic data types, a foreign function interface (FFI) with C, C++, Objective-C, and JavaScript, and supporting compiling to those same languages as intermediate representations.