Using Maxima from Racket



On 3/8/12, Jens Axel S?gaard <jensaxel at soegaard.net> wrote:

> using Lisp SBCL 1.0.47

> Maxima has an option -s <port> that makes Maxima listen on a give port.

Well, maxima -s makes Maxima the client, not the server.
For a simple-minded Unixish server, try share/contrib/maxima-server.lisp.
It only works with SBCL, but you're in luck!
See the comment header of maxima-server.lisp for some info.

Also there are command-line options to suppress output cruft.
Try maxima --help and look for --quiet and --very-quiet.

As to the output format, after display2d:false, output is rendered in
the so-called 1-d format, which might be easier to parse automatically.
You can probably convince Maxima to return only S-expressions by

:lisp (print #$<input expression goes here>$)

I just tried maxima-server w/ --very-quiet and it looks like Maxima
fails to flush its output buffer. If you want to try that I can look into it.

HTH

Robert Dodier