Also, somewhere along the line you changed what the program was actually doing - originally you produced a 20x21 grid, but that got reduced to a 20x20. I used this to make sure I didn't change the program during golfing: require 'stringio' out = "" $stdout = StringIO.new(out) srand(1); $><<"\e[2J";s,o,f,c,u=20,"#"," ";b,q=(z=0..s).map{z.map{(rand<0.3)?o:f}}, (m=[-1,0,1])-[0];until c==b;c=b.map{|z|z.dup};$><<"\e[H"<<b.map{|x|x*f}*" ";s.times{|i|s.times{|e|n=((m*2+q).sort.zip(m+q+m).map{|x|(c[i+x[0]]||[ ])[e+x[1]]}-[f,u]).size;b[i][e]=(n==2?b[i][e]:n==3?o:f)}};sleep 0.2;end $stdout = STDOUT #uncomment this to reset the content of the file. #File.open("monkeys","w") {|f| f << out } raise "Different" unless File.read("monkeys") === out > -----Original Message----- > From: cardologist / gmail.com [mailto:cardologist / gmail.com] On > Behalf Of Joey > Sent: Thursday, 4 May 2006 5:16 AM > To: ruby-talk ML > Subject: Re: Golfing a signature. > > I now have my signature! It is 305 charcters long, wit help > from Florian and > Dave! > you can check it out at > http://code.eachmapinject.com/game_of_life_golf.rb > or just below my name! > > Joey > http://eachmapinject.com > > s,o,f,c,u=20,"#"," > ";b=(z=0..s).map{z.map{(rand<0.3)?o:f}};$><<"\e[2J";until > > c==b;$><<"\e[H"<<b.map{|x|x*" > "}*"\n";c=b.map{|z|z.dup};s.times{|i|s.times{| > e|n=(q,z=-1..1,[];q.map{|x|q.map{|y|z<<[x,y]}};(z-=[[0,0]]).ma > p{|x|c[i+x[0]][ > e+x[1]]rescue > u}-[f,u]).size;b[i][e]=(n==2?b[i][e]:n==3?o:f)}};sleep 0.2;end >