Weeknotes 2025-W34
NewsRadar; switching from SwiftUI to AppKit
- August 22, 2025
- Jon Sterling
I previously mentioned that I was working on a new RSS client for the Macintosh called NewsRadar. I had a prototype of many basic parts of the user interface, built using SwiftUI—Apple’s flagship user interface development framework. There are better places to learn about what SwiftUI is, but roughly the idea is to treat the view itself as a model and offload the actual rendering and interaction to the framework. SwiftUI views (which are really models, not views!) are nicely composable and their state management is handled explicitly by plumbing bidirectional bindings up and down the view hierarchy. These are all good ideas, but unfortunately one tends to run into insurmountable limitations of the framework—which in the old days of Cocoa/AppKit we might have been able to hack around.
I ended up hitting the point where I could go no further with SwiftUI, so I’ve started from scratch with AppKit, the 36-year-old object-oriented applications framework that powered NeXTSTEP and Mac OS X. Now, I am actually very comfortable with this style of coding because my previous career was as an iOS developer, and I was naturally an expert with UIKit (Apple’s original applications framework for iPhoneOS/iOS/iPadOS) which was modelled off of AppKit.
AppKit is mature, in the sense that code written 25 years ago still runs, but also in the sense that its bugs tend also to be at least 10 years old without any fixes likely in the future. But what I love about AppKit is that there is almost nothing you can’t do with it if you know the right way; it is rich with extensibility and customisability, and although it forces you to work in a somewhat ceremonious and bureaucratic way, you get in return a lot of control that is simply unavailable in more “modern” frameworks. You can develop really powerful and polished applications that don’t have any rough edges, taking advantage of all the great user interface affordances that the Macintosh platform has to offer—whereas these days I can spy a typical SwiftUI app from miles away almost as easily as I can detect the dreaded Electron apps. (Note that from macOS 26 onward, many parts of AppKit are actually backed by SwiftUI! But that is implementation, not API.) I think this will change as SwiftUI matures, but for now, AppKit is the only serious option for building an app of non-trivial complexity on the Macintosh.
Another thing I like about AppKit and Cocoa development, aside from the old familiarity, is that the books published on the topic a dozen years ago are still relevant and very inexpensive. Yes, I’m an old Objective-C programmer, and translating Objective-C to Swift is effortless to me (and, apparently, to LLMs as well).
There are many bugs and omissions in the implementation of the new design language and the “liquid glass” material in the latest developer betas, unfortunately. For example:
Technote Broken scroll edge effects in AppKit
- August 22, 2025
- Jon Sterling
As of macOS Tahoe beta 7 / Xcode 26 beta 6, scroll edge effects are not correctly applied to an NSScrollView unless its hasVerticalScroller property is set to true.
Note that even when a scroll view does not have a vertical scroller, it is possible to scroll it underneath the titlebar area using the trackpad. In this case, no edge effect is applied and the content appears directly underneath the window chrome.
This is filed under FB19629432.
Technote Missing scroll edge effect APIs in AppKit
- August 22, 2025
- Jon Sterling
As of Xcode 26 beta the advertised APIs for configuring a soft vs. hard scroll edge effect for NSScrollView in AppKit are nowhere to be seen. An analogous API for SwiftUI does exist.
This is filed under FB19629463.
HoTT/UF lecture notes
- August 22, 2025
- Jon Sterling
I’ve been continuing working on my lecture notes for the Homotopy Type Theory & Univalent Foundations module I am offering. This started off as a slog, but now I am hitting a stride. I’ll no doubt be writing the lecture notes simultaneously with giving the module.
Forester and its language server
- August 22, 2025
- Jon Sterling
I’ve fixed a few annoying bugs and have started making some improvements to the language server. The language server we fully implemented by Kento Okura so I did not know well how it worked, but I found it was very easy to improve diagnostics and add some autocompletion features. For example, typing \date{ will trigger an autocompletion of the current date and time in ISO 8601 format.
There are many deficiencies of the current language server implementation, but these are consequences of the parsing and expansion architecture currently employed by Forester. I am excited to redesign this aspect to support richer and more reliable interactivity for users of Forester.
Feedback on the stifling of clientside XSLT
- August 22, 2025
- Jon Sterling
Following up on the clientside XSLT story from last week, I will say that I have heard from the famous Mason Freed himself—who felt that my original article was a “thinly veiled threat” to him personally. Mason felt himself to be in such acute danger that he took it upon himself to write not only to me but also to my Head of Department, no doubt unaware that our commitment to intellectual freedom at the University of Cambridge remains inviolable by American political correctness culture, and that a proposal to remove someone from a position of influence in a project of public interest cannot be construed as a threat of any kind. Of course, it goes without saying that my points of view do not represent those of my employer.
But I wish to say explicitly for all to hear: it is not and will never ever be my intention to threaten Mason’s or anyone else’s safety or employment, nor to encourage anyone else to do so. If anyone got the idea in their head that they should threaten or otherwise harrass Mason after reading my article, I personally request they cease immediately. As I pointed out in my article, it is Google and the other browser vendors who are responsible for this, and if it were not Mason it would be someone else. If you want to have a positive impact, support projects that aim to restore and augment the Open Web; fighting Google is a dead end.
They say that the axe forgets and the tree remembers; but sometimes the axe has feelings too. People should remember, when the corporation wields the man, it is the corporation that is most to blame and often the man is deserving more of pity and compassion than anything else. Although I was in no way obligated to do so, I have therefore changed the wording of my article in order to set Mason’s heart at ease.