home Mail List
Info
Info
Meetings
Goals
Upcoming
Projects
FAQ
Security
Links

[Date Prev][Date Next] [Chronological] [Thread] [Top]

[NMLUG] Ruby



On Mon, 2005-08-15 at 17:56 -0600, Wesley J. Landaker wrote:
> Apparently, Don Wilde recently wrote:
> > Have been doing some good work with Ruby these days. Anybody else out
> > there as impressed as I am? I just bought a book about Rails and
> > haven't started it, but the core Ruby language is so much clearer than
> > Perl that in a comparison I'd have to call Perl a has-been except for
> > CPAN. Thoughts?
> 
> In the domain where perl used to be useful, I almost exclusively use and 
> teach Ruby, and have for some years now. There are a number of reasons 
> behind this, but the easiest explanation is just that I like it, it's fun 
> to use, it's easy to learn, it's a good language.
> 
> irb is great as an interactive calculator and/or prototyping shell, 
> especially because of Ruby's intrinsic big-integer support and reflection. 
> You can do this in other languages, but not with the same ease.
> 
>    What is 2**1000? 
> irb(main):001:0> 2**1000
> => 
> 10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069376
> 
>    What instance methods does a SHA1 object have besides regular Object 
> instance methods?
> irb(main):002:0> require 'sha1'
> irb(main):002:0> SHA1.instance_methods.sort - Object.instance_methods
> => ["<<", "digest", "hexdigest", "update"]
> 
> I still use perl for quite a bit for the occasional "perl -pi -e 's/.../'" 
> where sed can't do the job, only out of habit; Ruby's regular expressions 
> are just as powerful, just not as sed-like when used on the command line.
> 
> I've haven't run into anything in CPAN (or a Python's library, or a C or C++ 
> library) that I've needed that's not available for--or easily wrapped 
> in--Ruby. In the very "worst" case (and often, this is good design anyway), 
> a program can be split into several coprocesses that communicate over 
> standard UNIX pipes, XMLRPC, shared memory, language embedding or whatever 
> is appropriate--this way each part of a program can be written in whatever 
> language is most suitable for the task at hand.
> 
As a full time sysadm, I've been through various scripting languages,
sh, tcl/tk, perl, and then python.  Of the latter three, it seems that
if the system doesn't have it installed (and the right version), it
becomes a problem. sh is like vi, its always there and it works, but its
not perfect. Perl is likely to be on most systems, though I've ran into
a few 'can't turn it off systems' with only perl 4.0.  Trying to get a
gui working in perl or python is 'fun', in the sense if it works -gad
don't touch it.  Now ruby.  I see it's not a default install on the Red
Hat systems soo....I have to give it a try.  

I guess its google time.


~smbinyon



  • References:


Please send sugestions and comments to webmaster@nmlug.org.
Valid XHTML 1.1! Valid CSS! Powered by Debian Powered by Apache