Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Coming from Perl question

Reply
Thread Tools

Coming from Perl question

 
 
Brian Hicks
Guest
Posts: n/a
 
      08-17-2006
I'm looking to switch from perl to something more object oriented. I'm
trying to decide between ruby and python, but I'm having some issues
with some aspects of ruby. The language looks great to me, but I am
interested in how it is extended (for things like network programming,
oracle connectivity, extra fancy date manipulation, things like that).
rubyforge seems to be the central location for these things, but it
isn't entirely obvious how to get things installed properly or in a
"standard" way, and if I did manage to get them installed, it's not
obvious how to use them.

I guess I was hoping for CPAN for ruby (I'm sure that's come up a few
billion times here). Or at least some sort of page like this:

http://www.python.org/doc/faq/library/

that tells how to find out the information i'm looking for. Can anyone
help out a newbie?

Thanks!

Brian

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

 
Reply With Quote
 
 
 
 
khaines@enigo.com
Guest
Posts: n/a
 
      08-17-2006
On Fri, 18 Aug 2006, Robert Dober wrote:

>> I guess I was hoping for CPAN for ruby (I'm sure that's come up a few
>> billion times here).

>
>
> Strangely enough not at all!


Search the archives. This is indeed a recurring topic.

However, in a nutshell, for the OP:

The majority of projects these days are hosted at Rubyforge.
The majority also have listings at RAA (http://raa.ruby-lang.org).

These are non-identical majorities with a lot of overlap, so when hunting
for something, it's a good idea to search both places.

A more or less standard package distribution format is the RubyGem.
Read all about it here:

http://docs.rubygems.org/

Once you have gems installed in your Ruby installation, you can do
something like this:

gem install mime-types

RTM for details on everything else you can do.


Kirk Haines


 
Reply With Quote
 
 
 
 
snacktime
Guest
Posts: n/a
 
      08-17-2006
On 8/17/06, Brian Hicks <> wrote:
> I'm looking to switch from perl to something more object oriented. I'm
> trying to decide between ruby and python, but I'm having some issues
> with some aspects of ruby. The language looks great to me, but I am
> interested in how it is extended (for things like network programming,
> oracle connectivity, extra fancy date manipulation, things like that).
> rubyforge seems to be the central location for these things, but it
> isn't entirely obvious how to get things installed properly or in a
> "standard" way, and if I did manage to get them installed, it's not
> obvious how to use them.


I found ruby fairly intuitive coming from a mostly perl background.
network programming is pretty easy. Database connectivity is pretty
good, although I haven't used the oracle adaptors. There is ruby-dbi
which is similar to perl dbi. The one thing I do miss is Date::Manip.
Nothing like it in ruby that I have found. Ruby regular expressions
aren't quite as powerful as perl's, but more then adequate. I do like
all the little methods in ruby that make doing the simple stuff easy,
like string.ljust, etc.. Some stuff takes a while to get used to
though, like the fact that everything is an object. Variable
assignment has it's quirks that have caught me a few times.

For things on rubyforge you can usually just 'gem install packagename'
from your local server and it will grab it from rubyforge and install
it. Stuff on raa you have to pull down and run 'ruby setup.rb'
yourself.

I've written a couple of decent sized apps in python and a ton of perl
code over the years, but the more i use ruby the more I like it.

 
Reply With Quote
 
Brian Hicks
Guest
Posts: n/a
 
      08-18-2006
Robert Dober wrote:
> On 8/17/06, <> wrote:
>>
>> On Fri, 18 Aug 2006, Robert Dober wrote:
>>

> 54 times in 6 months, whatever you say.
>
> I guess OP felt better with my reply, but obviously you did not!
>
> Sorry


I was mostly just looking for the most up to date anyway, so both
answers are appreciated.

I had actually found raa.ruby-lang.org, so finding the modules looks to
be not THAT difficult, but finding usage info for them could be
problematic.

For example, I'm interested in sending an email with ruby. So I go to
raa.ruby-lang.org and look through "libraries" and find RubyMail. The
description says, "lightweight mail library containing various mail
utility classes and modules". It sounds like it might do what I want.
From this: http://raa.ruby-lang.org/project/rubymail/ I can see links to
download the module, see changes, the project homepage on rubyforge, and
the author's email address. No usage info.

Ok, so I'll go to the homepage. It's here:
http://rubyforge.org/projects/rubymail/. Again, I can see the
requirements/dependencies, a changelog, and I can download the module.
There's even a forum here, but it's empty. Still no usage help. I could
ask on the forum, but that seems inefficient.

What's the easiest way to figure out what this "RubyMail" does and how
to use it?

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

 
Reply With Quote
 
William Crawford
Guest
Posts: n/a
 
      08-18-2006
Brian Hicks wrote:
> What's the easiest way to figure out what this "RubyMail" does and how
> to use it?


I'm new to Ruby, too, but I've already come across this question on my
own learning. My solution was to simply open up the source code and
look through it. If it's commented even halfway well, it'll be very
obvious what everything does.

I know this isn't nearly as easy as a proper set of examples, but it's
usually enough to get started and quite often enough to do what you
need.


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

 
Reply With Quote
 
Brian Hicks
Guest
Posts: n/a
 
      08-18-2006
William Crawford wrote:

> I'm new to Ruby, too, but I've already come across this question on my
> own learning. My solution was to simply open up the source code and
> look through it. If it's commented even halfway well, it'll be very
> obvious what everything does.


Man, I was hoping it wouldn't come to that, since you'd have to download
and possibly install a module before deciding if it's something you even
need.

However, I just noticed here:

http://www.ruby-doc.org/docs/ProgrammingRuby/

That there are plenty of useful modules for networking (including
smtp!). There's even a date class in the standard library! I should be
able to build any modules I'm missing from those building blocks without
too much trouble.

Neat!

Brian

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

 
Reply With Quote
 
Austin Ziegler
Guest
Posts: n/a
 
      08-18-2006
On 8/17/06, Robert Dober <> wrote:
> On 8/17/06, Brian Hicks <> wrote:
>> I guess I was hoping for CPAN for ruby (I'm sure that's come up a few
>> billion times here).

> Strangely enough not at all!


Not recently, especially since the introduction of RubyGems and
their hosting on RubyForge, but in the past, it was quite common to hear
people say something like "we need something like CPAN".

-austin
--
Austin Ziegler * * http://www.halostatue.ca/
* * http://www.halostatue.ca/feed/
*

 
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
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 01-23-2011 05:00 AM
Learning Python now coming from Perl Bertilo Wennergren Python 20 12-09-2008 01:31 PM
Coming from Perl Amer Neely Python 29 09-18-2007 01:30 PM
PyCon is Coming! PyCon is Coming! Steve Holden Python 0 01-05-2006 11:53 AM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57