/ tag
Swift
3 posts on this topic.
-
Vendor the small algorithm, don't add the dependency
The reflex to reach for a package for everything is wrong for small, stable, well-specified code. Why I vendored the FSRS-5 spaced-repetition algorithm into my iOS app instead of adding a dependency — and where vendoring is the wrong call.
-
Low-latency on-device captions in Swift with SpeechAnalyzer
Transcribing a 50-minute audiobook chapter before showing the first caption is unusable. How I get the first line in ~1–2s: a playhead-windowed AsyncStream feeding iOS 26's SpeechAnalyzer, with the feeder and results consumer racing on separate tasks — all on-device.
-
Vendoring FSRS spaced repetition as a pure Swift function
My audiobook app turns highlights into flashcards scheduled by FSRS-5 — the algorithm Anki uses. Why I vendored the math as a pure, dependency-free, unit-testable Swift function instead of adding a package, and how the scheduler actually works.