shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

267
active users

#swiftlang

2 posts2 participants0 posts today

Y'all wanna see an excessively cute trick LLVM's optimizer can do?

Swift String contains roughly this method:

```
func _fastCStringContents() -> UnsafePointer<UInt8> {
if isASCII {
return contentsPointer
}
return nil
}
```

Where `isASCII` is defined as `(flags & 0x8000_0000_0000_0000) != 0`

Would you expect this to generate (solution in reply)

Say, any experts who know about `@ _implementationOnly import` in Swift?

I'm having trouble finding information about it and am reviewing some legacy code that uses it. The reason it was used was to avoid confusing people by having them see an internal C library.

I'm seeing a warning about having to turn on library evolution, which seems confusing.

A couple weeks ago, I gave a talk at @omt_conf on What's New in Testing. That talk was recorded, but while I wait for it to be edited and published, I published an edited (and updated!) version of my speaker notes from that talk.

There's a lot new in testing since last year. I'm still surprised there wasn't a WWDC video about all the new things you can do.

rachelbrindle.com/2025/06/26/w

rachelbrindle.comWhat's new in Testing, 2025 EditionPilot. Software Engineer. Building an Electric Airplane

Update: OH THANK GOODNESS I WAS WRONG! It actually mapped it to UnsafeMutablePointer<UInt8> in the argument and only got uses of the typedef in Swift wrong! That's sensible enough that I can use it!

Ohhh Swift ... why do you have to map an uint8_t[8] in C to a (UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8) and not an Array or Data ...

I hope InlineArray comes with at least a compiler flag that tells it to make these InlineArray objects.

✨Swift 6.2 ✨

SE-0481 is introducing "weak let" to Swift 6.2!

That will allow us to create immutable weak references that can't be reassigned after initialization, but can still become nil when the referenced object is deallocated.

This is a game-changer for Sendable compliance (weak var can't be Sendable, but weak let can!) 🎉

#Swift #iOS #SwiftConcurrency #SwiftLang

github.com/swiftlang/swift-evo

GitHubswift-evolution/proposals/0481-weak-let.md at main · swiftlang/swift-evolutionThis maintains proposals for changes and user-visible enhancements to the Swift Programming Language. - swiftlang/swift-evolution