http://www.biostat.wisc.edu/~annis/creations/PyLisp/pylisp.html
However, how about extending the idea? I.e., making all the Python
functions callable from Lisp, and having all the objects in Lisp
actually be Python objects (using some classes like cons cells etc.):
-----------------------------
lst = readlisp("""(defun sum (x y) (+ x y))""")
# lst == <cons cell at 0x123>
ns = mk_lisp_namespace() # this has lambda, defun, defmacro & friends
eval (lst,ns)
# ns["sum"] == <cons cell>
def sum2(x,y):
return x+y
ns["sum2"] = sum2
s = evallist("(sum2 2 3)",ns)
# s == 5
---------------------------------
Sounds like a nice way to bring us all the macro power our Lisp
friends glorify so much, and a way to end all the inter-newsgroup
flamewars once and for all :-).
--
Ville Vainio http://www.students.tut.fi/~vainio24
Danny Yoo did a basic Scheme or Lisp intrpreter in Python a few
years ago - it may be on the Useless Python website...???
Are you listening Danny?
Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
It can be found here :
<http://www-hkn.eecs.berkeley.edu/~dyoo/python/pyscheme/index.html>
--
DW