Forum: Ruby Ruby vs. Groovy: your perspective

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Aae5c9f81fe990a48daf2bb91ac82759?d=identicon&s=25 Diego Virasoro (Guest)
on 2009-04-13 13:35
(Received via mailing list)
Hello,
I realise this is a very hot topic... and people have strong feelings
about either language. I am not trying to trolling.

Still I've heard a bit about Groovy and it kind of seems like the Java
answer to Ruby (even the names are kind of similar). So I was
wondering if that kind of "first citizen" status will eventually make
it take over Ruby as a dynamic language (assuming that indeed that the
Groovy language offers everything Ruby does).

I checked online, but websites are either very old, or too "official".
So I wanted to ask my fellow Ruby programmers, who probably share
similar preferences to mine.

Note: I am not sending this to the Groovy list or the Java list. I
don't program in either, I program in Ruby, and what I am looking for
is not an "official" intro to Groovy, just some opinions from Ruby
users. Many things are about personal preference, not checking boxes
on a list. (for that there's wikipedia) :)

So thoughts? Does Groovy (the language) have everything to offer that
Ruby does? And the fact that it was designed to be used on the JVM
from they one gives it an advantage (I know I can keep use Ruby, but a
strong community means more libraries out there, more books, and in
general more help).

Fire away. :)

Diego Virasoro
42773b24e0c3fb506a8a875c058a9dd7?d=identicon&s=25 Dylan Evans (Guest)
on 2009-04-13 14:50
(Received via mailing list)
Use whatever language makes you happy (i do). There is plenty of room
among
programmers to accommodate new languages and they tend to bounce idea
off
each other which keeps development from getting stale, languages don't
just
die because something new came out, for example you can still find
contingents of pascal programmers around. One issue with groovy is (at
the
moment) shackled to JVM which has both it's pros and cons. Overall
groovy
looks like an interesting language but for the moment i don't have a
compelling reason to use it.
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-04-13 15:00
(Received via mailing list)
On Mon, Apr 13, 2009 at 7:35 AM, Diego Virasoro
<Diego.Virasoro@gmail.com> wrote:
> Hello,
> I realise this is a very hot topic... and people have strong feelings
> about either language. I am not trying to trolling.
>
> Still I've heard a bit about Groovy and it kind of seems like the Java
> answer to Ruby (even the names are kind of similar). So I was
> wondering if that kind of "first citizen" status will eventually make
> it take over Ruby as a dynamic language (assuming that indeed that the
> Groovy language offers everything Ruby does).

I am not really familiar with Groovy, but I'm somewhat surprised you
didn't mention JRuby here.
It runs on the JVM, lets you access the wealth of the Java libraries,
and is fully compatible with  Ruby 1.8.6.
It is also targeting Ruby 1.9 features over time.

So I'm not sure why I'd use something "like Ruby" if I could just use
Ruby.

-greg
Aae5c9f81fe990a48daf2bb91ac82759?d=identicon&s=25 unknown (Guest)
on 2009-04-13 16:05
(Received via mailing list)
> Use whatever language makes you happy (i do).

Well, that was the plan. And currently Ruby seems more elegant. But is
this true? And is it more powerful? And it's easier to use? I dunno. I
guess I could pick a book and start reading it. But currently I don't
have much interest in learning Groovy if in the end it ends up exactly
like Ruby.

So I was hoping someone who has tried both could tell me a little bit
more on their opinion.
Aae5c9f81fe990a48daf2bb91ac82759?d=identicon&s=25 unknown (Guest)
on 2009-04-13 16:20
(Received via mailing list)
> I am not really familiar with Groovy, but I'm somewhat surprised you
> didn't mention JRuby here.

You are right... and I think I've not explained myself very well. I
was interested to hear people's opinion about Groovy to get an idea if
I may want to invest some time in learning it or not.

To this end, I currently have two main concerns:
1- A language I enjoy using. Ruby is such a language so far (apart
from the speed). On the other hand is Groovy? Are the two really on
feature parity? What are their advantages over each other? I could
find very little recent stuff on Groovy, and as you put it << I'm not
sure why I'd use something "like Ruby" if I could just use Ruby >>. So
what is the feeling of the Rubyist that have already looked closely at
Groovy?

2- A language that will be around for a (relatively) long time, and
with a strong community support. I mean, I know Ruby per se would not
disappear if people stopped using it, but still, with little support
there are less libraries, and the technological world is a moving
target, so a language with no development would slowly become less and
less useful.

So I am sorry I confused everybody by mixing the two points. I was
trying to address both points in the opening post, but I didn't
distinguished the two questions very well. I hope things are more
clear now. :)

Diego
4299e35bacef054df40583da2d51edea?d=identicon&s=25 James Gray (bbazzarrakk)
on 2009-04-13 16:44
(Received via mailing list)
On Apr 13, 2009, at 9:05 AM, Diego.Virasoro@gmail.com wrote:

> And currently Ruby seems more elegant. But is this true?

This is pretty much personal opinion.  Which ever one feels better to
you is better.

> And is it more powerful?

There's no such thing.  Both languages are Turing Complete
(http://en.wikipedia.org/wiki/Turing_complete
).  Thus, they are literally capable of the same things.

> And it's easier to use?

Again, that's pretty much personal preference.  What's easy for me may
not be easy for you.

