Release Note (v0.3)¶
ELI version 0.3 has been released on August 10, 2015. In this new version, ELI system has been greatly improved by adding several useful functions for database systems. The debut of ELI Studio shows a preliminary, but productive IDE for developers, especially for beginners. Moreover, ELI Studio is a cross-platform version for Windows, Linux and MacOS.
Prior Version 0.2a¶
The last stable ELI interpreter was released on November 30, 2013. At the time, it supported most of the functionality of the ISO APL standard. Moreover, we introduced dictionaries, tables and SQL-like statements to enhance ELI system. Compared with a compiled language, an interpreted language is more attractive to users by providing an interactive environment. Two tutorials have been released since the last update: <Programming with arrays> and <ELI for Kids>. Moreover, ELI primer and other documents also have been updated and can be found in online documents.
Many new features are introduced in this newly released version; we also fixed several old bugs and made effort to improve the ELI system.
- New IDE support for ELI
likeis similar to the classic database string pattern matching and regular expression search
'name.cpp' like '%.cpp' //1 'eli1.esf' like 'eli_.esf' //1 'eli23.esf' like 'eli_.esf' //0
New primitive function match (
~) checks the value of two variables, returns either same (1) or not (0). Usually, match is used in debugging programs to check the variable value.
Printing Precision Control¶
PPcontrols the precision of the output of floating point
)timeis able to measure the one line execution time
with standard input from users
Temporal attributes for date & time types (i.e. d.year)
To output to afile, ELI provides
closewhich open and close a file handle respectively. With a
open, a file handle will be returned for further output. The syntax looks like C++’s stream output (
Save value in a **file1.txt.* *
Find the saved file under the current directory
getimports data from ‘text files’ as lists. In each item of the list, it is one line string. On the other words, the size of the list is the number of rows in the designated file.
A table can be output by
writewith four kinds of format support so far. They are
txt. The default format is
txt. The designated format is defined by the suffix of the output filename. ** Note **: == The file name should be the same as the table’s name. ==
Create a table in interpreter and save it as a csv file. The output file can be found in the current workspace directory.
Try extra three formats.
A screenshot of the csv file
A screenshot of the xml file
A screenshot of the json file
A screenshot of the txt file
Semi Colon (
In most programming languages (C, Java and etc.), the semicolon is popular to be used at the end of one statement. It also enables multiple statements written in single line. In ELI, one line may contain multiple statements which are executed from left to right. However, the execution order inside the statements follows ELI native order: from right to left.
More Data types¶
Type Type Value Symbol Example Boolean 0 B 0,1 Integer 1 I 123 Float 2 E 2.5 Char 3 C ‘abc’ Complex 4 X 1.5j2 Symbol 5 S `ibm List 6 L (`chen `wu;10 20) Month 7 M 2012.08m Date 8 D 2012.08.15 Datetime 9 Z 2012.08.15T13:25:17.357 Minute 10 U 13:25 Second 11 V 13:25:17 Time 12 T 13:25:17.357 Enumeration 21 N ... Dictionary 91 Y ... Keyed Table 91 K ... Table 92 A ...
- Short function is able to define recursive functions (call itself)
- Better support for control structure
- Fix some trivial bugs
The main reason we introduce ELI studio is to offer a consistent release for cross-platform ELI system. Because in prior versions we only support GUI on Windows, people with Linux and Mac OS have to use command line input In fact, popular Linux versions (i.e. Ubuntu) and Mac OS have an excellent GUI interface for users. With an integrated development environment (IDE), newbies have less stress to learn a new programming language.
The ELI Studio has two parts: main window and code editor. The main
window is a terminal window which enables developers to test their code
easily. Since ELI provides scripting facilities (eli script file, called
esf), a code editor is a good addition for developers to build and
test scripts efficiently.
Inherited from previous ELI version on Windows, the main window accepts the basic layouts with normal six spaces ahead of an input line to clearly differentiate with the following line of system response. Also, the multiple line editing (see example 1) is enabled.
There are some new features as follows.
- Paste with multiple lines can be handled just like executing line by line except the last line
- Three widgets monitor functions and variables in the workspace, ELI scripts in the current directory and command history respectively
- Click on the ELI script widget, then the selected script will be automatically loaded into the workspace
- Click on a line in the command history widget, then the selected command will be copied into the main window and executed
- Additional functionalities that can be found on menus are workspace load and save, workspace path setting and offline documentation support
Code Editor is an option for users to easily write and test code in ELI interpreter environment. It is designed for fast loading of scripts and line-by-line execution. Other than basic operations such as editing (i.e. load, save, undo and redo), it provides the following additional features for ELI developers.
- A symbol table (CTRL+T) that helps newbies to easily remember and understand primitive symbols.
- Loading scripts into workspace. The scripts should be in esf
format which has been saved somewhere on your computer. It has the
same effect as you type
)fload yourscriptin the main window if you have saved the scripts under the current workspace path.
- Copying scripts into the workspace. Unlike the loading scripts into workspace, it does not clear the whole workspace before loading the saved content. Therefore, it is a safe way to load your scripts without clearing out the existing workspace.
- Executing selected blocks of code as a script. It is
useful for loading functions, variables and multiple lines of code.
Since the function and variable definitions (with
&) are not accepted in interpreter input, this facility eases the work of saving scripts every time.
- One line where the current cursor stays will be executed and the cursor doesn’t move after the execution.
- One line will be executed and the cursor will automatically move to the following line. It is a debugging tool to test code one by one line.