January 23, 2006, at 02:04 PM by-
Changed line 13 from:
January 23, 2006, at 02:03 PM by-
Added lines 1-50:
The purpose of this page is to collect information and ideas necessary to create a Mathematica mode.
Mathematica is one of the leading multi-purpose programmes for symbolic and numerical computation in mathematics. The front page for Mathematica is http://www.wolfram.com/products/mathematica/index.html
Mathematica is commercial closed-source software.
<jkock:2005-03-05> I never use Mathematica myself, but I am the maintainer of Alpha's Modes.MapleMode, and I think it would be relatively easy to adapt all this functionality to create a Mathematica mode too.
I assume that we are talking about editing of plain text files, and possibly sending a signal to a running mathematica process with instruction to reread the file. Well, editing a plain text file Alpha does really well, including advanced searches and all sorts of goto-line functionality. What is missing are perhaps some language-specific features like keyword colouring, automatic indentation according to mathematica-language syntax, and if it is going to be really fancy also some templates and syntax specific navigation procs. As to the second point, interaction with a running mathematica process, I have heard that Mathematica comes with a well-designed inter-application protocol called MathLink, and whether it is based on sockets, pipes or applescript it should not be too difficult to set up Alpha to talk to Mathematica via this interface. (Alpha can run other math programmes like Maxima, Pari-GP, and Coq as subprocesses; for various reasons it is much more difficult to communicate with Maple.)
All this is to say that it would not be too difficult to set something up, but it is not meant as a promise that I will do this myself --- as I said, I never use Mathematica myself, so my motivation, if any, would be pure sport.
Oh, of course! I should just refer you to Alpha's excellent mode creation assistant. If you know more or less what you want, it is a matter of a few minutes work to create a new mode (or should we say a good starting point for a mode). It is in Config -> GlobalSetup -> CreateNewMode.
In any case the first step is to specify more precisely what you expect. That is, provide list of keywords to be coloured, give examples of mathematica code, explaining what the conventions for indentation are. If you want interaction with Mathematica, try to find some documentation on this MathLink protocol...