Post

Replies

Boosts

Views

Activity

Reading large documents
Can the SwiftUI document architecture Take a file as read-only; never to be written out Take files too large for memory (multi-MB, or even GB) I wouldn't want the system to read a gigabyte size file into memory by default. If the system can use a memory-mapped Data as the representation, that'll be something I can make do. It would be even better if I could tell the system that I'll handle all the reading, all I need from it is a reference to the file's location on disk.
Topic: UI Frameworks SubTopic: SwiftUI
0
0
43
Apr ’25
Trimming down Standard SDEF
I've heard that when a Mac app implements their version of the Standard AppleEvent suite, the developer can copy "CocoaStandard.sdef" and trim out whatever they don't need. What are the constraints on this trimming? I guess that we could remove commands wholesale, but can we remove sub-parts of a command? Can we change an enumeration? A record type?
1
0
138
Dec ’25
How do I internally handle conditionally conforming to ConnectablePublisher
I'm making an operator Publisher, which has to wrap the upstream publisher. But I want the operator to conditionally conform to ConnectablePublisher, but only when the upstream publisher does the same. I can make my connect() call the upstream's connect(), but is that all I have to do? That Apple's plumbing will automatically hold back the initial call to the Subscription object if the publisher is connectable. Otherwise, I need to make a flag in the subscription for when to connect, which would involve an infinitely copyable struct somehow send a message to a unique class/actor. That last part makes sense to me, but it also seems like too much work for something plug-and-play. Having Apple's implementation taking care of that issue also makes sense, and would be a better solution.
0
0
46
2w
Problem getting Expectation objects (AI slop)
This is from an Xcode generated file. var values: [String] = [] let exp = Expectation() let c = pub.filter { $0 != nil }.map { $0! }.sink( The second line gives an error: "'Expectation' cannot be constructed because it has no accessible initializers". My best guess that Expectation objects come from some other Apple Swift Testing function, but I don't know where.
2
0
90
2w
Where did I screw up trying concurrency?
I tried making a concurrency-safe data queue. It was going well, until memory check tests crashed. It's part of an unadvertised git project. Its location is: https://github.com/CTMacUser/SynchronizedQueue/commit/84a476e8f719506cbd4cc6ef513313e4e489cae3 It's the blocked-off method "`memorySafetyReferenceTypes'" in "SynchronizedQueueTests.swift." Note that the file and its tests were originally AI slop.
1
0
59
2d