I am currently have a small program in Common Lisp, which I want to run as a shell script. I am using the SBCL and perfectly fine with this so will prefer to stay on this platfo
Creating a dedicated version of core image is a good option. You may:
load quicklisp
and sb-ext:save-lisp-and-die
in a new image. You write a shell/bat script named, say qlsbcl
, like this:
sbcl --core "$@"
grab clbuild2
at http://gitorious.org/clbuild2 and run clbuild lisp
. You'll have to symlink clbuild to a binary directory in your path and tweak some scripts a bit if your quicklisp
is not in the common place ~/quicklisp (https://gist.github.com/1485836) or if you use ASDF2
(https://gist.github.com/1621825). By doing so, clbuild
create a new core with quicklisp
, ASDF
and anything you may add in conf.lisp. Now the shebang may look like this:
#!/usr/bin/env sbcl --noinform --core /sbcl-base.core --script
The advantage of clbuild
is that you may easily create and manage core and quicklisp installation from shell for sbcl
(by default) or any other modern CL like ccl64
implementation. Mixing the two techniques (script and clbuild
) will solve your problem.