hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

`ruby -h`.unpack(%w[x558 155ax95 277 1a].join('aX')).join #

by why in cult

The obfuscated code in the advert is a tiny ETA interpreter wizarded by Stephen Sykes in 2004—it took him two years to refactor off the last 81 bytes!

Here’s the code nicely printed:

 i=*$<;_=a=$==-1;i[_].scan(/\w/){!p='htaoinse'=~$&or
 a<0?i<<eval(%w^,>0?i.slice!(a-p):i[p+a] ,,==0||(_=c-2;break), _+2
 ,utc(p), getc||a a=0, ,,-c ,,;i<<p/c;p%c^[p].gsub',',';c,p=p,i.pop
 p'):a=p>6?i<<a&&~0:a*7+p}until(_+=1)/$.!=0

Look for the ensuing flamewar over the wrongness of this all on ruby-talk. Obfuscation still pops up as a controversy. If you let stuff like obfuscated Ruby get under your bonnet, uh.. well.. why is it that you’re wearing a bonnet again?? (whoops, via ~matz.)

said on 22 Feb 2005 at 11:22

right. this is .. wrong.

said on 22 Feb 2005 at 16:39

Wrong, but at the same time so cool. Ruby (with its rich syntax) has some great potential for obfuscation.

Comments are closed for this entry.