1 Running Programs
Suppose we have a felix program
println$ "Hello World";
which we expect to print
To run this program we just type
That's it. Behind the scenes, it is translated to C++, compiled, linked, and executed.
The first time, it will take around 5 seconds.
1.2 Dependency Checking
However, if you do it again, it's much faster. That's because, if the program binary is up to date, Felix just runs it.
~/felix>time flx hello Hello real 0m0.581s user 0m0.476s sys 0m0.086s
You may wonder where the binary is. Indeed, you may
wonder where the generated C++ is. If you look at the
directory containing the
hello.flx file, you will not
see these files.
These files are considered temporaries, and are stored
in a cache, usually in
That isn't the end of it, though. Most scripting languages make it insanely difficult to generate a portable binary. Just take a look at projects such as py2exe, PyInstaller, OCRA, srlua, and many more similar projects. However, Felix makes it easy. Just run:
flx -c --static -o hello hello.flx
You should now have a working
hello binary! This combination
of being able use Felix like a scripting language and then
generate portable binaries for distribution is very powerful.