[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

PLEAC - Programming Language Examples Alike Cookbook

Nando Sanchez

3/18/2007 5:14:00 PM

Hi! I've been researching about dynamic languages and a couple of weeks
ago I decided that Ruby is the best... I guess most of you guys will
agree :) Well, one of the pages I found is http://pleac.source...
where there is a very interesting effort to create code working examples
to compare different languages. I'm a Ruby newbee and I'll try to help
as much as I can to fill in the blanks for Ruby, but I think there must
be a lot more experts that can provide great examples, so ... please
help! I don't like to see Python above Ruby, I know it's not real, it's
just a %, but Ruby is a lot better and deserves 1st place ;)

Regards,

Nando

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

5 Answers

John Joyce

3/19/2007 9:39:00 AM

0

For some basic structures, this is not a bad idea, but unfortunately
for many things Ruby code and approach is often pretty different from
similar programs in other languages. It's apples and oranges, they're
all fruit. It's not a competition really. Languages that are really
good at something will stick around because they're good at things in
their own way. After enough code is created in a language, it's going
to be around for a LONG time. The unbelievably long life of legacy
code was proven by the Y2K crisis. Sometimes a particular language is
the right choice for a particular task or just for the particular
situation.
If you have 3 people skilled in Python and C and PERL and a project
that works with existing COBOL to work on you might not choose Ruby
as a tool, but you might.
On Mar 19, 2007, at 2:14 AM, Nando Sanchez wrote:

> Hi! I've been researching about dynamic languages and a couple of
> weeks
> ago I decided that Ruby is the best... I guess most of you guys will
> agree :) Well, one of the pages I found is http://
> pleac.sourceforge.net/
> where there is a very interesting effort to create code working
> examples
> to compare different languages. I'm a Ruby newbee and I'll try to help
> as much as I can to fill in the blanks for Ruby, but I think there
> must
> be a lot more experts that can provide great examples, so ... please
> help! I don't like to see Python above Ruby, I know it's not real,
> it's
> just a %, but Ruby is a lot better and deserves 1st place ;)
>
> Regards,
>
> Nando
>
> --
> Posted via http://www.ruby-....
>


dblack

3/19/2007 11:53:00 AM

0

Hi --

On 3/19/07, John Joyce <dangerwillrobinsondanger@gmail.com> wrote:
> For some basic structures, this is not a bad idea, but unfortunately
> for many things Ruby code and approach is often pretty different from
> similar programs in other languages.

Moreover, unless the PLEAC philosophy has changed, my impression was
that they were interested mainly in how to do things in a Perl-like
way in other languages. I seem to remember suggesting a rewrite of
one of the Ruby examples to use a block, or something along those
lines, and being told that they weren't aiming to illustrate the
individual features of separate languages. To the extent, great or
small, that PLEAC is constrained to play in Perl's ballpark in terms
of constructs and idioms, I don't think it's of much interest. I
haven't examined it in great detail recently, though.


David

--
Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning...)
(See what readers are saying! http://www.r.../r...)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.r...)

Rick DeNatale

3/19/2007 1:10:00 PM

0

On 3/19/07, David A. Black <dblack@wobblini.net> wrote:
> Hi --
>
> On 3/19/07, John Joyce <dangerwillrobinsondanger@gmail.com> wrote:
> > For some basic structures, this is not a bad idea, but unfortunately
> > for many things Ruby code and approach is often pretty different from
> > similar programs in other languages.
>
> Moreover, unless the PLEAC philosophy has changed, my impression was
> that they were interested mainly in how to do things in a Perl-like
> way in other languages. I seem to remember suggesting a rewrite of
> one of the Ruby examples to use a block, or something along those
> lines, and being told that they weren't aiming to illustrate the
> individual features of separate languages. To the extent, great or
> small, that PLEAC is constrained to play in Perl's ballpark in terms
> of constructs and idioms, I don't think it's of much interest. I
> haven't examined it in great detail recently, though.

Hmmmmm,

Might be interesting to come up with a similar set of examples which
highlight the ruby way of doing things and then challenge others to
replicate the ruby code in other languages.

Just a thought.




--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denh...

Chad Perrin

3/19/2007 6:20:00 PM

0

On Mon, Mar 19, 2007 at 10:10:05PM +0900, Rick DeNatale wrote:
> On 3/19/07, David A. Black <dblack@wobblini.net> wrote:
> >Hi --
> >
> >On 3/19/07, John Joyce <dangerwillrobinsondanger@gmail.com> wrote:
> >> For some basic structures, this is not a bad idea, but unfortunately
> >> for many things Ruby code and approach is often pretty different from
> >> similar programs in other languages.
> >
> >Moreover, unless the PLEAC philosophy has changed, my impression was
> >that they were interested mainly in how to do things in a Perl-like
> >way in other languages. I seem to remember suggesting a rewrite of
> >one of the Ruby examples to use a block, or something along those
> >lines, and being told that they weren't aiming to illustrate the
> >individual features of separate languages. To the extent, great or
> >small, that PLEAC is constrained to play in Perl's ballpark in terms
> >of constructs and idioms, I don't think it's of much interest. I
> >haven't examined it in great detail recently, though.
>
> Hmmmmm,
>
> Might be interesting to come up with a similar set of examples which
> highlight the ruby way of doing things and then challenge others to
> replicate the ruby code in other languages.
>
> Just a thought.

. . or just check again on whether they'll accept Ruby examples that
illustrate a Ruby idiom -- assuming the answer is still "no", archive
the answer, then:

1. Create a site dedicated to solving the same problems in the Ruby
idiom within Ruby.

2. Post the text of the "no" answer on the site.

3. Consider letting other languages play without forcing them to
adhere to your own language's idiomatic methodologies.

If the answer is now "yes", just contribute to PLEAC.

--
CCD CopyWrite Chad Perrin [ http://ccd.ap... ]
"There comes a time in the history of any project when it becomes necessary
to shoot the engineers and begin production." - MacUser, November 1990

M. Edward (Ed) Borasky

3/19/2007 9:13:00 PM

0

Nando Sanchez wrote:
> Hi! I've been researching about dynamic languages and a couple of weeks
> ago I decided that Ruby is the best... I guess most of you guys will
> agree :) Well, one of the pages I found is http://pleac.source...
> where there is a very interesting effort to create code working examples
> to compare different languages. I'm a Ruby newbee and I'll try to help
> as much as I can to fill in the blanks for Ruby, but I think there must
> be a lot more experts that can provide great examples, so ... please
> help! I don't like to see Python above Ruby, I know it's not real, it's
> just a %, but Ruby is a lot better and deserves 1st place ;)
>
> Regards,
>
> Nando
>
Rather than messing with comparing Ruby with other languages and
programming examples, just get one of the cookbook-style Ruby books and
the Pickaxe book and learn by example! I'd recommend "The Ruby Way,
Second Edition" and "Programming Ruby, Second Edition" to start with.


--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blo...

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.