I was reading Paul Gregg’s very clear explanation of “classless” ranges comparison when I realized that his code was not as “bare metal” as could be. So, here is the code I’ve been using in nextBBS. It only accepts ranges in the form “x.x.x.x/b” but it’s short and all I needed, really. ?View Code PHPfunction isSubnet($subnet, $ip) { // Classless [...]
Today’s fun and games: let’s swap a few variables without using more variables than necessary. Let me know if you disagree with any of this… ?View Code PHP$a = 1; $b = 2; list($a, $b) = array($b, $a); print "a=$a, b=$b\n"; ?View Code RUBYa = 1 b = 2 a, b = b, a puts "a=#{a}, b=#{b}\n" ?View Code PERLmy [...]
bespin is really an intriguing project. Since I’ve grown frustrated with the inconsistencies between the various code editors that I have been using — I work on Leopard at home and Ubuntu at work — I thought that creating my own editor would be the answer to that. Nothing fancy, mind you. Just something consistent. My first impulse was to [...]






