@mattiem@mastodon.social
@mattiem@mastodon.social avatar

mattiem

@mattiem@mastodon.social

macOS/iOS ⌨️, outdoors 🏔, justice ⚖️, games 👾

Pretty into open source. Previously: Crashlytics, Apple

This profile is from a federated server and may be incomplete. Browse more on the original instance.

tonyarnold, to random
@tonyarnold@mastodon.social avatar

Is there a way to declare via a Swift Protocol that a property must be isolated to AnyActor in Swift 5.10?

mattiem,
@mattiem@mastodon.social avatar

@tonyarnold Are you trying to express that it must be isolated to some actor, but you do not care which?

mattiem,
@mattiem@mastodon.social avatar

@teomatteo89 @tonyarnold I think this gets to the root of my question. Are you trying to force conformances to be actor types? And if so, why? Could you make the property async instead?

mattiem,
@mattiem@mastodon.social avatar

@tonyarnold @teomatteo89 I bet it does, but if you can make it async, you get all of the same protection with a lot more flexibility. Give it a shot!

mattiem, to random
@mattiem@mastodon.social avatar

Making progress in Transistor.

Kid keeps asking me to finish Jump Jump Jump in Mario Wonder and I want to throw the controller at the TV every time. But I’ve only tried maybe 10000 times so far.

Playing anything?

mattiem,
@mattiem@mastodon.social avatar

@HanBrolo I really want to play Witcher 3! But I cannot take on another 40+ hour game until I clear out my backlog a little more…

mattiem,
@mattiem@mastodon.social avatar

@MuseumShuffle @HanBrolo “40 hours” is what they call it, which takes me about 6 months too

mattiem,
@mattiem@mastodon.social avatar

@MuseumShuffle @HanBrolo yeah for sure! I don't mean how long you could play for, these numbers usually refer to how long you need to play for to complete. Witcher's estimation is here:

https://howlongtobeat.com/game/10270

ctietze, to random
@ctietze@mastodon.social avatar

Designing Actor-Based Software (with Hugh McKee) https://youtube.com/watch?v=CBUWcUuG6Ss

The examples sound great and also intuitively make sense to me as an actor noob: use data structures that support "fanning out" for concurrency.

But Swift's actor model seems to behave a bit differently, doesn't it?

At least the stuff everyone complains about feels different.

/cc @mattiem

mattiem,
@mattiem@mastodon.social avatar

@ctietze I didn’t watch the whole thing. But no, “actors” in this context are not the same thing as Swift concurrency actors and this has tripped up a lot of people.

airspeedswift, to random
@airspeedswift@mastodon.social avatar

// Only access this property via the queue

Narrator: but it was not only accessed via the queue

mattiem,
@mattiem@mastodon.social avatar

@airspeedswift Someone should really make some kind of language feature to help with problems like this.

ctietze, to random
@ctietze@mastodon.social avatar

ChimeHQ has 69 repositories.

Nice. @mattiem

mattiem,
@mattiem@mastodon.social avatar

@ctietze Just 31 more to go!

mattiem,
@mattiem@mastodon.social avatar
mattiem,
@mattiem@mastodon.social avatar

@icanzilb @ctietze Sure why not!

mattiem, to random
@mattiem@mastodon.social avatar

It's very common to have trouble with SwiftUI's EnvironmentKey/PreferenceKey protocols and strict concurrency.

I've updated the protocol section here to include a few techniques that work well for any static let in a non-isolated protocol.

https://github.com/mattmassicotte/ConcurrencyRecipes/blob/main/Recipes/Protocols.md#static-variables

mattiem, to random
@mattiem@mastodon.social avatar

Brain stopped making smart. Added caffeine but no more smart come out. Added even more. Still no smart! How make more smart?

charliemchapman, to random
@charliemchapman@mastodon.social avatar

For anybody who's curious: here's a comparison of the 2024 11in iPad Pro vs the 2018 with the Magic Keyboard and the Keyboard Folio (RIP 😢)

image/jpeg

mattiem,
@mattiem@mastodon.social avatar

@charliemchapman iPad sandwiches

ctietze, to random
@ctietze@mastodon.social avatar

