photog.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A place for your photos and banter. Photog first is our motto Please refer to the site rules before posting.

Administered by:

Server stats:

265
active users

#swiftlang

3 posts3 participants1 post today

Do I know anyone who's using the point-free swift-dependencies package in production and replaces a entry in some paths but not others?

I would love to see a real-world use of this.

(Outside of testing)

The academic appeal from the package README and the coolness factor are intriguing, but simulating its use in my head, I don't see where I would have used this feature in any of my apps.

Coming from someone who overrides bindings in local contexts in Lisp.

It's hilarious (as in: I am very sad about it) that with #Swiftlang macros from packages all over the place, Xcode refactoring breaks down even more often.

Meanwhile, I can use a `rg` and regular expressions to replace a symbol in a plain text editor interactively with accuracy and also somewhat with ease.

I don't get this:

People say "you shouldn't make your Foo protocol itself Sendable most likely, but instead require Foo&Sendable in dependent code" one minute, and the next propose "use an actor, you just need to make all of Foo's methods async for actor isolation support"

Continued thread

SK8 has some clever ideas, like VirtualType (basically retroactive protocol conformance on classes you don’t own like in #SwiftLang), but it also does some things AppleScript luckily rolled back.

You create new handlers using a dialog panel, like you'd name a new file. That's slow. Also, a handler in SK8 looks like:

on mouseDown of me (a Board)
drag me with live
end mouseDown

So they threw out the English syntax right from the start (vs. AppleScript, where they just don't enforce it)

3/6

Reminder that SwiftPM package manifests are Swift code, so you can write loops etc. in them. I use this in some of my packages to enable the same upcoming language features for all targets. Example: gist.github.com/ole/c0f4de915a

This isn’t particularly useful for complex projects where you might want to migrate to Swift 6 mode module-by-module, but for small and simple packages it’s usually easy to stay on the cutting edge of Swift. #SwiftLang

Replied in thread

I'm making a seasonal anime guide app, in the open for all to experience and learn from.

I noticed some worrying logs yesterday, so let’s investigate that today!

#Jiiiii #DevStream #tvOS #visionOS #macOS #iOS #iPadOS #Anime #SwiftLang #SwiftUI #Vapor #WebAuthn #BuildInPublic #TestFlight #PWA #WebPush

Come chill with me: youtube.com/live/WznhpMFlLKo

Introducing a new open-source #Swift package that I've been working on for 8 months! Say hello 👋 to #ErrorKit – a set of APIs that simplify #ErrorHandling in Swift 6. Built to be actually helpful, not only for large teams but also for #IndieDev's like myself. And boy have I documented it! 💯

Please check it out & give it a ⭐️ on GitHub: #iOSDev #SwiftLang
github.com/FlineDev/ErrorKit

Simplified error handling with built-in user-friendly messages for common errors. Fully localized. Community-driven. - FlineDev/ErrorKit
GitHubGitHub - FlineDev/ErrorKit: Simplified error handling with built-in user-friendly messages for common errors. Fully localized. Community-driven.Simplified error handling with built-in user-friendly messages for common errors. Fully localized. Community-driven. - FlineDev/ErrorKit

Periodic reminder that `Task.detached` is semantically equivalent to `DISPATCH_BLOCK_DETACHED`. e.g. it opts out of automatic priority propagation, task locals, cancellation, etc…

So far 100% of the time I've mentioned this the response has been "what's DISPATCH_BLOCK_DETACHED?", which should give you an idea of how rare uses of `Task.detached` should be.

As the docs say: "Don’t use a detached task if it’s possible to model the operation using structured concurrency features"