S
I read a reaction as a "Love this!", which I think is a completely fine and professionally appropriate reaction. As to being a gendered component I thought so a couple of months ago, until I observed and realized that this is used by newer generations (both genders). So if you are hesitant of using reactions you are just showing your age ;-)
S
Thanks for the feedback folks (mostly in the form of likes on the message), this proposal is now Ready for Implementation.
S
I asked the same question elsewhere. This was the answer I got: SE-0556: Cell, ConstCell, and Volatile We may be able to back deploy types soon though with some work that Doug has been doing here: Back deployment for @frozen structs and enums with non-resilient layouts by DougGregor · Pull Request #93430 · swiftlang/swift · GitHub I believe the issue is around needing unique type metadata symbols. Continuation isn’t in the list in the above PR.
S
It's slightly sad that this API is only available since version 27 @available(anyAppleOS 27.0, *). Because of that I have to reimplement my version of StrictContinuation in my project (basically, copy what is in stdlib). The API builds on top of language features, and doesn't require OS support, so it's not clear why it requires 27 in runtime.
S
Hello everyone FWIW I have written this SOAR so I'm very bias but I am pretty sure that adding macro to the generated code of Swift OpenAPI Generator could only be a positive additions because macro allow powerful and varied modifications to the generated code.
S
following up: Snippets aren’t actually required. any executable fails the same way if none of the modules it links pulls in libm. a library that calls Int64(exactly:) on a Double, plus an executable that imports it, is enough: // swift-tools-version:6.0 import PackageDescription let package = Package(name: "TruncProbe", targets: [ .target(name: "Lib"), .executableTarget(name: "Exe", dependencies: ["Lib"]), ]) // Sources/Lib/l.swift public func f(_ x: Double) -> Int64? { Int64(exactly: x) } //…
S
That's super cool! I was thinking of something similar. What type of problems do you usually face using Metal? Mine is I am not great at math lol. It's very difficult for me to translate ideas into linear algebra equations. I am imagining a world we could just describe what we want in each pixel and instead of doing the math by hand. do you think that's possible?
S
As part of our continued requirements gathering, alongside our HTTPClient discussion, we'd like to open discussion regarding the various layers a native Swift network stack may need. This includes the points at which it would touch operating systems, interact with various protocols, and offer abstractions to developers. From a systems perspective, it's fairly straightforward. Each layer introduces its own level of data and set of events into the stream. Kernel and OS abstractions: sockets,…
S
The main issue with closure-based APIs is that they don’t compose with control flow constructs and async/await.
S
Resurrecting this thread since I rebased both PRs, re-re-requested review, then received the (correct) suggestion that it’d be good to revisit the discussion to see how custom scripts in DocC would fit in with static HTML output. But first A lightning-round of user-facing changes since the last update, mostly from review feedback and the Documentation Workgroup’s security discussion: Added --disable-custom-scripts so hosting services (e.g. SPI) that build untrusted docs can turn them off.…
S
Same issue now with the 6.4.1 Android SDK, oddly only after the 6.4.2 SDK was released.
S
hassila: Apple developer forums Alright, thank you!
S
These forums are for discussions on building the swift compiler and the swift language itself - Apple framework questions should go to Apple developer forums (according to apples wishes). So would suggest you try there instead.
S
My map app uses a persistent bottom sheet over a full-screen Map. On the iPhone Duo I want the sheet pinned to the leading side at about half the screen width. When the device is half-open, .presentationPlacement(.leading) works and the sheet sits on the left . When it's fully unfolded, the sheet stretches much wider and ignores the placement . The Flighty app manages to show a half-width sheet on the Duo even when it's fully unfolded, so it seems possible. Does anyone know how they do it? Is…
S
Thanks! I have always been bemused by the lack of a built-in ability to retrieve the current device's model name without having to maintain a lookup table of all possible devices (whether in JSON or another format). While MGCopyAnswer can do this, it is unfortunately a private API.
S
Personally I find the scoped version more easy to reason about: file.withMappedBytes { bytes in checksum(bytes) ... print("Some log statement here", bytes.count) } // cleanup happens upon returning from the closure compared to a yielding version: let bytes = file.mappedBytes() checksum(bytes) .... print("Some log statement here", bytes.count) // control jumps back to mappedBytes to do the cleanup
S
laptudirm: Result doesn't have any success or failure computed properties though? You'd need to write your own extension for this to compile. That's what I meant by relatively easy. extension Result { var success: Success! { switch self { case .success(let success): success case .failure: nil } } var failure: Failure! { switch self { case .success: nil case .failure(let failure): failure } } }
S
I built NotchUser, an open-source project for macOS Im sharing it with the Mac community and would love to hear your feedback. Open source Built for macOS Contributions and suggestions are welcome! If you find it interesting, consider giving it a on GitHub. GitHub - Magnumja/NotchUser: Turn your MacBook's notch into a music player and file shelf. Native, lightweight, free and open source. · GitHub macos #OpenSource #BuildInPublic
S
That’s a good idea for v2. For this POC I just wanted something quick and dirty.
S
Repository colemancda/SwiftUI-iOS9 GitHub - colemancda/SwiftUI-iOS9: SwiftUI-compatible UI library in Embedded Swift... SwiftUI-compatible UI library in Embedded Swift for iOS 9 on armv7 (iPhone 4S) I have another version for iOS 9, tested in iPhone 4s. Main difference is the use of UIStackView and view resizing, vs iOS 6 SwiftUI is just explicit frames for UIViews. Also CoreBluetooth is actually usable.
S
Using these for concurrency with... APIs is tempting, but the trouble there will be not the asnc part which at least is acknowledged as future direction, but the throwing which is quite a bigger design task (1) We'd need "the caller has thrown" which the single-yield function would need to get: { var group = TaskGroup.make(...) throw boom() } func make() -> yield TaskGroup<...> { do { yield &taskGroup } catch { // "the caller has thrown" taskGroup.cancelAll(...) } await…
S
I think this is a logical extension of the current accessors and I have run into the limitation of only having yielding accessors but not methods. [quote="allevato, post:3, topic:90319"] I haven't thought this completely through yet, but there are a ton of closure-taking with* functions where functionally the closure invocation could be replaced by yielding the value and callers could reduce the pyramid of doom on their end. I wonder if you've given any thought to which standard library APIs…
S
Great to see this pitch and overall heavily +1 on solving this problem. We have come across this many times in the Swift Server ecosystem and had to resort to workarounds such as new repositories for new major versions. Overall, the pitch is well motivated but I think the detailed design section contains a little too much SwiftPM implementation detail such as internal representations. bripeticca: Introduce an opt-in flag Developers will have to explicitly opt-in to this behaviour; a flag will…
S
I like the idea but not the direction. I think this doesn’t really need to be such a distinct language feature. Normal types should be able to achieve the same thing. Rough idea: struct MyYielder: ~Copyable, ~Deinitilizable { let value: Ref<Something> let extraContext: Whatever consuming func mustCallThisWhenDone() async throws {} } The function call can return a type like that. There could also be a “generic” default type that simply takes a closure to perform when done, so not everyone has to…
S
Hi AbdAlRahman, I'm Shubham. Would an independent Windows argument-forwarding test pass be useful for your shim probe? Its README lists embedded quotes as untested, and the quote function has separate handling for backslashes before a quote and at the end of an argument. I'd propose a small matrix of empty arguments, spaces, embedded quotes and trailing backslashes, using a helper that prints the received arguments and returns a chosen exit code. That would separate shell parsing from the…
S
every cool, thanks for sharing
S
This pitch is based on some investigative and prototype work that I've developed over the last few months. The goal with this feature is to extend the versatility of SwiftPM as a sophisticated package manager tool that grants users the flexibility to migrate alongside major version bumps to their dependencies without the strain of being limited to a single version per package. I've brought this topic up for discussion some months back (Multiple Major Versions of a Package in SwiftPM: Opening…
S
Thanks for the ping, that's my ballpark and I missed the PR somehow. I'll have a look and the most difficulty will be about making sure we won't break any existing code rather than making the change itself. We'll need to do some additional testing to see if we break anyone with the change, but overall it'd be good to get done -- thanks for the PR, let's continue over ther.
S
I've been writing a lot of code lately using ~Copyable and ~Escapable, and I keep butting heads with the compiler automatically inserting Copyable and Escapable constraints on protocols that refine ~Copyable and ~Escapable in generic contexts. This is probably the biggest ergonomics complaint people have about these protocols as it stands, and I have been trying to figure out how we could address that. The other day I had an idea, though I'm not sure we can retcon it at this point:…
S
If we can get this feature, Swift Testing can implement safe attachment buffers to replace the current unsafe interface Attachable.withUnsafeBytes(for:_:): protocol Attachable: ~Copyable { ... associatedtype BytesError: Error func bytes(for attachment: borrowing Attachment<Self>) throws(BytesError) -> yield borrow RawSpan } Among other possible enhancements!