[Openmcl-devel] self-contained executable library - how does it access command line arg[1]?

Tim Bradshaw tfb at tfeb.org
Fri Dec 30 06:14:11 PST 2011


On 29 Dec 2011, at 09:09, Gary Byers wrote:

> 1)  It's trivial to write a shell script to process arguments however you
>    want to and pass them to ccl after -- .  There's no reason to expose
>    the user to the horrors of -- this, though I think that people who
>    worry about this issue probably overestimate the degree to which
>    end users share their concern.

For what it's worth, every time I have written a non-trivial application I have ended up writing wrapper scripts for it, because you almost always end up needing to do that I find.  I even have a tool called "skel" for doing this (though skel won't do the command-line massaging you often need).  This isn't just Lisp: I've had to do it for Lisp, Java, Perl & C (C because it is hugely easier to parse command line options with Perl and pass the C bit a fully-defaulted command line – in this case the Perl was itself wrapped to set some environment variables so it could find modules, so the whole invocation was shell wrapper -> perl wrapper -> C).  Indeed, the wrapping infrastructure tends to be the first thing I write now (because it's easy to do, I know I'll need it, and it lets me put off thinking about the real problem for a bit).


More information about the Openmcl-devel mailing list