On Apr 13, 2010, at 11:20 PM, Adam Getchell wrote:

Hi all,

I realize this maybe a bit of an insane question, but I'm looking for a way to use ecl within sage besides:

./sage -ecl

I have googled for relevant results, but documentation on sage.interfaces.lisp seems broken right now:

http://sage.math.washington.edu/home/mhansen/sage-epydoc/sage.interfaces.lisp-module.html

That just happened to be a file sitting in someone's directory. It doesn't look like its in the user manual, http://hg.sagemath.org/sage-main/file/ea02bc44fa94/sage/interfaces/lisp.py can serve as a reference though. Basically, you can do

sage: lisp("(+ 1 2)")
'3'

and whatever else you want, including reading in files, etc. You can also do

sage: a = lisp(1)
sage: b = lisp(2)
sage: a + b
3
sage: type(a+b)
<class 'sage.interfaces.lisp.LispElement'>

If it helps, here's the background:

We've got some rather neat causal dynamical triangulation (2d quantum gravity) code running in Lisp. The lisp environment lacking certain facilities, I thought it would be neat to find a way to run it within Sage and take advantage of all the nice facilities provided. I'm looking to avoid rewriting it in python for now, though I would certainly do it if advised that was the only way.

One of the primary goals of all the interfaces is so you can use your existing code right from Sage. Give the above a try.

- Robert

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to