maxima written in maxima



Barton Willis wrote:

> Conjecture:  Suppose you rewrote large chunks of Maxima in Maxima.  By the
>  time you finished
> (1) fixing bugs and inefficiencies in the translator,

This needs to be done anyway, and for all user code, not just rewriting
maxima.

> (2) writing Maxima-level interfaces to many
> functions in  the Maxima core and to other common Lisp functions, you'd be
> sufficiently competent in Lisp to  have done all your work in Lisp in the
> first place.

I am not suggesting that this be done.  I am suggesting that there may be some

optimum seperation of maxima and lisp, that makes it easier to maintain and
enhance the code.

> I had many reasons for rewriting specfun in Lisp (now orthopoly);  some
> were good
> some neutral (insomnia,  long, dark, cold Nebraska winters, etc).   But
>
> (1)  Yes, the mathematical parts of orthopoly could be expressed more
> compactly in
> infix notation; however  (a) surprisingly little of orthopoly is
> mathematical stuff

I wonder if this is a indication of maxima in general, that most of the
code is not mathematical, it handles other things.

> (b) I generated most (probably all) of the lengthy mathematical  prefix
> expressions
> in orthopoly automatically (via ?print and other tricks).
>
> (2) Floating point complex number arithmetic is slow in Maxima;  I think
> it would be  difficult to make it fast.  By rewriting in Lisp, orthopoly is
> able to
> use Lisp complex numbers.

It may a good idea to change this anyway.

> (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)

It is quite difficult to use them in symbolic computations, and impossible
without obscuring the code with arraymake in many places.
Also the commercial macsyma is broken worse than maxima in this regard.