From: gabriele renzi Date: 2003-01-16T06:19:56+09:00 Subject: Re: Ruby advocacy in sigs On Sun, 12 Jan 2003 20:37:40 GMT, Martin DeMello wrote: >Chad Fowler wrote: >Little (72x4) code snippets that were sufficiently eye-catching would be >a nice positive way to do it. Not along the lines of perl's JAPHs, more >like code whose meaning is obvious when you read it, and which is cool >in a "wow - Ruby lets you do it that simply/elegantly/enjoyably?!" sense. >(The Haskell quicksort is a perfect example of the sort of thing I have >in mind). ruby haiku ? this could be wonderful :D >"hello world".gsub(/\w*/) {|match| match.reverse} # => "olleh dlrow" that's not so obvious :) my favourite: 99.downto 1 do |x| puts "#{x} bottles of beer on the wall", " #{x} bottles of beer!", "Take one down, pass it around," end puts "No more bottles of beer on the wall!"