Need help -- redefining existing functions (reloading modified source)
Subject: Need help -- redefining existing functions (reloading modified source)
From: James Amundson
Date: Fri, 28 Nov 2003 19:03:30 -0600
On Fri, 2003-11-28 at 16:14, Robert Dodier wrote:
> Hello,
>
> I'm attempting to figure out a bug fix (#834729).
Great. I heartily encourage that sort of behavior.
> Toward this end I want to hack on a source file
> (plot.lisp) and then reload it and see if the
> modified functions work correctly.
That is a sensible plan.
> I am running
> Maxima 5.9.0 on Clisp 2.29, on RedHat 7.1 (kernel 2.4.2).
It really makes much more sense to do bug fixing with the current cvs
version of Maxima. We should be getting close to a 5.9.1 release, so
every bug fix will help.
> However, I find that just reloading the unmodified
> file is problematic: with Maxima 5.9.0 (-r1.18 plot.lisp)
> if I do load("plot.lisp") then plot(x^3,[x,-1,1]) yields
>
> *** - THE: (- XEND X) evaluated to the values (2.0), not of type
> LONG-FLOAT
>
> and if I load the most recent CVS version (-r1.32 plot.lisp)
> then plot(x^3,[x,-1,1]) yields
>
> *** - argument to MINUSP should be a real number: NIL
>
> The problem with rev 1.18 is especially puzzling, since
> it is the same version that is executed when I just do
> plot(x^3,[x,-1,1]) by itself (which does work correctly).
I have tried the current cvs version of maxima (running Clisp) and
maxima 5.9.0 (running GCL.) I tried the "native" version of plot.lisp
and with 5.9.0 and the current version of plot.lisp with the cvs maxima.
I can't reproduce your problem.
> I'm guessing that some functions or macros are getting
> redefined in a different namespace or something.
> Can someone comment on this?
It is, unfortunately, possible that some functions or macros are getting
redefined. As I said, however, I can't reproduce the problem here. You
should probably try doing a rebuild from the source distribution.
> How do other people go about testing possible fixes?
More often than not, I do a "make" in the source directory, then run the
maxima-local script. Dynamically reloading the source file is a more
lisp-like way of doing things, though.
> I'd rather not rebuild the binary, since it seems
> unnecessary, and besides I spent some time trying to
> do that and couldn't get it working.
Compling the binary should be trivial. Although there are many known
bugs in Maxima, few if any are in the compile. If you get the current
version of clisp (2.31), the cvs version of maxima should compile with
./bootstrap
./configure
make
If it doesn't, we want to know about it.
--Jim