By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,965 Members | 1,962 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,965 IT Pros & Developers. It's quick & easy.

using common lisp with python.

P: n/a
is there a way to embed common lisp programs in python?

Aug 28 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
le*********@gmail.com 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 ?
Aug 29 '05 #2

P: n/a
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.

Aug 29 '05 #3

P: n/a
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.

Aug 29 '05 #4

P: n/a
ci********@gmail.com wrote:
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
rk***@ucsd.edu

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

Aug 29 '05 #5

P: n/a
"ci********@gmail.com" <ci********@gmail.com> writes:
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
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Aug 30 '05 #6

P: n/a
Thank you all for the advice, I think I'll be writing my lisp code in
python.

Sep 3 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.