Any of you know sample code for making an NSTextView do custom drawing/measuring for an app-defined text style? I.e. I have a range of text “popup names: a, b, c” that I’ve styled with “ULIPopupStyle” and I could tell it “this is 200pt wide and draw a popup menu control there”.

BTW — not sure if I‘ve made these two recommendations yet:

If you like point and click adventures, play Trüberbrook.

If you like Marvel movies or 80ies scifi, watch Captain Marvel.

‘nuff said.

Just came to the sudden realization that the “look and feel”of old HyperCard is basically “System 6, but double-buffered”.

Is there a way to get JSONEncoder in Swift to format the output JSON more like normal JSON? It puts spaces to the left of “:” characters, and shows empty arrays with an empty line between the square brackets.

Or is there a drop-in replacement that gives more formatting control?

And yes, I’m aware that range-loops and for(in) and whatever else should obviate the need for loop counters in Swift in most cases, but walking certain data structures still requires it, and there the “shouldn’t this be a ‘let’?” warning helps.

Swift’s insistence on reminding me to change a var into a let has reminded me so often that I forgot to update a loop counter, it’s not even funny anymore.

Of course The Weekly Review podcast has a theme song by James Dempsey and Jean MacDonald. <3 I should have expected that, they‘re hosting the show!

Does the current Safari have a bug where all requests not explicitly marked as HTTPS end up as HTTP again? Seeing a lot of web sites recently accessed as insecure when I type in their domain names or follow web search results.

par for the course:

Normal, typical, or to be expected (especially when something is a source of annoyance or frustration).

An allusion to golf, in which “par” is the number of strokes that it should take a player to get the ball into a particular hole on a golf course.

I don’t like that Confluence notifications say “X edited your page Y”… makes me feel unnecessarily possessive of shared pages I happened to create.

The only features I regularly use on my Apple Watch are timers and telling the time. Too often its screen is black (and I have to flick my wrist to get it to turn on) or shows notifications when I want the time… Is there a watch like a Casio with a nicer/larger time display? 🤔

Sympathy for the Devil just came on and I realized that “Pilot” on Farscape could have been named after Pilate. “Washed his hands …”

TIL that, while C lets you initialize struct fields by name (struct Foo var = { .bar = 1, .baz = 2 };), standard C++ doesn’t support that syntax, because it guarantees member variables are set up and torn down in declaration order in the class. At least C++20 wants to fix that.

TIL that argument is the actual value you pass into a function, and parameter is the variable as which a function receives those values.

Monotype are redesigning Helvetica? Maybe they can finally make it look pretty? 🤪

(I’m more a Futura fan — Helvetica is good, but just too neutral for the things I want a font for)

Somehow I keep forgetting that Sourcetree has a “Search” entry in the sidebar on the left. I always expect there to just be a filter field in the upper right of the History view. Seems kind of an unnecessary split (UI-wise, totally understand that split under the hood).

Anyone know why calling a function

void foo(MyStruct*)

like

struct MyStruct param;
void (*funcPtr)(void*) = (void (*)(void*)) foo; 
funcPtr(&param);

is undefined behavior? I.e. on what platform is this a problem?

I know THAT it is UB, just not why.