MathDrag'n 0.7 released
I don't have a lot of time right now to make a big, detailed announcement, but I have to say something. I have released a new version of MathDrag'n. It is available for download now on the sourceforge page. The first thing to notice is that it now has a windows installer which includes an embedded JRE, which should make handling the system on windows straightforward and require no additional downloads to get the program running. It is also now a executable file on windows, rather than a .jar file, which should make things simpler. You will still need to download Maxima (or buy Mathematica) seperately in order to get full functionality.
The next biggest change people should notice is that it solves the problems MathDrag'n was having communicating with Maxima. I have heard the complaints, and I've done my best to solve them. It *should* work with all systems now. *Please* tell me if you are having trouble.
There are several other minor changes, improvements, and bug fixes that people will appreciate, but none as serious as the Maxima problems it was having before.

Reader Comments (20)
$ java -jar MathDragn.jar
validation string: Maxima 5.10.0 http://maxima.sourceforge.net
Succesfully connected to Maxima kernel
and hangs.
Thanks,
Dave
I'll be sure to include this in the documentation next time.
I have Xubuntu 6.10, package Maxima 5.9.3-1.1 and
JRE Sun 1.5.0-08-0.
I don't know if it works with Mathematica (which I don't have).
BTW, I am using MathDrag'n to keep me honest with basic but complicated equation manipulations. It would be very useful to add the functionality to allow summation of logs. Also to add the ability to extract real and imaginary parts of an equation, or to display as real + imaginary.
Thanks for an extremely useful tool.
Dave
To see the file format make an equation in MathDrag'n manually, then save it. It is quite simple, so should be easy to fix.
Good luck,
Dave
I have Xubuntu 6.10, package Maxima 5.9.3-1.1 and
JRE Sun 1.5.0-08-0.
I don't know if it works with Mathematica (which I don't have)."
Thank you for this error report. The real problem is that MathDrag'n attempts to use Maxima as a console application in the background, and it didn't recognize the text that Maxima returned immediately when the Maxima was started. I have attempted to make the program as generic as possible so that it will recognize as many things as possible, but given the large number of operating systems and the variants of LISP under which Maxima operates, this is difficult to do.
The best thing you could do for me is to run Maxima directly from the command line and tell me what comes up immediately on start-up.
At this moment in time, I am still trying to get a PhD in physics, and the changes you suggest would take too much time (I know---I've tried to do both at the same time. It never happens.). At the moment I'm essentially only doing maintenance work, and not much of it because not many people have heard of MathDrag'n. I appreciate your feedback immensely.
However, the suggestions you are making are good. I've already thought of those particular ones, and many others as well, but the more people suggest them, the higher a priority they will become, so don't stop just because of that!
da@claxtron:~/Da/bin/Mathdragn/dist$
Maxima 5.9.3 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1)
------------------------------------------------------------------
this is the result of bug_report:
Maxima version: 5.9.3
Maxima build date: 13:9 10/3/2006
host type: i686-pc-linux-gnu
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.7
Anyway, I've tried your program in Windows and there it works fine. I'm particularly interested in Maxima, Lisp, and graphical programming (a little less in java), so your program seems to me a perfect thing to start fiddling with these things.
My dream would be having a lisp editor capable of handling math equations _as well as lisp functions_ in a smart way like MathDrag'n does. For example I appreciate the graphical programming style DrScheme has (see
http://www.plt-scheme.org/software/drscheme/tour/tour-Z-H-10.html
http://www.plt-scheme.org/software/drscheme/tour/tour-Z-H-11.html
http://www.plt-scheme.org/software/drscheme/tour/tour-Z-H-5.html
). I know it would be a difficult thing, but I want to try to do something.
What do you think of these ideas?
What editor do you use for developing?
Thanks for the useful program.
Ciao,
David
OK. I might see the problem. When you want to start Maxima from the command line (if I read you correctly), you use the expression '~/Da/bin/Mathdragn/dist$'. MathDrag'n assumes that in Linux, it can start Maxima by typing "maxima" directly at the command line. Because (apparently) just typing 'Maxima' doesn't work on your system, MathDrag'n fails to connect.
Is this correct? If it is, you might be able to get around it by using the Kernel->Connect dialog box and entering the correct text to be typed at the command line to get it started. If this doesn't work, it may work if you can get it to start maxima when you type maxima in the command line.
You have some very good (and extremely ambitious---take it from me!) ideas about where this kind of editing will go in the future. I say---more power to you. As I said, I wish I had the time to help with this, but right now, I just don't.
I'm sorry, yesterday I was a little dumb (maybe I have to many things going around my head, as you saw :) ).
The console output I sent you was misguiding: in fact, maxima executable in my system is /usr/bin/maxima, not ~/Da/bin/Mathdragn/dist . I was just browsing your program from console before entering the command 'maxima', which didn't get displayed after the prompt (don't know why - console was behaving strangely yesterday). The output of Maxima was correct anyway.
If I give complete path /usr/bin/maxima to kernel dialog the problem persists.
I've looked around a bit, but I haven't found many decent open source GUIs to CAS, and none of them had the interactive MathDrag'n approach. In this a little sad panorama, I think MathDrag'n (even if it is a little known at the moment) could easily shine in the open source field. For this reason I'd focus it more on maxima, which is free, rather than on Mathematica, which has just its own (and expensive) GUI. Moreover, Maxima is written in LISP, which is a powerful language and funny to use (I find the idea of functions that build functions very attractive). This IMO makes it a winner in respect to Octave. The problem with LISP AFAIK is there aren't much editors, and Emacs (which,they say, should be the best for lisp) is extremely user-hostile.
In the next days I think I'll try to
a) build a maxima version with SBCL, which I prefer for its run-time compile speed and features
b) try to develop some simple lisp or lisp-through-maxima console inside MathDrag'n for debugging purposes
I must say I've just begun seriously thinking about these kinds
of things only these days, but the thing excites me greatly.
I will look some docs on mathematical approaches to writing and debugging of programs. Applications _mathematically_ without bugs get more needed on and on.
Talking about the [far? :( ] future I'd very like to implement things like:
a) being able to edit 'equations' of lisp functions, where you have something as (this is just a quick idea)
(progn (setf a 2) (setf a 3)) = (progn (setf a 2) (setf a 3))
and editor reducts them to
(progn (setf a 3)) = (progn (setf a 3))
b) make possible to see graphically displayed lisp trees of lists, and to be able to drag'n'drop items.
c) but this is only a wish list ....................... :(
Well, that's enough, I don't want to let you away from your PhD too much...
Ciao,
David
"------------------------------------------------------------------
this is the result of bug_report:
Maxima version: 5.9.3
Maxima build date: 13:9 10/3/2006
host type: i686-pc-linux-gnu
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.7"
Is this part of the text output from the program? If it is, it could be causing trouble. If it isn't, I'll have to dig a little deeper, because the rest of the output looks completely normal.
As for a Lisp code editor---I'm fine with the idea. I don't know enough about lisp to really help, though. And I guarantee you it would be a big project. I mean, simply gargantuan.
I simply inserted it to get to you more information, it doesn't appear when you launch Maxima. Next time I'll try to be more clear.
As for Lisp, now I just want to do little experiments, but they should be eased by the fact that is possible to quickly access lisp functions from Maxima and viceversa.
See this page:
http://maxima.sourceforge.net/docs/manual/en/maxima_3.html#SEC5
This is also little example session plus comments I've made with wxMaxima (note that sometimes when you write a command beginning with :lisp wxMaxima doesn't recognizes when you press enter, and expects another command to append on the same line - stupid bug):
Define a lisp function that increase its argument
(%i1) :lisp (defun lisp_inc (x) (+ x 1));
LISP_INC
Calls the defined lisp function from Maxima (appending a '?' in front of it, to say it is taken from lisp)
(%i2) ?lisp_inc(3);
(%o2) 4
Define a maxima variable called maxima_var, assigns 2 to it
(%i3) maxima_var : 2;
(%o3) 2
Calls a lisp function that increases maxima_var (appending a '$' in front of it to tell the lisp system the variable is taken from maxima world)
(%i4) :lisp (lisp_inc $maxima_var);
3
I repeat, at the moment I just want to play with code, but in order to shrink a possible big (uh, 'gargantuan') project, maybe I could merging Jabberwocky lisp editor http://jabberwocky.sourceforge.net/main.html into MathDragn. It's written in Java, and it seems quite good, although I can't get it working with SBCL. As for simplify lisp expressions, SBCL could help because is a compiler written in lisp, so it already reduces lisp programs into an intermediate form, which is still similar to lisp. But how to use these things are my problems.... :)
Bye,
David
da@claxtron:/$ /usr/bin/maxima
Maxima 5.9.3 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1)
Notice there's an empty line after the command is executed.
To overcame it I've just placed an extra
compString = maximaReader.readLine();
after
String compString = maximaReader.readLine();
declaration
Bye,
David
To test this, could you replace the second
'compString = maximaReader.readLine();'
with the line
'while (compString.matches("\\s*")) compString=maximaReader.readLine();'
and see if that works? I'll be testing on my end as well, of course, but all I expect to have happen is that the loop never iterates.