James Edward Gray II
4299e35bacef054df40583da2d51edea?d=identicon&s=25 James Gray (bbazzarrakk)
on 2009-04-13 16:53
(Received via mailing list)
On Apr 13, 2009, at 9:20 AM, Diego.Virasoro@gmail.com wrote:

> I was interested to hear people's opinion about Groovy to get an
> idea if
> I may want to invest some time in learning it or not.

Well, learning new languages is a good thing.  I've enjoyed most of
what I've worked with, even if they didn't replace Ruby for me.

> 1- A language I enjoy using. Ruby is such a language so far (apart
> from the speed).

I've been pretty impressed with 1.9's speed.  Time to make the switch!

> 2- A language that will be around for a (relatively) long time, and
> with a strong community support.

While some languages do die, I think it's a pretty rare thing.  Most
languages are still around in some form and generally have a community
supporting them.

James Edward Gray II
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2009-04-13 20:35
(Received via mailing list)
On Mon, Apr 13, 2009 at 4:43 PM, James Gray <james@grayproductions.net>
wrote:
> (http://en.wikipedia.org/wiki/Turing_complete).  Thus, they are literally
> capable of the same things.
Of course, but I would like to give a broader interpretation to
"performance".
There are (at least) two interpretations of "powerful" that make a
difference here.

The first is "how fast I can achieve my goal", and I believe Ruby is
difficult to beat in this domain.
This only might not be true in the case of the need of some very
specific java libraries to be reused. Groovy might have an adavantage
here, which otoh you might be able to overcome with JRuby :). (1)

If, and it is a big IF, you mean execution speed with powerful, Groovy
is probably faster, but yet there is JRuby and unless heading into the
direction of some very specific code, worrying about speed now is a
bad decision.

Really I did not like Groovy but that is why I am on this list :).
Check it out by all means if you are not happy with Ruby, but its is
quite clear, that on this list most folks will concur with your first
impressions ;).

(1) Avoid continuations
>
>> And it's easier to use?
Actually maybe not, Ruby has some subtleties which Groovy might not
have, but to learn them is very rewarding and relatively easy because
of excellent material available (c.f. Pickaxe book
http://www.pragprog.com/titles/ruby3/programming-ruby-1-9  of which
you find an older version for Ruby1.8 online which I would recommend
by all means ) and also thanks to some very helpful folks on this
list.

HTH
Robert

--
Si tu veux construire un bateau ...
Ne rassemble pas des hommes pour aller chercher du bois, préparer des
outils, répartir les tâches, alléger le travail… mais enseigne aux
gens la nostalgie de l’infini de la mer.

If you want to build a ship, don’t herd people together to collect
wood and don’t assign them tasks and work, but rather teach them to
long for the endless immensity of the sea.
2f55791ab9018b4d01fb741fab21843d?d=identicon&s=25 Tony Arcieri (Guest)
on 2009-04-13 20:50
(Received via mailing list)
On Mon, Apr 13, 2009 at 5:35 AM, Diego Virasoro
<Diego.Virasoro@gmail.com>wrote:

> Still I've heard a bit about Groovy and it kind of seems like the Java
> answer to Ruby (even the names are kind of similar). So I was
> wondering if that kind of "first citizen" status will eventually make
> it take over Ruby as a dynamic language (assuming that indeed that the
> Groovy language offers everything Ruby does).
>

One of the most powerful Ruby idioms I know of requires features Groovy
doesn't have.  I'm talking about creating a small declarative "DSL" you
call
from a class body to metaprogram methods, such as with ActiveRecord
associations, e.g.:

 class Foo < ActiveRecord::Base
   has_many :bars
   has_many :bazzes, :through => :quuxes, :order => "created_at DESC"
 end

This allows for instances of Foo to potentially respond to many
different
methods based on the association names (e.g. you can call afoo.bars to
get a
collection of associated bars)

Groovy does not allow code in class bodies (at least last I checked),
and I
believe Grails tries to work around this with static properties, which
can't
provide the full expressive power of a DSL.

I've heard generally bad things about Groovy's approach to metaclasses
and
metaprogramming in general, but as I haven't used Groovy I can't really
comment in that regard.
Fa2521c6539342333de9f42502657e5a?d=identicon&s=25 Eleanor McHugh (Guest)
on 2009-04-13 21:00
(Received via mailing list)
On 13 Apr 2009, at 12:35, Diego Virasoro wrote:
> So thoughts? Does Groovy (the language) have everything to offer that
> Ruby does? And the fact that it was designed to be used on the JVM
> from they one gives it an advantage (I know I can keep use Ruby, but a
> strong community means more libraries out there, more books, and in
> general more help).

I followed Groovy development for a while (between 2004-2006) and
liked what I saw, but ultimately gave up on developing for the JVM and
lost interest. Were it to break out of that particular ghetto I think
it could gain in popularity, although from what I recall it's similar
enough to Ruby in many respects that it might be difficult to
differentiate itself.


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason
Ae16cb4f6d78e485b04ce1e821592ae5?d=identicon&s=25 Martin DeMello (Guest)
on 2009-04-13 21:58
(Received via mailing list)
On Tue, Apr 14, 2009 at 12:29 AM, Eleanor McHugh
<eleanor@games-with-brains.com> wrote:
>
> I followed Groovy development for a while (between 2004-2006) and liked what
> I saw, but ultimately gave up on developing for the JVM and lost interest.
> Were it to break out of that particular ghetto I think it could gain in
> popularity, although from what I recall it's similar enough to Ruby in many
> respects that it might be difficult to differentiate itself.

