1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
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
|