[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Real world ruby programs to learn from

Fernando Perez

9/30/2008 1:10:00 PM

Hi,

Can you recommend some Ruby projects in which I can have a look to learn
good Ruby practices / idioms and why not contribute to them? I am fed up
with the stupid code examples we find in books.

The Ruby on Rails code is a bit too complex to start with I guess.
--
Posted via http://www.ruby-....

11 Answers

Lex Williams

9/30/2008 1:27:00 PM

0

Fernando Perez wrote:
> Hi,
>
> Can you recommend some Ruby projects in which I can have a look to learn
> good Ruby practices / idioms and why not contribute to them? I am fed up
> with the stupid code examples we find in books.
>
> The Ruby on Rails code is a bit too complex to start with I guess.

I think http://pl... is the site you need to visit.
--
Posted via http://www.ruby-....

Fernando Perez

9/30/2008 1:36:00 PM

0

Your link seems very interesting and cool to learn from and can very
very helpful to jump from one language to another.
--
Posted via http://www.ruby-....

Robert Klemme

9/30/2008 2:16:00 PM

0

2008/9/30 Fernando Perez <pedrolito@lavache.com>:
> Your link seems very interesting and cool to learn from and can very
> very helpful to jump from one language to another.

I had a quick look at
http://pleac.sourceforge.net/pleac_ruby/processmanageme... and
I must say this is far from correct or ideal. Issues I have spotted
on first check:

readme = IO.popen("ls") # does not use block form

$stdout = writeme # must be $stdout.reopen(writeme)

Process.waitpid(pid, 0) # should come after the read loop otherwise
deadlock may occur

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end

Lex Williams

9/30/2008 2:32:00 PM

0

Robert Klemme wrote:
> 2008/9/30 Fernando Perez <pedrolito@lavache.com>:
>> Your link seems very interesting and cool to learn from and can very
>> very helpful to jump from one language to another.
>
> I had a quick look at
> http://pleac.sourceforge.net/pleac_ruby/processmanageme... and
> I must say this is far from correct or ideal. Issues I have spotted
> on first check:
>
> readme = IO.popen("ls") # does not use block form
>
> $stdout = writeme # must be $stdout.reopen(writeme)
>
> Process.waitpid(pid, 0) # should come after the read loop otherwise
> deadlock may occur
>
> Kind regards
>
> robert

Robert , pleac is "a work in progress" . Anyone can make contributions
to it . It would be great if you would submit corrections to bugs you
found , if you can spare the time , of course .

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

Fernando Perez

9/30/2008 2:51:00 PM

0

> Robert , pleac is "a work in progress" . Anyone can make contributions
> to it . It would be great if you would submit corrections to bugs you
> found , if you can spare the time , of course .
>
> Lex
>
Argh too bad there are not always good coding practices, that's a reason
why I avoid looking at refactormycode for instance, there are too many
funky solutions proposed.
--
Posted via http://www.ruby-....

Robert Klemme

9/30/2008 3:10:00 PM

0

2008/9/30 Lex Williams <etaern@yahoo.com>:
> Robert Klemme wrote:
>> 2008/9/30 Fernando Perez <pedrolito@lavache.com>:
>>> Your link seems very interesting and cool to learn from and can very
>>> very helpful to jump from one language to another.
>>
>> I had a quick look at
>> http://pleac.sourceforge.net/pleac_ruby/processmanageme... and
>> I must say this is far from correct or ideal. Issues I have spotted
>> on first check:
>>
>> readme = IO.popen("ls") # does not use block form
>>
>> $stdout = writeme # must be $stdout.reopen(writeme)
>>
>> Process.waitpid(pid, 0) # should come after the read loop otherwise
>> deadlock may occur
>>
>> Kind regards
>>
>> robert
>
> Robert , pleac is "a work in progress" . Anyone can make contributions
> to it . It would be great if you would submit corrections to bugs you
> found , if you can spare the time , of course .

I know. But time is lacking ATM. :-)

robert

--
remember.guy do |as, often| as.you_can - without end

David A. Black

9/30/2008 5:24:00 PM

0

Hi --

On Tue, 30 Sep 2008, Lex Williams wrote:

> Robert Klemme wrote:
>> 2008/9/30 Fernando Perez <pedrolito@lavache.com>:
>>> Your link seems very interesting and cool to learn from and can very
>>> very helpful to jump from one language to another.
>>
>> I had a quick look at
>> http://pleac.sourceforge.net/pleac_ruby/processmanageme... and
>> I must say this is far from correct or ideal. Issues I have spotted
>> on first check:
>>
>> readme = IO.popen("ls") # does not use block form
>>
>> $stdout = writeme # must be $stdout.reopen(writeme)
>>
>> Process.waitpid(pid, 0) # should come after the read loop otherwise
>> deadlock may occur
>>
>> Kind regards
>>
>> robert
>
> Robert , pleac is "a work in progress" . Anyone can make contributions
> to it . It would be great if you would submit corrections to bugs you
> found , if you can spare the time , of course .

I submitted some suggestions a few years ago, I think involving
switching something so that it used a block, and I was told that that
wouldn't be good because it wasn't similar enough to other languages
to compare.

I got the impression that pleac was mostly Perl being written in a
variety of languages, but I haven't looked at it in a while.


David

--
Rails training from David A. Black and Ruby Power and Light:
Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL
Advancing with Rails January 19-22 Fort Lauderdale, FL *
* Co-taught with Patrick Ewing!
See http://www.r... for details and updates!

Axel Etzold

9/30/2008 7:09:00 PM

0


-------- Original-Nachricht --------
> Datum: Tue, 30 Sep 2008 23:51:18 +0900
> Von: Fernando Perez <pedrolito@lavache.com>
> An: ruby-talk@ruby-lang.org
> Betreff: Re: Real world ruby programs to learn from

> > Robert , pleac is "a work in progress" . Anyone can make contributions
> > to it . It would be great if you would submit corrections to bugs you
> > found , if you can spare the time , of course .
> >
> > Lex
> >
> Argh too bad there are not always good coding practices, that's a reason
> why I avoid looking at refactormycode for instance, there are too many
> funky solutions proposed.
> --
> Posted via http://www.ruby-....

Dear Fernando,

I think a good place to look at many solutions to many problems and sometimes very
insightful comments is the Rubyquiz site:

http://rub...

Best regards,

Axel

--
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzz...

Martin DeMello

9/30/2008 7:58:00 PM

0

On Tue, Sep 30, 2008 at 12:09 PM, Axel Etzold <AEtzold@gmx.de> wrote:
>
> I think a good place to look at many solutions to many problems and sometimes very
> insightful comments is the Rubyquiz site:

Actually, just this once I would not recommend the rubyquiz site - the
programs there aren't written with an eye on maintainability.

martin

Todd Benson

9/30/2008 10:18:00 PM

0

On Tue, Sep 30, 2008 at 2:58 PM, Martin DeMello <martindemello@gmail.com> wrote:
> On Tue, Sep 30, 2008 at 12:09 PM, Axel Etzold <AEtzold@gmx.de> wrote:
>>
>> I think a good place to look at many solutions to many problems and sometimes very
>> insightful comments is the Rubyquiz site:
>
> Actually, just this once I would not recommend the rubyquiz site - the
> programs there aren't written with an eye on maintainability.
>
> martin

I agree with martin. There are only a handful of quizes that have
real-world applicability, and of the answers to those, only a small
percentage exhibiting good coding practices (my own included).

If someone hasn't already mentioned this, look at some of the stdlib
code, and cast your glance over the many projects on rubyforge.

Todd