Clojure pushes the jvm as a strength [http://clojure.org/rationale].
It's certainly nice to have all those libraries for free and a
well-optimised vm, though I got a trifle disillusioned when I wrote an
app in it and discovered that yes, swing does suck. (Some day I'll
work up the energy to scrap the UI and rewrite it in QtJambi)

martin
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-04-13 23:15
(Received via mailing list)
Eleanor McHugh wrote:
> I followed Groovy development for a while (between 2004-2006) and liked
> what I saw, but ultimately gave up on developing for the JVM and lost
> interest. Were it to break out of that particular ghetto I think it
> could gain in popularity, although from what I recall it's similar
> enough to Ruby in many respects that it might be difficult to
> differentiate itself.

I don't know if I'd consider the JVM a ghetto :) At any rate, I think
there's practically no chance of Groovy ever living anywhere but the
JVM, since they're tightly intertwined with both Java the platform and
Java the languages.

- Charlie
Fa2521c6539342333de9f42502657e5a?d=identicon&s=25 Eleanor McHugh (Guest)
on 2009-04-14 00:21
(Received via mailing list)
On 13 Apr 2009, at 22:14, Charles Oliver Nutter wrote:
> Eleanor McHugh wrote:
>> I followed Groovy development for a while (between 2004-2006) and
>> liked what I saw, but ultimately gave up on developing for the JVM
>> and lost interest. Were it to break out of that particular ghetto I
>> think it could gain in popularity, although from what I recall it's
>> similar enough to Ruby in many respects that it might be difficult
>> to differentiate itself.
>
> I don't know if I'd consider the JVM a ghetto :)

Well I'll concede that the JVM does have a few things going for it,
but I never was entirely comfortable with having my code tightly
coupled to it. The Groovy guys have a different outlook and good luck
to them for that - if we all thought alike we'd never get anywhere lol


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason
Ff9e18f0699bf079f1fc91c8d4506438?d=identicon&s=25 James Britt (Guest)
on 2009-04-14 09:35
(Received via mailing list)
Charles Oliver Nutter wrote:
> Eleanor McHugh wrote:
>> I followed Groovy development for a while (between 2004-2006) and
>> liked what I saw, but ultimately gave up on developing for the JVM and
>> lost interest. Were it to break out of that particular ghetto I think
>> it could gain in popularity, although from what I recall it's similar
>> enough to Ruby in many respects that it might be difficult to
>> differentiate itself.
>
> I don't know if I'd consider the JVM a ghetto :)


In some ways MRI is more of a "ghetto" in that if you ever end up using
a native-code library you may find it hard to run you code on multiple
platforms, whereas if you use JRuby with Java libs you have far more
portability.


As it stands, it's a fair bet that Ruby + Java gives you more libraries
than Ruby + C.

That's not to claim there are no downsides to running on the JVM, just
that the Java platform seems to have been tagged with a very outdated
image, and people are doing themselves and others a real disservice to
so blithely dismiss it.



--
James Britt

www.jamesbritt.com           - Playing with Better Toys
www.ruby-doc.org             - Ruby Help & Documentation
www.rubystuff.com            - The Ruby Store for Ruby Stuff
699c00ad35f2755810b4aa5f423d73e2?d=identicon&s=25 Albert Schlef (alby)
on 2009-04-14 10:11
Eleanor McHugh wrote:
> Well I'll concede that the JVM does have a few things going for it,
> but I never was entirely comfortable with having my code tightly
> coupled to it.

When you're writing in Ruby, your programs are tightly coupled to the
Ruby interpreter. Why is that better than having a program coupled to
the JVM?
Baf83fa62a7481a08c40353795e11f44?d=identicon&s=25 Michael Neumann (mneumann)
on 2009-04-14 10:22
(Received via mailing list)
On Tue, 14 Apr 2009 16:34:45 +0900
James Britt <james.britt@gmail.com> wrote:

>
>
> In some ways MRI is more of a "ghetto" in that if you ever end up
> using a native-code library you may find it hard to run you code on
> multiple platforms, whereas if you use JRuby with Java libs you have
> far more portability.

Portability is very subjective :)
For many years, Java was only supported on a handful of platforms,
others like for example FreeBSD weren't (I'm talking about Sun's Java
here).
I still can't run Java and depending applications like OpenOffice on a
specific operating system, until OpenJDK becomes ready.

Portability for me means, that I have full access to the C/C++ code, and
it compiles easily on every platform. Welcome to Ruby :)

> As it stands, it's a fair bet that Ruby + Java gives you more
> libraries than Ruby + C.

Sure. But does it give us more quality? My own (limited) experience
with Java was that it's very hard to find a usable, bug-free HTML parser
in Java (TagSoup without bugs), which on the other hand was very easy in
Ruby (Hpricot).

Regards,

  Michael
Baf83fa62a7481a08c40353795e11f44?d=identicon&s=25 Michael Neumann (mneumann)
on 2009-04-14 10:23
(Received via mailing list)
On Tue, 14 Apr 2009 17:11:58 +0900
Albert Schlef <albertschlef@gmail.com> wrote:

