Batten down the patches| fdiv.net
Every now and then, I find myself running a program and think “You know what would be really cool? What if, whenever function is called, MyFunction was called instead? Wouldn’t that be great?!” This thought has rolled around in my head for years, but accomplishing it always seemed to come with baggage I didn’t want to deal with, or complexities I didn’t understand. Using linkers and Objective-C runtime tricks to swap functions is something I’ve done with reckless abandon for d...| fdiv.net
Mach exception handlers allow for some pretty fun magic that can be both dangerous and terrifying. They’re also pretty undocumented, and the various examples that float around out there are generally incomplete, are for ancient architectures, or just don’t work. All this is part of the charm that makes them fun.| fdiv.net
I first learned about this incident several years after I moved to Athens, from a chatty HVAC repairman. I was reminded of it last weekend when I saw a mural depicting famous people from nearby Nelsonville, in which Bernie Mac’s grandmother was conspicuously absent.| fdiv.net
Table of Contents| fdiv.net
Table of Contents| fdiv.net
Unix has all kinds of pessimizations that seemed really cool in the 1970s when they were introduced. One of them is ATime.| fdiv.net
When we last left off, we were able to cook up a service name of our choosing, and resolve it from a client. If we hooked up launchd stuff, we could also make it demand-launch (maybe that’s for another day). But we didn’t actually do anything with that resolution. There are several reasons for that, first, because actually crafting a message and sending/receiving it was covered by a prior article. But even more than that, there are actually a substantial number of design decisions aro...| fdiv.net
Recently a friend and fellow programmer asked me how I learn a new language or platform. I answered that I do it with specific task in mind. Basically, I bumble along googling every little step until I complete my task. But I forgot to tell her about the pitfall of this method…| fdiv.net
During my time at Apple, I dealt with a lot of rather low-level systems treachery. It’s poorly documented, even internally, and asking for help has roughly even odds on getting a passive aggressive non-answer.| fdiv.net
On June 30, 1987, when Delta Flight 810 had risen to about 1700 feet after taking off from LAX, the pilot reached for a switch to give him manual control of the throttle. In a butterfingers or butterbrains move, he accidentally flipped two nearby switches that shut off fuel to both of the plane’s engines. The crew spent the next 60 seconds scrambling to restart the engines, as passengers felt the plane drop about a thousand feet and prepared for a crash. The crew managed to get the engines ...| fdiv.net
I like filling out forms. No, really, I do. I like how a complicated task like “record your medical history” or “file your income taxes” is broken down into small, discrete steps. I like the clear expectations about what I should and shouldn’t say.| fdiv.net
Recently I was adding a photo gallery page to a Drupal 9 site. The markup for each photo looked something like this1:| fdiv.net
(This is a sort of simplified retelling of http://fdiv.net/2011/01/14/machportt-inter-process-communication with some added lore. You should probably start there.)| fdiv.net