Re: [racket] Using Maxima fra Racket

2012-03-09 Thread Jens Axel Søgaard
Hi All, I have found out what caused my problems. When starting Maxima with -s one must read the output from input port return by (tcp-accept listener) in the snippet. But one must write to the output port returned by (process (format "... maxima.sh -s ~a" PORT)) in order to send c

Re: [racket] Using Maxima fra Racket

2012-03-08 Thread Jens Axel Søgaard
2012/3/8 Neil Van Dyke Thanks for taking the time to look at the problem. It sounds like Maxima and your Racket program are both trying to be the TCP > listener. Maybe "tcp-connect" instead of "tcp-listen"? > I am fairly sure that part is correct. I do receive the welcome message from Maxima.

Re: [racket] Using Maxima fra Racket

2012-03-08 Thread Neil Van Dyke
It sounds like Maxima and your Racket program are both trying to be the TCP listener. Maybe "tcp-connect" instead of "tcp-listen"? Once that's working, for robustness, you might want to manage some TCP I/O buffers yourself, and use "sync" (or "sync/timeout" or similar) on the ports. Using th

[racket] Using Maxima fra Racket

2012-03-08 Thread Jens Axel Søgaard
Hi All, I am trying to send commands from Racket to Maxima (algebra system). Here is a normal interaction with Maxima in the terminal: soegaard$ /Applications/Maxima.app/Contents/Resources/maxima.sh Maxima 5.25.1 http://maxima.sourceforge.net using Lisp SBCL 1.0.47 Distributed under the GNU Publi