@mattiem I thought about multiple cursors some more.

Given N cursor locations, an Insert("Foo") command would need to apply the change to the text storage from back to front in all N locations.

Isn't that it?

I'm almost done with the single cursor approach.

I can apply Insert and Delete commands as depicted, and change the selection declaratively.

Tomorrow I'll implement the execution of the whole command value. Pretty excited!

Would this be useful for you with 2+ cursors?

mattiem,
@mattiem@mastodon.social avatar

@ctietze I think you are getting it.

My text mutation system is really complex, involves scheduling and deferred non-visible work. But my own personal use-case may not matter! I still think this is a neat concept.

mattiem,
@mattiem@mastodon.social avatar

@ctietze No not yet unfortunately. This was an area I’m working on changing. I think it may be my next focus. Plus it’s all under my control so I can change it!

twostraws, to random
@twostraws@mastodon.social avatar

Tomorrow @mikaela__caron and I record the next episode of @swiftovercoffee, and we want your views on our next open ballot: is Swift Evolution working? Is it going in the right direction, do you follow along, do you discuss features in review? Let us know by replying below 👇

mattiem,
@mattiem@mastodon.social avatar

@twostraws @swiftovercoffee
@mikaelacaron I think it is working wonderfully, in the sense that many swift 6 proposals are amazingly forward-looking and deep. Really incredible stuff.

But the process itself is hard for new comers, and the implementation requirement is an incredibly high bar.

mattiem, to random
@mattiem@mastodon.social avatar

Concurrency in Swift 6

SE-0421: Generalize effect polymorphism for AsyncSequence and AsyncIteratorProtocol

AsyncSequence is getting some long-awaited improvements. I'm excited for this one, and I also think it's cool because isolated parameters are involved.

https://www.massicotte.org/concurrency-swift-6-se-0421

finestructure, to random
@finestructure@mastodon.social avatar

30 hours into and it's great fun. It's not the most compelling story in the world but the graphics and the mechanics are great. An excellent space shooter, and native to the Mac to boot.

I'll be damned if Rockfish Games aren't looking into or even already working on Everspace for the Vision Pro. Feels like a no brainer. Surely Apple must be talking to them about it?

mattiem,
@mattiem@mastodon.social avatar

@finestructure Have you played the first as well? It’s in my backlog…

mattiem,
@mattiem@mastodon.social avatar

@finestructure Was it on iOS? I have it on the Switch! But have not played it yet.

mattiem,
@mattiem@mastodon.social avatar

@finestructure Yeah this it was I have!

mattiem,
@mattiem@mastodon.social avatar

@finestructure Apparently I had downloaded this before but I have no memory of this! Interesting to see how they’ve been iterating for so long.

mattiem, to random
@mattiem@mastodon.social avatar

Inspired by @Migueldeicaza , I was thinking, again, about what would be required to support a full IDE experience on an iPad. And the propects are grim.

LSP is just fundamentally incompatible with iOS. And even with spec changes (which I have roughly outlined) that could be hard justify, it would still require enormous work from each server implementation to support.

mattiem,
@mattiem@mastodon.social avatar

@helge @Migueldeicaza Yeah you’re right.

I have experimented with LSP extensions that would allow project/file relay and environmental control so that a non-local server would think it was local. I didn’t get too far because it’s a lot of work.

mattiem,
@mattiem@mastodon.social avatar

@Migueldeicaza ios_system is very clever, but I cannot imagine it will help much, if at all.

ish is bonkers. But I kind of hate it. I’d probably go for environment proxying and LSIF for non-awful offline support. I played around a little and it would be a lot of work.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • khanakhh
  • mdbf
  • InstantRegret
  • Durango
  • Youngstown
  • rosin
  • slotface
  • thenastyranch
  • osvaldo12
  • ngwrru68w68
  • kavyap
  • cisconetworking
  • DreamBathrooms
  • megavids
  • magazineikmin
  • cubers
  • vwfavf
  • modclub
  • everett
  • ethstaker
  • normalnudes
  • tacticalgear
  • tester
  • provamag3
  • GTA5RPClips
  • Leos
  • JUstTest
  • All magazines