From: Paul Lutus Date: 2006-11-09T16:10:08+09:00 Subject: Re: Ruby to C? Mohammad --- wrote: > Okay, I'm working an a robotics project and instead of using C could I > actually write it in ruby then convert it into C code? If you mean convert automatically, no, not really. Not unless what you write in Ruby is very generic, and you don't use any of C's distinct properties. If that were true, converting to C would have little point. Why do you think you need to convert to C? For speed? I have written a number of projects in Ruby because the development time is so short, then, after establishing the design, I converted to a faster language. But the conversion was by no means easy. So in essence I took advantage of the prototyping speed of Ruby, then I went after the execution speed of another language. But I didn't seriously expect to be able to automatically translate between languages. Here is an example of a physics simulation program I wrote in Ruby, then converted to C++: http://www.arachnoid.com/ruby/gravity/index.html -- Paul Lutus http://www.arachnoid.com