ELI (programming language): Difference between revisions

Content deleted Content added
m change source to syntaxhighlight
m File extensions: <syntaxhighlight lang="q">
 
(5 intermediate revisions by 4 users not shown)
Line 1:
{{multipleMultiple issues|
{{COI|date=April 2017}}
{{notabilityNotability|date=April 2017}}
{{primaryPrimary sources|date=April 2017}}
}}
{{Infobox programming language
Line 26:
}}
 
'''ELI'''<ref name="website">[{{cite web |url=https://fastarray.appspot.com/ |title=ELI: -A officialSystem site]for HostedProgramming onwith GoogleArrays App Engine|website=Disqus}}</ref> is an interactive [[array programming]] language system based on the [[programming language]] [[APL (programming language)|APL]]. It has most of the functions of the [[International Organization for Standardization]] (ISO) APL standard ''ISO/IEC 13751:2001'', and also list for non-homogeneous or non-rectangular data, complex numbers, symbols, temporal data, and control structures. A scripting file facility is available to organize programs in a fashion similar to using <code>#include</code> in [[C (programming language)|C]], which also provides convenient data [[input/output]]. ELI has dictionaries, tables, and a basic set of [[SQL]]-like statements. For performance, it has a [[compiler]] restricted to flat array programs.
 
By replacing each [[APL syntax and symbols|APL character]] with one or two [[ASCII]] characters, ELI retains APL's succinct and expressive way of array programming compared with [[MATLAB]] or [[Python (programming language)|Python]], ELI encourages a [[dataflow programming]] style, where the output of one operation feeds the input of another.
 
ELI is available without charge, as [[freeware]], on [[Windows]], [[Linux]], and [[macOS]].
 
==Version 0.3==
Line 54:
</syntaxhighlight>
The execution order of ELI is from right to left, and all primitive functions have equal precedence.
<syntaxhighlight lang="textq">
5 * 2 + 10 // from right to left, 5 * (2 + 10)
60
</syntaxhighlight>
In the next example a function <code>add</code> is declared in a short function form. The arguments of the function can be either a scalar or a vector.
<syntaxhighlight lang="textq">
{add: x+y} // short function form
add
Line 68:
</syntaxhighlight>
The <code>$</code> rotation operator returns the reverse order of a vector.
<syntaxhighlight lang="textq">
$!10 // reverse
10 9 8 7 6 5 4 3 2 1
</syntaxhighlight>
A 2-by-3 matrix (or higher dimension array, e.g., <code>2 3 4#!24</code>) can be generated by <code>#</code> with left argument <code>2 3</code>.
<syntaxhighlight lang="textq">
2 3#!6 // 2 dimension array (matrix)
1 2 3
Line 79:
</syntaxhighlight>
In first line below the <code>x</code> is assigned with a vector from 1 to 20. Then, <code>1 = 2|x</code> returns odd number <code>True</code> and even number <code>False</code>. The <code>/</code> is a primitive function for compression which '''picks up''' the value in <code>x</code> corresponding to the <code>True</code> values in its left argument.
<syntaxhighlight lang="textq">
x <- !20 // 1..20
x
Line 103:
An ELI file with extension <code>.eli</code> is an ELI workspace file which contains everything in a workspace. <code>save</code> and <code>load</code> are commands for workspace files.
 
<syntaxhighlight lang="textq">
)save MyWorkspace
)load MyWorkspace
Line 113:
 
==External links==
* {{Official website|fastarray.appspot.com}}
* [https://fastarray.appspot.com/docs/ Online documentation]{{Dead link|date=December 2019 |bot=InternetArchiveBot |fix-attempted=yes }}
* [https://www.youtube.com/channel/UCpq4XRc7A1YNbEnBRx9-jzw YouTube channel]