Paul Samuels:
My approach when needing to figure out what an old regex was doing was to paste it into whatever the top search result for “Explain regular expression” was.
Something that I’ve been doing for a while but hadn’t really thought about was using Xcode’s Refactor
> Convert to Regex Builder
as a way to explain a regular expression without having data leave my machine.
Yes, it’s a shocker but one of Xcode’s refactoring tools actually works for me.
It works surprisingly well and as a bonus gets those endorphins flowing knowing that my data is safe from some AI drivel.
[…]
Depending on your level of experience with regex you might think this is actually more wordy/overkill (in this case I’d agree) but the point is each part of the regex is broken out into smaller parts that have names explaining what they are doing.
And you can manipulate it using Code Folding.
Previously:
Mac macOS Tahoe 26 Programming Regular Expression Swift Programming Language Xcode
ToxicLand (via Hacker News):
Using an M1 Max MacBook Pro, having Electron-based apps open / not minimized causes a huge lag.
CPU and GPU usage remains low, but if I have Discord and VS Code open, moving windows, scrolling is stuttery. It happens even when only Discord is open but it gets worse if I open a second Electron app.
This is kind of weird because while having Discord open and I’m in Chrome, the lag still occurs, but it’s fixed if I minimize.
avarayr:
After a lot of digging, I believe I’ve found the root cause of the WindowServer GPU spike on macOS 26 when shadows are enabled.
It turns out Electron was overriding a private AppKit API (_cornerMask
) to apply custom corner masks to vibrant views.
This method is called by WindowServer to calculate the shadow of the window. I’m speculating that Apple uses some sort of memoization by reference, and this method breaks the memoization and forces WindowServer to repeatedly recalculate and repaint the shadow.
🤔 What’s particularly funny is that even a simple override that does nothing but call super
still presents the issue.
Previously:
Cocoa Cursor Discord Electron Mac macOS Tahoe 26 Private API Visual Studio Code