DIFF doesn't work



On Mon, 2003-11-17 at 14:46, Joe Koski wrote:

> I quickly checked the maxima archives, but didn't see anything, so my
> apologies if this isn't a new problem.

The problem is fixed in cvs. I had hoped we would have a 5.9.1 release
by now, but things always take longer than I want them to.

(Most of the messages in recent months with "clisp" in the title
directly or indirectly refer to problem you are seeing.) 


> Maxima 5.9.0 http://maxima.sourceforge.net
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> This is a development version of Maxima. The function bug_report()
> provides bug reporting information.
> ;; Loading file /usr/local/share/maxima/5.9.0/share/maxima-init.lisp ...
> ;; Loaded file /usr/local/share/maxima/5.9.0/share/maxima-init.lisp
> (C1) u:x^3;
>                                        3
> (D1)                                  x
> (C2) diff(u,x);
>                                     d    3
> (D2)                                -- (x )
>                                     dx
> 
> What should be my next step?

If you go through the archives, you will find a list of files that can
be patched to avoid the problem.

I hope I have a simpler workaround. Unfortunately, I haven't had a
chance to test it. I would appreciate hearing if it works for you:

----------------------------------------------------------
Add the following function to the file
/usr/local/share/maxima/5.9.0/share/maxima-init.lisp:

(defun maclisp-typep (x &optional type)
  (format t "doh!~A")
  (cond (type
         (lisp:let ((pred (get type 'ml-typep)))
           (cond (pred
                  (funcall pred x))
                 (t (typep x type)))))
        (t
         (typecase x
           (cl:cons 'list)
           (cl:fixnum 'fixnum)
           (cl:integer 'bignum)
           (cl:float 'flonum)
           (cl:number 'number)
           (cl:array 'array)
           (cl:hash-table 'hash-table)
           (t
            (type-of x))))))

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

Try your test above. If that works, try running the test suite again. If
either of those step fails, you can either check out the current cvs
version of Maxima, or look through the mailing list archives for the
list of files to patch. (I would suggest the former.)

Either way, I would appreciate the results of the simple fix above.

--Jim