2003/05/09

I'm such a geek.

Here's what I wrote (well, printed out and taped) in a work-boy's birthday card:


sub d {@a=@_;@b=();foreach $a(@a){push @b,chr($a);}return join "", @b; } $hm =
"72-97-112-112-121-32-66-105-114-116-104-100-97-121-32-74-111-104-110-33-32-".
"32-89-111-117-39-114-101-32-116-104-101-32-99-111-111-108-101-115-116-33";
$pm = "80-97-114-116-121-32-111-118-101-114"; @hd=split /-/,$hm; @pd=split /-/
,$pm; $a1="\33[2J\33[10;0;f ".d(@pd)." here!\n /\n \\0\\"." "x49 .
"/0/\n | ".d(@hd)." |"." "x11 ."\n //"." "x50 ."//"."\n"x8; $a2 =
"\33[2J\33[10;0;f\n\n /0/"." "x49 ."\\0\\ - ".d(@pd)."\n | ".d(@hd).
" | there!\n \\\\"." "x50 ."\\\\"."\n"x8; while(1){print$a1;sleep(1);
print$a2;sleep(1);}


When you run it, it displays some little dancing stick men (two frames of animation) and says a little Happy Birthday message. (Ah... I just learned some HTML):


Party over here!
/
\0\ /0/
| Happy Birthday John! You're the coolest! |
// //



The second frame of animation, of course, has the guys arms and legs going the other way, and the second guy is saying "Party over there!" Good stuff.

I did this for him last year (albeit with a much simpler script) and he got a kick out of decoding it. This is pretty straightforward, but obfuscated enough to hide it from a casual glance.

Happy Friday!

No comments: