Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ex-Perl coders: Howz it feel to convert to Ruby?

Reply
Thread Tools

Ex-Perl coders: Howz it feel to convert to Ruby?

 
 
Chris
Guest
Posts: n/a
 
      09-15-2004
I didn't even think about asking this question until now, based on a
paragraph I wrote in another thread, so I thought I would ask...

I've had this long time infatuation with Ruby and as a fairly proficient
Perl coder, have even recreated a few "Ruby things" in Perl over the
last few years. But a couple of "Wow!" factors in Ruby have kept me
hanging around and I've finally decided that the only way is to ween
myself off of Perl and just start using Ruby all the way.

This is hard because I can't afford a lot of downtime, which has been
the biggest strike for me against using Ruby. I'm fairly fast, tight,
and concise at hitting targets using Perl and I don't want to loose that
productivity using Ruby. Still, it appears a "hit" has to be taken if I
really want to learn it as well as I know Perl.

So the question for any hardcore Perl coders out there that have
converted to Perl (or are fluent in both) is: Is it really worth the
time? Are the paybacks there? And do you feel you've exceeded your
capabilities in Perl using Ruby?

I perceive, from what I've read, that this could be the case. I see all
these "testimonials" that claim rapid development and this is inticing,
yet at the same time, having done *some* Ruby coding, this is a little
hard for me to believe because in my estimation, the paradigm in Ruby is
entirely different than in just about any other procedural language and
even from the OO aspects of Perl, C++ and Java. To me, the difference
between Ruby and just about anything else (common) is the same as when,
in the development world, many of us made the leap from procedural to
OO. I think the gap between Ruby and most everything else is that big
-- as well as the payoffs...?

So I'm looking for feedback from those that have converted, esp. from a
hardcore Perl perspective.

Thanks,
-ceo
 
Reply With Quote
 
 
 
 
James Britt
Guest
Posts: n/a
 
      09-15-2004
Chris wrote:

> ... in my estimation, the paradigm in Ruby is
> entirely different than in just about any other procedural language and
> even from the OO aspects of Perl, C++ and Java. To me, the difference
> between Ruby and just about anything else (common) is the same as when,
> in the development world, many of us made the leap from procedural to
> OO. I think the gap between Ruby and most everything else is that big
> -- as well as the payoffs...?


Could I can encourage you to go into more detail about this? In what
ways do you see the Ruby paradigm as being s different from Perl, Java,
and C++?

When you started learning Ruby, did you try to adapt familiar Perl/Java
concepts/structures/object models to Ruby? If so, did this help or
hinder your learning Ruby?

>
> So I'm looking for feedback from those that have converted, esp. from a
> hardcore Perl perspective.


Same here. This is an interesting topic.

Thanks,


James



 
Reply With Quote
 
 
 
 
Robert Klemme
Guest
Posts: n/a
 
      09-15-2004
Although I don't regard myself as a diehard perl coder...

"Chris" <(E-Mail Removed)> schrieb im Newsbeitrag
news:REY1d.17014$(E-Mail Removed) om...
> I didn't even think about asking this question until now, based on a
> paragraph I wrote in another thread, so I thought I would ask...
>
> I've had this long time infatuation with Ruby and as a fairly proficient
> Perl coder, have even recreated a few "Ruby things" in Perl over the
> last few years. But a couple of "Wow!" factors in Ruby have kept me
> hanging around and I've finally decided that the only way is to ween
> myself off of Perl and just start using Ruby all the way.
>
> This is hard because I can't afford a lot of downtime, which has been
> the biggest strike for me against using Ruby. I'm fairly fast, tight,
> and concise at hitting targets using Perl and I don't want to loose that
> productivity using Ruby. Still, it appears a "hit" has to be taken if I
> really want to learn it as well as I know Perl.


IMHO that will be the case with *any* language which you don't use for a
long time: it just takes some initial learning until you reach the same
(or even higher) speed as with a language that you're proficient in. If
you can't afford that at all then I'd suggest to not switch at all *or*
defer the switch, take your time and do Ruby stuff whenever you can afford
until you reach the level of proficiency and speed that you need.

> So the question for any hardcore Perl coders out there that have
> converted to Perl (or are fluent in both) is: Is it really worth the
> time? Are the paybacks there? And do you feel you've exceeded your
> capabilities in Perl using Ruby?


