maxima written in maxima



Just some additions:

Barton Willis <willisb@unk.edu> writes:

> (3) Maxima arrays are unpleasant to use (that's my opinion) and
> inefficient (I believe, but I haven't tried any tests so I could be
> wrong) -- orthopoly uses Lisp arrays in a few places.

Maxima can create and use lisp arrays in a direct way:

(C1) make_array('any,10);
(D1) 	     {Array:  #(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL)}
(C2) ?describe(%);
#(NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL) is a vector with 10 elements.
(D2) 				     FALSE

See also the USE_FAST_ARRAYS switch.

> (6) As it is now, the Maxima to Lisp translator has too many bugs to
> make it a reliable way to write good code.  Try translating a
> tellsimpafter; for example
> 
> ----- start of file------------------
> matchdeclare(x,true);
> tellsimpafter(f(x),0);
> 
> --------------------------------------

(C1) translate_file("bartontest.mac");
Translation begun on bartontest.mac.
(D1) 	     [bartontest.mac, bartontest.LISP, bartontest.UNLISP]
(C2) load("bartontest.LISP");
(D2) 			        bartontest.LISP
(C3) (1+f(y)+f(f(x)+1))^2;
(D3) 				       1

This needs the following patch

http://members.inode.at/wjenkner/maxima/matfix.diff

Some background information for this patch is in

http://www.math.utexas.edu/pipermail/maxima/2002/002669.html

and the corresponding thread.

Wolfgang