Jérôme Danthinne

@jeromedanthinne
71 Followers
82 Following
74 Posts
iOS Dev @ Neopixl, Drummer, Father
GitHubhttps://github.com/jdanthinne
Workhttps://www.neopixl.com/
@stroughtonsmith Water… then glass… oh I see now, all that work to recreate Liquid Glass 😁.
@christianselig The folks at @pointfreeco uses the same combination (GRDB + CKSyncEngine) as you in their SwiftData alternative, hiding this magic sync from you. https://github.com/pointfreeco/sqlite-data
GitHub - pointfreeco/sqlite-data: A fast, lightweight replacement for SwiftData, powered by SQL and supporting CloudKit synchronization.

A fast, lightweight replacement for SwiftData, powered by SQL and supporting CloudKit synchronization. - pointfreeco/sqlite-data

GitHub

I've been thinking about this one for a long time. There is subtly here, but I tried my best to keep it short. I don't think you should use MainActor as the default isolation.

https://www.massicotte.org/blog/mainactor-by-default/

MainActor by Default

It's enabled for new projects, but I wouldn't recommend it.

massicotte.org
@mattiem Then how to launch the stream and task in parallel, with error propagation from both side to the parent stream?

@mattiem What I don't really like is the fact that the two tasks are launched in parallel and I'm afraid the stream is not fully "ready" yet when the second task performs.

But, from my tests, everything seems fine on this side BUT there seems to be some sort of flakiness when the second task has itself some kind of same stream going on inside (with the same unsubscribe) and the parent stream ends, it seems to cancel the second task inside.

@mattiem My best guess would be the Publisher handleEvents(receiveSubscription:) extension. My real source (the code I'm converting from) is RxSwift do(onSubscribe:).
@mattiem @donnywals @swiftlee As concurrency champions, any idea on how to make some kind of equivalence to RxSwift/Combine onSubscribed? The idea is to launch an async operation as soon as a stream is started, and handling any error from the operation and propagating it to the main stream.
Here's what I'm using now, but not really happy with that…
https://gist.github.com/jdanthinne/f45eb390102b03e0244a6519e9b4382c
Extension for AsyncSequence to launch an operation when stream starts

Extension for AsyncSequence to launch an operation when stream starts - AsyncSequence+onSubscribed.swift

Gist
@natpanferova the colour rendering is indeed very different. But which one is the closest to the real (accent) color? The orangish or yellowish one?
How is sending troops into U.S. cities NOT grounds for immediate impeachment? It is unprovoked, unjustified, and completely unconscionable. We declared independence from a King 249 years ago for similar transgressions. Guess we have to go and do it again.
@stroughtonsmith without a backup Mac, shipping it with Xcode Cloud should be possible, no?