Compile/Close Ruby Code

I write scripts under Linux using Ruby.

It wouldn’t matter releasing the code as long as the code is MINE.
However, if I develop software for a company, and if a rival gets a hold
of the code; you can consider me fired.

So what are the options?

I believe JRuby or IronRuby hide the code right? I haven’t used these,
so please inform me.

What about Ruby2Exe? Is it any good? Would it please Windows users?

What about closing the code in UNIX or Linux?

Thanks!

On 3/9/2010 12:20 PM, Aytug G. wrote:

What about Ruby2Exe? Is it any good? Would it please Windows users?

What about closing the code in UNIX or Linux?

Thanks!

I don’t about Ruby2Exe, as I understand it, it’s been replaced by OCRA,
which I’ve had good luck with. Of course, with both of them, it’s not
going to be very difficult for someone with a little bit of knowledge to
extract the code. Of course even technologies built on Java or .NET are
fairly easy to reverse with a little knowledge (Or written in C for that
matter). I guess the real question is why in the world would you
release your code to a rival? Suffice it to say, if you have someone
actively trying to steal your code, there is no programming language
that will stop them. There are tools that can help make it more
difficult, but it’s always possible by someone sufficiently
knowledgeable.

On Mar 9, 2010, at 11:20, Aytug G. wrote:

I write scripts under Linux using Ruby.

It wouldn’t matter releasing the code as long as the code is MINE.
However, if I develop software for a company, and if a rival gets a hold
of the code; you can consider me fired.

So what are the options?

License your software and hire a lawyer for people who violate your
license and/or copyrights.

Even if you were to obscure the source somehow there’s no way to prevent
people from reversing the process.

On 2010-03-09, Aytug G. [email protected] wrote:

It wouldn’t matter releasing the code as long as the code is MINE.
However, if I develop software for a company, and if a rival gets a hold
of the code; you can consider me fired.

Why?

I work for a company. They pay me to write code, all of which is at the
very least shown to other people, and much of which we release under
GPL.

What about closing the code in UNIX or Linux?

In general:

  1. You can’t.
  2. You shouldn’t try.

It’s not worth it. There’s no way to make something other people can
run
but can’t figure out how it runs.

-s

On Tue, Mar 9, 2010 at 10:09 PM, Walton H.
[email protected]wrote:

so please inform me.
extract the code. Of course even technologies built on Java or .NET are
fairly easy to reverse with a little knowledge (Or written in C for that
matter). I guess the real question is why in the world would you
release your code to a rival? Suffice it to say, if you have someone
actively trying to steal your code, there is no programming language
that will stop them. There are tools that can help make it more
difficult, but it’s always possible by someone sufficiently knowledgeable.

The question of obfuscating code comes up a lot here. One of the more
reasonable desires for it is to stop a client tinkering with it, or
otherwise
control how it is updated with respect to support etc. I am sure python,
perl,Tcl mailing lists are full of this too.

Generally people are happy with packaging solutions, where the source is
not sitting on the file system and so cannot be tinkered with and
repackaged
easily. JRuby offers a few options here with Rawr possibly, and Warbler
allows
you to create self contained Rails apps that are indistinguishable from
regular
java WAR files. Crate is another packaging solution that I have heard of
that
may be useful.

Once you are distributing your code, these options will only hide your
code
from casual snooping. A determined individual will be able to unpackage
the
application, inspect the code and repackage it. Signing the package may
provide some options to help you control this problem, but it wont hide
your source.

As to why Ruby source is being singled out in this case I don’t know.
Aytug,
if your employer takes a hard line on this, my sympathies. My experience
on
this
is that naive false assumptions on how ‘protected’ the source is by
language
can only rarely be undone. Its usually an emotive problem.

regards,
Richard

On Tue, Mar 9, 2010 at 1:20 PM, Aytug G. [email protected]
wrote:

I write scripts under Linux using Ruby.

It wouldn’t matter releasing the code as long as the code is MINE.
However, if I develop software for a company, and if a rival gets a hold
of the code; you can consider me fired.

So what are the options?

I believe JRuby or IronRuby hide the code right? I haven’t used these,
so please inform me.

There are several vendors who use JRuby to pre-compile code for
release as packaged software. The pre-compiled code is just JVM
bytecode, so it’s possible to decompile it to something…but it would
be hard to duplicate it without a lot of effort. Since you can also
bundle it up inside a .jar file and provide a simple executable, most
users would never bother cracking it open. Using JRuby has the added
benefit that your bundle doesn’t need to be rebuilt for any platform;
if there’s a JVM installed (and there probably is), it will just work.

My opinion: despite what others on this thread have said, sometimes
there’s a real need to at least make it difficult to reverse-engineer
code when you ship a packaged application. Using JRuby is probably the
easiest way right now.

  • Charlie

OK, I see. I shouldn’t bother too much about hiding the code then.

Thanks for the explanation guys!