Fexl is an interpreter for a programming language based on functions. The interpreter is written in standard C and compiled with strictness and optimization. It is designed to be small, efficient, and suitable for embedded or sandboxed applications. The language has a small grammar and a small implementation. Here is some sample code.
Now here are some instructions for various things you might want to do.
To clone and build it, use:
git clone git@github.com:chkoreff/Fexl.git fresh cd Fexl ./build
See the README file for other instructions, such as how to run the self-test:
. alias .time a1
Note that this fresh branch does not contain the entire "kitchen sink" of predefined functions that the master branch has. But I'm working on adding those, and I also have a fresh, more flexible approach to this entire issue.
You can browse the Fexl source code on Github.
To download and install directly into the standard system directory "/usr", do this:
git clone git@github.com:chkoreff/Fexl.git cd Fexl sudo ./build install
You can then run fexl as simply:
fexl
You might want to install in some other directory of your own, such as "~/myfexl", so you don't need root privileges. Use this build command:
./build install in ~/myfexl
You can now run that version of fexl as:
~/myfexl/bin/fexl
This is handy if you want to use Fexl on a system where you don't have administrator privileges to install it. It also lets you install different versions of Fexl in different places so you can test them independently.
Alternatively, you can download the code as a compressed archive, and unpack it with:
tar -xzf <filename>
Apart from the weird file names you'll see if you download this way, the other instructions on this page still pertain.
You can build the fexl program right in the download directory so you can test it without installing:
./buildThen run the local version as:
bin/fexl
The "alias" file has some handy shell commands for testing and benchmarking. Source it into your shell as follows:
. alias
Then you can run the tests as follows:
.time a1 .time a2 .time a3 .time a4
Note that a1, a3, and a4 run quickly, but a2 takes about 18 seconds.
Also note that you can run those tests immediately after downloading the code, like this:
git clone git@github.com:chkoreff/Fexl.git cd Fexl . alias .time a1 .time a2 .time a3 .time a4
The aliases automatically do a quiet build so you never have to think about it. The .time alias runs the test and compares its output with the reference standard output. If you want to run the tests and actually see the output to your screen, use the .run alias like this:
.run a1 .run a2 .run a3 .run a4
The clump program lets you write C code and simply type "clump" to compile and link it. No makefiles are necessary. It automatically detects and checks dependencies.
Note that I do not use clump to build fexl. I used to do that, but found that I needed more fine-grained control about building the shared library and installation.
Download or browse the code at Github.
Download the code directly from this site as a compressed archive.