Blog

Articles, notes, and links. Software, AI, calligraphy, politics — in that rough order.

Article21 min read

Binding libVLC directly from Swift 6

An IPTV client needed Picture-in-Picture, and the VLCKit line it ran on does not have it. Notes on owning a C engine rather than consuming one — pointer isolation, lifetimes nothing checks, a patch set carried against VLC's own source, and what that costs.

Article5 min read

Namespace your Swift extensions

SwifterSwift passed five hundred extensions and began colliding with other libraries. A member added to a type you do not own is not scoped to your library at all — it is global, and no module qualifier reaches it.

Note4 min read

Enforce SSH instead of HTTPS for Git operations

GitHub stopped accepting passwords for Git in August 2021. A token in a credential helper solves the typing but not the expiry; a key solves both, and reaches the HTTPS URLs you did not write yourself.

Note2 min read

Three comparisons the standard library already does

Finding the first match, ordering by more than one key, and checking an index against a range. The hand-written version of each is longer, and two of the three are also slower.

Note2 min read

A typealias can take a type parameter

Naming a completion handler once and writing Handler<Post> at each call site. It gives you readability and a single place to change the signature. It does not give you type safety.

Note2 min read

When to use a safe collection subscript

The extension turns an out-of-bounds crash into nil. That is useful when the index comes from outside your own code, and hides a logic error when it does not.

Topics