Branchless hex-to-decimal conversion hack
via @simonebordet, on the mechanical-sympathy list: ((c & 0x1F) + ((c >> 6) * 0x19) – 0x10)
(tags: hacks one-liners coding performance optimization hex conversion numbers ascii)
A sampling profiler for your daily browsing – Google Groups
via Ilya Grigorik: Chrome Canary now has a built-in, always-on, zero-overhead code profiler. I want this in my server-side JVMs!
(tags: chrome tracing debugging performance profiling google sampling-profiler javascript blink v8)
-
from tonx. Good advice
-
‘The web’s only open collection of legal contracts and the best way to negotiate and sign documents online’. (via Kowalshki)
(tags: via:kowalshki business documents legal law contracts)
How an emulator-fueled robot reprogrammed Super Mario World on the fly
Suffice it to say that the first minute-and-a-half or so of this [speedrun] is merely an effort to spawn a specific set of sprites into the game’s Object Attribute Memory (OAM) buffer in a specific order. The TAS runner then uses a stun glitch to spawn an unused sprite into the game, which in turn causes the system to treat the sprites in that OAM buffer as raw executable code. In this case, that code has been arranged to jump to the memory location for controller data, in essence letting the user insert whatever executable program he or she wants into memory by converting the binary data for precisely ordered button presses into assembly code (interestingly, this data is entered more quickly by simulating the inputs of eight controllers plugged in through simulated multitaps on each controller port).
oh. my. god. This is utterly bananas.(tags: games hacking omgwtfbbq hacks buffer-overrun super-mario snes security)
Nassim Taleb: retire Standard Deviation
Use the mean absolute deviation […] it corresponds to “real life” much better than the first—and to reality. In fact, whenever people make decisions after being supplied with the standard deviation number, they act as if it were the expected mean deviation.’ Graydon Hoare in turn recommends the median absolute deviation. I prefer percentiles, anyway ;)
(tags: statistics standard-deviation stddev maths nassim-taleb deviation volatility rmse distributions)
Mathematical Purity in Distributed Systems: CRDTs Without Fear
Via Tony Finch. Funnily enough, the example describes Swrve: mobile game analytics, backed by a CRDT-based eventually consistent data store ;)
(tags: storage crdts semilattice idempotency commutativity data-structures distcomp eventual-consistency)