Live data from Hacker News

Swift at Apple: Migrating the TrueType hinting interpreter

swift.org

71–80 of 139 posts

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#71
post #41

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.

One of the genius things about Swift is its interop with Objective C. Made the switch over considerably easier for developers. I’m not sure what that looks like in a Rust world. Rust is also just a more complex language. I’m not convinced the benefits would have been worth it.

Not just interoperability with Objective C but with C (full) and C++ (increasingly better but not full) as well.

Swift is also interoperable with different versions of itself courtesy of the Swift stable ABI (Application Binary Interface)[0], which they invested a significant amount of time into at the expense of adding other new features to the language, which have come along later.

Rust offers a different approach: recompile everything and static linking.

[0] https://faultlore.com/blah/swift-abi/

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#72

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

I see Swift as a more approachable version of Rust.

If somebody is mulling over Rust but finds it too difficult to grasp, they could start off with Swift first and then move over to Rust.

One of the main advantages of Rust is a more developed and thriving ecosystem.

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#73

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…

Any resources you'd recommend for learning about reasoning about the security of code?

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#74
post #42
post #38

Earlier quoted context omitted.

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

A very quick search yielded Dell selling 1080p laptops today: https://www.dell.com/en-us/shop/dell-laptops/dell-15-laptop/... It is very, very common. Just not in the Mac world.

It’s very common for the people who got their last monitor 8 years ago.

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#75
post #38

What'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.

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

Then let me blow your mind:) One of my daily drivers is an ex-Chromebook at 1366x768. Granted, it's also physically smallish so the DPI isn't quite as low as a macbook would be with those pixels, but still. And that's a touch cramped but it's fine.

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#78
post #73

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…

Any resources you'd recommend for learning about reasoning about the security of code?

For low-level system security, I'm a fan of https://llsoftsec.github.io/llsoftsecbook/LLSoftSecBook.pdf as an overview for any systems developer, not just compiler devs. It might not be the most approachable, but it's got great info on everything memory corruption.

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#79
post #38

Earlier quoted context omitted.

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

Then let me blow your mind:) One of my daily drivers is an ex-Chromebook at 1366x768. Granted, it's also physically smallish so the DPI isn't quite as low as a macbook would be with those pixels, but still. And that's a touch cramped but it's fine.

I'm reading on that resolution right now! MacBook Air 11" running Linux that I use as a quick hacking/reading machine in bed.

Re: Swift at Apple: Migrating the TrueType hinting interpreter

#80
post #74
post #42

Earlier quoted context omitted.

A very quick search yielded Dell selling 1080p laptops today: https://www.dell.com/en-us/shop/dell-laptops/dell-15-laptop/... It is very, very common. Just not in the Mac world.

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...
Post reply on HN