Forum: Ruby on Rails Ruby Vs. PHP pipe terminal access

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
71ee1809f53df0a2b4dac0530f630933?d=identicon&s=25 Richard Schneeman (snowmaninthesun)
on 2009-02-05 02:59
I'm attempting to make a javascript/RoR site that utilizes maxima the
free math program. In this thread I was able to pass
information into and out of maxima, but I wasn't able to retrieve the
last line, and when running this code multiple times:

max = IO.popen("maxima", "w+")
max.puts "1+1;"
response = max.gets

I get a new instances (found via ps -A) of  "ttys000    0:00.00 (sbcl)"
every time i run the code. And i can't kill this "sbcl" via "kill pid".
I also get
"ttys000    0:00.05 sbcl --core
/opt/local/lib/maxima/5.15.0/binary-sbcl/maxima.core --noinform
--end-runtime-options --eval (cl-user::run) --end-toplevel-options"

(my version of maxima runs on a version of lisp known as SBCL)

After a few dozen requests I get this error:

I know that piping into maxima can provide an adequate connection
solution via PHP utilizing this (working) code from the WMI project:

If you have any php system piping experience, or any ruby piping
experience (or maybe both). Can you provide any tips??
This topic is locked and can not be replied to.