On 8/15/07, Bill Page <[EMAIL PROTECTED]> wrote: > > Wonderful. > > > It just took a lot of work refining how the maxima interface works -- > > it resynchronizes itself before every interaction by putting > > "random number + 1" in the input and waits for the result of that > > arithmetic, etc. I'm sure the axiom interface could do something > > similar. > > Yes, I saw your new resynchronization code in 'maxima.py' and I was > **amazed** ! :-) It seems to me that you have gone to heroic lengths > to ensure that there is a way to recover from these sort of > communications problems. (At least Axiom never tries to ask the > console user a question!) I would be very interested to know how > often communications with Maxima have to be resynchronized during an > intensive interaction. If the need for resynchronization is occurring > often even when Maxima is not asking questions, and *if* this is due > to readline/pexpect interactioin - as I am now sure it is in the case > of Axiom - then it seems to me that preventing communications problems > in the first place and eliminating the (possible) spurious need for > resynchronization might make things more efficient.
No. It will make the communications overhead maybe 50% better, but it would be far far less robust. And robustness is critically important. Also, random things can happen to mess up certain interfaces, e.g., the user hits control-C. If you want a rock solid interface, synchronizing (or dividing things up into clear transactions) is necessary. > I was thinking about how to do this resynchronization in 'axiom.py' > but then I realized that in my tests this was actually happening > because pexpect was (sometimes) returning a matched prompt string in > 'expect.after' even though the contents of 'expect.before' did not > contain the complete output that leads up to that prompt and then it > would return the same buffer a second (and sometimes third) time, each > time a little more complete before. As a result the communications get > out of sync. This problem entirely disappears when I rebuild with > readline disabled. Maybe it is a bug in pexpect. But as you implied, > these problems seem to be exceeding difficult to debug. It is easier > to work around them. I think that to really do this right we need > better syntactical markup in the Axiom output like is possible in > Maxima. Better markup would be very nice indeed. Best of luck with all this. Do consider synchronization. -- William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---