| François-René Rideau ( @ 2005-08-20 15:18:00 |
| Current music: | Doris Day - My Romance |
| Entry tags: | code, en, hacker, intellectual property, lisp, meta, smop, tao of programming, unix |
cl-launch
I am glad to announce my latest piece of semi-useful software, CL-Launch, an infrastructure to easily make your Common Lisp software launchable from a Unix command line.
CL-Launch essentially supports two modes of operation:
- to produce a shell script executable out of a single Lisp file, or
- to produce a shell script executable that loads a given ASDF project.
In both cases, CL-Launch will autodetect a Common Lisp implementation out of a list of supported ones. You can override the default list if you want. Currently supported are SBCL, CMUCL and CLISP (the ones I use), with partial support for OpenMCL and GCL (ones that I don't use). I'll update my software with any patches that are sent to me so as to better support more implementations.
When run with ASDF projects, CL-Launch will have it cache fasl files in the user's home directory.
CL-Launch is part public-domain (the shell scripting), part LLGPL (the Lisp stub), for having taken snippets out of common-lisp-controller. These licensing terms do not apply to the software that you process with CL-Launch, that can independently use whatever terms the authors may choose. Of course, all this paragraph is only valid if you believe in intellectual property, in which case you'll have to abide by my End-Seller License.
Other features include the ability to define a form to be executed after loading the file, or to run cl-launch on a file already processed by cl-launch so as to upgrade its cl-launch components without touching the rest of the file.
The software is currently only available on my site. It currently consists of three files, which is clumsy: one auxiliary file is required at compile-time, and the other one is required at run-time for ASDF projects. But I have plans to make it better in the near future.
The plan in the immediate future is to merge all three files into one using here-documents, which will remove the hassles both of compile-time and run-time dependencies together with the problem of packaging multiple files. Other desirable improvements would be on the Lisp side to smooth a few things, for instance, the access to the argument list; it would be nice to allow for more configurability of runtime options to Lisp implementations or of FASL location. Don't expect me to do it until I need it, though; however if you do it I'll gladly integrate it with my upstream version.
In a further future, it would be fun to bootstrap later versions to have all the shell maker logic in Lisp but I think I will leave that part as an exercise to the gentle macro-expander. (Obviously the wrapper logic will forever have to remain in shell, even if that shell stuff is one day dumped from an efficient SEX encoding that is eventually usable in other ways than mere shell dumping -- a Lisp-to-shell compiler would be nice.)
2005-08-21 Update: new release according to plan, with all files merged in one [an exercise in Quining], the ability to update the cl-launch part [an exercise in de-quining and re-quining], the ability to specify implementation-dependent options, and smoother command line argument access [and lots of testing]. Still lacking is more configurability of FASL cache location [provided since].