Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
ol(1)			    General Commands Manual			 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 op-
       tions 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 remain-
	      ing 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.he-
       lin@iki.fi>.

				 Jan 12, 2021				 ol(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=ol&sektion=1&manpath=FreeBSD+Ports+15.0>

home | help