Japanese numeral for Ruby kaigi by murky-satyr

stdin linesDo:[:x|O:=''.X:=x.{'?\xe5\x8d\x83'.'?\xe7\x99\xbe'.'?\xe5\x8d\x81'.'$'}do:[:r|N:=0.X=~('(.)',r,'(.*)')ifMatched:[:m|N:=1.X:=m at:2.nil=(D:=m at:1)or:[N:='\x80\x8c\x89\x9b\x94\xad\x83\xab\x9d'indexOf:D first]].O:=O,(#[],{48+N})].O asNumber printNl]

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

download

return to the top page