Better HN
topnewbestaskshowjobs
Log inSign up

timsneath

2,621 karma · joined Feb 16, 2011 (15y ago) · 181 submissions

Developer technologies at Apple.

In former lives I worked on Flutter (Google) and Windows (Microsoft).

Submissions

comment 2mo ago · link · parent

What a lovely blog in general: some really fun retro-computing projects, written up in a very thoughtful, human way. Feels like a throwback to the earlier hacking spirit of the internet. Thank you, Colin: your "experiment with writing" is a success as far as I'm concerned!

comment 2mo ago · link · parent

One fun example is this Playdate game: https://news.play.date/news/four-corners-swift/

Here's a more comprehensive list of different platform examples: https://github.com/swiftlang/swift-embedded-examples

3.

Swift 6.4 Released(swift.org ↗)

128 points · by timsneath · 2mo ago · 63 comments

4.

Embedded Swift improvements coming in Swift 6.4(swift.org ↗)

1 points · by timsneath · 3mo ago · discuss

5.

Swift on Windows: A Year of Refinement(speakinginswift.substack.com ↗)

3 points · by timsneath · 3mo ago · discuss

comment 5mo ago · link · parent

To clarify a few comments here: this is not only OCI containers: container machines add support for persistence and filesystem mounting, making container machines a great lightweight Linux environment for developers using macOS. More details here: https://developer.apple.com/videos/play/wwdc2026/389

7.

macOS Container Machines(github.com ↗)

1269 points · by timsneath · 5mo ago · 437 comments

comment 9mo ago · link · parent

Swift goes further down the stack than you might at first imagine -- there's a lot of Swift written at Apple even in places where you might expect C.

The container CLI tool wraps the underlying Containerization framework, which in turn vends packages for things like EXT4 file system support -- all written in Swift. Here's one example as a jumping off point. https://github.com/apple/containerization/blob/main/Sources/...

9.

Improving the usability of C libraries in Swift(swift.org ↗)

147 points · by timsneath · 10mo ago · 35 comments

comment 10mo ago · link · parent

