Proactive Peek & Reveal on Edge Hover

Screen capture video showing an attempt to grab the scroll handle and how it's foiled by Proactive Peak stealing the click away to resize a previously-closed sidebar.

These are two misfeatures that appeared in macOS Sonoma (I believe). They are where a closed sidebar forces its way back into view temporarily, if the mouse comes to rest near the relevant edge of the window. It’s easy to see how some UI designer thought this was a good idea. Surely if you move… Read more

SwiftUI drag & drop does not support file promises

SwiftUI doesn’t offer anything equivalent to NSFilePromiseProvider, i.e. to write data to the drop destination. You have to ditch SwiftUI and use AppKit’s drag & drop APIs instead. FB13583826. Is that it? I know that’s not a very helpful in some sense, but I wasted days trying to figure out how to implement this very… Read more

Creating files safely in Mac apps

Creating a file is a pretty basic and conceptually simple task, that many applications do (whether they realise it or not – library code often does this too, at least for temporary files such as caches or for communicating between programs). So you’d think it’d be trivial to do correctly. Alas, it is not. ☝️… Read more

Reminder: macOS system frameworks binaries are hidden (since Big Sur)

Every now and again I’ll go to do something really innocuous with an Apple framework, like disassemble it in Hopper or check the link headers. And every. single. time. I forget that Apple did some really weird shit in Big Sur, and removed the binaries. $ ls -lh /System/Library/Frameworks/AppKit.framework/Versions/Current/AppKit ls: /System/Library/Frameworks/AppKit.framework/Versions/Current/AppKit: No such file or… Read more

cloudinit breaks connections from localhost to Plesk-operated web servers

I don’t know how or why it is even installed – perhaps part of the provided Ubuntu image from my VPS host – but cloud-init (a.k.a “cloud-config”) is a bit obnoxious. At [re]boot time (best I can tell), it resets /etc/hosts based on some random template it has (/etc/cloud/templates/hosts.debian.tmpl in my case, even though that… Read more

How to install ImageMagick 7 for WordPress under Plesk Obsidian on Ubuntu 22.04

The ImageMagick logo: a stout blue-robed wizard, with huge white beard and moustache, point a wand up and to the left where the words "Image Magick" arc across, surrounded by gold stars.

Why should I do this? WordPress relies on either ImageMagick or GD for its ability to read & write images. It prefers ImageMagick, as ImageMagick supports a much wider range of files, tends to be faster, and some assert that it produces higher quality files. ImageMagick 6 was superseded by ImageMagick 7 nearly a decade… Read more

SwiftUI main thread hang detector

Illustration of the MacOS Spinning Pinwheel of Death cursor

This is just a little snippet that is quite useful for reporting when your GUI thread (the main thread / actor) hangs for a significant amount of time. There are numerous heavier-weight tools for analysing this sort of thing, but I’ve found that this simple monitor does what I need most of the time. You… Read more