maxima-5.6 and cmucl 18c x86



Raymond Toy writes:
 > I have a few patches but they have to do with plotting.  They're not
 > quite ready yet.

So you got the basics to work without the problems I had? IIRC, you're
on sparc and run cmucl from CVS, that could be the reason.

 >     Ole>  (proclaim '(inline *quo *dif))
 >     Ole>  #+cl
 >     Ole>  (DEFun *QUO (X Y)
 >     Ole>         (cond ((and (integerp x) (integerp y))
 >     Ole> -	       (truncate x y))
 >     Ole> +	       (progn (truncate x y)))
 >     Ole> 	      (t (/ X Y))))
 > 
 > This progn shouldn't change anything.  Don't you mean (values
 > (truncate x y)) so that returns exactly one value?

I had (if (...) (prog1 (truncate x y)) (/ x y)). Trying to
hand edit for a minimal diff I accidentally changed PROG1 -> PROGN
:-(Shame on me)-:

BTW: (prog1 form) works like (values form), is that a bug?

 > Doesn't that mean that the eval-when is either wrong or CMUCL is not
 > doing the right thing with the eval-when?  The current CVS versions of
 > CMUCL has an ANSI compliant eval-when implementation now.

I'm wondering: If I compile a file containing,
(eval-when (eval compile) (defmacro foo ...)  ...),
is it correct for FOO to be defined as a macro in the lisp image where
the compilation takes place? Or should the DEFMACRO only have effect
for the compilation unit? I saw something relating to this in the
hyperspec, but I didn't really understand it.

Here is what happens to me: I compile hyp.lisp, MABS gets defined as a
macro in that image. I dump and restart maxima.core, MABS is still
defined as a macro in my image. On the other hand, if I start a fresh
lisp and load hyp.x86f, MABS is not defined as a macro because of the
EVAL-WHEN. It would be interesting to know if the CVS version behaves
differently from my stock 18c. I am not, however, a CMUCL compiling
person.

	Regards, Ole