I'd say Ruby is worth the journey. I never got really acquainted with
perl OO - which is a major nuisance IMHO. Also Perl has all sorts of
specialities, which make it fast but can lead to ugly surprises ("sort
works only with a restricted kind of block" is one of those exceptions).
Personally I stepped into the "did I dereferenciate often enugh" trap
often enough to slow me down. That might not be the case in your
situation as hardcore perl coder though.

> I perceive, from what I've read, that this could be the case. I see all
> these "testimonials" that claim rapid development and this is inticing,
> yet at the same time, having done *some* Ruby coding, this is a little
> hard for me to believe because in my estimation, the paradigm in Ruby is
> entirely different than in just about any other procedural language and
> even from the OO aspects of Perl, C++ and Java. To me, the difference
> between Ruby and just about anything else (common) is the same as when,
> in the development world, many of us made the leap from procedural to
> OO. I think the gap between Ruby and most everything else is that big
> -- as well as the payoffs...?


I wouldn't claim that big difference: Ruby OO <-> Perl OO, yes of course -
perl OO is close to nonexistent. There is no unique way to create
instances etc, which makes it hard to work with IMHO. Ruby OO <->
Java/C++ OO, much closer but less hazardous (C++ multiple inheritance) and
more flexible (not only meta data inspection as in Java but also meta data
*manipulation*, such as adding methods dynamically).

> So I'm looking for feedback from those that have converted, esp. from a
> hardcore Perl perspective.


I hope these comments helped even I not from a "hardcore Perl perspective"
but rather from a reasonable Perl background.

Kind regards

robert

 
Reply With Quote
 
Dick Davies
Guest
Posts: n/a
 
      09-15-2004
* Chris <(E-Mail Removed)> [0954 15:54]:
> I didn't even think about asking this question until now, based on a
> paragraph I wrote in another thread, so I thought I would ask...


> .....I've finally decided that the only way is to ween
> myself off of Perl and just start using Ruby all the way.


Good on you boy, although your family will starve
I am still 'Writing Perl for Food', though I hope to start sneaking Ruby under
the radar here now that I've settled in and earned some credit.

> .... I'm fairly fast, tight,
> and concise at hitting targets using Perl and I don't want to loose that
> productivity using Ruby. Still, it appears a "hit" has to be taken if I
> really want to learn it as well as I know Perl.
>
> So the question for any hardcore Perl coders out there that have
> converted to Perl (or are fluent in both) is: Is it really worth the
> time? Are the paybacks there? And do you feel you've exceeded your
> capabilities in Perl using Ruby?


Perl has a lot of annoying rough edges now I'm used to Ruby -
lack of iterators and the func(thingy) rather than obj.method syntax.

But it's also got a few absolutely horrible bits, number one being the whole
OOP model. Despite this a lot of third party libs use the model because it
makes namespace management almost feasible.

It sticks in my eye whenever I try to read another library, sometimes
when I just try to use them, and means things like unit testing are impractical.

So with Perl I just throw something together until it works, test it by hand as
best I can, and hope I can finish it in one sitting, because I won't be able to
follom it when I come back to it

> OO. I think the gap between Ruby and most everything else is that big
> -- as well as the payoffs...?


The nice thing about ruby is that it lets you write code without thinking too
much about the language, so your brain has more room for your app logic.
I have almost finished my del.icio.us api library after
about two days of ten minute coding sessions while I was waiting for kernels to compile.

Find a problem to solve and get to it, and post here when you get stuck or think
'there must be a prettier way of saying this' (because in my experience there is).

but to paraphrase the Envoy Corps: '*you* write the code, not the language'.
Use what you find easiest. But I think if you already dig it, then Ruby will
pay off for you.

--
God made the world in six days, and was arrested on the seventh.
Rasputin :: Jack of All Trades - Master of Nuns


 
Reply With Quote
 
Peter Hickman
Guest
Posts: n/a
 
      09-15-2004
Being a long time Perl programmer I tend to reach for Perl when I have a
problem to solve. Mainly because I can just grab a module off CPAN and
hack something up.

However whenever I want to write a simulation (population models, music
generators etc.) I go straight for Ruby.

I can hack something up pretty quick in Perl, but I stand a better
chance of maintaining it in Ruby so I get it to work in Perl and then
take the design over to Ruby.



 
Reply With Quote
 
James Edward Gray II
Guest
Posts: n/a
 
      09-15-2004
On Sep 15, 2004, at 9:54 AM, Chris wrote:

> So the question for any hardcore Perl coders out there that have
> converted to Perl (or are fluent in both) is: Is it really worth the
> time? Are the paybacks there? And do you feel you've exceeded your
> capabilities in Perl using Ruby?


You almost sound like you're looking for the "Silver Bullet" of
programming languages. I'll tell you upfront that I don't think there
is one, so you can let that color the rest of what I say...

I would rate myself as a Perl Expert and an Intermediate Ruby
programmer. I've recently "converted" to Ruby in that I'm now using it
for more and more day-to-day tasks.

Everything else that follows is solely my opinion.

I feel Perl has a slight edge in quick and dirty scripting. Simple
things like having to call to_s() on the integers I print or
remembering when to use times() instead of upto() slow me down or trip
me up just a bit. Of course, this is probably my familiarity as much
as anything else. Please don't get me wrong. I'm not complaining
about the Ruby way of doing things, but I do think I throw down a quick
throw-away or one-use script a touch faster in Perl.

On the flip side, Ruby is by far the cleanest most readable language
I've ever worked with. That gives a huge advantage in bigger and long
term projects, I think. I can just read my code, without having to
figure it out all over again. Because of that, I can make changes
easier and maintain software faster.

Related to that, Perl's object system is downright laughable next to
Ruby. Heck Java doesn't stand up that much better. If you're a OO
guy, there's a lot to like in Ruby and I am.

I spend more of my time writing big programs than small scripts, so it
should be clear why I've begun to prefer Ruby.

The other big difference I've noticed is maturity. Perl and especially
the CPAN are quite mature, simply as a function of time. Ruby is still
"young" in places. I view this as a plus and a minus.

When I need a module XYZ, it's not always immediately available, easy
to find, easy to install, or completely finished. The CPAN can often
claim all of those things at once, which is a stunning feat.

Again though, I also view this as a plus. I sometimes feel like 90% of
the problems have already been solved in Perl and there's not a lot of
room let for my mark. I don't feel that way about Ruby. If a module
is missing, I could be the one to write it. This is more a feeling
than anything else, but it's kind of fun to be on the adventurous side
of a young language, to me at least.

You seem concerned with downtime though, so this may not hold true with
you.

Those are just some of my general impressions. Hopefully, they give
you something of what you're looking for.

In the end I suppose you need to ask yourself why you would switch from
Perl to Ruby, and then see if you think Ruby fits that reasoning. Good
luck with your choice.

James Edward Gray II



 
Reply With Quote
 
Bill Guindon
Guest
Posts: n/a
 
      09-15-2004
On Wed, 15 Sep 2004 23:54:51 +0900, Chris <(E-Mail Removed)> wrote:

> I've had this long time infatuation with Ruby and as a fairly proficient
> Perl coder, have even recreated a few "Ruby things" in Perl over the
> last few years. But a couple of "Wow!" factors in Ruby have kept me
> hanging around and I've finally decided that the only way is to ween
> myself off of Perl and just start using Ruby all the way.
>
> This is hard because I can't afford a lot of downtime, which has been
> the biggest strike for me against using Ruby. I'm fairly fast, tight,
> and concise at hitting targets using Perl and I don't want to loose that
> productivity using Ruby. Still, it appears a "hit" has to be taken if I
> really want to learn it as well as I know Perl.


Personally, I don't see it as an either/or thing. I'm learning Ruby
to speed up my coding in another language (Miva - yeah, I know. you've
never heard of it)

So far, my focus has been on building tools for code generation, file
parsing, etc. I can't afford to switch languages, but I think I'll be
much better off with Ruby than without it.

> So the question for any hardcore Perl coders out there that have
> converted to Perl (or are fluent in both) is: Is it really worth the
> time? Are the paybacks there? And do you feel you've exceeded your
> capabilities in Perl using Ruby?


I'm hardly hardcore Perl, but I've done quite a bit of it in the past.
If it was my core today, I'd continue to use it for it's speed,
compatibility with existing code, and to appease other dev's working
in the same environment.

I'd pull Ruby in to handle the grunt work, and to bring truth to the
"quick" in "I'll just write a quick script to do X". Granted, it'll
be some time before that can happen, but I think the minimal syntax
helps for those "quick" needs.

I've started by letting it do my local work where speed/compatibility
isn't important, and I'm using it to generate large blocks of
consistent code in my core language.

> I perceive, from what I've read, that this could be the case. I see all
> these "testimonials" that claim rapid development and this is inticing,
> yet at the same time, having done *some* Ruby coding, this is a little
> hard for me to believe because in my estimation, the paradigm in Ruby is
> entirely different than in just about any other procedural language and
> even from the OO aspects of Perl, C++ and Java. To me, the difference
> between Ruby and just about anything else (common) is the same as when,
> in the development world, many of us made the leap from procedural to
> OO. I think the gap between Ruby and most everything else is that big
> -- as well as the payoffs...?


One of the payoffs is the opportunity to think differently

--
Bill Guindon (aka aGorilla)


 
Reply With Quote
 
Brian Wisti
Guest
Posts: n/a
 
      09-15-2004

--- Chris <(E-Mail Removed)> wrote:

> I didn't even think about asking this question until now, based on a
> paragraph I wrote in another thread, so I thought I would ask...
>
> I've had this long time infatuation with Ruby and as a fairly
> proficient
> Perl coder, have even recreated a few "Ruby things" in Perl over the
> last few years. But a couple of "Wow!" factors in Ruby have kept me
> hanging around and I've finally decided that the only way is to ween
> myself off of Perl and just start using Ruby all the way.
>
> This is hard because I can't afford a lot of downtime, which has been
>
> the biggest strike for me against using Ruby. I'm fairly fast,
> tight,
> and concise at hitting targets using Perl and I don't want to loose
> that
> productivity using Ruby. Still, it appears a "hit" has to be taken
> if I
> really want to learn it as well as I know Perl.
>
> So the question for any hardcore Perl coders out there that have
> converted to Perl (or are fluent in both) is: Is it really worth the
> time? Are the paybacks there? And do you feel you've exceeded your
> capabilities in Perl using Ruby?
>
> I perceive, from what I've read, that this could be the case. I see
> all
> these "testimonials" that claim rapid development and this is
> inticing,
> yet at the same time, having done *some* Ruby coding, this is a
> little
> hard for me to believe because in my estimation, the paradigm in Ruby
> is
> entirely different than in just about any other procedural language
> and
> even from the OO aspects of Perl, C++ and Java. To me, the
> difference
> between Ruby and just about anything else (common) is the same as
> when,
> in the development world, many of us made the leap from procedural to
>
> OO. I think the gap between Ruby and most everything else is that
> big
> -- as well as the payoffs...?
>
> So I'm looking for feedback from those that have converted, esp. from
> a
> hardcore Perl perspective.
>
> Thanks,
> -ceo


I'm not exactly an ex-Perl coder, since I still use Perl everyday at
work and at home. I have found Ruby to be an excellent item in my
toolkit for testing, prototyping, and creating applications where the
corresponding Perl code would risk melting my brain. Note: High risk of
brain-melt results in significant difficulties maintaining code.

More recently, I've also been exploring the use of Ruby as a shell
scripting language. Guess what? The Ruby code is freakishly similar to
the Perl code for accomplishing the same tasks, minus a few punctuation
symbols. This led me to my first assertion of Perl-to-Ruby transition:

Brian Wisti's First Assertion of Perl-to-Ruby Transition
--------------------------------------------------------
"You're probably trying too hard."

Sorry, I just had to make it look all fancy like that for a second. Ego
is a delicate thing, and it demands attention at all times

You don't need to take advantage of every language feature to become
proficient in a language. Heck, I was making useful programs in Perl
for a couple years before I started using references and Perl-style
objects. So look at the list, admire the cleverness of the Ruby gurus
with their management of reflection, continuations, Procs, and whatnot.
Then go make the programs you need to make in the way you know how.
Take advantage of the similarities between Ruby and other languages.
Incorporate the really neat features as you develop an understanding of
them. It's okay if your Ruby code looks a little like Perl at first, or
a little like C++. You'll get the hang of the "right way" as your
knowledge improves.

What's the payoff using Ruby instead of Perl? For me, the end result is
stress reduction. It takes roughly the same amount of effort to create
a small program in the two languages, but progressively less effort to
create Ruby applications as the size and scope of the app increases.
The Principle of Least Surprise means that most things are done like
you would expect them to be (or at least like Matz expects them to be,
which is still more consistent than most languages out there).

It is nice to have legible code, too. I know that "legible" is entirely
subjective, and you don't have to agree with it if you don't want to.
You can make clean code in Perl, but it takes a little more work and a
lot more discipline. Plus, all of the "my/local/our" stuff and shifting
subroutine arguments and list context vs. scalar context (and, and,
...) in Perl starts to look more than a little extraneous, interfering
with your reading of the actual code logic. Since Ruby doesn't use any
of that stuff, it's easier for me to see the meat of the code.

So that's my thoughts. And everybody else has their own thoughts as
well, naturally

Kind Regards,

Brian Wisti
http://www.velocityreviews.com/forums/(E-Mail Removed)


 
Reply With Quote
 
Phil Tomson
Guest
Posts: n/a
 
      09-15-2004
In article <REY1d.17014$(E-Mail Removed) >,
Chris <(E-Mail Removed)> wrote:
>I didn't even think about asking this question until now, based on a
>paragraph I wrote in another thread, so I thought I would ask...
>
>I've had this long time infatuation with Ruby and as a fairly proficient
>Perl coder, have even recreated a few "Ruby things" in Perl over the
>last few years. But a couple of "Wow!" factors in Ruby have kept me
>hanging around and I've finally decided that the only way is to ween
>myself off of Perl and just start using Ruby all the way.
>
>This is hard because I can't afford a lot of downtime, which has been
>the biggest strike for me against using Ruby. I'm fairly fast, tight,
>and concise at hitting targets using Perl and I don't want to loose that
>productivity using Ruby. Still, it appears a "hit" has to be taken if I
>really want to learn it as well as I know Perl.


I don't think that the 'hit' is all that big. When I moved from Perl to
Ruby (as a primary agile programming language; I still use C++ ) after
about 3 days of Ruby coding I actually felt more comfortable and more
productive in Ruby than I had in Perl (and I had been coding in Perl for six
years, including OO Perl). I think that Ruby just 'hangs' together a lot
better. You know all of the methods that will operate on a particular
object of a certain class (or you can easily find out) and there were more
methods available on builtin classes (for example, look at all of the
methods available on Array objects and compare with functions available in
Perl to operate on @list objects).

>
>So the question for any hardcore Perl coders out there that have
>converted to Perl (or are fluent in both) is: Is it really worth the
>time? Are the paybacks there? And do you feel you've exceeded your
>capabilities in Perl using Ruby?
>


First off, I _was_ a big Perl fan, however I haven't used Perl for
anything significant for about 3.5 years now. I've forgotten Perl such
that anytime I look at Perl code these days it just makes my eyes hurt.
So in my case, I made a very clean break from Perl.

To answer your questions: Yes, it's worth the time especially since you
can be productive in Ruby in a day or two. It doesn't take much time to
get productive in Ruby coming from Perl. Sure you'll be coding Perl in
Ruby for the first few months, but keep at it and you'll be learn The Ruby
Way soon enough. The point is, you can be productive in Ruby in a short
time - it may not be code you'll want to show off here on the list, but
it'll get the job done.

Yes, I definately feel that I've exceeded my Perl capabilities. Do OO
Perl for a while and you'll really appreciate moving to Ruby.

>I perceive, from what I've read, that this could be the case. I see all
>these "testimonials" that claim rapid development and this is inticing,
>yet at the same time, having done *some* Ruby coding, this is a little
>hard for me to believe because in my estimation, the paradigm in Ruby is
>entirely different than in just about any other procedural language and
>even from the OO aspects of Perl, C++ and Java.


Yes & no. You mention a mix of agile and static languages. Ruby OO is
much nicer than OO Perl where everything is a do-it-yourself project. OO
in an agile language like Ruby feels much different than in C++ or Java
(you have much more freedom in Ruby).

Phil
 
Reply With Quote
 
Phil Tomson
Guest
Posts: n/a
 
      09-15-2004
In article <(E-Mail Removed)>,
Dick Davies <(E-Mail Removed)> wrote:
>* Chris <(E-Mail Removed)> [0954 15:54]:
>> I didn't even think about asking this question until now, based on a
>> paragraph I wrote in another thread, so I thought I would ask...

>
>> .....I've finally decided that the only way is to ween
>> myself off of Perl and just start using Ruby all the way.

>
>Good on you boy, although your family will starve
>I am still 'Writing Perl for Food', though I hope to start sneaking Ruby under
>the radar here now that I've settled in and earned some credit.


Actually things are changing. This place is hiring Ruby programmers for
Rails work, for example:
http://robotcoop.com/

I know of another Ruby job that is probably still open in my area as well.

I'd vote for making a clean break from Perl. It might be that learning
Ruby and Rails will actually turn out to be a good career move (let's
hope).

Phil
 
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
OT: It's the end of the world as we know it, and I feel... bored. Psychometrically Validated MCSE 14 02-22-2006 05:08 PM
want to search for anyone in the world? Feel curious to know who might be searching for you? nightelves6667@yahoo.com Cisco 0 03-27-2005 06:07 PM
I feel loved and wanted Network Guru MCSE 8 07-23-2004 04:54 PM
Specifying look and feel for embedded windows user control Marina ASP .Net 3 01-28-2004 05:14 PM
Consistent Look and Feel Nick ASP .Net 5 01-15-2004 07:41 AM



Advertisments