Ben Crowell wrote:
>Hi,
>
>I have a preexisting Perl CGI application (http://www.lightandmatter.com/spotter/spotter.html)
>that I would like to interface with maxima. For instance, I'd like to add a little
>utility to it for doing integrals, sort of like Wolfram's integrals.com. The app
>is something my students use (I teach physics), and it already has a mathematical
>input language that my students are used to. The language is not all that different
>from Maxima's, but, e.g., it allows implicit multiplication. So the idea is that,
>rather than telling them they can go to integrals.com to compute an integral
>they don't know how to do, I can have them enter it into my CGI application
>in the notation they already know, and my app will then parse it and convert
>it to Maxima syntax, and display the result (either as ascii-art math, or
>as LaTeX-generated graphics).
>
>Does anyone have any experience with embedding Maxima in a script like this?
>For example, I want to make sure there isn't any tricky way for users to
>do inappropriate things, like deleting all my files. (OK, since it's going
>through my own parser first, it would probably be hard for them to accomplish
>that anyway, but I'd still be interested in hearing if anyone else has tackled
>the issue of sanitizing input appropriately.) It would also be nice to make
>sure they can't inadvertently send my server spinning off on a computation
>that will eat up 99% of its CPU for the next month :-)
>
>Thanks in advance for any suggestions!
>
>
>
>
I wrote a little script writer in octave to make a in.mac file
I then executed a batch file from inside Octave that started up Maxima
and ran the sript file in.mac
Maxima wrote the answer to a separate file.
I then read the answer back into octave
You could do the same from your prog.
If this is what you want, I will send them to you.
Doug Stewart