[Ecls-list] Embedding ECL interpreter in a C++ application
der_julian at web.de
Thu Mar 4 02:42:03 UTC 2004
On Wed, 3 Mar 2004 09:30:03 -0800 (PST)
Michael O'Connor <moconnor59 at yahoo.com> wrote:
> However I need to be able to split the read / compile
> stages from the run stage (because the app is required
> to run the same lisp program repeatedly on different
> data sets, and I want to avoid the overhead of reading
> / compiling the file on each run). I'm unable to
> figure out what function calls are needed to perform
> these tasks separately, any pointers would be much
You can compile your Lisp code to C from the commandline and load it at
run time. Currently the ECL X-Chat plugin uses this approach. Look into
the Makefile to see how to do this. Boils down to 'ecl -compile
your.lisp -o your.fas' and cl_load(1,make_simple_string("your.fas")).
You can call the compiled functions as often as you like via cl_funcall.
It should be possible to compile your lisp source and link it directly
to your C(++) application, but I have been unable to accomplish this
yet. Any pointers? :)
Signed and encrypted mail welcome.
Key-Server: pgp.mit.edu Key-ID: 0xD65B2AB5
FA38 DCD3 00EC 97B8 6DD8 D7CC 35D8 8D0E D65B 2AB5
Any sufficiently complicated C or Fortran program
contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
- Greenspun's Tenth Rule of Programming
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
More information about the ecl-devel