# PLEAC - Programming Language Examples Alike Cookbook

**URL:** <https://www.ruby-forum.com/t/pleac-programming-language-examples-alike-cookbook/89210>\
**Category:** Ruby\
**Created:** [March 18, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/pleac-programming-language-examples-alike-cookbook/89210 "2007-03-18T18:13:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nando](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/77aa72/32.png) [@nando](https://www.ruby-forum.com/u/nando)\
**Post date:** [March 18, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/pleac-programming-language-examples-alike-cookbook/89210/1 "2007-03-18T18:13:59Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![nando](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/77aa72/32.png) [@nando](https://www.ruby-forum.com/u/nando)\
**Post date:** [March 19, 2007, 10:39am UTC](https://www.ruby-forum.com/t/pleac-programming-language-examples-alike-cookbook/89210/2 "2007-03-19T10:39:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nando](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/77aa72/32.png) [@nando](https://www.ruby-forum.com/u/nando)\
**Post date:** [March 19, 2007, 12:54pm UTC](https://www.ruby-forum.com/t/pleac-programming-language-examples-alike-cookbook/89210/3 "2007-03-19T12:54:42Z")

</div>

Hi –

On 3/19/07, John J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![nando](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/77aa72/32.png) [@nando](https://www.ruby-forum.com/u/nando)\
**Post date:** [March 19, 2007, 7:20pm UTC](https://www.ruby-forum.com/t/pleac-programming-language-examples-alike-cookbook/89210/4 "2007-03-19T19:20:18Z")

</div>

On Mon, Mar 19, 2007 at 10:10:05PM +0900, Rick DeNatale wrote:

> > way in other languages. I seem to remember suggesting a rewrite of  
> > 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.

---

<div class="post-metadata">

**Author:** ![nando](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/77aa72/32.png) [@nando](https://www.ruby-forum.com/u/nando)\
**Post date:** [March 19, 2007, 10:14pm UTC](https://www.ruby-forum.com/t/pleac-programming-language-examples-alike-cookbook/89210/5 "2007-03-19T22:14:25Z")

</div>

Nando S. wrote:

> 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.blogspot.com/](http://borasky-research.blogspot.com/)

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

---

<div class="post-metadata">

**Author:** ![nando](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/77aa72/32.png) [@nando](https://www.ruby-forum.com/u/nando)\
**Post date:** [March 19, 2007, 2:11pm UTC](https://www.ruby-forum.com/t/pleac-programming-language-examples-alike-cookbook/89210/6 "2007-03-19T14:11:40Z")

</div>

On 3/19/07, David A. Black [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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.denhaven2.com/](http://talklikeaduck.denhaven2.com/)