> Eleanor McHugh wrote:
> > Well I'll concede that the JVM does have a few things going for it,
> > but I never was entirely comfortable with having my code tightly
> > coupled to it.
>
> When you're writing in Ruby, your programs are tightly coupled to the
> Ruby interpreter. Why is that better than having a program coupled to
> the JVM?

Ruby is open-source. Ruby runs everywhere.

Regards,

  Michael
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-04-14 11:10
(Received via mailing list)
Michael Neumann wrote:
> Portability is very subjective :)
> For many years, Java was only supported on a handful of platforms,
> others like for example FreeBSD weren't (I'm talking about Sun's Java
> here).
> I still can't run Java and depending applications like OpenOffice on a
> specific operating system, until OpenJDK becomes ready.
>
> Portability for me means, that I have full access to the C/C++ code, and
> it compiles easily on every platform. Welcome to Ruby :)

http://robilad.livejournal.com/44589.html

I'm also running the BSD port of OpenJDK on Mac right now.

>> As it stands, it's a fair bet that Ruby + Java gives you more
>> libraries than Ruby + C.
>
> Sure. But does it give us more quality? My own (limited) experience
> with Java was that it's very hard to find a usable, bug-free HTML parser
> in Java (TagSoup without bugs), which on the other hand was very easy in
> Ruby (Hpricot).

http://java-source.net/open-source/html-parsers

No promises, of course, but there's a lot more to pick from.

- Charlie
Fa2521c6539342333de9f42502657e5a?d=identicon&s=25 Eleanor McHugh (Guest)
on 2009-04-14 12:37
(Received via mailing list)
On 14 Apr 2009, at 08:34, James Britt wrote:
>
> In some ways MRI is more of a "ghetto" in that if you ever end up
> using a native-code library you may find it hard to run you code on
> multiple platforms, whereas if you use JRuby with Java libs you have
> far more portability.

All platforms are ghettos by their very nature. In the case of Groovy,
it's a language closely coupled to a particular platform - the JDK -
which is out of the control of its creators and therefore breaking
free from that ghetto could prove too difficult to be worth the
investment. That's a pity for Groovy because it's a language that's
fun to play with and that freed of the JDK constraint might not look
out of place rubbing shoulders with Ruby and Python.

> As it stands, it's a fair bet that Ruby + Java gives you more
> libraries than Ruby + C.
>
> That's not to claim there are no downsides to running on the JVM,
> just that the Java platform seems to have been tagged with a very
> outdated image, and people are doing themselves and others a real
> disservice to so blithely dismiss it.


I've been coding for almost thirty years, and for ten of those I
followed the JVM closely enough to have been a reasonable JASM coder.
So if I'm blithe in my tone, that's not without having formed an
opinion through experience and come to the conclusion that I want *and
need* my code to live in a world larger than that circumscribed by the
JDK.

In Ruby that's easy as Charlie and his confederates have built me a
first-class tool to use in JRuby with very few restrictions on the
kind of Ruby code it'll support, whilst MRI still gives me support on
a host of other platforms thanks to its ANSI-C implementation. For the
Groovy folks that could well be impossible.


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2009-04-14 12:52
(Received via mailing list)
On Tue, Apr 14, 2009 at 10:23 AM, Michael Neumann <mneumann@ntecs.de>
wrote:
>> the JVM?
>
> Ruby is open-source. Ruby runs everywhere.
Well so is the JVM, open source and run everywhere :). But to add to
your answer, it is better to be coupled to Ruby than to the JVM,
because you are one abstraction higher and although JRuby is a great
thing to use you do not depend on the JVM, which is good. If use JRuby
because you depend on Java features you do not loose anything, because
you are bound anyway. If you use JRuby for other reasons you will not
be bound to JRuby and can use any other rubyspec compliant
implementation :).
Robert
--
Si tu veux construire un bateau ...
Ne rassemble pas des hommes pour aller chercher du bois, préparer des
outils, répartir les tâches, alléger le travail… mais enseigne aux
gens la nostalgie de l’infini de la mer.

If you want to build a ship, don’t herd people together to collect
wood and don’t assign them tasks and work, but rather teach them to
long for the endless immensity of the sea.
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2009-04-14 12:54
(Received via mailing list)
On Tue, Apr 14, 2009 at 12:36 PM, Eleanor McHugh
<eleanor@games-with-brains.com> wrote:

> JDK constraint might not look out of place rubbing shoulders with Ruby and
> Python.

Hmm are you sure about this? Charles implemented Ruby on the JVM, a
priori that seemed much harder than to implement Groovy on the say
LLVM, or do I miss something here?
R.
Aae5c9f81fe990a48daf2bb91ac82759?d=identicon&s=25 unknown (Guest)
on 2009-04-14 13:21
(Received via mailing list)
> Groovy does not allow code in class bodies (at least last I checked), and I
> believe Grails tries to work around this with static properties, which can't
> provide the full expressive power of a DSL.
>
Thanks that's exactly the kind of tidbits I was looking for.

