Japanese numeral for Ruby kaigi by gunjisatoshi (kaigi)

$KCODE='u'\x0d
require 'kconv'\x0d
$<.read.map{|i|a=i.toutf8.match(/(.?\xe5\x8d\x83)?(.?\xe7\x99\xbe)?(.?\xe5\x8d\x81)?(.+)?/).to_a.map{|i|i ?{'\xe4\xb8\x80',1,'\xe4\xba\x8c',2,'\xe4\xb8\x89',3,'\xe5\x9b\x9b',4,'\xe4\xba\x94',5,'\xe5\x85\xad',6,'\xe4\xb8\x83',7,'\xe5\x85\xab',8,'\xe4\xb9\x9d',9,'\xe5\x8d\x81',1,'\xe7\x99\xbe',1,'\xe5\x8d\x83',1}[i.split(//)[0]]:0}\x0d
p a[1]*1000+a[2]*?d+a[3]*10+a[4]}

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

download

return top