eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

218
active users

#swiftlang

6 posts6 participants0 posts today
Continued thread

Plotty reads from stdin, i.e. you simply run this as follows to process data on the clipboard for instance:

pbpaste | plotty

I still need to add proper arguments like -o <output filename> and width and height parameters for the canvas, labels etc but for quick visualisation of benchmark data it's already useful.

It is *very* tempting (and easy to fall back to) but my recommendation for #SwiftLang concurrency is the same I have for #SwiftUI. Do NOT try to map your existing knowledge to the new system. An actor is not a GCD serial queue, just as a SwiftUI View is not the same as a UIView.
You essentially have to learn both from scratch, prior knowledge is more of a distraction leading to wrong paths of thinking about them.
Those things solve similar problems, but are very different things.

Replied in 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

Jumped back on the #100daysOfSwiftUI train 🚅 and completed day 36, a simple expenses app.

Getting back to it after a few months away took some considerable mental effort. Couldn't remember a lot of the specifics of what went before, but there was plenty of residual memory of concepts intact in my brain 🧠 which made it easier than I expected!

Glad I’d been taking copious notes throughout, and thankful the site's search is super useful! hackingwithswift.com/100/swift