Diego
Aae5c9f81fe990a48daf2bb91ac82759?d=identicon&s=25 unknown (Guest)
on 2009-04-14 13:21
(Received via mailing list)
> This is pretty much personal opinion.  Which ever one feels better to  
> you is better.
>
Yeah, I know. But since I've never written anything in Groovy and it
takes time to learn the subtlties of the language, I was asking fellow
Rubyists for their opinion. If you want you could rewrite the question
as "which one does it feel better for you, and why?".

> There's no such thing.  Both languages are Turing Complete 
(http://en.wikipedia.org/wiki/Turing_complete
> ).  Thus, they are literally capable of the same things.
>
Mmm... that sounds a lot like fine semantic details. :/
I agree powerful was a pretty generic term, but I thought it was
pretty clear. The fact that Ruby is so dynamic, for example, I'd say
makes Ruby pretty powerful: you can easily and tersely write complex
programs. And allows you to do things that other languages don't (or
are much more complex and/or time consuming).


> Again, that's pretty much personal preference.  What's easy for me may  
> not be easy for you.
>
Yep, and I was asking for your personal preference... sorry if I
seemed to imply I wanted to get an objective, balanced, correct
opinion. That is an oxymoron, I agree. I was asking the opinion of
other Ruby users.
(I assume someone in the list has probably tried Groovy, or may even
use both)

Diego
134ea397777886d6f0aa992672a50eaa?d=identicon&s=25 Mark Thomas (Guest)
on 2009-04-14 15:01
(Received via mailing list)
On Apr 14, 4:21 am, Michael Neumann <mneum...@ntecs.de> wrote:

> Sure. But does it give us more quality? My own (limited) experience
> with Java was that it's very hard to find a usable, bug-free HTML parser
> in Java (TagSoup without bugs), which on the other hand was very easy in
> Ruby (Hpricot).

Hmm...

 > jruby -S gem install hpricot
 JRuby limited openssl loaded. gem install jruby-openssl for full
support.
 Successfully installed hpricot-0.6.161-java
 1 gem installed
 Installing ri documentation for hpricot-0.6.161-java...
 Installing RDoc documentation for hpricot-0.6.161-java...
Baf83fa62a7481a08c40353795e11f44?d=identicon&s=25 Michael Neumann (mneumann)
on 2009-04-14 15:33
(Received via mailing list)
Am Dienstag, 14. April 2009 11:09:10 schrieb Charles Oliver Nutter:
>
> http://robilad.livejournal.com/44589.html
>
> I'm also running the BSD port of OpenJDK on Mac right now.

That's good news. They should have opened Java 10 years ago :)
I fear you need bootstraps to be able to compile that, which are
binaries, so again it's limited to some more widely used OSes. And this
will probably take hours to compile.

> No promises, of course, but there's a lot more to pick from.
Thanks. I forgot to mention that the experience I made with Java lies
two years in the past :)

My point was, that while there are a lot libraries for Java, not all of
them are usable (the same applies to Ruby of course).
Btw, IIRC tagsoup somehow incorrectly converted UTF-16
(I forgot the exact details), so that in the end all umlauts were lost.

Regards,

  Michael
Baf83fa62a7481a08c40353795e11f44?d=identicon&s=25 Michael Neumann (mneumann)
on 2009-04-14 15:43
(Received via mailing list)
Am Dienstag, 14. April 2009 12:51:11 schrieb Robert Dober:
> On Tue, Apr 14, 2009 at 10:23 AM, Michael Neumann <mneumann@ntecs.de>
wrote:
> >> coupled to the JVM?
> >
> > Ruby is open-source. Ruby runs everywhere.
>
> Well so is the JVM, open source and run everywhere :).

Hehe, depends on what exactly JVM means. The machine
architecture? Or the emulator, which in case of Sun's JVM
is not open-source. OpenJDK seems to be open source, except a few binary
plugs ("Not all of the source code that makes up the JDK is available
under an open-source license") [1].

Run everywhere? Have you ever tried Java on DOS :). I remember running
Ruby under DOS :). Okay lets agree on run everywhere, where everywhere
means 95-99% of all machines.

Now, Ruby clearly runs more than everywhere, thanks to JRuby *g*.

Regards,

  Michael

[1]: http://download.java.net/openjdk/jdk7/
Baf83fa62a7481a08c40353795e11f44?d=identicon&s=25 Michael Neumann (mneumann)
on 2009-04-14 15:50
(Received via mailing list)
Am Dienstag, 14. April 2009 15:00:06 schrieb Mark Thomas:
>  JRuby limited openssl loaded. gem install jruby-openssl for full
> support.
>  Successfully installed hpricot-0.6.161-java
>  1 gem installed
>  Installing ri documentation for hpricot-0.6.161-java...
>  Installing RDoc documentation for hpricot-0.6.161-java...

Notice my use of "was", where "was" means Summer 2007 :)

And it's definitively great to be able to use hpricot on JRuby!

