Ruby2C: May 2006 Archives
After almost a year, I'm pleased to announce that another beta of ruby2c is available. The project stagnated for a bit, but is coming back in force! We've solidified this release by gemifying it, splitting up our tail end translator to convert to either ANSI C or ruby internals C, and making it much more happy with other tool-chains (like our obfuscator).
ruby2c translates a static ruby subset to C. Hopefully it works.
Enough Propaganda! Just install it!
sudo gem install RubyToC
CHANGES:
+ 6 minor enhancements:
+ Split RubyToC to RubyToRubyC and RubyToAnsiC.
+ Extended Environment to be more flexible for various situations.
+ Removed propaganda (bloat) from release.
+ Gemified and reorganized things. Support still needs splitting up.
+ Flipped a lot of internal naming to use Unique.
+ Added ruby_to_c_show (like parse_tree_show).
+ 4(ish) bug fixes:
+ Use ivars instead of cvars so inheritance won't bugger the translator.
+ Corrected unsupported node lists in pipeline.
+ Fixed bugs for splat args, iters, optional args, method name map.
+ Fixed many other bugs.
Phase 1: All the unit tests are passing.
Phase 2: We can even obfuscate the unit tests and run the binary version of them and they still pass.
Phase 3: We're currently working on obfuscating the obfuscator itself and passing the unit tests a third time.
We've got 6 methods (out of 56) not translating. 2 of them I think I can do w/o too much hassle, but the other 4 (all 1 related issue) are a PITA (closure semantics just don't map to C very well). I think I just brainstormed a solution that may actually work once I have rested my brain some.
One nice thing is that every lesson we learn from the obfuscator is something we can potentially use to improve ruby2c.
That said, we're damn close to having a full-fledged ruby obfuscator that we'll make commercially available in the near future.
