









|
[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[NMLUG] Ruby
Apparently, Sarang Gupta recently wrote:
> Does anyone else agree w/ Kelly (w/ perhaps a little more verbosity?).
> I've poked around w/ Ruby (and it does seem neat, especially the alias,
> set_var, and missing_method features), but trying to find an excuse not to
> learn it.
In my experience, it's a very easy language to jump in and start learning.
After about 5 hours of my initial Ruby exposure, I knew it well enough to
write useful code without continually looking things up. Most people that
have seriously tried to learn Ruby are pretty fluent in using the basics in
a few days. Obviously to use "advanced" features (e.g. currying,
reflection, functional techniques) and sometimes learning how to stop doing
things the hard way takes time. (=
If you do decide to learn it, there is a book available online at
<http://www.rubycentral.com/>, as well as a nice language reference. They
are fine enough to get started. =)
There are plenty of other resources linked from
<http://www.ruby-lang.org/en/20020103.html>. There are some good short
tutorials, references, etc.
> My general feeling is that you can't become a proficient programmer if you
> keep switching languages, unless there's a good reason.
If by "switching" you mean dropping one completely, and then using another
exclusively, sure, I wouldn't do that too often! =) On the other hand, I
think that often it's only by learning new languages, seeing how they do
things, learning different concepts, etc, that one can really become a
proficient programmer. My general feeling is that if learning a new
language is not a dirt simple matter of learning a new syntax, there must
be something conceptual in the language that I don't already know.
(Sometimes the new concept is utter garbage, but not most of the time ;)
> So, my big question is: why Ruby? What "quantum leap" does Ruby have over,
> say, Java and Perl? (this isn't flamebait and I *have* been reading the
> thread-- but I'm not seeing why people think Ruby is so much better than
> Java and Perl?).
Ruby is just more fun to work with, and makes it easier to do powerful
things. Sure you can "do" anything in any language, but Ruby doesn't make
you jump through hoops in order to access powerful features.
In my mind, if I have a spill on my kitchen floor to clean up, Ruby is a
clean, damp, soft, absorbent sponge, Java is a 20-ton diesel powered
Zamboni that won't fit through my front door, and Perl is a ragged, dirty
mop. Yes, sometimes I need a Zamboni or a dirty mop, but not daily. ;)
> My smaller questions:
>
> % Is Ruby cross-platform in the sense that I can deliver an .exe or
> similar file to a Windows user?
Yes, there are several programs that will roll up a Ruby application and all
of it's libraries into a stand-alone executable.
I personally don't find this a very useful feature; the same thing can be
accomplished with an installer and doesn't smell like, "I'm trying to hide
something."
In general, Ruby works very well on any POSIX-like platform -- there are a
couple quirks on Windows, but nothing to get real excited about. (I deploy
Ruby on Windows machines all the time.)
> % Ruby uses TK to create GUIs, and I'm guessing Windows doesn't ship w/
> TK-- again, is there an easy way to deliver GUI-based ruby scripts to
> Windows users, as(suming) Windows users are lazy and stupid?
Ruby doesn't use Tk to create GUIs, but some programmers might use the
default, included Ruby/Tk library bindings to make GUIs. Personally, if
you're looking for an all-Ruby solution, I'd recommend using something
else, like Ruby/Qt, Ruby/GTK, Ruby/FOX, or Ruby/wxWindows. I highly
recommend Qt; the other toolkits are all pretty good. The world would be a
better place if folks would stop using Tk, Athena, Motif, and stuff like
that. =)
To answer the other part of your question, if you use the Ruby Windows
installer, I believe it will put in all the supporting libraries needed,
including Tk.
> % Can Ruby scripts be compiled for speed?
They can, but IMO if you've got a Ruby program that's running too slow, it
probably shouldn't have been a Ruby program, or the problem isn't Ruby.
> % I've written Java code that emulates some (very few) of Ruby's
> features-- w/ a little work, could Ruby's advantages be ported to Java? [I
> realize there are some fundamental limitations here, but my general
> thought is: could Java be made more Ruby-like?]
I doubt you'll get far--Java has a fundamentally different paradigm. But, if
you're just wanting to have Ruby and Java play nicely, there are plenty of
ways to do that. See <http://jruby.sourceforge.net/> for example.
--
Wesley J. Landaker <wjl@icecavern.net>
OpenPGP FP: 4135 2A3B 4726 ACC5 9094 0097 F0A9 8A4C 4CD6 E3D2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.b9.com/pipermail/nmlug/attachments/20050816/0e89a737/attachment.pgp
|
|