git clone ''

(ql:quickload :lisp-executable)

Lisp Executable

The LISP-EXECUTABLE system provides a language for defining and creating programs that can be used from the Unix shell instead of the Lisp read-eval-print-loop (REPL).

The documentation for this project is contained in or online.

Quick Introduction

The files lisp-executable-example.asd and example/main.lisp provide a quick illustration of how to use this system.

(asdf:load-system "lisp-executable-example")
(asdf:oos 'lisp-executable:create-executables-op "lisp-executable-example")

The above code will generate two executables, example/example-program and example/control-c-tester.

Example Program

(define-program example-program (&options help)
     (format t "Help has arrived."))
     (format t "You are doomed.")))

Control C Tester

(define-program control-c-tester (&options help (sleep sleep-time))
  (declare (conversion-function (real 0) sleep)
           (type (or null (real 0)) sleep-time))

  (unless sleep
    (setf sleep-time 20.0))

     (format t "Usage: [options]

Sleep for an amount of time.

  --help                      This helpful message.
  --sleep <positive real>     How long to sleep for. Default is 20 seconds.
     (sleep sleep-time)