Working on @pointfreeco and @isowords. 🦋 @stephencelis.com 🐘 @stephencelis@hachyderm.io

California
Joined June 2007
Stephen Celis retweeted
Did you know Swift actors can share the same isolation and communicate with one another in a completely synchronous manner? This week we apply the idea to ComposableArchitecture 2.0, where a scoped StoreActor can wrap a parent and share parts of the same core domain and state.
1
6
40
2,890
Stephen Celis retweeted
This week we conclude our series by showing how to share isolation across boundaries! By abstracting our nonisolated core with a protocol, isolated shells can scope down to subfeatures while retaining all the benefits of controlled isolation. pointfree.co/episodes/ep384-…
2
2
23
1,522
Stephen Celis retweeted
This week we started reaping the benefits of "nonisolated core, isolated shell". We write features a single time, without thinking about isolation, then wrap the feature in the isolation we need. @‌MainActor for SwiftUI, arbitrary actor for tests! pointfree.co/collections/bey…
4
30
3,343
Stephen Celis retweeted
The feedback on ComposableArchitecture 2.0 has been pretty reassuring 😁
2
5
1
84
7,477
Stephen Celis retweeted
Advanced Swift macro technique: Accessing inferred types Macros only see the syntax of Swift code, so it seems impossible to access inferred types. But with a clever trick involving associated type inference, we can achieve the seemingly impossible! pointfree.co/blog/posts/233-…
8
2
69
8,170
Stephen Celis retweeted
Which error would you prefer to diagnose? The one that is presented on the problematic line, or the one hidden in the guts of expanded macro code?
Part 1 of our Advanced Swift Macros series is out! You may think macros can only see the stringy syntax of Swift code, but it is possible to tease out some static type information. You can even detect if a type conforms to a protocol! 🤯 pointfree.co/blog/posts/232-…
1
3
27
2,784
Stephen Celis retweeted
Part 1 of our Advanced Swift Macros series is out! You may think macros can only see the stringy syntax of Swift code, but it is possible to tease out some static type information. You can even detect if a type conforms to a protocol! 🤯 pointfree.co/blog/posts/232-…
3
1
17
3,501
Stephen Celis retweeted
Come for the real world explanations of isolation in Swift, stay for the deep dives into esoteric underscored attributes like '@​_inheritActorContext(always)' 🤣 pointfree.co/collections/bey…
1
6
21
1,665
Stephen Celis retweeted
This week we explore the “Nonisolated Core, Isolated Shell” pattern in Swift using a type that drives the business logic of a SwiftUI app. A nonisolated “Core” type is hosted in an isolated “Store” type, simplifying the complexities one typically encounters in Swift concurrency.
3
7
78
6,000
“Nonisolated Core, Isolated Shell” is our mantra for wielding Swift concurrency effectively, with minimal suspension points and locking, and maximal reliability and testability.
Modern concurrency tools like nonisolated(nonsending) and Task.immediate got us closer to our goal, but not all the way. So we’re trying a new approach inspired by Gary Bernhardt’s “functional core, imperative shell”: Nonisolated core, isolated shell. pointfree.co/episodes/ep382-…
1
3
24
2,453
Stephen Celis retweeted
Modern concurrency tools like nonisolated(nonsending) and Task.immediate got us closer to our goal, but not all the way. So we’re trying a new approach inspired by Gary Bernhardt’s “functional core, imperative shell”: Nonisolated core, isolated shell. pointfree.co/episodes/ep382-…
4
1
16
4,050
If you’re interested in writing async code that is easy and reliable to test, and free of UI glitches from thread hops, nonisolated(nonsending) and Task.immediate can get you there!
We tried using two modern Swift concurrency tools to allow us to embrace non-sendability: • nonisolated(nonsending) • Task.immediate They got us close to our goals, but sadly there were still data races. Watch this week's episode to understand why: pointfree.co/episodes/ep381-…
7
1,401
Stephen Celis retweeted
We tried using two modern Swift concurrency tools to allow us to embrace non-sendability: • nonisolated(nonsending) • Task.immediate They got us close to our goals, but sadly there were still data races. Watch this week's episode to understand why: pointfree.co/episodes/ep381-…
7
1
37
4,484
Stephen Celis retweeted
Our deep dive into Swift isolation from a few months back may have been a bit abstract for people, so we are bringing things down to earth by designing real world code with isolation in mind from the beginning: pointfree.co/collections/bey…
Replying to @pointfreeco
Really loving this style of you guys building the “toy” store step by step and explaining why each piece moves. Super useful to bring home the abstraction of concurrency/safety to something concrete
1
1
33
5,318
Stephen Celis retweeted
Our code is at an impasse: we want to embrace non-sendability, but async work seems to force us into Sendable. We’ll revisit our approach to this problem from ComposableArchitecture 1.0, see why it's not ideal, and search for a better way. pointfree.co/episodes/ep381-…
2
2
31
2,910
Stephen Celis retweeted
It’s time to put what we’ve learned about isolation into practice. We’re building the reimagined Composable Architecture 'Store' from scratch and exploring the benefits of strictly controlling isolation through every layer of the library. pointfree.co/episodes/ep380-…
3
30
2,565
Stephen Celis retweeted
Earlier this week we held our first Point-Free Office Hour. We answered questions from our viewers and gave a tiny preview of a new library we are working on. Check it out: pointfree.co/office-hours/f6…
1
11
2,019
Stephen Celis retweeted
For the past 10 weeks we have analyzed many of the new SwiftUI and SwiftData features announced at WWDC26. We uncovered a lot of things that haven't gotten widespread attention in the community, and now the whole series is free! 👉 pointfree.co/blog/posts/226-…
5
35
2,288
Stephen Celis retweeted
Last month we shipped 40 releases across 16 of our open source libraries, including new JSON and DB collation tools, preview traits in Dependencies, and the completion of a years-long package rename. Here’s a recap of everything that happened. pointfree.co/blog/posts/225-…
4
28
2,192
Stephen Celis retweeted
Compare to SwiftUI’s LazyState (wrapped in a macro by us), where we get to drop all the Optional dancing, potentially buggy “onAppear” logic, and generally write things as succinctly as possible:
The pattern Apple has established for influencing a view’s @‌State from a parent: 1. Make the state private and Optional 2. Populate the state in onAppear This means extra boilerplate, imprecise domains, optional coalescing and chaining dances, and potential lifecycle bugs!
2
4
1
48
5,578