[Ecls-list] Two Questions...

Samium Gromoff _deepfire at feelingofgreen.ru
Thu Oct 22 20:19:37 UTC 2009


From: Brit Butler <redline6561 at gmail.com>
> Dear list,
> 
> I don't understand how to compile standalone executables that use other
> libraries, say External-Program. Is there some example code I can look at or
> other pointers here? If I try to load the following code
>> (require 'external-program)
>> (external-program:run "echo" (list "hello world"))
> it loads correctly but if I run (compile-file "test.lisp" :system-p t) it
> complains that the package external-program does not exist.
> What's going on here? I tried putting (require 'asdf) at the top of
> test.lisp followed by the above code. It still fails to find the package.

It's not very clear, from your examples, what exactly you are doing,
so I'll just skip to explanation.

ECL support of deliverables (including executables) revolves around
C::BUILDER, or, more user-friendly speaking, around ASDF:MAKE-BUILD.

The latter requires you to formulate the behavior of your executable
with two pieces: the ASDF system for the main code of your executable
(potentially dependent on other ASDF systems), and the activation form,
calling the main code.

So, in the context of executables, you end up doing something like this:

   (asdf:make-build :your-system :type :monolithic
                    :epilogue-code '(your-package:run))

> Second and more importantly, I have a bit of code posted
> here<http://redlinernotes.com/sigint.txt>(
> http://redlinernotes.com/sigint.txt). You'll notice there are stubbed out
> definitions for ECL there. I can't figure out if there is a function
> analogous to sb-sys:enable-interrupt in ECL. Apropos turned up some useful
> things though, including si:terminal-interrupt and si::+sigint+. Can anyone
> shed light on this?

Off the top of my head I can't come up with a 1-to-1 translation
to the "handler" semantics of SBCL.  Also, I'm living in the era
of April's ECL, so take my advice with a grain of salt.

Here's, though, what I use for handling of SIGINT's:
   
(handler-case <form-protected-against-SIGINT>
  (si::interactive-interrupt ()
     <action>))


regards,
  Samium Gromoff
--
                                 _deepfire-at-feelingofgreen.ru
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org




More information about the ecl-devel mailing list