A little experiment to see if ECL can be used as a library from python, and after browsing through ECL's API, it looks like it should be fairly straightforward to wrap the API with cython. The data format that ECL uses for its objects should also be easy to interface with, and since many of the atomic types of ECL have a direct analogue in Sage, binary conversions should also be feasible.
My first try was the result of a lot of reading and then cut&pasting completely obvious code. At least I learned something in the process. My compliments to the cython people. It's amazingly easy to use! (although not so easy outside of sage. I couldn't get it to find the library, even though I was working in the appropriate "sage -sh". Anyway, hello world: http://trac.sagemath.org/sage_trac/ticket/6781 It makes sage segfault on exit, though, and I have no idea why. Further obstructions: - If one keeps pointers to ECL objects outside of ECL's management (i.e., a cl_object pointer in a cython object), one needs to tell ECL's garbage collector about it. I don't know how. - If one wants to use this for maxima, it needs to be built as a lisp library rather than an executable. Judging from the recommended ECL build process, I suspect that such a thing already does get built, but I didn't check. In the mean time, it seems like a nice project to allow "ECL programming in python". Any feedback on the obstructions above? I respect William's comment on "no big picture talk without doing the work", so I might give the wrapper a further shot if I can solve the preliminary issues. Nils --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---