mooigraph 9081c0cb65 added parser+lexer for fexl script language as peg for packcc 4 years ago
..
Makefile 9081c0cb65 added parser+lexer for fexl script language as peg for packcc 4 years ago
README-FEXL 9081c0cb65 added parser+lexer for fexl script language as peg for packcc 4 years ago
README.md 9081c0cb65 added parser+lexer for fexl script language as peg for packcc 4 years ago
fexl.c 9081c0cb65 added parser+lexer for fexl script language as peg for packcc 4 years ago
fexl.h 9081c0cb65 added parser+lexer for fexl script language as peg for packcc 4 years ago
fexl.peg 9081c0cb65 added parser+lexer for fexl script language as peg for packcc 4 years ago
t.fexl 9081c0cb65 added parser+lexer for fexl script language as peg for packcc 4 years ago

README-FEXL

Fexl (Function EXpression Language) http://fexl.com

AUTHOR

Patrick Chkoreff wrote this software. Please see the NOTICE file for terms of
use.


CREDITS

I thank Moses Schönfinkel, who in 1924 wrote a paper titled "On the building
blocks of mathematical logic". I found this paper in "From Frege to Gödel, A
Source Book in Mathematical Logic, 1879-1931".

Mr. Schönfinkel observes that all computable functions can be defined in terms
of just two primitive functions C and S applied together in various
combinations. This is a profound and magnificent insight for which I am very
grateful.

The C function is governed by the rule ((C x) y) = x. This is known as the
"constancy function", or "Konstanzfunktion" in the original German.

The S function is governed by the rule (((S x) y) z) = ((x z) (y z)). This is
known as the "fusion function", or "Verschmelzungfunktion" in the original
German.

I also thank Jørgen Steensgaard-Madsen, who in 1989 wrote a paper titled
"Typed Representation of Objects by Functions". I found this paper in the
"ACM Transactions on Programming Languages and Systems, January 1989, Volume
11 Number 1".

Mr. Steensgaard-Madsen observes that all of what we ordinarily understand as
"data" can be represented as pure functions. Even a piece of data as humble
as a single bit is in essence just a function.


HOW TO INSTALL

Go into the source code directory and run this command:

./build install

You may be prompted for your sudo (superuser) password.

That builds the program locally in ../bin, then copies it to the /usr/bin
directory. If you need to install it in a different place, change the
install_location variable inside the build script.


HOW TO BUILD LOCALLY

If you wish to enhance or test the program, you might prefer to build it
locally in the ../bin directory and run it from there, without installing into
/usr/bin. You do that with this command:

./build


HOW TO RUN

To run a fexl program which is read from standard input:

fexl

To run a fexl program which is read from a file named "script":

fexl script

You may also use the "shebang" method to create an executable fexl file. For
example, create a file named "script" and put this on the first line:

#!/usr/bin/fexl

Then make your script executable with:

chmod +x script

Now you can run your script directly this way:

./script