Maxima's interface to GUI's, etc. (was Re: [Maxima] Maxima - new GUI)
Subject: Maxima's interface to GUI's, etc. (was Re: [Maxima] Maxima - new GUI)
From: James Amundson
Date: Fri, 15 Oct 2004 17:52:51 -0500
On Fri, 2004-10-15 at 02:30, Michael Reimpell wrote:
> > It really wants to be able to interact
> > with the user at its pleasure (is x pos neg or zero?) and it not
> > disciplined about handling error/exception cases in a way that is easy
> > to interface to other systems.
> ... together with the worst case examples. Since James Amundson is probably
> the expert for this, it would be nice to hear a comment from him, if changing
> this is at all feasible and how much work would be invloved (maybe with some
> pointers to the source-files/documentation).
I am staying out of this GUI discussion, but I will comment on the issue
of communication between Maxima and other systems, including GUI's. I
have thought about the communication issue a great deal, but I haven't
discussed it on the list very much at all. One of the reasons for that
is that I generally don't discuss technical design issues until I am
ready to work on them.
Anyway...
Other programs need to talk to Maxima. To date there have been two
closely-related methods employed: Talking to maxima through sockets and
talking to maxima through pipes. Either way, the non-maxima end has had
to sort through the textual chatter coming out of maxima in order to
extract any sort of information whatsoever. For example, a GUI might
need to try try to figure out when input is expected. I call this the
"stone age" approach. It clearly is neither robust nor efficient. The
stone age approach has the advantage that it is easy to implement on the
Maxima side. In the stone age it was easy to be a stone.
In 5.9.1, we added the ability to insert definable markers at key
moments in Maxima's output. I call this the "bronze age" approach
because it is a clear advance over the stone age approach. Some
robustness is possible. It still seems pretty primitive in 2004,
however.
What I would really like to see is a jump all the way up to the
Enlightenment -- a mechanism for two-way communication of actual
semantic information. Types of information should include, but not be
limited to:
1) Text in Maxima notation.
2) Numbers of various sorts.
3) Symbols.
4) Multi-dimensional arrays of numbers.
5) Actual Maxima expressions, not to be confused with (1).
6) Arbitrary text.
One huge issue is the mechanism for communication. My preferred choice
at this time is CORBA. I'm sure that will be a controversial choice, but
I have some strong arguments for it.
I might be able to spend some time on the interface issue if there are
people seriously interested in working on the other (non-maxima) end. If
so, we can start to discuss details. There are many, many details to
discuss.
--Jim