This is my golf-ed solution for generating a munching square (https://en.wikipedia.org/wiki/Munching_square). Even abused PPM image format (https://en.wikipedia.org/wiki/Netpbm_format#PPM_example) parsers tolerance. This example requires imagemagick for display:
gawk 'BEGIN{s=256;print("P3\n"s,s"\n"s-1);for(;x<s;x++)for(y=0;y<s;y++){b=xor(x,y);print(0,b,b)}}' | display
And this is what you get: