Stu is a simple & minimal lisp implementation in C. To build, you need the following installed:
- autoconf, automake & libtool
- valgrind (optional but highly recommended)
- libedit-devel
The following commands can be performed to develop stu:
$ autoreconf -i && ./configure ALLOCATOR=system CFLAGS="-O0 -g" --disable-shared && make
...
$ cat <<END |./src/repl/stu -f-
> (def a 100)
> (def b 200)
> (def c (+ a (* 2 b)))
> (eval (list 'quote a b c))
> END
(100 200 500)
Or you can use the repl by specifying no arguments:
$ ./src/repl/stu
stu> (def make-adder (λ (a) (λ (b) (+ a b))))
nil
stu> (def add-two (make-adder 2))
nil
stu> (add-two 2)
4
stu> ^D
Bye!
Online manual pages are generated from both docs/*.pod files and various headers in the source. The HTML docs are automatically made available at the stu github page. The equivalent roff manual pages are installed during a sudo make install.
The test suite uses valgrind if installed (which you should).
$ make check
$ make check TESTS="my_specific_test_name"