From: Richard Schneeman Date: 2009-02-06T05:49:45+09:00 Subject: Re: Integration/Antidifferentiation Program By "using" maxima, I mean accessing maxima via a pipe in Ruby. I am developing a web based mathematical application that can integrate symbolically among other things. I don't have to use maxima or even ruby for that matter but I would like to if possible. I understand the concept of "system" access but during the execution I've hit two snags First, If i run this code multiple times: max = IO.popen("maxima", "w+") max.puts "1+1;" 8.times {max.gets} #needed to rid of unneeded lines response = max.gets max.close 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". And after enough runs, I have to restart my computer. Second, I am unable to just get the last line from maxima without running "8.times {max.gets}." If i try to execute "max.gets" after maxima has reached the last line, I get an error (and no return to ruby). While i can get around this problem, (via 8.times ) it isn't exactly best practices. So, any suggestions?? -- Posted via http://www.ruby-forum.com/.