From: "Brian Schröder" Date: 2004-12-08T21:06:05+09:00 Subject: Re: Duck images On Wed, 8 Dec 2004 12:22:22 +0900 Eirikur Hallgrimsson wrote: > I am having the worst time getting these cute little things to work. > Pasting into irb is almost working for me. I think it's a problem > with line wrapping inside code which is pretty hard for me to read > to begin with. Is there some way to cast these into a canonical form > that will survive their trip through email and cut and paste? > > Eirikur After some further golfing borrowing heavily from Dave and T. Onoma. I have on your demand line broken versions that you should be able to cut and paste into irb. For me it does work only in a standard xterm, uxterm is failing because it does interpret the "�" wrongly. Exchange this against another symbol, e.g. " to make it work. regards, Brian # Franks Original Version: 186 Bytes s="\033[2J\033[0;0H _\n Quack! >(')____,\n (` =~~/\nv^v^v^v^v^`---'v^v^v^v^";(1..(1/0.0)).each{|i|s[23,6]=(i%2)==0?"Quack!":" "*6;s.tr!('>v^^v<','<^vv^>');puts s;sleep 1} # Packed (RLE) and enhanced: 203 Bytes # Remove newlines s="\e[2J\e[0;0H"+" 30_\n 21Quack! >(*)_4,\n 29(` =~2/\nw15`-3'w15\n w33\n".gsub(/(.)(\d+)/){$1*$2.to_i}.gsub('w','v^');i=0;loop{s[63,6]=i&1>0?'Qua ck!':' '*6;s.tr!(t='*.>v^<,�',t.reverse);$><(*)_4,\n 29(` =~2/\nw15`-3'w15\n w33 ".gsub(/(.)(\d+)/){$1*$2.to_i}.gsub('w','v^');i=0;loop{s[63,6]=i&1>0? 'Quack!':' '*6;s.tr!(t='*.>v^<,�',t.reverse);$><0?'Quack!':' '*6;s.tr!(t='*.>v^<,�',t.reverse);$><0?'Quack!':' '*6;s.tr!(t= '*.>v^<,�',t.reverse);$><0?'Quack!':' '*6;s.tr!(t= '*.>v^<,"',t.reverse);$><