-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 And shorter and shorter and: Based on my solution and the ideas from email55555 1. Removed split("").map..... I'm using each_byte now ( z*7 to z*7-336) 2. replaced x==1?1:4 with h=x*4/3 2. replaced x==1?2:5 with h+1 ;) 3. replaced <<f with +f 4. repalced ~ y[1,1]*=s ~ y[2+s,1]*=s with ~ y[3,1]*=s ~ y[1,1]*=s 323 byte: ### (this is 100bytes shorter than my first solution) s=$*.index("-s");s=(s ?$*.slice!(s,2)[1].to_i: 2) i=$*.join d,="7krtt1r30v/s".unpack("m")[0].unpack("B*") f=" " a,b=f*s,f+"-"*s+f c,e,o="|",a+f+f,49 y=([0]*5).map{""} i.each_byte{|z|u=d[z*7-336,7] 3.times{|x|y[x*2]<<(u[x*3]<o ?e:b)+f} [1,3].each{|x|y[x]<<(u[h=x*4/3]<o ?f:c)+a+(u[h+1]<o ?f:c)+f}} y[3,1]*=s y[1,1]*=s puts y ### -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB4Z4a5YRWfc27RzQRAki9AJ4jtcBX1JueoJM+tXn6V2tMahXhOACgx3Km 5tUh3zTWjIpRjbZDgQ6WUX8= =HbPU -----END PGP SIGNATURE-----