Nils Bruin wrote: > 7. The main drive for using ecl-as-a-library in sage is to get a > faster interface with Maxima. If all options above turn out to involve > a lot of work or are expensive to maintain, perhaps we need to find > another way of speeding up the interface. As a side effect, we already > have maxima-as-a-library in ecl now. Processes can communicate > efficiently in various ways. Shared memory? Send data info through a > pipe? With a little programming on both the sage and the ecl side, we > could make a binary communication protocol. Definitely not as > satisfying a solution as a library interface, but perhaps good enough.
Thanks for your work on this topic, I know it isn't easy. Best of luck to you. There are a few things to bear in mind. (1) Maxima was originally written with a general assumption that someone is sitting at the console. This is the origin of the asksign stuff. Interactive features (mostly asksign, also printing error messages (instead of throwing something), are the major items in Maxima) make it difficult to write programmatic interfaces. Even if you solve the communication problem, you'll still need to somehow handle the interactive stuff. I've made an attempt to work around the interactive stuff but it doesn't always work as intended. Btw I wouldn't mind getting some help on it. (2) There are probably some substantial chunks of Maxima which you'd be better off omitting. E.g. if you can somehow talk to Maxima directly, you can omit the parser. I'm trying to make some tentative steps toward organizing Maxima to be more easily decomposable. I wouldn't mind some help with that too. (3) For the most part, Maxima has a very simple internal format for expressions. A general expression foo(a, b, c) is represented pretty much as ((FOO) A B C) in Lisp. Infix and postfix operators in Maxima are represented as prefix operators in Lisp, e.g. a + b => ((MPLUS) A B) . If you call Maxima directly from outside presumably you'll get some C object which stores the Lisp expression. Seems like it should be easy to traverse those in C code. However, there are some objects, notably a special representation for polynomials, which are not so simple. Probably the easiest way to deal with those is to convert them to their so-called display representation, which is the simple ((FOO) A B C) scheme above. (1) is the most important, (3) not so much, and you can ignore (2). I mention here that I'd like help on (1) and (2) because it's of interest mostly to outsiders; within Maxima it doesn't make much difference. Hope this helps in some way. Robert Dodier --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---