Watch our preview of these tools today: www.pointfree.co/episodes/ep3...
Watch our preview of these tools today: www.pointfree.co/episodes/ep3...
A screen shot showing an exhaustive test failure in TCA2+SQLiteData.
And all of TCAβs powerful testing tools just work! You play a script of user actions to your feature and get to exhaustively test how your feature changes over time by describing it in simple mutations:
A screen shot of a TCA2 feature interacting with a SQLiteData type.
Composable Architecture 2.0 and SQLiteData work together like salt and pepper. You treat persisted models as simple values that live in your featureβs state, something that just isnβt possible in SwiftDataβ¦
Swiftβs ownership tools are not only for library users. They also help authors stay disciplined. When we lend a valuable resource to a userβs closure, we wrap it in ~Escapable so it cannot live longer than that closure.
Get all the details here: www.pointfree.co/episodes/ep3...
Swiftβs ownership tools donβt just help our users. They also help library authors keep themselves honest. When we lend a precious resource to a userβs closure, we wrap it in ~Escapable so it cannot outlive that closure.
Learn all about it: www.pointfree.co/episodes/ep3...
Swiftβs ownership tools don't just help our users. They also help us as library authors to keep us honest. When we lend a precious resource to a userβs closure, we wrap it in ~Escapable so it canβt outlive that closure.
Learn more:
www.pointfree.co/episodes/ep3...
This is an exciting time for the #swift community. I think this series will be an excellent case study into why great software is made so much better with excellent educational content at it's foundation.
Swift's ownership tools allow us to restrict how users of our libraries interact with dangerous objects, such as a raw database pointers. They should never escape from a database transaction, and now this is enforced by the compiler.
Learn more: www.pointfree.co/episodes/ep3...
By using almost every advanced Swift concurrency tool, we can fully control how database changes are sent to observers, all without slowing down the writer actor!
Learn more in this week's episode: www.pointfree.co/episodes/ep3...
You may have heard that actors cause you to make everything async, but that's not true!
In this weekβs episode, we show how to support an async database read (using a database pool without blocking) while still keeping a synchronous read option.
www.pointfree.co/episodes/ep3...
By embracing ~Copyable/~Escapable and controlling isolation we can add incredible safety and performance to a legacy C API! We also preview how these tools make testing a Composable Architecture 2.0 + SQLiteData app feel like magic: www.pointfree.co/episodes/ep3...
Watch our brand new video series to dive deep into the topic so you can best take advantage of these features: www.pointfree.co/episodes/ep3...
You should be leveraging Swift isolation, ~Copyable, and ~Escapable types!
Doing so not only enforces correctness, but gives you better ergonomics and performance, for free!
See how a βnonisolated(nonsending)β clock can make asynchronous work like Task.sleep completely synchronous: www.pointfree.co/episodes/ep3...
A code snippet: @MainActor @Observable final class OnboardingModel { var isOnboardingVisible = false private var clock: any NonsendingClock<Duration> = .continuous func onAppear() async throws { try await Task.sleep(for: .seconds(1), clock: clock) isOnboardingVisible = true } } @Test func basics() async throws { let model = OnboardingModel(clock: .immediate) try await model.onAppear() #expect(model.isOnboardingVisible) } // Test run with 1000 tests in 1000 suites passed after 0.566 seconds.
When you add time-based asynchrony to a Swift feature, good luck testing it! Youβre often led to literal Task.sleeps in your suite, making it slow and flakey all at once.
But did you know itβs possible to make Task.sleep completely synchronous, without a single thread hop?
This is only possible because TCA2 has taken full control over Swift isolation using modern language tools. Watch our videos to learn more: www.pointfree.co/episodes/ep3...
A screen shot of TCA2βs new TestStoreActor type, which isolates features to an actor so that they can run on any thread.
Swift Testing has amazing parallelization, but most apps canβt take advantage of it because their models are all MainActor-isolated.
But Composable Architecture 2.0 lets you run features on any actor, which can speed up large test suites many times over.
See how in this weekβs video: www.pointfree.co/episodes/ep3...
A screen shot from the episode, showing work done in an async context being asserted on synchronously.
Isolation in Swift doesnβt mean making everything βasyncβ and sprinkling βawaitβ everywhere.
With properly controlled isolation, async code can become synchronous with no awaiting required!
Composable Architecture 2 leverages this to let you synchronously test async features:
Weβre going beyond the basics with isolation, ~Copyable, and ~Escapable types, starting with a preview of how careful control of isolation in the Composable Architecture 2.0 unlocks synchronous superpowers.
See how: www.pointfree.co/episodes/ep3...
We like keyword-maxing in Swift as much as the next person, but our next series of episodes is going to show how each keyword allows us to accomplish a very specific goal that unlocks all new superpowers perviously thought impossible. You won't believe it...
But in all seriousness, we can't wait to show everyone what we're cooking!
You may not agree, but this is what peak Swift concurrency looks like.
By combining Swift's isolation tools with Swift's ownership tools we can encode a high level of safety into our applications without blocking our code and without unnecessary allocations.
A wonderful testimonial from a user of the Point-Free Way. And we've got a lot more planned!
github.com/pointfreeco/...
And if youβve ever struggled with the sendable vs. non-sendable question in Swift concurrency, we will give you the mental model to embrace both!
We are hard at work on our next video series where we break down some of Swiftβs most advanced features: isolation, ~Copyable, and ~Escapable.
You will learn how to write code that enforces correctness and improves performance.
Stay tuned!
A screen shot of a simple Counter feature in TCA2, with bindings and explicit user actions.
TCA2 is not Redux! There are no βreducers,β just βfeaturesβ that are built and composed like SwiftUI views.
Get a sneak peek of Composable Architecture 2.0 by watching this weekβs video: www.pointfree.co/episodes/ep3...
And if you didn't know this already, we have a thriving and helpful community of over 3,500 people. Join today!
pointfree.co/slack
A huge congratulations to @kayathomas.is for her App of the Day feature!
She was able to leverage our SQLiteData library to easily add privacy-first synchronization and data sharing to her app.
Be sure to check it out are share with your loved ones:
apps.apple.com/us/story/id1...
In our live stream we previewed Composable Architecture 2.0. We have solved nearly every pain point and accommodated every feature request we have seen in the past 5 years!
The screenshot below shows a new tool for driving effects from state changes.
π www.pointfree.co/episodes/ep3...