slope lines by leonid

a=$<.map &:chop
2.upto($.){|i|a[-i]=a[-i].ljust~-a[1-i].size}
(1-a[0].size).upto(7){|i|c=-1
puts"  "*i.abs+(a.map{|k|k[c-i,1]if~-i<c+=1}-[p,""])*"   "}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top