[Maxima] [sage-devel] presentation about Maxima at Sage developer days

Ondrej Certik ondrej at certik.cz
Thu Jun 19 03:35:23 CDT 2008

On Thu, Jun 19, 2008 at 7:19 AM, Richard Fateman
<fateman at cs.berkeley.edu> wrote:
>> -----Original Message-----
>> From: ondrej.certik at gmail.com
>> Well, but someone had to write the pprint function, no?
> Yes, but it doesn't make sense to me to write a tree printing function as
> part of the limit calculation.
> What does that say about python symbolics?
> .... snip....

Yes, good point. It was because I wrote the limit algorithm 2 years
ago, when sympy didn't have all the symbolic algorithms that it has
The general code like tree printing and signum should of course be
moved elsewhere.

>> >
>> > which in lisp would be, I think..
>> >
>> > (if (numberp e)(signum e)(signum (evalf e))
>> Well, but the above Python code is for the function signum, so in
>> LISP, someone had to write that code too.
> Again, why would signum be part of limit??

Yep, see above. To be fair, you can find a lot of interesting stuff in
the lisp counterpart as well, i.e.:

;;;Hackery until assume and forget take reliable args. Nov. 9 1979.
  291 ;;;JIM.

> .....
>> Right. One can look at the overall style of lisp and python though.
> The lisp program was written over 30 years ago, as part of Paul Wang's PhD
> thesis. It was probably not intended to be held up as an example of readable
> programming..

Ah, I didn't know that. But are you sure? In the Gruntz thesis, he is

P.S. Wang, Evaluation of Definite Integrals by Symbolic Manipulation,
Ph.D. Thesis, MAC TR-92, October 1971

P.S. Wang, Automatic Computation of Limits, Proceedings of the
2nd Symposium on Symbolic and Algebraic Manipulation SYMSAC'71
(S.R. Petrick, ed.), ACM Press, New York, pp. 458{464, 1971.

So it seems P. Wang did integrals as his phd thesis and limits only as
a side effect. :)
So the code was actually written in 1971? Wow. I thought it was written in 1979.

But I read P. Wang's papers when I was writing the code, just for inspiration.

>  A modern lisp program would probably be easier to read, at least if it
> were written with the intention of being readable.
> Examples are in the books by Norvig, or Graham.

I think you can write readable code in any language.

> If you find python easier to write and read, I understand that you can use
> python, and translate it to Common Lisp with clpython.
> Then you can compile it.   I have not used this program, so I cannot say how
> good it is.

Me neither. For me, Python is enough.


More information about the Maxima mailing list