Fula is a pure functional programming language. It is shipped with two jar files: a compiler and a runtime library.
The version of the software used must be the following ones :
- Java SE 16, can be downloaded from https://www.oracle.com/java/technologies/javase-jdk16-downloads.html
- Scala 2.13.1
- Sbt 1.3.8
In order to install sbt use brew:
brew install sbt
From the terminal, in the same directory where the build.sbt file is use the following command:
sbt assembly
A jar file called fulac.jar is created in the target/scala-2.13 directory. It is the compiler jar file.
If you are using macOS you can build the runtime library. In the runtime folder run:
sh build-library.sh
The fular.jar file created in the runtime folder is the runtime library.
From the terminal with the prebuild compiler use the following command:
java -jar fulac.jar filename.fula
It will create a class file name filename.class in a fula directory.
From the terminal use the following command to run a class file compiled with fula using the prebuild fula runtime library:
If the file is in the same directory where the command is executed:
java -cp .:fular.jar fula.filename
Otherwise, give the path to the library, prebuild folder for instance:
java -cp .:./prebuild/fular.jar fula.filename
The compiler is at a very early stage, a lot of features can be added. If you would like to contribute to the compiler please feel free to open a PR or an issue. Otherwise contact me directly if you would like to talk about it.
The compiler is accompanied with a dissertation. It can be a good start point to understand what goal this compiler tries to achieve. dissertation.pdf