RE: Anyone using Ruby for scripting?

  • From: "Matthew Zito" <mzito@xxxxxxxxxxx>
  • To: <cary.millsap@xxxxxxxxxxxx>, <steve.harville@xxxxxxxxx>, <norman.dunbar.capgemini@xxxxxxxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 15 Sep 2010 12:20:12 -0400

I'm very biased as well, but our whole software product is Perl at the
core.  It's a wonderful scripting language, with lots of useful modules.
The biggest problem I have with Perl is that there's so many different
ways to do the same thing that it can get very confusing.  For example,
if you wanted to print the contents of a file, you could do:

 

$file = "test.txt";

open(FILE, "$file");

while(<FILE>) {

            print ;

}

close(FILE);

 

or

 

open(FILE, "test.txt");

print while(<FILE>);

close(FILE);

 

or

 

open(FILE,"test.txt");

@lines = <FILE>;

close(FILE);

print foreach (@lines);

 

or

 

perl -pe eval test.txt

 

(there's a ton more ways to do this, I'm just highlighting some of the
syntactical variations that are all allowed).

 

In any case, trying to do team programming with perl can be annoying,
because you need to really get people to agree on common practices and
conventions, because otherwise you have six different ways of doing the
same thing, and your code turns into a mess.  But for single
person/small group scripting, it's workable, and quite nice.

 

Ruby is a nice language, I think it's extremely elegant, but it is slow
as a dog.  JRuby is actually much faster than the compiled ruby, and as
a friend of mine put it, "When the answer to making your language faster
is to run it inside of a JVM, you're doing it wrong."  :-)

 

Matt

 

________________________________

From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Cary Millsap
Sent: Wednesday, September 15, 2010 9:56 AM
To: steve.harville@xxxxxxxxx;
norman.dunbar.capgemini@xxxxxxxxxxxxxxxxxxxxxxxxx
Cc: Oracle-L Group
Subject: Re: Anyone using Ruby for scripting?

 

In my completely biased opinion: Perl.

*       Its' everywhere.
*       It can do anything.
*       It's fast.
*       There are lots of people out there who can help you.
*       That thing you need to do: someone's probably already done it
for you (probably Jared).
*       It's a great language that doesn't stand in the way of clear
thinking.
*       It's a living language that keeps improving with every release.


Cary Millsap
Method R Corporation
http://method-r.com  (check out our new blogs)
http://carymillsap.blogspot.com



On Wed, Sep 15, 2010 at 8:32 AM, Dunbar, Norman (Capgemini)
<norman.dunbar.capgemini@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>> I'm looking for a common scripting language for system administration
>> and Oracle administration.

Perl?

I'm not a guru myself, in fact,. I hardly understand it! Jarred
(Apologies if I've spelt your name wrong!) on this list is a guru and
uses Perl quite extensively for Oracle duties I believe.

I even think that an Oracle install installs Perl <somewhere? beneath
ORACLE_HOME. Even on Windows?

I use ActivePerl on Windows when I have to run scripts in that language.


Cheers,
Norman.

Norman Dunbar
Contract Senior Oracle DBA
Capgemini Database Team (EA)
Internal : 7 28 2051
External : 0113 231 2051


Information in this message may be confidential and may be legally
privileged. If you have received this message by mistake, please notify
the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you
should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to
under the Freedom of Information Act, Data Protection Act or for
litigation.  Email messages and attachments sent to or from any
Environment Agency address may also be accessed by someone other than
the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our
terms and conditions which you can get by calling us on 08708 506 506.
Find out more about the Environment Agency at
www.environment-agency.gov.uk

--
//www.freelists.org/webpage/oracle-l



 

Other related posts: