Langtons Ant by leonid

s="%#{k="\x11
."[z=id%3]}s"%$/*x='\xc4"'[z]||$$
gets.to_i.times{x+=[k,-1,-k,1][3&$.-=1|s[x]^=3]}
$><<s

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

download

return top