Standalone Application



Robert Dodier wrote:
> My advice is to get the socket stuff working first. Once you have
> that in place you can elaborate the GUI ad infinitum.
> If you have not worked with sockets before, just try to figure that
> out first. I think you can find lots of examples on the web.



The socket stuff is easy to get working. Taken from an old post:
"
First you open a listening socket, for example with netcat
nc -l 8888
Then you connect maxima to the socket in the following way:

maxima -r ":lisp (setup-client 8888)"

Here you execute the function setup-client defined in server.lisp which
connects to port 8888.
"

Here is the demonstration on two windows of a Mac:

window with netcat: first start nc, then start maxima, finally run a
computation

lilas% nc -l 8888
pid=1608
(%i1) expand((x+y)^3);

                            3        2      2      3
(%o1)                      y  + 3 x y  + 3 x  y + x
(%i2)



window with maxima

lilas% maxima -r ":lisp (setup-client 8888)"
(%i1)

Note that after printing (%i1) all the IO gets deported to the
netcat window.

Of course netcat can be replaced by anything which can listen and talk to a
socket, for example gnu awk, python, etc.
http://docs.python.org/library/socket.html, see the server example.
For example for doing a quick
Qt GUI able to manage a socket, PyQt is an obvious possibility.


-- 
Michel Talon