Ill at home...
Sep. 29th, 2003 11:56 amYou might see a lot of me on LJ today - I've got this cold that's been going around, and sleeping has been troublesome, so I'm alternately fiddling with the computer from bed and sleeping...
Update: And here's the sort of thing I get up to when I should be doing something useful - shaving four characters off the shortest implementation of RC4 in Perl. (Theirs is 193 chars, mine is 189)
Update: And here's the sort of thing I get up to when I should be doing something useful - shaving four characters off the shortest implementation of RC4 in Perl. (Theirs is 193 chars, mine is 189)
#!/usr/bin/perl -0777 sub Q{$s[($_[0]+=$_[1])%=@s]}sub S{@s[$x,$y]=@s[$y,$x]}@k=map hex,pop=~/../g;S Q$y,$k[$x%@k]+Q$x,$_>0for@s=0..255;$x=$y=0;print chr($_^Q S Q$y,Q$x,1)for unpack'C*',<>