how to use "maxima --batch" *reliably* ??



On Tue, Feb 26, 2008 at 9:56 AM, Stavros Macrakis <macrakis at alum.mit.edu> wrote:

>    1) Maxima often asks questions in the middle of a calculation (e.g. Is
> x>0?).

I've tried to implement a mode of operation in which interactive
queries are suppressed and turned into conditional expressions.
I made some progress (see the "noninteractive" package which
is somewhere in cvs) but there are some problems with it still.
If anyone is interested, I'd be glad to have some help on it.

>    2) Maxima errors are not designed for consumption by other programs.

A couple of ideas here. (1) quit should take an integer argument
which is the exit value (if the Lisp implementation allows it).
(2) If running in batch mode, probably there could be a top-level
error handler such that all Maxima errors are turned into some
kind of expression, e.g. oops("Division by zero"), instead of
printing the error as an out-of-band message.

>    4) Startup time is long.

I wrote a program share/contrib/maxima-server.lisp which
implements a conventional unix-ish server which forks off
a new instance for each client. Typically that's faster than
re-launching. The program works only with SBCL.

Oliver, you might take a look at the list of related projects,
http://maxima.sourceforge.net/relatedprojects.shtml
Various kinds of systems which use Maxima as a computational
engine have been implemented.

best

Robert Dodier