From: "J. Ryan Sobol" Date: 2006-01-05T13:06:08+09:00 Subject: Re: Extreme dynamism examples for showing off Ruby power Many solutions to the latest ruby quiz used breadth-first search, a classic computer science algorithm. There were a wide variety of solutions, filled with neat examples of ruby-isms. I'm sure you can find some gems for your presentation by looking here: http://www.rubyquiz.com/quiz60.html BTW - Here was my solution, which turned instances of Integers into an ad-hoc nodes. http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/173622 ~ ryan ~ On Jan 4, 2006, at 10:03 PM, Dave Symonds wrote: > Hi All, > > I'm giving a presentation to my research group next month about Ruby > (mainly an intro), but seeing as though it's in a Computer Science > department, with plenty of people who have several decades of > programming experience in many different languages, I'm trying to come > up with some examples of (among other things) how Ruby's dynamism can > be taken to extremes. My first thought was satisfying Orwell's famous > "Nineteen Eighty Four" proposition about mathematical adherence to Big > Brother: > > class Fixnum > alias old_plus + > > def +(arg) > if self == 2 and arg == 2 > 5 # INGSOC compliance > else > old_plus(arg) > end > end > end > > > Any improvements, or other neat little examples I can use? I've also > adapted the VCR-proxy example (pimple-class using method_missing to > catch, record and pass on method calls). > > > > Cheers, > > Dave. > >