
Fexl – Highly robust functional evaluation - fexl
https://github.com/chkoreff/Fexl/tree/c0afb51878fe4277a75f88ad69a8086a5ce51644
======
fexl
This version handles syntax errors, out of memory errors, and out of time
errors, propagating them upward instead of halting with an error message, and
reporting them in an orderly fashion at the end of the main program. Now the
only calls to "die" are those which should never happen, i.e. they are pure
assertions which are never expected to fail.

This allows for some very nice embedded calls to parsing and evaluation from
within a Fexl program itself, which can always be expected to return to the
caller instead of halting.

Ultimately I'm going to put a full-powered interpreter right on the web to
allow arbitrary programs submitted from strangers, and this release is a
necessary prerequisite for that.

~~~
JadeNB
Could you talk a little more about what `fexl` _is_? I don't see any obvious
documentation beyond the README, which doesn't even seem to give a code
sample; and, while 'functional evaluator' is an intriguing name, I don't know
what it means.

~~~
fexl
Fexl is a functional programming language. I used the term "functional
evaluation" because Fexl evaluates functions.

Here are a few code samples:

[http://rosettacode.org/wiki/99_Bottles_of_Beer#Fexl](http://rosettacode.org/wiki/99_Bottles_of_Beer#Fexl)

[http://rosettacode.org/wiki/Fibonacci_sequence#Fexl](http://rosettacode.org/wiki/Fibonacci_sequence#Fexl)

[http://fexl.com/sample/](http://fexl.com/sample/)

This one's a bit more involved:

[http://fexl.com/demo/](http://fexl.com/demo/)

You'll also find some code samples in the "test" directory:

[https://github.com/chkoreff/Fexl/tree/master/src/test](https://github.com/chkoreff/Fexl/tree/master/src/test)

The program a1.fxl there is the definitive test suite. The program a2.fxl
reads what you type and echoes it back.

The samples above should help illustrate the nature of the language.
Grammatically, it's very simple:

[http://fexl.com/grammar/](http://fexl.com/grammar/)

For another quick illustration of the language, I'll give you a sample here:

    
    
        say "Hello"
        \x=(* 4.7 8.6)
        put "x = " put x nl
    

The output is:

    
    
        Hello
        x = 40.42

