Maxima + Java



Dimitri Pissarenko wrote:

> I'm writing a Java application (http://demetrix.sourceforge.net/),
> which will implement several sophisticated algorithms (like
> resource-task networks, or input-output methods).
> 
> For this reason, I need some math engine for my program.
>
> Now I am thinking about making some nifty interface between my Java
> program and Maxima, so that I can take advantage of Maxima's
> functionality.

My advice here is to use a socket interface. This will be 
portable across platforms, and it is easy to implement. 
The hard part will be dealing with errors, canceled calculations,
etc. Still, it's better than trying to get Lisp & Java to
play nice together.

You might have Maxima return stuff as an S-expression. I believe
a parser for such stuff would be easy to write in Java. In the
name of all that is good, do not pass XML back and forth....

> At SourceForge.net, I discovered a piece of software called Jatha 
> (http://sourceforge.net/projects/jatha/), which is an implementation
> of LISP in Java.

It is possible, but unlikely, that Maxima can be recompiled by
Jatha. You are likely to find bugs in either Jatha or
Maxima or both, if you try to recompile. Well, I guess that since
you can find out right away whether it recompiles, it's reasonable
to try it. But if it doesn't work, don't spend more time on it,
is my advice.

Good luck and let us know how it goes.

Regards,
Robert Dodier

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html