There are a number of web apps that do this sort of thing -- live math on the web. It sounds to me like you're re-inventing a wheel here. Of course, most of said web apps are not in Ruby, because Ruby and Rails weren't popular when they were designed. On Thu, Feb 5, 2009 at 12:49 PM, Richard Schneeman <thedickster / gmail.com> wrote: > 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/. > > -- M. Edward (Ed) Borasky I've never met a happy clam. In fact, most of them were pretty steamed.