Edwin Woollett | 10 Feb 18:16
Favicon

Re: display patch, was: get name of variable as string in function?

On Feb. 6, 2012, Robert Dodier wrote:
-----------------------
>Well, OK. No need to invent a work-around, it's easier to fix the bug.
>Here is a patch. Can someone commit this? My git sandbox
>is messed up (OH WONDERS OF GIT WILL YOU NEVER CEASE)
>and I can't take the time to straighten it out right now.
[snip]

>diff --git a/src/comm.lisp b/src/comm.lisp
>index 1282784..94c3823 100644
>--- a/src/comm.lisp
>+++ b/src/comm.lisp
>@@ -753,7 +753,9 @@
>        (setq ans (list '(mequal simp) (disp2 l) ans)))
>     (if lablist (nconc lablist (cons (elabel ans) nil)))
>     (setq tim (get-internal-run-time))
>-    (displa (list '(mlable) (if lablist linelable) ans))
>+    (let ((*display-labels-p* nil))
>+      (declare (special *display-labels-p*))
>+      (displa (list '(mlable) (if lablist linelable) ans)))
>     (mterpri)
>     (timeorg tim)))

----------------------------------------
I am using the new version of comm.lisp downloaded from
git, and find a peculiar interaction with integrate
resulting in a lisp error:

------------------------------------

(Continue reading)

Raymond Toy | 10 Feb 23:11
Picon

Re: display patch, was: get name of variable as string in function?



On Fri, Feb 10, 2012 at 9:16 AM, Edwin Woollett <woollett <at> charter.net> wrote:
I am using the new version of comm.lisp downloaded from
git, and find a peculiar interaction with integrate
resulting in a lisp error:

------------------------------------

Maxima 5.26.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)


(%i1) integrate(-1/(x^2-x),x,-1/2,1/2);
Principal Value
(%o1) log(3)
(%i2) load ("comm-new.lisp")$
(%i3) integrate(-1/(x^2-x),x,-1/2,1/2);
Maxima encountered a Lisp error:

Error in COND [or a callee]: The variable NUM is unbound.


I suspect this is not a problem with the new version.  I'm guessing you will have the same problem if you load the original version of comm.lisp.

With the current git version of maxima, I don't run into any problems (without loading com-new.lisp, separately).  The output of integrate is different, though, but it is still correct.

Ray
 
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Edwin Woollett | 11 Feb 19:48
Favicon

Re: display patch, was: get name of variable as string in function?

On Feb. 10, 2012, Raymond Toy wrote:
----------------------
>I suspect this is not a problem with the new version.  I'm guessing you
>will have the same problem if you load the original version of comm.lisp.
>
>With the current git version of maxima, I don't run into any problems...
--------------------------------------------------------------------------

You are right - just loading in comm.lisp messes with integrate.

-----------------------------------------------------------
(%i1) integrate(-1/(x^2-x),x,-1/2,1/2);
Principal Value
(%o1) log(3)
(%i2) load ("comm-old.lisp")$
(%i3) integrate(-1/(x^2-x),x,-1/2,1/2);
Maxima encountered a Lisp error:

 Error in COND [or a callee]: The variable NUM is unbound.

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
-----------------------------------
Ted
Raymond Toy | 12 Feb 00:19
Picon

Re: display patch, was: get name of variable as string in function?

On 2/11/12 10:48 AM, Edwin Woollett wrote:
> On Feb. 10, 2012, Raymond Toy wrote:
> ----------------------
>> I suspect this is not a problem with the new version.  I'm guessing you
>> will have the same problem if you load the original version of comm.lisp.
>>
>> With the current git version of maxima, I don't run into any problems...
> --------------------------------------------------------------------------
> 
> You are right - just loading in comm.lisp messes with integrate.

Not sure if it will make a difference, but you might want to compile and
comm.lisp.  Something like

:lisp (load (compile-file "<path>/comm.lisp"))

Ray
Edwin Woollett | 12 Feb 20:52
Favicon

Re: display patch, was: get name of variable as string in function?

On Feb. 11, 2012, Raymond Toy wrote:
------------------------------------------------
>Not sure if it will make a difference, but you might want to compile and
>comm.lisp.  Something like
>
> :lisp (load (compile-file "<path>/comm.lisp"))
---------------------------------------------------------------
This seems to work for me:
(display2d:false set in my init file)

------------------------------------------
Maxima 5.26.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)

(%i1) a : 2$

(%i2) :lisp $_
((MSETQ) $A 2)

(%i2) :lisp (load (compile-file "c:/work2/comm-new.lisp"))

Compiling c:/work2/comm-new.lisp.
End of Pass 1.  

;; Note: Tail-recursive call of SUBST1 was replaced by iteration.
;; Note: Tail-recursive call of SUBST2 was replaced by iteration.
;; Note: Tail-recursive call of $TRUNC was replaced by iteration.
;; Note: Tail-recursive call of DISP2 was replaced by iteration.
;; Note: Tail-recursive call of DISP2 was replaced by iteration.
;; Note: Tail-recursive call of FINDPOWERS1 was replaced by iteration.
End of Pass 2.  
OPTIMIZE levels: Safety=2, Space=3, Speed=3
Finished compiling c:/work2/comm-new.lisp.
73680

(%i2) integrate(-1/(x^2-x),x,-1/2,1/2);
Principal Value
(%o2) log(3)

(%i3) display(a)$
a = 2
---------------------------------
Thanks for the suggestion,

Ted

Gmane