Why Storing Closures in SwiftUI @Observable Causes EXC_BAD_ACCESS

What I Was Trying to Do I was building an iOS music streaming app with detail views behind NavigationDestination. Each detail view had its own ViewModel, with API calls injected as closures. Something like this: @Observable final class PlaylistDetailVM { var songs: [Song] = [] var isLoading = false // API methods injected as closures private let fetchSongs: (String) async throws -> [Song] private let addToPlaylist: (String, [String]) async throws -> Void init( fetchSongs: @escaping (String) async throws -> [Song], addToPlaylist: @escaping (String, [String]) async throws -> Void ) { self.fetchSongs = fetchSongs self.addToPlaylist = addToPlaylist } } Created as @State inside NavigationDestination: ...

April 21, 2026 · 3 min · Young

Remember Me: LLM Client-Side Memory That's 40x Cheaper Than Vector DBs

The Problem: Vector DB Costs and Complexity When building LLM applications, “memory” is essential. It’s used for conversation history, context maintenance, and knowledge retrieval. Currently, most developers rely on Vector Databases: Pinecone (cloud) Chroma (local) pgvector (PostgreSQL extension) Milvus, Qdrant, etc. But this approach has issues: Cost: Cloud Vector DB expenses scale quickly Complexity: Requires embedding generation, indexing, and search pipeline Latency: Additional network RTT Infrastructure: Server management overhead The Solution: Client-Side O(1) Memory Remember Me is an LLM memory library that runs client-side without Vector DBs. ...

January 24, 2026 · 2 min · Young