Note: Lavender (specifically CLavender) is in active developement. This site is updated relatively frequently with the latest Lavender features. Depending on how often you visit this site, you may need to clear your browser's cache in order to see the latest changes.

Lavender

Lavender is an interpreted, pure functional REPL-based programming language.

Running Lavender

Running Lavender requires a comforming C compiler. The following command will compile the Lavender runtime on your machine. If you use a compiler distribution other than GCC, change CC in the Makefile to your preferred compiler. $ make The Makefile has two modes, release and debug. Debug mode compiles Lavender with debugging information and assertions enabled, and is meant to aid in debugging the runtime itself. Release mode is the default.

After compiling, you can run Lavender right away. You should see something like the following. $ ./lavender
Lavender runtime v. 1.0 by Chris Nero
Open source at https://github.com/kvverti/clavender
Enter function definitions or expressions
>
In addition to REPL mode, if a file name (without the .lv extension) is specified, that file is parsed and its main function evaluated. Any arguments specified after the main file are passed to the main function.

The Lavender runtime can also take command line arguments. There are several command line arguments.

Option Format Description
-fp <filepath> Specifies the directory where Lavender source files may be found.
-debug Runs Lavender in debug mode. In debug mode, extra information from the interpreter is printed to the output.
-maxStackSize <size> Specifies the maximum Lavender stack size in bytes. The Lavender stack holds function call information and function parameters. If the maximum stack size is exceeded, the Lavender runtime exits. The size is an unsigned integer optionally specified with a unit, one of K (kibibyte), M (mebibyte), or G (gibibyte). If no unit is specified, the size is in bytes.