Mathematica2Maxima



Martin RUBEY <rubey@labri.fr> writes:

> Something I longed for during my transition from Mathematica to Maxima was
> a translator that acts like a filter, that is, schematically, you copy the
> (simple) expression into the clipboard, and when you paste it into maxima,
> voila, it's a Maxima expression...

Dave Gillespie's wonderful Calc package for Emacs (The Emacs
Calculator, which is part of the current GNU Emacs CVS tree at
savannah.gnu.org) has various language modes.  Calc can operate in
`embedded mode' on some arbitrary Emacs buffer, where it tries to
figure out by context which expression is in which language, which
suggests that cutting and pasting should more or less work the way you
describe it.

Unfortunately, there is no Macsyma language mode.  Even worse, last
time I checked I found that there is no dispatching to different
parsers for different languages but only, essentially, one parser
(spaghetti code with different sorts of spaghetti, as it were).

I found this puzzling because in every other respect Calc is quite
modular and customisable.  For example, each supported language has an
extensible syntax table.  So it might be possible to extend Calc's
`normal language mode' in such a way that a usable subset of Macsyma
can be parsed.

As far as feasibility is concerned: In a fit of masochism, I once
extended Calc's TeX syntax table in a way that all of the expressions
in the PARI user manual could be parsed but it was not really fun to
do so. (This is part of an emacs-lisp package I wrote for converting
the PARI documentation to texinfo.  Although nobody seems to use the
resulting info documentation, you find a link to it at
http://www.math.u-psud.fr/~belabas/gp.html)

Wolfgang
-- 
wjenkner@inode.at