On 7 October 2010 20:18, Teemu Likonen <tlikonen@...> wrote:
> I wonder if the broadcast stream should be closed (?). Anyway, I once
> wrote this:
No need to. The broadcast stream is purely a Lisp object, so there is
no risk at all in letting the GC deal with it. (If it had OS resources
like fds, then it unpredictable release of those by the GC might be an
issue.)
Cheers,
-- Nikodemus

On Thu, 07 Oct 2010 20:36:09 +0300
Teemu Likonen <tlikonen@...> wrote:
>
> When using SBCL to run scripts it's probably a good idea to create a
> special Lisp image which already contains all the needed libraries.
> The same in concrete terms:
>
> $ sbcl --noinform
>
> * (require :asdf)
> * (require :local-time)
> * (sb-ext:save-lisp-and-die "sbcl-script" :executable t)
>
> Now copy the executable sbcl-script image somewhere and use it to run
> your scripts:
>
> #!/some/path/sbcl-script --script
> (format t "~A~%" (local-time:now))
I tried it, nice.
However, it is amazing that the image file is 47M large. That is pretty
much. On the other hand I have to admit that from a runtime point of
view it is not a big deal to run a script via that big image file
nowadays.
My script initially had a runtime total of 1.258 sec. Now using the
imagefile in the shebang it ran in 0.292 sec. That is a huge
difference for small scripts.
--
Thanks,
Manfred