From: Tim Pease Date: 2009-05-22T04:18:17+09:00 Subject: Re: w00t! Party for Gregory! On Thu, May 21, 2009 at 1:03 PM, Tim Pease wrote: > On Thu, May 21, 2009 at 9:42 AM, pat eyler wrote: >>> On May 20, 2009, Gregory Brown wrote: >>> > On Wed, May 20, 2009, Juan Zanos 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 so well 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. My efforts at humor are wrought with bugs. More coffee is needed. TwP