As much as I enjoyed Swift, one can only wonder what the world would look like if they had gone with Rust as their default language instead.
Swift at Apple: Migrating the TrueType hinting interpreter
91–100 of 139 posts
Re: Swift at Apple: Migrating the TrueType hinting interpreter
#92Beware: As of a few months ago, when I tried to use the lifetime features shown off in this post, I ran into constant compiler crashes with very simple programs, until I gave up and wrote off the features as unusable. This happened on both stable and nightly compilers. I guess they work well enough for this TrueType interpreter, but I suspect they’re using a narrow subset of what the features are supposed to support.…
Re: Swift at Apple: Migrating the TrueType hinting interpreter
#93> Operations like filter and map allocate memory, but that allocation is only necessary if the value escapes. The Swift standard library provides .lazy.map and .lazy.filter, but they don’t work in every case. For logic that only iterates over the filter or map, it’s much more efficient to loop with continue (or use for … in … where) and transform elements into local variables as necessary. It does feel like a compile…
Though, it probably wouldn't work if user code modified the Array prototype.
Re: Swift at Apple: Migrating the TrueType hinting interpreter
#94"we used a fuzzer to minimize a corpus of 10 million PDF files down to 4,200 without any loss of code coverage" Did they need a fuzzer for that? They could've render them all and see what's exercised?
Re: Swift at Apple: Migrating the TrueType hinting interpreter
#95Earlier quoted context omitted.
It’s very common for the people who got their last monitor 8 years ago.
It's still the most common resolution for people using desktop monitors today, according to: https://gs.statcounter.com/screen-resolution-stats/desktop/w...
1920 x 1080 51.89%
2560 x 1440 21.20%
3840 x 2160 5.00%
Re: Swift at Apple: Migrating the TrueType hinting interpreter
#96During the State of Platform keynote, on the subject of Swift adoption across macOS, several examples were given, not only TrueType engine. RIS is happening across all OS levels, if the keynote is to be believed.
https://blog.timac.org/categories/reverse-engineering/
And frequently discussed on Hacker News:
https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
Re: Swift at Apple: Migrating the TrueType hinting interpreter
#97Re: Swift at Apple: Migrating the TrueType hinting interpreter
#98I'm surprised the code has visible LLM smells. Though, I shouldn't be surprised. I hope the important bits are still human-controlled (and the same for Apple's many operating systems that absolutely deserve to remain stable and understood).
I assure you, every inch of the interpreter code has been stared at by humans, a lot. TBH even the assembly generated by it has.
Re: Swift at Apple: Migrating the TrueType hinting interpreter
#99What's funny is from 2023 (I think), macOS just draws the UI unhinted. You have a 1080p display and you don't want to see the letters in the UI blurred to death? Tough luck, 1080p is incompatible with macOS, everybody needs "retina", and nobody cares that Windows and all Linux DEs look on 1080p just fine. It looks like this hinter will be used only in rendering PDFs, because that's where they test the performance.
If you work with text and fine UI elements, do yourself a favour and get proper tools for the job. Get an ergonomic mouse and a good keyboard while you're at it. In every other field professionals use high quality tools to do their jobs, IT shouldn't be any different.
A plumber has equipment worth tens of thousands of dollars, while IT professionals think it's outrageous to pay a few hundred for equipment which is undeniably an improvement.
Re: Swift at Apple: Migrating the TrueType hinting interpreter
#100Earlier quoted context omitted.
It's still the most common resolution for people using desktop monitors today, according to: https://gs.statcounter.com/screen-resolution-stats/desktop/w...
Also for gaming too: https://store.steampowered.com/hwsurvey/ 1920 x 1080 51.89% 2560 x 1440 21.20% 3840 x 2160 5.00%