[Ecls-list] Embedding ECL (Newbie)
Geoff Cant
nem at lisp.geek.nz
Sun Jan 22 15:04:08 UTC 2006
Hi there, I'm new to embedding ECL into things and am having trouble
with ecl and Quake 1.
I'm trying to embed ecl into the QuakeWorld client. I've got as far as
booting CL and converting strings to cl_objects and back again via
format, but can't figure out how to actually get eval/funcall to work
properly. At the moment, they crash the application with tens of
thousands of recursive calls to:
cl_error
cl_funcall
L36error_type_specifier
L3Universal_Error_Handler
L30coerce_to_condition
cl_typep
The console logs show:
Read or write operation to stream #<input stream "stdin"> signaled an
error.
Explanation: Resource temporarily unavailable.
Broken at COMMON-LISP:ERROR.
QUAKE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>
My lisp and c code (cribbed from the xchat plugin and vbecl) are
attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cl_lisp.c
Type: application/octet-stream
Size: 3721 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20060122/18dfa0d5/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quake.lisp
Type: application/octet-stream
Size: 1884 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20060122/18dfa0d5/attachment-0001.obj>
-------------- next part --------------
In the code I'm trying to use Cmd_Lisp_Eval with a lisp_code string of
"(+ 1 1)". The crash happens in cl_lisp.c at line 73 ("cl_object
result = cl_safe_eval (form, Cnil, NULL);").
Does my eval code look reasonable (like it's doing the right things)?
As quake is a GUI app without a useful stdin/out, what do I need to do
in ECL to prevent errors due to things trying to read *standard-input*
and friends? What am I missing in the way of housekeeping (memory
management, static roots for the GC, ...)?
Thanks muchly,
--
Geoff Cant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2145 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20060122/18dfa0d5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20060122/18dfa0d5/attachment.sig>
More information about the ecl-devel
mailing list