I sometimes wonder how things would've looked on #Bluesky if the first beta had been ready just 6 months earlier, if all those people who left Twitter for Mastodon could have gone there…
I've just checked the hashtag feed for #swiftlang and apparently there were 19 posts in total… (and 9 of those from me) 😕
All the tips in the book are focused on Swift and Swift Standard Library, so they can be applied to any platform, from iOS and macOS to Swift on the server.
I managed to get a little something running on a Pimoroni PicoSystem using Embedded #Swift !
The PicoSystem uses an RP2040, so I was able to use the embedded examples from Apple to get started.
The demo is using the PicoSystem SDK on top of the Pico SDK. I had to work around the C++ name mangling differences between g++ and Clang by making a thin C wrapper.
I’ll be publishing the code somewhere soon, and hope to have a more interesting demo eventually.
I’d still like to find a solution that doesn’t require a C wrapper. Perhaps building the PicoSystem SDK with Clang would work? The Pico SDK has issues with Clang, out of the box at least.
What's a modern alternative to https://github.com/JohnSundell/Files that people us using nowadays? #SwiftLang the correct answer is probably just Foundation, but I'm curious if there is another interesting one
Hey, is there any way to add a range check to a SwiftUI TextField?
I have an
struct MyView: View {
@ State var intValue: UInt16
var body: some View {
TextField("UInt16”, value: $intValue, format: .number)
}
}
and if I enter “-1” or “65537” into the text field, it calls fatalError() trying to convert the user-entered text into a UInt16, and I'd rather it just beep than crash the app on invalid user input.
It's called Evolreader (because it's for reading Swift Evol-ution... you get it). It downloads the swift-evolution repo to your device so you can read stuff offline. It also saves your progress along the way.
I had fun making it, it's free, and maybe some of you might enjoy it. Here, have some hashtags and screenshots. #swiftlang#iosdev#macdev
#Swifties, I welcome you to check out #swiftlang, the programming language, to help you build tooling for all of your servers filled with your pics from the Eras tour! it’s modern and joyful just like taylor. 😆 tag me with your creations!
We're almost at #Swiftlang v6 and there's still no way to inspect an operator like "+" in Xcode to find out more about its definition and relation to the two summands
I've been playing with benchmarking some regexp matching code in several languages last week (I want to replace that part of #Ruby code with something faster - I was thinking of Crystal or Swift). ChatGPT helped me write some versions :)
The results were… unexpected. #swiftlang & Crystal didn't do well, but JS & PHP did 🤔
Finally, I also had an idea to try #Rust (which I don't know at all), and together with GPT we've managed to write something working. Rust turned out to be the fastest (but only in release mode, debug is very slow).
Interesting that the new #swiftlang native regexp seems… super slow? I've only run it at 100 iterations instead of 10k, and it took a few seconds… 🤔
I know there are already plenty of task managers available for the #GNOME desktop, but no one is simple enough for my very limited needs. So I'm working on the Subtasks app:
While developing the app, I documented the process and created a tutorial on how to develop GNOME apps in #swift (note that the tutorial is not very polished yet):
Memorize 0.2.1 for #GNOME has been released and will be available on Flathub soon! Thanks @konstantin for implementing a search feature for flashcards in the edit dialog!
Is there a way to tell the #swiftlang compiler to just compile a single file like swift build test.swift -o test? Or do I need to have a Package.swift, Sources folder etc.?