restarting maxima from scratch



On 2/18/11 3:12 PM, Leo Butler wrote:
>
> On Fri, 18 Feb 2011, Raymond Toy wrote:
>
> < 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?
>
> This might be useful if you have users whose login shell is
> /usr/bin/maxima and whose permissions prevent them from accessing
> a shell. In that situation, quitting+restarting would probably mean
> re-authentication, etc.
Do users really have maxima as their login shell?
>
> < 
> < A line not added is a line debugged. :-)
>  
>  rm -fr *
>
>  All problems sorted.
I suggested that once at work when the powers that be kept complaining
that we must have absolutely no lint warnings or errors in our code.   I
just said it was easy:  rm -rf *.   We do the best we can, but you can't
have it both ways. :-)

Ray

>  Leo
>