ELI (programming language)
It is proposed that this article be deleted because of the following concern:
If you can address this concern by improving, copyediting, sourcing, renaming, or merging the page, please edit this page and do so. You may remove this message if you improve the article or otherwise object to deletion for any reason. Although not required, you are encouraged to explain why you object to the deletion, either in your edit summary or on the talk page. If this template is removed, do not replace it. This message has remained in place for seven days, so the article may be deleted without further notice. Find sources: "ELI" programming language – news · newspapers · books · scholar · JSTOR Nominator: Please consider notifying the author/project: {{subst:proposed deletion notify|ELI (programming language)|concern=Sources are all primary. No indication of this being more than a personal project or meeting WP:GNG.}} ~~~~ Timestamp: 20170429200625 20:06, 29 April 2017 (UTC) Administrators: delete |
Paradigm | array |
---|---|
Designed by | Wai-Mee Ching |
Developer | Hanfeng Chen[2] (Rapidsoft) |
First appeared | 2011 |
Stable release | 0.3
/ August 10, 2015 |
Typing discipline | dynamic |
OS | Cross-platform |
Filename extensions | .esf .eli |
Website | fastarray |
Major implementations | |
C++, Qt | |
Influenced by | |
APL, Q |
ELI[3] is an interactive array programming language system based on APL. It has the most of functionalities of ISO APL standard. In addition to classical APL, ELI features list for non-homogeneous or non-rectangular data, complex numbers, symbols, temporal data, and control structures. A scripting file facility helps a user to easily organize programs in a fashion similar to using #include in C, which also provides convenient data input/output. Moreover, ELI has dictionaries, tables and a basic set of SQL-like statements. For performance, ELI offers a compiler restricted to flat array programs.
By replacing each APL character with one or two ASCII characters, ELI retains APL’s succinct and expressive way of doing array programming, i.e. compared with MATLAB or Python, ELI encourages a dataflow style of programming where the output of one operation feeds the input of another that results in greater productivity and clarity of code.
ELI is free and available on Windows, Linux and Mac OS.
Version 0.3
ELI version 0.3 has been released on August 10, 2015. It integrates with a cross-platform IDE, ELI Studio. The ELI Studio provides a code editor with specialized functionalities to easily write/load ELI code. Moreover, three additional widgets are used to monitor functions, variables, libraries and command history.
- Like: string match
- Match
- []PP: printing precision control
- )time: performance measure
- []: standard input
- Date and time attributes
- File Handle: []open, []close, []write and []get
- Semi Colon (;)
New medias:
Example Code
A line of ELI executes from right to left as a chain of operations; anything to the right of ‘//’ is a comment.
Exclamation point (!) is an interval function. It can generate a vector of n integer from 1 to n.
!10
1 2 3 4 5 6 7 8 9 10
The execution order of ELI is from right to left and all primitive functions have equal precedence.
5 * 2 + 10 // from right to left, 5 * (2 + 10)
60
In next example a function add
is declared in a short function form. Then, the arguments of the function can take either a scalar or a vector.
{add: x+y} // short function form
add
1 add 2 // 1+2
3
1 add !10 // 1+(1..10)
2 3 4 5 6 7 8 9 10 11
The $
rotation operator returns the reverse order of a vector.
$!10 // reverse
10 9 8 7 6 5 4 3 2 1
A 2-by-3 matrix (or higher dimension array, e.g. 2 3 4#!24
) can be generated by #
with left argument 2 3
.
2 3#!6 // 2 dimension array (matrix)
1 2 3
4 5 6
In first line below the x
is assigned with a vector from 1 to 20. Then, 1 = 2|x
returns odd number True
and even number False
. The /
is a primitive function for compression which picks up the value in x
corresponding to the True
values in its left argument.
x <- !20 // 1..20
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
(1 = 2|x) / x // get odd numbers from x
1 3 5 7 9 11 13 15 17 19
File extensions
There are two kinds of file extensions in ELI: .esf
and .eli
. Both are designed for exchanging and sharing code based on different purposes.
An ELI file ends with .esf
is an ELI script file which contains all methods and data. A simple way to create a script file is using the command )out
. However, a clean workspace without any debugging/error information left is required before you can output a script file. Later, the command )fload
is able to load the script file back.
)out MyScript
)lib
MyScript.esf
)fload MyScript
saved 2017.02.17 10:23:55 (gmt-5)
An ELI file ends with .eli
is an ELI workspace file which contains everything in a workspace. save
and load
are two commands designed for workspace files.
)save MyWorkspace
)load MyWorkspace
saved 2017.02.17 10:57:19 (gmt-5)
Development notes
- (Dec. 2016) ELI began to actively maintain its online language reference manual which can be found at fastarray/docs
- (Dec. 2016) The latest ELI primer was released
See also
- APL, the first array programming language
- J, another APL-inspired language
- Q, programming language from Kx Systems
References
- ^ ELI: a simple system for array programming
- ^ ELI - mirror site in the Sable lab at McGill University
- ^ ELI - official site Hosted on Google App Engine