Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Doubts about Ruby and JRuby

Reply
Thread Tools

Doubts about Ruby and JRuby

 
 
Giuseppe luigi Punzi ruiz
Guest
Posts: n/a
 
      03-14-2011
Hi all,

Right now, I'm very busy, but sometimes, I need to disconnect of all my
day tasks.

From some time ago, I would like to learn Ruby (I like smalltalk a lot,
and Ruby is very similar), and this could be a good moment. I'm
developing an application in a closed source enviroment, and I'm
thinking, develop it in Ruby too in parallel (when have time) to learn
it.

My main question, is, thath I readed thath is not possible to get
something equivalent to .pyc files in Python. This is not a problem when
you develop an opensource project, but if is not opensource, could be a
problem.

I readed with JRuby you can get something like a .pyc/.jar/"compiled"
file (I'm not sure, for this reason I'm here). And access to the vast
Java libraries, could be interesting.

Then... Is good idea, to use JRuby for Desktop closed source
applications instead Ruby MRI? For other type of projects, opensource
for example, is better Ruby 1.9 performance than JRuby? Am I mixing
concepts?

The application I'm developing right now, is a little desktop closed
source ERP for a customer. I need to develop a website too, with a
customers area to make invoices, and this web and ERP needs to be
communicated.

Thanks for your time.

Regards.

P.S.: Sorry for my english

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Richard Conroy
Guest
Posts: n/a
 
      03-14-2011
[Note: parts of this message were removed to make it a legal post.]

On Mon, Mar 14, 2011 at 10:37 PM, Giuseppe luigi Punzi ruiz <
> wrote:

> I readed with JRuby you can get something like a .pyc/.jar/"compiled"
> file (I'm not sure, for this reason I'm here). And access to the vast
> Java libraries, could be interesting.
>
> Then... Is good idea, to use JRuby for Desktop closed source
> applications instead Ruby MRI? For other type of projects, opensource
> for example, is better Ruby 1.9 performance than JRuby? Am I mixing
> concepts?
>
> The application I'm developing right now, is a little desktop closed
> source ERP for a customer. I need to develop a website too, with a
> customers area to make invoices, and this web and ERP needs to be
> communicated.
>
>

Hi,
I am not sure what the exact problem you are communicating, but in a
nutshell:
- true, many corporate customers will not be familiar or comfortable with a
Ruby Runtime. They have invested in enterprise level app deployment options
that Ruby or any other interpreted language would not fit into.
- JRuby based apps can integrate invisibly into Java based shops
- source hiding is more of an issue - you want to prevent the end user
making modifications to fully interpreted source (creates support problems),
packaged software & installers avoids a lot of these problems.

regards,
Richard

--
http://richardconroy.blogspot.com | http://twitter.com/RichardConroy

 
Reply With Quote
 
 
 
 
Michael Edgar
Guest
Posts: n/a
 
      03-14-2011
Caution: .pyc files can be decompiled to realtively well-structured =
Python code. The dynamicity
of the language (such as access to the local variable table) makes fewer =
optimizations possible
at the bytecode level, so you can get surprisingly straightforward code =
out of a decompilation.

http://depython.net/ is one example of a service that will decompile =
code compiled with Python
2.5 and lower.

I would seriously recommend against treating pyc files as having more =
security than raw .py files.

There are also decompilers for Java bytecode, but their output often =
less closely matches
the input source. Also, the .jars emitted by JRuby will, when decompiled =
by a Java decompiler,
be quite different from the input Ruby code, so you will have some =
obscurity there as well.

Michael Edgar

http://carboni.ca/

On Mar 14, 2011, at 6:37 PM, Giuseppe luigi Punzi ruiz wrote:

> My main question, is, thath I readed thath is not possible to get
> something equivalent to .pyc files in Python.



 
Reply With Quote
 
Tony Arcieri
Guest
Posts: n/a
 
      03-15-2011
[Note: parts of this message were removed to make it a legal post.]

On Mon, Mar 14, 2011 at 4:37 PM, Giuseppe luigi Punzi ruiz <
> wrote:

> Then... Is good idea, to use JRuby for Desktop closed source
> applications instead Ruby MRI? For other type of projects, opensource
> for example, is better Ruby 1.9 performance than JRuby? Am I mixing
> concepts?
>


JRuby's a great way to distribute Ruby apps on Windows, so long as they
don't use native extensions, which is fairly easy to avoid if you're
trying. For packaging JRuby apps, there's Rawr, which will make a .exe on
Windows and a .app for Macs:

