Maxima's REPL



Glad to hear you have a solution for these issues.  If you have a solution
for intercepting all of Maxima's 'spontaneous' output and questions, it
should be applicable to the string-based interfaces, too.

          -s

On Fri, Apr 8, 2011 at 13:11, Leo Butler <l.butler at ed.ac.uk> wrote:

>
>
> On Fri, 8 Apr 2011, Stavros Macrakis wrote:
>
> < That's the easy part of a Webified REPL.
> < The harder parts are what to do when Maxima asks questions before
> returning an answer, e.g.
> <
> <       (%i2) integrate(x^a,x);
> < Is  a+1  zero or nonzero?
> < n;
> <
> <       (%o2) x^(a+1)/(a+1)
> <
> < or gives an error rather than returning an answer:
> <
> < (%i3) 1/0;
> < Division by 0
> <  -- an error. To debug this try: debugmode(true);
> <
> <
> < a bunch of people have banged their heads against these (seemingly
> trivial) issues.
> <
> <             -s
> <
>
>  Honestly, I don't think that you are correct.
>  In general, yes, but not when running
>  Maxima in the same Lisp image as the server.
>
>  These are exceptions and the webserver should
>  be able to use the exception handling mechanism
>  to respond appropriately (I am not claiming the
>  current exception handling suffices; I don't know,
>  but I suspect not). This is the inherent
>  superiority of a Lisp-based webserver: it can communicate
>  with Maxima in its own language, or even better,
>  Maxima can be its own webserver. I wouldn't
>  even bother hacking yet another string-based
>  front-end...
>
>  While I am on it, some commands (e.g. plot2d) are
>  called only for side-effects. These are more of a problem....
>
>
>  Leo
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>