using common lisp with python.

P

Pierre Barbier de Reuille

(e-mail address removed) a écrit :
is there a way to embed common lisp programs in python?
It depends on what you call "embedding" ... can you be more specifiv
about what you want ?
 
L

levicc00123

basically, what I'm looking to do is use python as a bridge between C
and Common Lisp to create a virtual city that contains Artificial life.
 
C

cipherpunk

Your best bet is probably to look into your LISP environment's FFI
(Foreign Function Interface). Most LISP environments have some way to
call C code directly. Insofar as going back the other way... that I'm
a little more sketchy on. Guile (the Scheme compiler from GNU) is a
strong contender, though. It's not Common LISP, but it's a LISP with
copious documentation for how to call it from C.

I really can't see a reason to use Python as a glue layer. I'd
recommend rewriting your LISP code in Python before I'd recommend using
Python to interface between Common LISP and C.
 
R

Robert Kern

Your best bet is probably to look into your LISP environment's FFI
(Foreign Function Interface). Most LISP environments have some way to
call C code directly. Insofar as going back the other way... that I'm
a little more sketchy on. Guile (the Scheme compiler from GNU) is a
strong contender, though. It's not Common LISP, but it's a LISP with
copious documentation for how to call it from C.

ECL might be a good choice for real Common Lisp (more or less).

http://ecls.sourceforge.net/
I really can't see a reason to use Python as a glue layer. I'd
recommend rewriting your LISP code in Python before I'd recommend using
Python to interface between Common LISP and C.

Agreed.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
M

Mike Meyer

Your best bet is probably to look into your LISP environment's FFI
(Foreign Function Interface). Most LISP environments have some way to
call C code directly. Insofar as going back the other way... that I'm
a little more sketchy on. Guile (the Scheme compiler from GNU) is a
strong contender, though. It's not Common LISP, but it's a LISP with
copious documentation for how to call it from C.

I believe SCM is also extensible/embeddable - and is generally a more
complete LISP system than Guile. However, it's still Scheme instead of
CL.
I really can't see a reason to use Python as a glue layer. I'd
recommend rewriting your LISP code in Python before I'd recommend using
Python to interface between Common LISP and C.

Agreed.

<mike
 
L

levicc00123

Thank you all for the advice, I think I'll be writing my lisp code in
python.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top