RSSAmplifier

Blog

don’t panic

Occasional posts, usually about technology

timekl.comRSS feed ↗10 posts

Latest posts

Swift Generics 2: Existentials Boogaloo

It’s been just over two years since we first saw “Improving the UI of generics,” the discussion post about potential changes to make generic types easier to work with in Swift, and five years since the first version of the Swift Generics Manifesto. (Time flies when you’re building a language!) Last week, generics landed back in the spotlight, as Anthony Latsis, Filip Sakel, and Suyash Srijan…

Home Office Audio Amplified

Well, I lasted all of a month on the first pass at an upgraded home office audio setup. While it was a huge step up from the previous, isolated, every-system-for-itself output configuration, there were just a few wrinkles that I wanted to address while I was in this headspace. As is habitual when I undertake these kinds of projects, I found just a couple additional tweaks and hardware add-ons to…

Hacking Home Office Audio

Two weeks after WWDC 2020, I’m still slowly soaking in the flood of new features, fixes, and info — only this time from home, with WWDC going virtual. Apple mentioned in their keynote that Messages traffic is up 40% in recent months, with folks largely confined to home, and I’m betting that videoconferencing is also up at least that much. I’ve certainly had more video calls in the last three…

Is isIdleTimerDisabled disabled?

Like so many articles with leading titles, the answer to this one is simple: no, the idle timer still works fine. But that doesn’t mean we can’t have fun exploring a little along the way! This topic came up while introducing support for iOS 13 application scenes to an existing app. This app supported back to iOS 11, and used the UIApplication property isIdleTimerDisabled shortly after launch to…

Swift Generics Evolution

Earlier this week, Joe Groff of the Swift Core Team published a massive discussion post on the Swift forums. It discussed a lot of possible changes to the way that generics work in the Swift language, and kicked off the process with a link to SE-244, a proposal to introduce some features around function return values. The post as a whole was an absolutely fascinating read, and made a really…

Mac Pro: x86… or ARM?

Of the several lingering rumors around Apple’s hardware strategy, there are two that tend to rise to the top: Will there be ARM Macs, and Where’s my new Mac Pro? Often we think of these separately. ARM chips have been the backbone of phones and tablets for some time, but that’s obviously the slot they’ll stay in. If a Mac were to be ARM-based, it’d be the MacBook Air or something equally…

Debugging NSNotificationCenter

The debugDescription property has been around for quite awhile. Formally first appearing as a @property on NSObject in iOS 5 and macOS 10.8, it came across into Swift as a member of the CustomDebugStringConvertible protocol, and continues to be incredibly useful today. But somehow it still manages to surprise me when I find a detailed custom implementation of the property, like the one I just…

Xcoders talk: Objective-C Bridging

As Swift enters its fourth year in public and continues to evolve, it becomes more and more attractive to add new features using the language — but for those of us who are blessed with large legacy codebases, crossing the divide between Objective-C and Swift can be a burden. What’s more, some of the language features in Objective-C that can help ease this transition aren’t necessarily…

Swift Tricks: Emoji Flags

Toying around with some code on the bus this morning, I came across an interesting fact about region flag emoji. Among the thousands of emoji that the Unicode standard defines, 270 of them represent region flags, each corresponding to a two-character region code: “us” means 🇺🇸, for example. My curiosity was this: is there a way to programmatically generate the flag emoji 🇺🇸 from the string…

Swift Tricks: Searching for Objects by Type

I was working on an app a few days ago, and managed to nerd snipe myself within a single line of Swift code. I thought it’d make a good short writeup.