http://rawr.rubyforge.org/

As far as performance goes, it's really going to vary depending on what
you're doing in terms of the actual Ruby code itself and what libraries
you're using, as some of the JRuby alternatives to native extensions are
quite slow and vice versa. 1.9/YARV and JRuby are generally considered two
of the fastest implementations available, and JRuby lets you tap into Java
libraries where you need additional performance.

The precompiled .class files that JRuby generates are probably one of your
best options in the Ruby world when it comes to source code obfuscation for
a closed source application.

--
Tony Arcieri
Medioh! Kudelski

 
Reply With Quote
 
Giuseppe luigi Punzi ruiz
Guest
Posts: n/a
 
      03-15-2011
Hi all,

> - true, many corporate customers will not be familiar or comfortable
> with a
> Ruby Runtime. They have invested in enterprise level app deployment
> options


The problem is not Ruby vs JRuby. I talked about JRuby, because I readed
thath with JRuby I can get something like "compiled" files and in Ruby
not. I don't know the advantages of JRuby against Ruby. I suppose the
access to Java libraries is one of them. I will check all of this when
have time.

> - source hiding is more of an issue - you want to prevent the end user
> making modifications to fully interpreted source (creates support
> problems),
> packaged software & installers avoids a lot of these problems.


Yes, but the source still there. They can open the rb files, modify
them, and start again the application to see (or broke) the changes.
With bytecode this is not possible without compiling again (AFAIK). For
this I asked about something compilated (to native code or bytecode). I
know (or suppose) there are decompilers, but everything can be
decompiled if you want, but this is not the same as plain files with the
code. Probably, an obfuscating application could be enough, I don't
know.

> Caution: .pyc files can be decompiled to realtively well-structured
> Python code.


I named Python only because I wanted to compare with something to what I
want. The "little" ERP I'm developing, needs to be deployed to desktop
without the possibility of touch/see the source. For website, If I
develop it in Rails, is not a problem if the source is visible for the
moment.

Could be interesting if code could be made compatible between VMs withou
much complex, so, If I can't deploy the app in a Java enviroment, I can
use MRI.

As I wrote, for the moment, I'm evaluating, I'm looking for Access
Database (noSQL?), GUI development, Mobile possibilities (Android?
iPhone?) and so on, but, If I can't lock de code........

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Shadowfirebird
Guest
Posts: n/a
 
      03-15-2011
For what it's worth, if you are that worried about your customers making away with your code, then perhaps it would be better to stay away from all scripting languages: Not just Ruby, but Python, PHP, Lua...

On the other hand, you should bear in mind that:

* the vast majority of your customers will not have the knowledge or the desire to steal your source code.

* The few that do are likely to have to spend quite a lot of effort to do so -- maybe as much as writing from scratch, when you consider that...

* ... just copying large bits of your code won't help them, because you'll easily be able to spot that and prosecute (or threaten to).

* Even compiled languages can be decompiled.

Just my 10c.

 
Reply With Quote
 
siva regani
Guest
Posts: n/a
 
      03-15-2011
Ruby is One of The Best Forum,Think Before Submitting ur Answer .Just
Spend think.. Could be interesting if code could be made compatible
between VMswithoumuch complex, so, If I can't deploy the app in a
Javaenviroment,Ican use MRI.
- JRuby based apps can integrate invisibly into Java based shops
- source hiding is more of an issue - you want to prevent the end user
making modifications to fully interpreted source (creates support
problems),
packaged software & installers avoids a lot of these problems.
<a href="http://www.clickhost.in">clickhost</a>

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Giuseppe luigi Punzi ruiz
Guest
Posts: n/a
 
      03-15-2011
Thanks a lot to all for your comments.

All of them are appreciated

Now, is moment to digest all the information.

Regards.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JRubyHub.com: The hub to all JRuby and JRuby on Rails (JRoR)resources... sbaltagi@gmail.com Ruby 0 12-15-2007 07:28 PM
JRubyHub.com: The hub to all JRuby and JRuby on Rails (JRoR)resources... Slim Baltagi Java 0 12-15-2007 07:26 PM
[ANN] [JRuby] Fast Debugger for JRuby Martin Krauskopf Ruby 0 11-11-2007 10:47 PM
[JRuby] JRuby perf questions answered Charles Oliver Nutter Ruby 7 11-01-2007 05:11 AM
Any JRUBY programmers out there? Problems specifying RUBYLIB with jruby. Ronald Fischer Ruby 2 05-16-2007 09:34 PM



Advertisments