Live data from Hacker News

Swift at Apple: Migrating the TrueType hinting interpreter

swift.org

101–110 of 139 posts

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#101
post #56

Earlier quoted context omitted.

s/better/blurrier/

Life without retina displays is possible, but pointless.

I sometimes wish I’d never seen a Retina display. There’s no going back for me now.

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#102
post #2

During 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.

Alexandre Colucci has published a series of articles analysing the use of Swift in iOS and macOS by Apple here: https://blog.timac.org/categories/reverse-engineering/ And frequently discussed on Hacker News: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...

Thanks!

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#103

If you want to help improve the security of OS software through the magic of memory safe languages, the team that did this work is hiring: https://jobs.apple.com/en-us/search?search=Spear&sort=releva... Knowledge of Swift not required. If you know your way around OS software, can reason about the security of the code you write, and are excited about writing exhaustively tested software, we’d love to talk to you. We’r…

How do I apply? Historically jobs.apple.com is a black hole unless you know people.

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#104
> By the end of the project, we wrote nearly four times as many lines of test code as we wrote for the Swift interpreter itself.

This is the most interesting bit to me. Engineers consistently underestimate the amount of effort that testing demands for projects that need truly high quality, it’s nice to see this shared.

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#105

Earlier quoted context omitted.

Modern Swift borrows a lot from Rust! And it also has its own benefits, both ergonomic and also supporting eg generic in dynamic libraries

These days I mainly write Rust but I did write a semi complex iOS app and enjoyed Swift. I just didn't love how slow the type checker was and how it got lost. I recall having to break things into smaller bits to help the compiler, and there were some oddities about the language. The gap between the two languages is quite small, it just makes me wish Apple was also all-in on Rust

Apple is not going bet all on language whose roadmap they do not control 100%.

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#106
post #38

Earlier quoted context omitted.

My last 1080p monitor was around 20 years ago. I have trouble comprehending people still use them regularly.

The problem is, as soon as you are not on a Mac but Linux or Windows, you are in for an awful, truly awful lot of pain. HiDPI support is a mess because even in the rare case applications are made with HiDPI in mind they are not tested on HiDPI machines. Other way around, most Mac software is not tested how it behaves on inferior external monitors.

I've been fine with Linux/KDE. Even the fractional scaling support is decent.

Edit: Guess it depends on the app

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#107
post #66

So, hinting only takes place at low resolutions, I believe. How often is it used, eg viewing “typical” PDFs on “typical” screens?

There are fonts that rely on hinting for correct shaping at all sizes: https://xoxo.zone/@numist/116716601962175503

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#108

Earlier quoted context omitted.

Yes they are using Claude Code - not the Xcode agents. It worries me. I hope Codex adoption picks up there.

thats a shame if true, they really should be dog-fooding that horrible agent ui in xcode to bring it up to a usable state

The UI got a massive overhaul in the new Xcode beta. It’s no longer confined to the sidebar.

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#109

Earlier quoted context omitted.

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.

All 150 kloc in six months by two people? Actually, it sounds like way too much code for the task unless 70+% of it is tests.

> By the end of the project, we wrote nearly four times as many lines of test code as we wrote for the Swift interpreter itself.

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#110

Earlier quoted context omitted.

The problem is, as soon as you are not on a Mac but Linux or Windows, you are in for an awful, truly awful lot of pain. HiDPI support is a mess because even in the rare case applications are made with HiDPI in mind they are not tested on HiDPI machines. Other way around, most Mac software is not tested how it behaves on inferior external monitors.

What kind of windows programs are these? HiDPI is more than a decade old. A desktop application, no matter what OS it is, should always be tested with different scaling factors.

Oh my sweet summer child. Even software being written TODAY isn’t being tested in HiDPI. Win32 still makes it difficult.
Post reply on HN