From: spoon
Subject: Reading from a file
Date: 
Message-ID: <4oesup$kif@franklin.its.utas.edu.au>
Hi,
	I've been trying to get Mathematica to communicate with lisp,
but haven't had much luck so far.

The idea was to open a few temporary files from Mathematica, one for
input one for output, and pass the names of these to the lisp process
on the cmd line.  Lisp then does something like


(defun repl (ifile ofile)
  (with-open-file (input ifile)
    (with-open-file (output ofile :direction :output)
      (loop
       (when (listen input)
	 (format t "~A" (eval (read input)))
	 (force-output output))))))


Mathematica then writes a lisp sexp to "ifile", and waits for ouput on
"ofile".

But this doesn't seem to work => "listen" returns nil all the time.

Any ideas?

Sp




--
"You need as many clues as you can get as to how these things work
when you're a buffoon." - D. Row