[Ecls-list] using ECL with C programs, a test

worm worm at arrakis.es
Thu Oct 16 08:52:17 UTC 2003


> On Thu, Oct 16, 2003 at 09:11:32AM +0200, Juan Jose Garcia-Ripoll 
> > As embedded library, your ECL has no toplevel. Thus, when it 
> signals an error, 
> > there is no one to catch it. See below for workarounds.
> 
> That explains the 172 'illegal frs index' messages.  I don't see the
> workarounds, though.  How do I catch the error? [...]
> That explains the failed make_lambda() call.  Do you mean, though,
> that I can use si_make_lambda(), that it is safe?  Is this the
> workaround that you mentioned above?

I forgot to tell you I rewrote the page regarding these functions. The 
new doc file is on the web, and on CVS. Basically, si_make_lambda() is 
unsafe because it does not catch errors, so you should either use it 
with valid forms or wrap everything inside code that catches the 
errors for you.

An example of such code is cl_safe_eval(), the code of which is IIRC 
in src/c/eval.d. cl_safe_eval() is a routine that evaluates a form and 
returns a default value when the evaluation produced an error. Using 
cl_safe_eval() to make functions from arbitrary lisp code is, in my 
opinion, better than calling si_make_lambda(). Furthermore, 
si_make_lambda() could also be an inspiration for you on how to write 
code that does not blow up when the lisp interpreted code does.

> > It is a bug in the documentation. I am a bit ashamed that it 
> happened, but it 
> > is already hard enough to find time to work on the code.
> I understand, especially with documentation.  I don't mind working
> through them.  Would you mind me sending discrepancies or corrections
> when I find them?

Sure! I would be very grateful if you can help me on that!

> BTW, I wrote an RPM spec file to install ECL on my system.  Do you
> want it?  Even if it is not useful for you, it might be for others
> wanting to install ECL or for distributing binaries.

Yes, please! But you should explain me how to use it. I have never 
produced RPM files, nor DEB files. My system is also a SuSe-8.2. How 
complicated would it be to make rpms that work also on a RedHat box?

> Muchas gracias, Juan.

De nada, Robert :-)

Juanjo






More information about the ecl-devel mailing list