3 added 55 characters in body edited Jul 16 '11 at 19:13 boothby 8,11522 gold badges2828 silver badges5555 bronze badges Python + Piet one-liners: 417 chars + 7391 7107 executing codels This Python script produces a 7393 x 2 image; the rightmost 2x2 block of which is a "sentinel" which terminates the program; so I'm not counting those; and the second row is otherwise white. I can probably golf the piet code down further by using characters with lower Hamming weight, and perhaps using Knuth's power tree for my addition/subtraction/multiplication chains instead of the naive binary algorithm... but I don't want to give away a solution to a future puzzle. I'm not going to post the image here, because of its ridiculous dimensions. If you want to see it, run the python code, and pipe the output to a .ppm file. Then, convert the .ppm to a .gif, and run the output at Rapapaing. (alternately, use a non-web Piet interpreter that groks .ppm) A='P=lambda A:reduce(lambda(D,H,B),P:(D[P/3:]+D[:P/3],H[P%3*2:]+H[:P%3*2],B+"".join("%i "%H[(D[0]/P)%2]for P in[1,2,4])),map(" A ! @ B".find,A),([1,3,2,6,4,5],[0,192,192,255,0,255],"P3 %i 2 255 "%(len(A)+2)))[2]+"255 "*4+"0 0 "+"255 "*len(A)*3+"255 0 0 "*2;B=lambda D:["@!%s","@@!%s!"][D%2]%B(D/2)if 1.,:@$?#!".find,"="+s): C=C[x//3:]+C[:x//3];V=V[x%3*2:]+V[:x%3*2] for i in [1,2,4]:R+="%i "%V[(C[0]//i)%2] return R+"255 "*4+"0 0 "+"255 "*l*3+"255 0 0 "*2 p=lambda x:[":+%s","::+%s+"][x%2]%p(x/2)if x/2 else"" print P("".join("|%s!"%k(ord(c))for c in "s="+s+";exec s[:-13]")) exec s[:-13]""" exec s[:-13]  Python + Piet one-liners: 417 chars + 7391 7107 executing codels This Python script produces a 7393 x 2 image; the rightmost 2x2 block of which is a "sentinel" which terminates the program; so I'm not counting those; and the second row is otherwise white. I can golf the piet code down further by using characters with lower Hamming weight, and perhaps using Knuth's power tree for my addition chains. I'm not going to post the image here, because of its ridiculous dimensions. If you want to see it, run the python code, and pipe the output to a .ppm file. Then, convert the .ppm to a .gif, and run the output at Rapapaing. (alternately, use a non-web Piet interpreter that groks .ppm) A='P=lambda A:reduce(lambda(D,H,B),P:(D[P/3:]+D[:P/3],H[P%3*2:]+H[:P%3*2],B+"".join("%i "%H[(D[0]/P)%2]for P in[1,2,4])),map(" A ! @ B".find,A),([1,3,2,6,4,5],[0,192,192,255,0,255],"P3 %i 2 255 "%(len(A)+2)))[2]+"255 "*4+"0 0 "+"255 "*len(A)*3+"255 0 0 "*2;B=lambda D:["@!%s","@@!%s!"][D%2]%B(D/2)if 1.,:@$?#!".find,"="+s): C=C[x//3:]+C[:x//3];V=V[x%3*2:]+V[:x%3*2] for i in [1,2,4]:R+="%i "%V[(C[0]//i)%2] return R+"255 "*4+"0 0 "+"255 "*l*3+"255 0 0 "*2 p=lambda x:[":+%s","::+%s+"][x%2]%p(x/2)if x/2 else"" print P("".join("|%s!"%k(ord(c))for c in "s="+s+";exec s[:-13]")) exec s[:-13]""" exec s[:-13]  Python + Piet one-liners: 417 chars + 7391 7107 executing codels This Python script produces a 7393 x 2 image; the rightmost 2x2 block of which is a "sentinel" which terminates the program; so I'm not counting those; and the second row is otherwise white. I can probably golf the piet code down further by using addition/subtraction/multiplication chains instead of the naive binary algorithm... but I don't want to give away a solution to a future puzzle. I'm not going to post the image here, because of its ridiculous dimensions. If you want to see it, run the python code, and pipe the output to a .ppm file. Then, convert the .ppm to a .gif, and run the output at Rapapaing. (alternately, use a non-web Piet interpreter that groks .ppm) A='P=lambda A:reduce(lambda(D,H,B),P:(D[P/3:]+D[:P/3],H[P%3*2:]+H[:P%3*2],B+"".join("%i "%H[(D[0]/P)%2]for P in[1,2,4])),map(" A ! @ B".find,A),([1,3,2,6,4,5],[0,192,192,255,0,255],"P3 %i 2 255 "%(len(A)+2)))[2]+"255 "*4+"0 0 "+"255 "*len(A)*3+"255 0 0 "*2;B=lambda D:["@!%s","@@!%s!"][D%2]%B(D/2)if 1.,:@$?#!".find,"="+s): C=C[x//3:]+C[:x//3];V=V[x%3*2:]+V[:x%3*2] for i in [1,2,4]:R+="%i "%V[(C[0]//i)%2] return R+"255 "*4+"0 0 "+"255 "*l*3+"255 0 0 "*2 p=lambda x:[":+%s","::+%s+"][x%2]%p(x/2)if x/2 else"" print P("".join("|%s!"%k(ord(c))for c in "s="+s+";exec s[:-13]")) exec s[:-13]""" exec s[:-13]  2 added 101 characters in body edited Jul 14 '11 at 22:20 boothby 8,11522 gold badges2828 silver badges5555 bronze badges Python + Piet one-liners: 417 chars + 73917391 7107 executing codelss='P=lambdaA='P=lambda sA:reduce(lambda(RD,CH,VB),xP:(R+""D[P/3:]+D[:P/3],H[P%3*2:]+H[:P%3*2],B+"".join("%i "%V["%H[(C[0]D[0]/iP)%2]for iP in[1,2,4]),C[x/3:]+C[:x/3],V[x%3*2:]+V[:x%3*2]),map("=|^+-*/%~>.,:@$?#!".find,s),("P3 %iA 2! 255 "%(len(s)+2 @ B".find,A),([1,3,2,6,4,5],[0,192,192,255,0,255],"P3 %i 2 255 "%(len(A)+2)[0]+"255))[2]+"255 "*4+"0 0 "+"255 "*len(sA)*3+"255 0 0 "*2;p=lambda"*2;B=lambda x:["D:+%s"["@!%s","::+%s+"][x%2]%p"@@!%s!"][D%2]%B(xD/2)if x/21.,:@\$?#!".find,"="+s): C=C[x//3:]+C[:x//3];V=V[x%3*2:]+V[:x%3*2] for i in [1,2,4]:R+="%i "%V[(C[0]//i)%2] return R+"255 "*4+"0 0 "+"255 "*l*3+"255 0 0 "*2 p=lambda x:[":+%s","::+%s+"][x%2]%p(x/2)if x/2 else"" print P("".join("|%s!"%k(ord(c))for c in "s="+s+";exec s[:-13]")) exec s[:-13]""" exec s[:-13]