embedding maxima in a CGI script



Ben,

I do have problems with interactivity and have not had time to investigate
Robert's post yet which may well be very helpful indeed (thanks!).  In my
application the teacher usually has control over the integrand.  In fact I
need to integrate very rarely since when marking a student's answer to an
integration problem it is better to differentiate - sorts out the constant
of integration problem.

In writing STACK I have paid a lot of attention to trying to allow the
teacher to make a minimal use of CAS.  I didn't want to require teachers
to write branches and loops.  This makes the PHP code much more
complex.  Hence, if you checkout the code from the CVS, look at the file

/scripts/stackUnix.php

and

/scripts/stackWin.php

for the details of the connection to Maxima.  Someone on the list
previously voiced a concern that I had "in mind a kludge with the command
line".  True. 

All the Maxima specific files are found in

/scripts/maxima/

the most important being 

/scripts/maxima/stackmaxima.mac

Some .mac files are generated at install time to reflect your local
settings, so things may not work if you just checkout these files and try 
to run them with Maxima.  

The easiest way to install is to use EasyPHP for Windows.  *However* this
is not suitable for anything other than development and demos - the
automatic timeouts (which in part prevent the whole thing falling over
during interactive mode) do not work yet in Windows.

Comments, suggestions and help very much welcome.

Regards
Chris

On Wed, 5 Oct 2005, Ben Crowell wrote:

> Thanks, all, for your helpful responses! What Chris is
> doing with STACK looks very similar to what I want to
> do, so I think I'll try to pick up a minimal amount of
> PHP, and read through his code. Spotter uses numerical
> sampling rather than symbolic algebra to see if the student's
> answer is correct, but there are definitely a bunch of
> cases where symbolic algebra could also come in handy
> in my application, and it looks like Chris has already
> solved the problem of sandboxing, etc. Chris, does the
> interactivity issue just not come up in your application,
> since you're basically just typesetting equations and
> using Maxima to test whether expressions are equal or
> not? I wonder what integrals.com does when you feed it
> an integral that can't be evaluated without knowing if
> a certain constant is positive, or is an integer? One
> thing that would probably cut out a lot of these difficulties
> would be simply to have the integral-computing service
> only accept integrals that don't have symbolic constants
> in them. Generally that just means that the user has to
> do an additional step of substitution.
> 
> 	Ben
> 
> _______________________________________________
> Maxima mailing list
> Maxima@math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>