Regards,

  Michael
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2009-04-14 19:27
(Received via mailing list)
On Tue, Apr 14, 2009 at 3:43 PM, Michael Neumann <mneumann@ntecs.de>
wrote:
Let me get that straight, please:
Java can run everywhere (with the exception of DOS, sorry!!!)
but Ruby can run on more than everywhere, well I guess I will ponder
this for eternity and come back to you immediately after that.........
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-04-14 19:31
(Received via mailing list)
Michael Neumann wrote:
> Hehe, depends on what exactly JVM means. The machine
> architecture? Or the emulator, which in case of Sun's JVM
> is not open-source. OpenJDK seems to be open source, except a few binary
> plugs ("Not all of the source code that makes up the JDK is available
> under an open-source license") [1].

I don't know what you mean by "emulator". OpenJDK *is* Sun's JVM, and
other than the parts Sun couldn't legally open-source (owned by other
companies) it's open-source. The "binary plugs" have also successfully
been replaced by OSS equivalents; see the IcedTea project from RedHat.

- Charlie
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-04-14 19:34
(Received via mailing list)
Michael Neumann wrote:
> That's good news. They should have opened Java 10 years ago :)
> I fear you need bootstraps to be able to compile that, which are
> binaries, so again it's limited to some more widely used OSes. And this
> will probably take hours to compile.

Whine whine whine :)

Took me less than an hour last time, and you can get JVM builds (based
on the same codebase) for building on all the BSDs already.

- Charlie
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-04-14 19:43
(Received via mailing list)
Eleanor McHugh wrote:
> In Ruby that's easy as Charlie and his confederates have built me a
> first-class tool to use in JRuby with very few restrictions on the kind
> of Ruby code it'll support, whilst MRI still gives me support on a host
> of other platforms thanks to its ANSI-C implementation. For the Groovy
> folks that could well be impossible.

I tend to agree here. Groovy really is Java with enhancements (lots of
enhancements, sure), and simply would cease to exist without being on
the JVM, having JVM's types, libraries, and type system, and without a
lot of Java's baggage. Groovy is, in a sense, a dynamic-typed Java. That
certainly gives an easy path for folks used to Java to start moving to
dynamic langauges. But detaching it from Java would not be easy, if it's
possible at all.

- Charlie
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2009-04-14 20:12
(Received via mailing list)
On Tue, Apr 14, 2009 at 7:41 PM, Charles Oliver Nutter
<charles.nutter@sun.com> wrote:
> JVM, having JVM's types, libraries, and type system, and without a lot of
> Java's baggage. Groovy is, in a sense, a dynamic-typed Java. That certainly
> gives an easy path for folks used to Java to start moving to dynamic
> langauges. But detaching it from Java would not be easy, if it's possible at
> all.
>
I am amazed that you say that, do you not think it would be easier to
port Groovy to e.g. Ruby than Ruby to Java?
Ok it would be lots and lots of work but surely less than the JRuby
project. Well I have no idea if it will be worth it, but that is not
my question.
To be honest I am not worried about Groovy, but about Clojure, which I
find most interesting.

Cheers
Robert

--
Si tu veux construire un bateau ...
Ne rassemble pas des hommes pour aller chercher du bois, préparer des
outils, répartir les tâches, alléger le travail… mais enseigne aux
gens la nostalgie de l’infini de la mer.

If you want to build a ship, don’t herd people together to collect
wood and don’t assign them tasks and work, but rather teach them to
long for the endless immensity of the sea.
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-04-14 21:01
(Received via mailing list)
Robert Dober wrote:
> I am amazed that you say that, do you not think it would be easier to
> port Groovy to e.g. Ruby than Ruby to Java?
> Ok it would be lots and lots of work but surely less than the JRuby
> project. Well I have no idea if it will be worth it, but that is not
> my question.
> To be honest I am not worried about Groovy, but about Clojure, which I
> find most interesting.

I think the fact you're missing is that without the set of classes and
libraries on the Java platform, Groovy would be a shell of a language.
Moving Groovy off the JVM would mean you'd need to also port across all
Java classes that it needs to run, as well as annotations, generics, and
many other things that don't make much sense off-platform. I will
concede it's probably possible to do, but totally infeasible.

- Charlie
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2009-04-14 21:19
(Received via mailing list)
On Tue, Apr 14, 2009 at 9:00 PM, Charles Oliver Nutter
<charles.nutter@sun.com> wrote:
> I think the fact you're missing is that without the set of classes and
> libraries on the Java platform, Groovy would be a shell of a language.
> Moving Groovy off the JVM would mean you'd need to also port across all Java
> classes that it needs to run,
that I was aware of
>as well as annotations, generics, and many
> other things that don't make much sense off-platform.
that I missed
> I will concede it's
Thanx for explaining.
R.
Baf83fa62a7481a08c40353795e11f44?d=identicon&s=25 Michael Neumann (mneumann)
on 2009-04-15 11:46
(Received via mailing list)
Charles Oliver Nutter wrote:

> Michael Neumann wrote:
>> That's good news. They should have opened Java 10 years ago :)
>> I fear you need bootstraps to be able to compile that, which are
>> binaries, so again it's limited to some more widely used OSes. And this
>> will probably take hours to compile.
>
> Whine whine whine :)
>
> Took me less than an hour last time, and you can get JVM builds (based
> on the same codebase) for building on all the BSDs already.

Hehe, I will try that on my "super-fast" netbook running DragonFlyBSD :)

Regards,

  Michael
Baf83fa62a7481a08c40353795e11f44?d=identicon&s=25 Michael Neumann (mneumann)
on 2009-04-15 11:53
(Received via mailing list)
Charles Oliver Nutter wrote:

