vpisarev / ficus

The programming language Ficus
Apache License 2.0
72 stars 9 forks source link

Ficus

This is a new functional language with the first-class array support that also supports imperative and object-oriented programming paradigms. ficus compiler generates a portable C/C++ code out of .fx files.

License

The code is distributed under Apache 2 license, see the LICENSE

How to build

The compiler is written in Ficus itself and needs C/C++ compiler and make utility.

Unix (Linux, macOS, BSD, WSL, ...)

cd <ficus_root>
make -j8
bin/ficus -run test/test_all.fx # run unit tests
bin/ficus -run -O3 examples/fst.fx # run some examples, e.g. fst.fx,
                                   # optionally specify optimization level

Windows (native)

Install Visual Studio, for example Visual Studio 2019 Community Edition, open "Developer PowerShell for VS2019" from the Windows menu and type:

cd <ficus_root>
nmake
bin/ficus -run -O3 examples/fst.fx # the usage is the same as on Unix

Set environment variables

You can add <ficus_root>/bin to the PATH. You can also customize ficus compiler behaviour by setting the following environment variables:

How to use

(run ficus --help to get more detailed up-to-date information about command line parameters)

Here is a brief description with some most common options:

ficus [-app|-run|...] [-O0|-O1|-O3] [-verbose] [-I <extra_module_path>]* [-o <appname>] <scriptname.fx> [-- <script arg1> <script arg2> ...]

Ficus 1.0

TODO

(see https://github.com/vpisarev/ficus/issues/4 for the decryption and the status)

Credits