On Thu, May 21, 2009 at 1:03 PM, Tim Pease <tim.pease / gmail.com> wrote:
> On Thu, May 21, 2009 at 9:42 AM, pat eyler <pat.eyler / gmail.com> wrote:
>>> On May 20, 2009, Gregory Brown wrote:
>>> > On Wed, May 20, 2009, Juan Zanos <juan_zanos / talkhouse.com> wrote:
>>
>>> > So you have better designs compared to those who seek further conciseness in
>>> > a language. If only those folks of poor ability could design soell as
>>> > you.
>>
>>> That's right.  I'm pretty awesome.  Maybe RubyTalk can throw a party
>>> in honor of me!
>>
>>
>> I say we do it. We should all celebrate Greg's awesomeness. Wherever you
>> are, take 5 minutes to party wildly and think of Greg.
>>
>
>  cat party.rb
>
> class Party
> @@styles = [
>  'Party, Greg, Party!!',
>  'Dance, Greg, Dance!!',
>  'Woot!!!',
>  'Wild Dancing Greg Party!',
>  '--< Chunky Bacon >--'
> ]
>
> def for_greg
>  puts @@styles.at(rand(@@styles.length))
> end
>
> def party( time )
>  start = Time.now
>  Thread.new {
>   loop {
>    self.for_greg
>    break if Time.now-start >= time
>   }
>  }
> end
> end
>
>
> 300.times {
> unless fork
>  Party.new.party(1)
> end
> }
>
> Process.waitall
>
> puts %q(That's right. I'm pretty awesome. Maybe RubyTalk can throw a
> party in honor of me!)
>
>

Hmmm ... I just created an infinitely spawning script! Need an exit!
after the "Party.new.party(1)" line; otherwise each forked child will
drop through back into the 300.times loop and start the process all
over again.

<sigh>

My efforts at humor are wrought with bugs. More coffee is needed.

TwP