> Michael Neumann wrote:
>> Hehe, depends on what exactly JVM means. The machine
>> architecture? Or the emulator, which in case of Sun's JVM
>> is not open-source. OpenJDK seems to be open source, except a few binary
>> plugs ("Not all of the source code that makes up the JDK is available
>> under an open-source license") [1].
>
> I don't know what you mean by "emulator".

If you treat JVM as an instruction set architecture (like IA32/x86),
then
the concrete machine or machine emulator that runs this ISA. Don't know
how
this is correctly termed in Java. JVM is probably the concrete machine,
but
then, how is the ISA termed? And how would one call other JVM
implementation
like Jikes? Jikes-JVM? Don't worry, I think this is getting off-topic :)

Regards,

  Michael
68a08995ddf9b3f8a0b562ed0baf63af?d=identicon&s=25 Michael Bruschkewitz (Guest)
on 2009-06-05 10:07
(Received via mailing list)
"Diego Virasoro" <Diego.Virasoro@gmail.com> schrieb im Newsbeitrag
news:5bd5ae80-a5bd-4a95-815e-988de2e068bd@y7g2000yqa.googlegroups.com...
> Hello,
> I realise this is a very hot topic... and people have strong feelings
> about either language. I am not trying to trolling.
>
> Still I've heard a bit about Groovy and it kind of seems like the Java
> answer to Ruby (even the names are kind of similar). So I was
> wondering if that kind of "first citizen" status will eventually make
> it take over Ruby as a dynamic language (assuming that indeed that the
> Groovy language offers everything Ruby does).

Depends on your colleagues.
If you are in a Java environment and want to implement some scripting,
then
it's probably better to start with Groovy.
If you are in an environment where not much people know _and_ _like_
Java,
start with Ruby.

For the long term, try to aquire both.

IMHO, Java is the language of choice for (portable) GUI-Apps if you
don't
have the need for hardware-or OS-near programming.
(There are GUI-Libs for Ruby too, however, currently no IDE provides
possibilities for Ruby as some do for Java.)

Ruby is wonderful for scripting, with a broad range of capabilities.
You could use very advanced features, but you're able to start at a very
low
level. Which is important when colleagues which are specialized on
another
area should be able to modify your scripts.

Michael B.
9d7ceca3c2fd90d61c6ea950f42b3a9a?d=identicon&s=25 marc (Guest)
on 2009-06-05 10:27
(Received via mailing list)
Michael Bruschkewitz said:

> IMHO, Java is the language of choice for (portable) GUI-Apps if you
> don't have the need for hardware-or OS-near programming. (There are
> GUI-Libs for Ruby too, however, currently no IDE provides possibilities
> for Ruby as some do for Java.)

Better still, use JRuby. All the advantages of Java (when  you need it)
and all the bnefits of Ruby when you don't. (You can package and deploy
with rawr.)

> Ruby is wonderful for scripting, with a broad range of capabilities. You
> could use very advanced features, but you're able to start at a very low
> level. Which is important when colleagues which are specialized on
> another area should be able to modify your scripts.

As a Java dude, I got into Ruby precisely for its ease of use for
scripting. JRuby is the icing on the cake.

--
Best,
Marc

"Change requires small steps."
68a08995ddf9b3f8a0b562ed0baf63af?d=identicon&s=25 Michael Bruschkewitz (Guest)
on 2009-06-05 12:36
(Received via mailing list)
"marc" <gmane@auxbuss.com> schrieb im Newsbeitrag
news:h0akoq$eti$2@ger.gmane.org...
> Michael Bruschkewitz said:
>
>> IMHO, Java is the language of choice for (portable) GUI-Apps if you
>> don't have the need for hardware-or OS-near programming. (There are
>> GUI-Libs for Ruby too, however, currently no IDE provides possibilities
>> for Ruby as some do for Java.)
>
> Better still, use JRuby. All the advantages of Java (when  you need it)
> and all the bnefits of Ruby when you don't. (You can package and deploy
> with rawr.)

That's what I discussed yesterday w/ Logan, rawr-Maintainer.
I did JRuby into Java integration in my last project.
But my colleagues already know Ruby.

My argument was:
If you're in an environment which is familiar to Java but not to Ruby, I
would prefer Groovy.
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (Guest)
on 2009-06-05 13:06
(Received via mailing list)
2009/6/5 Michael Bruschkewitz
<brusch4_removeunderlinesandtextbetween_@gmx.net>:
> My argument was:
> If you're in an environment which is familiar to Java but not to Ruby, I
> would prefer Groovy.

What are your reasons for this?  Is it easier to access Java classes
from Groovy then from JRuby?

Kind regards

robert
9d7ceca3c2fd90d61c6ea950f42b3a9a?d=identicon&s=25 marc (Guest)
on 2009-06-05 14:05
(Received via mailing list)
Michael Bruschkewitz said:

>> and all the bnefits of Ruby when you don't. (You can package and deploy
>> with rawr.)
>
> That's what I discussed yesterday w/ Logan, rawr-Maintainer. I did JRuby
> into Java integration in my last project. But my colleagues already know
> Ruby.
>
> My argument was:
> If you're in an environment which is familiar to Java but not to Ruby, I
> would prefer Groovy.

