Subject: Re: Is this a correct way of delivering CMUCL application ?
From: rpw3@rpw3.org (Rob Warnock)
Date: Sun, 19 Feb 2006 02:48:37 -0600
Newsgroups: comp.lang.lisp
Message-ID: <huidnSVu_7F4rWXeRVn-pQ@speakeasy.net>
RPG <rpgoldman@gmail.com> wrote:
+---------------
| Rob Warnock wrote:
| > This seems fine, though as long as you're going to the trouble of
| > building a core image you might as well specify the call of your
| > MAIN-FUNCTION in the SAVE-LISP call itself...
| 
| Wow!  This was such an excellent article about application delivery for
| CMUCL.  Would you consider putting it into the CMUCL documentation
| and/or putting it on Cliki?
+---------------

I'll see what I can so. For some time I've been meaning to
write up something related to this, a "-script" hack that
works with a standard distribution core file [the hack is
implemented in the "site-init" file], that's used this way
[it also allows FASLs]:

    $ cat demo
    #!/usr/local/bin/cmucl -script
    (format t "~s run with ~a args:~%" *script-name* (length *script-args*))
    (loop for i from 0 and arg in *script-args* do
      (format t "arg[~a]: ~s~%" i arg))

    $ demo foo 'bar baz' gorp
    "demo" run with 3 args:
    arg[0]: "foo"
    arg[1]: "bar baz"
    arg[2]: "gorp"
    $

It's what I use for all my miscellaneous "scripting" these days...


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607