Hacked (yes really).
August 2nd, 2009
Hey readers - I want to apologize to anyone who tried to get to my last post and got a bunch of spam for cheap foreign pharmaceuticals instead. That certainly wasn't my intention (when I sell out, it won't be for gasex pills) and I'm taking steps to guard against this sort of thing in the future. If you want specifics on the hack, the best thread I've seen so far is here.
Sincerely,
-Rob
Modulo Grids
August 1st, 2009
Here's a quick optimization for people making grids of things. The traditional method is a pair of loops, nested to make rows and columns:
This can be simplified and sped up by taking advantage of the relationship between division and modulus to generate the row and column dynamically:
By upgrading to loop-invariants, we can cut the nested for-loop for a nice boost. And, as a bonus, this new code can work with sets that don't end squarely at the end of a column.
