Pythonica
One of my long standing fantasies has been to find/write a high quality open source symbolic mathematics system that is hackable. Axiom is the closest I have yet to come, but to hack that, I would need to learn Lisp as well as Aldor. Besides, I have the feeling Axiom is headed nowhere, fast; it’s code seems almost anachronistic and certainly foreign, not in content, but in style. It’s a wonderful idea, and the most full featured free CAS, but it lacks an attractive interface (TeXmacs?— blah!). All the other free CASes I’ve found are pathetic (e.g., YACAS), C-based or Lisp-based, and in general resist casual hacking. Certainly, they all lack something a successful CAS must have: an attractive interface, where the math is typset.
Now, it seems like someone has the opportunity to rectify this situation: Python is a very hacker friendly language, and already has a lot of numeric tools that could be called upon by a CAS, e.g. scipy. Also, the gmpy module supports multiple precision integer, rational, and floating point arithmetic. So ‘all’ the aforementioned someone would have to do is write a symbolic engine and some glue code to bind these tools together, as well as a suitable interface. Pythonica, albeit a very small one, is the first step in this direction.
I would love to be that someone, but I don’t know anything about writing an interpreter, or implementing a computer algebra system. Hopefully this entry will inspire someone, somewhere to take up the mantle… and save us all ![]()
Possibly relevant posts:
- Differential Algebra (6/8/2005)
- Math::Symbolic Modules (5/31/2005)
- The sad reality of Scheme (3/11/2005)
Funny, the same idea has been in the back of my mind. There are a few papers out there that talk about designs of computer algebra systems (YACAS, magma, etc).
As for mathematical output, I’ve tried to imagine how one would go and display \theta, for example. I wonder if python has the ability to read font files and display them. There is an enhanced console for python called ipython (http://ipython.scipy.org/), maybe it has this capability.
Have you seen SAGE (http://modular.fas.harvard.edu/SAGE/)? It’s a CAS in Python too. I have not have time to check it out fully, but it looks like development is still active. The team is small, so there is a definite possibility to hack it while the code is still compact/young.
I had to take a break from smallNT during the school year, but now that I’m “reviewing” algebra, this might be a good time to go at it again.
Comment by didier — 5/19/2005 @ 11:40 pm
Thanks for the links– SAGE looks like a source of interesting algorithms. I’ve started messing around with Tkinter today, and I noticed it has some functions that deal with font metrics. Between that and the fact that TeX fonts have been ported to TrueType, it should be possible to code up an interface like Mathematica’s in Tkinter.
Comment by Alex — 5/21/2005 @ 10:49 am
Just so you know it: The Math::Symbolic set of Perl modules ( http://steffen-mueller.net/modules ) which you discovered recently were initially written in four weeks worth of spare time by a second semestre physics student who knows nothing about computer algebra. (I’m no longer in the second semestre, but still know little about CAS’s.)
I’m saying this just so you know that you need some dedication and a good idea of what you want to accomplish and not necessarily have to be an expert to boot.
Steffen
Comment by Steffen Mueller — 5/31/2005 @ 10:39 am