1ol(1) General Commands Manual ol(1)
2
3
4
6 ol - an Owl Lisp compiler and interpreter
7
9 ol [options] [path] ...
10
12 Owl Lisp is a purely functional variant of R7RS Scheme. Ol can be used
13 to evaluate programs interactively and compile them to native binaries
14 via C.
15
17 This program follows the usual GNU command line syntax, with long
18 options starting with two dashes (`-'). A summary of essential command
19 line flats options is included below. The complete list is shown on
20 the help page.
21
22 -h, --help
23 Show summary of options.
24
25 -v, --version
26 Show version of program.
27
28 -e, --eval string
29 Evaluate the string, print it's value, and exit with 0 unless
30 errors occurred.
31
32 -t, --test string
33 Evaluate the string and exit with 1 if the value is #false, 0 if
34 it's true, or 126 if there is an error.
35
36 -o, --output output-file
37 Compile the given file to fasl or C code, and save the result to
38 the given output file.
39
40 -r, --run path
41 Load the file silently, and call the last value with the remainā
42 ing command line arguments.
43
44 -x, --output-format format
45 Choose what ol should compile the given input to. Valid options
46 are currently c and fasl. This is normally deduced from the file
47 suffix given in -o, and is thus not usually needed.
48
49 -O0, -O1, -O2
50 Write plain bytecode, compile some common functions to C or
51 everything possible. These only make sense when compiling to C.
52
53 -l, --load path
54 Resume execution of program state saved with suspend.
55
57 Make a simple binary
58 $ echo '(lambda (args) (for-each print args))' > test.l
59 $ ol -o test.c test.l
60 $ gcc -o test test.c
61 $ ./test foo bar
62
63 Compile in a pipe
64 $ echo '(lambda (args) (print (cons "I got " args)))' | ol -x c
65 -o - | gcc -x c -o test - && ./test 11 22 33
66
67 Loading vs running files
68 $ echo '(print "Hello, world!")' > test.l
69 $ ol test.l
70 Hello, world!
71 $ echo '(lambda (args) (print "Hello, world!"))' > test.l
72 $ ol --run test.l arg1 arg2 arg3
73 Hello, world!
74
76 ovm(1),gcc(1),scheme48(1).
77
79 Owl Lisp and this manual page were written by Aki Helin
80 <aki.helin@iki.fi>.
81
82
83
84 May 31, 2018 ol(1)