On 2/18/11 2:22 PM, dlakelan wrote:
> It would be useful to be able to COMPLETELY clear Maxima back to
> initial conditions. kill(all); and reset(); help a lot if you're doing
> casual calculations, but if you want things completely cleared out, as
> far as I can tell the only way to do this reliably is to quit and
> re-start maxima.
>
> It could be useful instead to have a function "restart();" which just
> calls "exec" on the maxima executable. I see that in Linux at least
> the maxima executable is actually a shell script that calls exec on
> the appropriate lisp runtime so perhaps it is a bit tricky to do this.
> SBCL certainly supports exec if I remember correctly, I'm not sure if
> GCL does or any of the other Lisps Maxima supports. In any case, the
> "restart" function could call exec when supported, and throw an error
> with a message like "this lisp does not provide support for the
> restart function, please quit maxima manually and start it again"
> otherwise.
>
How is restart() different from quitting maxima and starting maxima
again? If there is none, the why spend any time adding this code and
testing it?
A line not added is a line debugged. :-)
Ray