Sure, the barrier to entry is lower. Also, as a manager type, I often
encounter devs who treat their day job as just that and are not
interested or motivated to learn more than they have to - they quietly
drive me nuts, to be honest! If this is the case, then Groovy is more
likely to succeed - and you won't encounter quiet hostility every day at
work!

If you have "old skool" devs who are interested in their work, then I'd
push on with JRuby (and by association Ruby). Ruby isn't "better",
necessarily, but it has features that allow you to do things a lot more
tersely than Java, which I'm sure we'll agree is rather a verbose
language, and I like that.

There's also an element of simply using and doing something different.
It's refreshing, invigorating, and I believe aids creativity.

--
Best,
Marc

"Change requires small steps."
Ea3084bf9444c7d0cd0c640ca0ac93b3?d=identicon&s=25 Logan Barnett (Guest)
on 2009-06-05 15:36
(Received via mailing list)
On Apr 14, 2009, at 6:43 AM, Michael Neumann wrote:
> means 95-99% of all machines.
I'm pretty sure I run Java on DOS (or equivalent) every day. There's
even an example in this thread!

> jruby -S gem install hpricot

You can also kick off any Java application from the command line with
`java -jar myapp.jar`.

Don't forget that Java also runs on some mobile devices as well. Some
folks have gotten JRuby running on Android phones.

Logan Barnett
logustus@gmail.com
http://www.logustus.com
68a08995ddf9b3f8a0b562ed0baf63af?d=identicon&s=25 Michael Bruschkewitz (Guest)
on 2009-06-06 15:18
(Received via mailing list)
"marc" <gmane@auxbuss.com> schrieb im Newsbeitrag
news:h0b1jf$pm3$1@ger.gmane.org...
> work!
Hello Marc,
your arguments target "devs" - I suppose you mean "software developers".
But you don't know which is the environment of OP.
Imagine, he develops software for medical devices, for example. Most
probably, people in his environment would be highly specialized
biologists,
physicists, physicians a.s.o. which only accidentally do something
related
to software. Maybe adapting some parameters. Forcing them to learn
another
language just because it's "better" some way would be wasting resources.
Imagine space, car, rail, weapons, energy related projects - everywhere
you
will work with people which are highly specialized on their area. In
most
real-world projects, you will have tight deadlines. So, low entry
barriers
are important for the success of most projects.
That's for short term.

For long term I supposed both languages for reasons as you mentioned
below.

Unfortunately, OP did not tell about his needs or environment.

> If you have "old skool" devs who are interested in their work, then I'd
> push on with JRuby (and by association Ruby).

It always depends on (their) plans for future. And depends on how much
time
is needed or available until targets must be reached.

> Ruby isn't "better",
> necessarily, but it has features that allow you to do things a lot more
> tersely than Java, which I'm sure we'll agree is rather a verbose
> language, and I like that.
> There's also an element of simply using and doing something different.
> It's refreshing, invigorating, and I believe aids creativity.

No doubt.
9d7ceca3c2fd90d61c6ea950f42b3a9a?d=identicon&s=25 marc (Guest)
on 2009-06-06 16:41
(Received via mailing list)
Michael Bruschkewitz said:

>> drive me nuts, to be honest! If this is the case, then Groovy is more
>> likely to succeed - and you won't encounter quiet hostility every day
>> at work!
>
> Hello Marc,
> your arguments target "devs" - I suppose you mean "software developers".
> But you don't know which is the environment of OP.

Sure, the OP was looking for subjective views, and they can only be
based
on the limited info provided; I wasn't writing a thesis!

> Imagine, he develops
> software for medical devices, for example. Most probably, people in his
> environment would be highly specialized biologists, physicists,
> physicians a.s.o. which only accidentally do something related to
> software. Maybe adapting some parameters. Forcing them to learn another
> language just because it's "better" some way would be wasting resources.

No-one suggested forcing anyone to do anything; that is almost certainly
guaranteed to fail. But I certainly don't agree that devs learning a new
language (identified as appropriate) is a waste of resources; a bean
counter might, but not an experienced technologist.

>
>> If you have "old skool" devs who are interested in their work, then I'd
>> push on with JRuby (and by association Ruby).
>
> It always depends on (their) plans for future. And depends on how much
> time is needed or available until targets must be reached.

Sure, it always depends. That's the nature of systems with constraints.

>> Ruby isn't "better",
>> necessarily, but it has features that allow you to do things a lot more
>> tersely than Java, which I'm sure we'll agree is rather a verbose
>> language, and I like that.
>> There's also an element of simply using and doing something different.
>> It's refreshing, invigorating, and I believe aids creativity.
>
> No doubt.

--
Best,
Marc

"Change requires small steps."
8f6f95c4bd64d5f10dfddfdcd03c19d6?d=identicon&s=25 Rick Denatale (rdenatale)
on 2009-06-06 16:52
(Received via mailing list)
On Mon, Apr 13, 2009 at 7:35 AM, Diego
Virasoro<Diego.Virasoro@gmail.com> wrote:
> I checked online, but websites are either very old, or too "official".
> So I wanted to ask my fellow Ruby programmers, who probably share
> similar preferences to mine.

I don't think anyone has already mentioned this, but Yehuda Katz
posted this a few days ago it contrasts one aspect of Ruby vs. Groovy.

http://yehudakatz.com/2009/06/04/the-importance-of...

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
This topic is locked and can not be replied to.