ol(1)

NAME
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 126 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.

-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>.