#!ruby -p0 gsub('.'){(0..8).count{|k|($/*18+$_)[$`.size+k%3+k/3*17]==?*}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page