On Monday 01 February 2010 03:59:12 pm Alpha Blue wrote:
> Marnen Laibow-Koser wrote:
> > Monkeybars uses Rawr and JRuby to do exactly what you're talking about.
> 
> Thanks Marnen, I did try out monkeybars but I didn't like the library.
[snip]
> My last issue has to do with lack of obfuscation, which I only want to
> apply to my source code and not to the ruby libraries that are packaged
> with my code.  I may have to create an obfuscator myself, but that's a
> long and tedious process.

First, realize it's not going to work, whatever your rationale is. If you want 
to obfuscate it because there's DRM involved, DRM is inherently flawed and 
will _never_ succeed. If you want to obfuscate it because you don't want 
people "stealing" your code and re-using it for something else, copyright law 
is a much better way to deal with that.

But if you're still determined to obfuscate your source, JRuby is likely going 
to be the best way to do that, though not yet. There was a recent announcement 
that JRuby will gain the ability to dump the bytecode result of any evaluation 
-- this means that if your program is well-behaved (properly object-oriented, 
for example), it should mostly compile directly to Java bytecode.

Well, sort of. If you're familiar with v8 snapshots (v8 is Google's Javascript 
engine), I think it's the same idea.

I don't think that exists _yet_, though I hope Rawr picks it up when it does 
-- not because I want obfuscation, but because it would improve startup time 
by a lot.