Sounds a bit like "We Didn't Playtest This at All" (https://boardgamegeek.com/boardgame/31016/we-didnt-playtest-...), which is a lot of fun as an icebreaker game in various settings. This version has the cards prepopulated with content.

comment 11mo ago · link · parent

Also see https://www.engadget.com/ai/you-can-turn-a-cluster-of-macs-i...

comment 1y ago · link · parent

Also announced today… AWS official support for Swift lambdas: https://aws.amazon.com/blogs/opensource/the-swift-aws-lambda...

comment 1y ago · link · parent

In macOS 26, you can see every Rosetta app that has recently run on your machine by going to System Information and then Software / Rosetta Software. It includes the "Fallback Reason" (e.g. if you manually forced the app under Rosetta or if it was an Intel-only binary).

comment 1y ago · link · parent

Ha! But that's not semantically meaningful Swift code in any normal context, nor is it idiomatic. `self` is equivalent to `this` in C++, and is never normally null.

You use this construct for unwrapping nullable fields, for example something like this:

guard let httpResult else { return }

Note that you don't need to assign the value to itself in modern Swift. This line takes an optional (httpResult?) and returns early if null. If not, you can use it with strong guarantees that it's not nullable, so no need for ? or ! to unwrap it later in the scope.

comment 1y ago · link · parent

This doesn't transpile. It cross-compiles to Android architectures using the NDK. You can see a very simple "hello world" example at the bottom of this article:

https://www.swift.org/documentation/articles/swift-sdk-for-a...

comment 1y ago · link · parent

It's worth noting that this doesn't add any expectations for how your UI is built. The example shown in the screenshot continues to use Jetpack Compose (Android's native UI) with Kotlin invoking Swift business logic. You can also use other UI frameworks on Android, of course, including some that are written in Swift.

One nice thing about this implementation is that it shares many of the same characteristics as Swift on other platforms: unlike some common alternatives, it's not garbage collected but uses reference counting; it uses the same underlying libraries, concurrency primitives and memory model.

Excited to see how folk use it... it's technology that will hopefully springboard some other interesting innovations.

[Disclosure: I work on developer tools and frameworks at Apple.]

comment 1y ago · link · parent

I didn't understand the introduction here, which says both:

> The well-maintained NTFS driver in the Linux kernel enhances interoperability with Windows devices

and

> Currently, ntfs support in Linux was the long-neglected NTFS Classic (read-only), which has been removed from the Linux kernel, leaving the poorly maintained ntfs3.

Is it well-maintained or long-neglected? Or am I misunderstanding this?

comment 1y ago · link · parent

And just for fun, they also support what must be the most weird encoding system -- UTF-EBCDIC (https://www.ibm.com/docs/en/i/7.5.0?topic=unicode-utf-ebcdic).

19.

Four Corners: the first Playdate game written in Swift(news.play.date ↗)

2 points · by timsneath · 1y ago · discuss

comment 1y ago · link · parent

OPA solves the problem of defining and enforcing policies across a system. Some examples:

- How do I enforce that inbound API requests come only from trusted sources?

- How do I enforce fine-grained access to user records?

- How do I enforce a set of naming conventions for a data update?

Many such policies may come from regulatory requirements, may be regional in nature, and may change in otherwise stable codebases. And it's even harder when you're applying this to a highly-scalable production internet service. As a result, defining policy at an organizational level with auditing is a challenge for large enterprises. OPA helps enterprises administer and enforce policies.

More details on what OPA does here: https://www.openpolicyagent.org/docs/philosophy

And you can see some examples of Rego (the policy language) here: https://play.openpolicyagent.org

comment 1y ago · link · parent

The framework that container uses is built in Swift and also open sourced today, along with the CLI tool itself: https://github.com/apple/containerization

comment 1y ago · link · parent

That's built in now -- the default VSCode "Format Document" / "Format Selection" commands work with just the Swift extension installed.

comment 1y ago · link · parent

Good news! https://code.visualstudio.com/docs/languages/swift

comment 1y ago · link · parent

It runs on Linux-based infrastructure. We've updated the blog post to clarify this. Thanks!

comment 1y ago · link · parent

Very feasible. From embedded (https://www.swift.org/blog/embedded-swift-examples/) to Linux apps (https://www.swift.org/blog/adwaita-swift/) to tiny games (https://www.swift.org/blog/byte-sized-swift-tiny-games-playd...) to ML (https://www.swift.org/blog/mlx-swift/) to Windows (https://www.swift.org/blog/swift-everywhere-windows-interop/) to Private Cloud Compute (https://github.com/apple/security-pcc)...

comment 1y ago · link · parent

Working on it: https://github.com/swiftlang/swiftly?tab=readme-ov-file

comment 1y ago · link · parent

Of course! Tons of examples here: https://github.com/apple/swift-embedded-examples

At WWDC24, we shared a session on embedded Swift, which is available on YouTube: https://www.youtube.com/watch?v=LqxbsADqDI4

More documentation on embedded Swift tooling here: https://github.com/swiftlang/swift/blob/main/docs/EmbeddedSw...

(Disclosure: I work at Apple.)

comment 1y ago · link · parent

It used to be that Hacker News was a place for the inventors, the technologists, and the futurists. What happened to our optimism and excitement for firsts?

Airfares have dropped precipitously over the last fifty years: https://simpleflying.com/50-years-airfares/, and it's quite possible that the trend will continue.

Conversely, the speed of commercial flight has barely changed over that time (with the exception of longer flights reducing stops). Boom is innovating in this area and bringing supersonic flight within reach again -- I for one think that's something to be celebrated.

comment 1y ago · link · parent

That is exactly the goal of Private Cloud Compute, part of the fabric of Apple Intelligence: https://security.apple.com/blog/private-cloud-compute/#:~:te....

comment 1y ago · link · parent

More here: https://www.swift.org/blog/announcing-swift-homomorphic-encr...
1234567