My recent posts were about SwiftUI quirks and annoyances, so I want to share a short success story for a change: You can @import Swift Packages in Objective-C code just fine. (At least if they are Objective-C compatible.) How I Got Here I updated my WordCounter app to rely less o … | Continue reading
With Xcode 14.3.1 on macOS 13 (Ventura), I found that you cannot put SwiftUI.Menus inside Lists without breaking the key event loop – iff you also set the menu button’s .buttonStyle(.plain)! This pesky menu, when using a plain button, breaks the app Once that button style is used … | Continue reading
I wanted to know how a SwiftUI TextField gets to know its onSubmit handler to wire my own NSViewRepresentable to it (would be the same for a UIViewRepresentable). There’s no key for that block in the EnvironmentValues structure that you get from the “context”, though. Naively (sp … | Continue reading
Natalia Panferova writes about Swift enum pattern matching with extra conditions and goes over: switch-case statements, switch-case statements with where clauses, for-in loops with where clauses, while loops with extra conditions (case let matching), if-case statements. (M … | Continue reading
Here’s my personal comparison of Android ebook readers for my Boox eink tablet. I would love to add drawings as annotations. Ratta Supernote devices do this splendidly by storing the pencil input directly, without handwriting recognition. (Example here.) This is the gold standard … | Continue reading
After my interesting journey into replacing greyscale values in the vector PDF export of Onyc BOOX Notes, some brainiac on Mastodon pointed out that there are non-grey colors I could use. (Seriously, thank you Jeroen :)) Some default pencil colors, exported from the greyscale dev … | Continue reading
Sacha Chua has this nice Python script to colorize her SuperNotes sketches. Can’t be that hard to apply color replacement to the notes from BOOX devices, can it?!?! The example note I had this exported vector PDF lying around: Screenshot of the original PDF file in all its greysc … | Continue reading
When you use the built-in “NeoReader” on a Boox tablet, you get the best pencil input and quite good highlighting and annotation support. If you don’t have a Onyx Boox eink tablet with that app installed, don’t bother looking for it on the Android/Google Play Store – that app i … | Continue reading
This will open my website in Safari on macOS, no matter your default browser: x-safari-https://christiantietze.de Try it! Depending on your platform and browser, this may not be clickable or not do anything (I have no clue what Android browsers would do with this). I was looking … | Continue reading
I have been complaining on social media about the Xcode Console sticking to the bottom, and how I’d prefer a horizontal split etc. And there have been good suggestions to e.g. open a new Console tab or window. (Thanks Dominik Hauser for the tip!) That didn’t stick because I neede … | Continue reading
I noticed that on mobile phones, wide tables wouldn’t scroll horizontally – instead, they broke out of the content container and everything looked a bit wonky. My goal: wrap in and add figure { overflow-x: scroll; } to make the table scrollable inside its container. Initially, … | Continue reading
The Washington Post published an article, “Inside the secret list of websites that make AI like ChatGPT sound smart”, that visualizes a bit of the C4 data model via websites that have been crawled. Scroll down a lot to “Is your website training AI?” (direct anchor link), and you … | Continue reading
I stumbled upon this page: http://ratfactor.com/cards/um Dave Gauer describes how he has a shell script, um, that he can use as a man replacement to help remember how to use a command. Dave’s implementation uses the cards} from his own Wiki, because the um pages there are “consol … | Continue reading
I’m a happy FastMail user. If you want to be a happy, too, use my referral code for 10% off of your first year (and I’ll get a discount, too!) → https://ref.fm/u21056816 I never used their Masked Email feature, though, because it’s so cumbersome to create these addresses from … | Continue reading
I was adding “tech stacks” to my CV and figured I might as well link the tech to articles or overviews on my page. The ‘wiki’ pages I added some time ago are the best places to summarize topics and embed a list of related posts. So I added a page about VIPER and briefly had a loo … | Continue reading
I’ve never touched GitHub Copilot in all these years, but at Timing, everyone was (and is) very happy with it. They recommended Copilot for all kinds of refactorings and repetetive tasks. So I figured I might give it a try and see how it works. Just yesterday, I used the Copilot … | Continue reading
TableFlip v1.4.1 passed App Store review and is now released: Improved: CSV importing and exporting compatibility: better handling of Excel export data, and quoted cell contents. Fixed: Edit > Copy Row didn’t copy the selected row properly. Fixed: Crash when copying a CSV-imp … | Continue reading
Users of The Archive and Dropbox have reported issues with deleting files in their Dropbox-managed folders in the past weeks: the app would beachball forever. Apparently, Dropbox’s recent migration from ~/Dropbox to ~/Library/CloudStorage affects this. I had the occasional Google … | Continue reading
Xcode on mobile data after resolving packages once: 45MB required This picture shows one of the weird annoyances with Xcode and Swift packages. One package resolution step swallowed 45MB of my data. You’ve likely heard it elsewhere: when iOS developers need to work with Swift pac … | Continue reading
Markus Müller (@m_mlr) recently did a presentation at CocoaHeads Leipzig about Jetpack Compose. – Thanks for the inspiring presentation, Markus! I learned a lot. The similarities are interesting, but the differences in the build tools was also striking. The JetBrains IDE did a gr … | Continue reading
In my conceptual post about equality vs identity, I mentioned Helge Heß’ advice to use a Dictionary with an ID as key, and the identified object as value when you would (wrongly) reach for Set and Hashable. I found a code snippet for this from late last year just for this! The in … | Continue reading
Helge Heß recently posted on Mastodon that he “still find[s] it disturbing how many #SwiftLang devs implement Equatable as something that breaks the Equatable contract, just to please some API requiring it. Feels like they usually should implement Identifiable and build on top of … | Continue reading
After discovering how to use SF Symbols in Emacs on Mac, folks on Reddit shared links where Josh Caswell (known by his handle “woolsweater”) did stuff like this ages ago. This is how the SF Symbol glyphs render if you can actually see them. I.e, outside the browser's code preview … | Continue reading
Today I learned that you can tell Emacs to use fontsets (or just “fonts”) for specific character ranges. Thanks to Alan at idiocy.org for the explanation! His example is this: (set-fontset-font t '(? . ?) "Segoe UI Emoji") Now instead of Emoji, which work fine in Emacs for me ou … | Continue reading
The odd title gives it away – I don’t have a good use-case for this :) Dr. Drang shared how he displayed one random line of “Oblique Strategies” in his email signatures many years ago. The “Oblique Strategies” can be found here: http://www.rtqe.net/ObliqueStrategies/Edition1-3.ht … | Continue reading
New year marks the day Protesilaos releases modus-themes v4 into the wild; and my package update from MELPA already ingested preliminary changes on Friday Dec 30th (much to my chagrin, because I initially wanted to do something else than fiddling with my Emacs setup) that were ab … | Continue reading
Early this year, I shared my setup to get tab numbers in the form of Unicode characters like “⓪”. This week, I reduced the font size in the tab bar to 80% of the main font and make the tab bar stand out less in general. The numbers in circled didn’t look so great then anymore, an … | Continue reading
In the previous post I showed some settings to manage a tab dedicated to Org Agenda and its related org files. I also mentioned that I didn’t like how that tab was actually handled, e.g. when I wanted to break out into other tabs. The following settings work much better for me, 9 … | Continue reading
Presentation Recording on YouTube I recently went to CocoaHeads Aachen and was asked if I happened to have a topic to talk about. Of course I did :) Designing plugins for The Archive took up a lot of my time this year. So this presentation is about the basic design of the plugin … | Continue reading
Emacs’s automatic window management is a bit arcane, but Mickey Petersen’s excellent article “Demystifying Emacs’s Window Manager” is full of inspiring snippets. A couple of months ago, I made some tweaks. One is to dedicate a tab to “Org Agenda”. (That’s a tab-bar-mode tab, not … | Continue reading
Me: How can you wrap NSTextView events to go through a ReSwift store? ChatGPT: It’s not clear what you’re asking. Could you please provide more information or context? I’m a large language model trained by OpenAI, so I don’t have the ability to browse the internet or access in … | Continue reading
EmacsConf 2022 is this weekend! It starts 15:00 CET (German Time), aka 9am-5pm Toronto/EST. There’s a metric crapton of talks and demos and stuff. Recent years have been good to the Emacs web community. Overview: https://emacsconf.org/2022/talks/ The website is great; it includes … | Continue reading
Emacs users sooner or later disable all the GUI stuff, and usually also get rid of system alerts and file pickers. But if you just once want to pick a file using your operating system’s file picker, these three temporary variable overrides will do: (let ((last-nonmenu-event nil) … | Continue reading
I may be 7 years late or so – but until last week, I didn’t realize that didSet property observers would fire when the observed property hasn’t actually changed. All you need is a mutating func that doesn’t even need to mutate. Observation This can be illustrated with a simple pi … | Continue reading
I just wanted to write one short post. Then I discovered that I didn’t yet have a wiki page for a central concept. Then I needed another one. And an hour later, here we are. New wiki pages: Domain-Driven Design Aggregate Root Bounded Context Entity Value Object … | Continue reading
Emacs’s outline-mode only has font settings aka “faces” for 8 outline levels; then they wrap, so level 9 looks like level 1 and so on. org-mode inherits these faces, and thus also only defines 8 styles. That’s more than enough, I believe, to have some visual variety in your outli … | Continue reading
I discovered this piece of news by accident, and I want to share this with you because I believe this is a very interesting case, providing insight into open source projects, even those that are wildly popular. Gitea is an open source “git forge” (think: GitHub; or rather GitLab, … | Continue reading
This Thursday (in 2 days), I’ll be doing a short presentation of plugin systems via JavaScriptCore, plus an interactive demo and something for attendants to play around with. (Fingers crossed I finish it in time ) You can join via Zoom. It’s free, and should be fun :) Time: 202 … | Continue reading
NSTableView comes with a couple of default shortcuts in an override of its keyDown(with:) method. These aren’t mentioned anywhere, so Xcode’s documentation quick help will repeat the NSView docstring to you, saying: The receiver can interpret event itself, or pass it to the sys … | Continue reading
In recent weeks, I’ve been feeling quite restless. There’s not enough time, too many things I just can’t seem to take care of. You probably know that feeling – or rather, the attitude towards things. There’s a couple of things that need to be sorted out. And there’s stuff that ar … | Continue reading
I have Screen Time enabled and synced across devices for quite a while for top secret reasons. My Mac can list Screen Time activity from my mobile devices many weeks in the past. The iPad itself, though, can’t show anything that was before last Thursday. Huh? knowledgeC.db and th … | Continue reading
Variable row heights in your NSTableView might be broken in your apps on macOS Ventura 13.0 – it’s fixed with the upcoming 13.1, but that’s only available as a beta at the moment. When you replace table contents by calling aTableView.reloadItems(), this will ingest the new data a … | Continue reading
Happy macOS release week, everyone! Earlier this week, macOS 13 Ventura was released. It’s a point-oh release, so you might want to sit this out a bit and wait for 13.1, as is common practice. (My main developer machine is running Big Sur, and I won’t be updating for a couple of … | Continue reading
This list was extracted from my reaction to Sketch laying off 80 employees for higher visibility. Update 2022-10-18: There’s a spreadsheet overview of 57 Sketch alumni you can check instead! Here are some amazing ex-Sketch folks that I’ve found thus far who are for hire now: A … | Continue reading
Sketch shared the news today (on LinkedIn!) that 80 employeed are being laid off. This will mostly impact Operations and Marketing, who have done great work in the recent weeks and months. Our Product team remains well-equipped, with a core team continuing to drive things forwa … | Continue reading
For a plain text (not rich text/RTF) NSTextView, I found that: writablePasteboardTypes contains only "NSStringPboardType" by default. readablePasteboardTypes contains a lot of types, but only "NSStringPboardType" for plain text copying.- An NSPasteboard understands both "NSStr … | Continue reading
NSTextStorage provides attribute fixing of user-entered text, via NSMutableAttributedString.fixAttributes(in:). Attribute fixing… … applies font fallbacks to special characters not included in the text font, e.g. “ZapDingbats” for some Unicode symbols, or “AppleColorEmoji” for … | Continue reading
The metaphor of the “black box” is very common in programming. It is so general that it’s nearly meaningless; but it summarizes a lot of specialized principles nicely and shows a unifying principle. A black box is characterized by: a boundary inputs outputs A black box has i … | Continue reading