ol man page

ol — an Owl Lisp compiler and interpreter

Synopsis

ol [options] [path] ...

Description

Owl Lisp is a purely functional variant of R7RS Scheme. Ol can be used to evaluate programs interactively and compile them to native binaries via C.

Options

This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of essential command line flats options is included below. The complete list is shown on the help page.

-h, --help
Show summary of options.
-v, --version
Show version of program.
-e, --eval string
Evaluate the string, print it's value, and exit with 0 unless errors occurred.
-t, --test string
Evaluate the string and exit with 1 if the value is #false, 0 if it's true, or 127 if there is an error.
-o, --output output-file
Compile the given file to fasl or C code, and save the result to the given output file.
-r, --run path
Load the file silently, and call the last value with the remaining command line arguments.
-x, --output-format format
Choose what ol should compile the given input to. Valid options are currently c and fasl. This is normally deduced from the file suffix given in -o, and is thus not usually needed.
-O0, -O1, -O2
Write plain bytecode, compile some common functions to C or everything possible. These only make sense when compiling to C.
-S, --seccomp
Enter seccomp sandbox mode at startup. This is an experimental Linux-only feature intended to be used for evaluating untrusted code.
-H, --heap n
Make sure there are at least n megabytes of heap space available before entering SECCOMP sandbox.
-l, --load path
Resume execution of program state saved with suspend.

Examples

Make a simple binary
$ echo '(lambda (args) (for-each print args))' > test.l
$ ol -o test.c test.l
$ gcc -o test test.c
$ ./test foo bar
Compile in a pipe
$ echo '(lambda (args) (print (cons "I got " args)))' | ol -x c -o - | gcc -x c -o test - && ./test 11 22 33
Loading vs running files
$ echo '(print "Hello, world!")' > test.l
$ ol test.l
Hello, world!
$ echo '(lambda (args) (print "Hello, world!"))' > test.l
$ ol --run test.l arg1 arg2 arg3
Hello, world!

See Also

ovm(1),gcc(1),scheme48(1).

Author

Owl Lisp and this manual page were written by Aki Helin <aki.helin@iki.fi>.

Referenced By

ovm(1).

December 14, 2011