Ashley Moran
7/8/2006 7:15:00 PM
On Jul 08, 2006, at 6:26 pm, dblack@wobblini.net wrote:
>>> puts "Dir\tProd\tDev\tDiff",
>>> [ prod, dev ].map{|x| x.split(/\s+\S+\n/).map{|s| s.split} }.
>>> transpose.map{|x| x.transpose}.map{|n,s|
>>> [ s[0], n[0], n[1], n[1].to_i - n[0].to_i]}.select{|x|
>>> x[1,2]!=["0","0"]}.sort_by{|x| x[-1]}.map{|x| x.join("\t")}.reverse
>>
>> He's done it in Perl already -- he said more Rubyish :-)
>
> Whoops, my witty repartee was factually inaccurate. s/in Perl/in
> Ruby but in a more typically Perlish style/ :-)
>
>
> David
I actually thought you were being metaphorical with that.. that code
is the most Perlish Ruby I've ever seen.
It's been said a million times that you can write FORTRAN in any
language; judging by the snippet above I think it's fair to say you
can write any language in Ruby!
Ashley