@tclementdev@mastodon.online avatar

tclementdev

@tclementdev@mastodon.online

iOS / macOS developer (since 2007)

Big proponent of keeping things simple and avoiding over-engineering.

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

alienmelon, to random
@alienmelon@mastodon.social avatar

i’ve had my browser homepage set to this for a while and think i should share it because it’s so beautiful and endearing https://demos.littleworkshop.fr/infinitown
a procedural infinite city. it’s like looking at a goldfish bowl but the tiny town version ❤️🏡🚕

tclementdev,
@tclementdev@mastodon.online avatar

@ben @alienmelon 👆this, no people, no cyclists, only cars. Makes me anxious to be honest.

christianselig, to random
@christianselig@mastodon.social avatar

SwiftUI noob question: I understand why my ViewModel is being initialized twice, but why is it not being deinitialized?

It's created, then a second later when appState.show is changed, the view is recomputed, and view, and its ViewModel, are created anew. Cool! But why is the old one not deinitialized? What's holding onto it?

Sample code: https://gist.github.com/christianselig/d88b1a4d1989b973689ae62d4691162f

tclementdev,
@tclementdev@mastodon.online avatar

@christianselig Replace your dispatch after with a Button that toggles the bool value and see how many you can leak :)

tclementdev,
@tclementdev@mastodon.online avatar

@christianselig Yes. Could be stuck in a run loop pass (e.g. autorelease pool) or forever leaked?

tclementdev,
@tclementdev@mastodon.online avatar

@christianselig Probably worth a feedback if you do that kind of thing. (and should probably post the number here if you do)

krzyzanowskim, to random
@krzyzanowskim@mastodon.social avatar

new fear unlocked

how are we supposed to implement the delegate pattern now in Swift?

tclementdev,
@tclementdev@mastodon.online avatar

@krzyzanowskim You have solutions, tag the class main actor (or another actor), use a lock to protect access, or just use nonisolated(unsafe) if all you want is get rid of the warning.

tclementdev,
@tclementdev@mastodon.online avatar

@krzyzanowskim another one: make the delegate a let and take it via class init()

tclementdev, to random
@tclementdev@mastodon.online avatar

That’s one hell of a list. https://support.apple.com/en-us/HT214084

nicklockwood, to random
@nicklockwood@mastodon.social avatar

I thought Dune part 2 was just OK. I will not be taking questions

tclementdev,
@tclementdev@mastodon.online avatar

@nicklockwood I don’t get why all these recent movies get so lauded. Blade Runner 2049, Tenet, Dune, The Batman. Why this trend where all the main characters are devoid of emotions, I could not care for them 🤷‍♂️

krzyzanowskim, to random
@krzyzanowskim@mastodon.social avatar

@mattiem my hero. what should I do in that situation. I can’t/really shouldn’t make NSFont sendable, but what is the proper way to make this work in struct?

tclementdev,
@tclementdev@mastodon.online avatar

@mattiem @krzyzanowskim I think he might want this to be non-sendable but movable between concurrency domains. They're working on supporting this I think.

tclementdev,
@tclementdev@mastodon.online avatar

@krzyzanowskim @mattiem Also this is not safe since you can escape the NSFont outside of the lock.

tclementdev,
@tclementdev@mastodon.online avatar

@krzyzanowskim @mattiem Yes. NSFont is not sendable but this wrapper allows you to send NSFont cross-concurrency domains. So, not safe. Unless you know NSFont is lying and is actually sendable.

tclementdev,
@tclementdev@mastodon.online avatar

@mattiem @krzyzanowskim And this is not going to be confusing at all that sending something is not the same as moving something 🙂

tclementdev,
@tclementdev@mastodon.online avatar

@krzyzanowskim @mattiem Why is that not swift 6?

groue, to random
@groue@hachyderm.io avatar

SwiftUI/Foundation vs. Swift concurrency 🐱🐶

https://forums.developer.apple.com/forums/thread/718565

tclementdev,
@tclementdev@mastodon.online avatar

@groue @mattiem Also you typically want to receive notifications synchronously. This API will cause so many racing state issues.

mackuba, to bluesky
@mackuba@martianbase.net avatar

OMG it's happening!! is now open for everyone to join without an invite 😲 https://bsky.social/about/blog/02-06-2024-join-bluesky

tclementdev,
@tclementdev@mastodon.online avatar

@mackuba Requests date of birth, requests phone number. Closed the page before the end.

stroughtonsmith, to random
@stroughtonsmith@mastodon.social avatar

Additionally, in my read, the way this new fee structure breakdown would affect an app like Spotify:

• External purchase link clicks capture 17% of transactions for 7 days, payable to Apple
• Spotify would also have to pay 50c per first instance of a download, reinstall, or update per user per year, which could be a hundred million dollars in extra fees

I don't think this is workable here either, and as Spotify is a big driver behind the E.U. legislation, some changes are gonna be needed

tclementdev,
@tclementdev@mastodon.online avatar

@stroughtonsmith "for each first annual install", I read that as reinstalls and updates not counting.

Migueldeicaza, to random
@Migueldeicaza@mastodon.social avatar

Nobody likes the 30% AppStore fee, but it has never been a credit card processing cost.

It has always been a marketplace access fee.

That’s the principle of building malls and other commercial public spaces: they invest to create a space for people to flock into and advertise and maintain it.

That’s what you are paying for.

tclementdev,
@tclementdev@mastodon.online avatar

@Migueldeicaza The thing is that you can't sell direct. That's what this is all about.

dimillian, to random
@dimillian@mastodon.social avatar

Apparently, async ProxyRepresentation was deprecated. So I did my little digging around, and of course, I'm the only one using this shit, so the best I found was someone on SO referencing my code lol. But anyway, the third image is a fix. Apparently, apple doesn't want us to use async anymore, so let's do it the old-fashioned way.

image/png
image/png

tclementdev,
@tclementdev@mastodon.online avatar

@dimillian Though…

tclementdev,
@tclementdev@mastodon.online avatar

@dimillian Why not use DataRepresentation? It has an async closure. I guess it needs the content type right away which ProxyRepresentation doesn’t provide until the target is returned.

dimillian, to SwiftUI
@dimillian@mastodon.social avatar

When doing this, do you see any problem?

tclementdev,
@tclementdev@mastodon.online avatar

@dimillian @helge @kaybutter One other thing I’d like to throw in, although I already know that Thomas you are not really into it, is state restoration (interface restoration after app jetsam by the OS). I think a good solution should support it. Then there are questions such as: should most (all?) at-State actually be at-SceneStorage? etc…

tclementdev,
@tclementdev@mastodon.online avatar

@helge @dimillian @kaybutter Yeah, I wish SwiftUI would force developers more into a coding pattern that gets you state restoration for free (or almost for free).

tclementdev,
@tclementdev@mastodon.online avatar

@helge @dimillian @kaybutter I mean, a fictional SwiftUI that would push developers into the right direction might require you store a local cache of that feed so you don’t have to wait for it to load (and quite frankly if you’d have to wait for the feed to load, that wouldn’t be a great interface restoration). I just wish it was more built into SwiftUI but I haven’t put much thoughts into it to be honest, so not sure what it would look like.

mjtsai, to random
@mjtsai@mastodon.social avatar
tclementdev,
@tclementdev@mastodon.online avatar

@mjtsai I regularly mention Cover Flow as a great example of producing a wow effect over usability. It’s great during a keynote but horrible to use and a simple flat grid of album covers does a better job.

krzyzanowskim, to random
@krzyzanowskim@mastodon.social avatar

deleted_by_author

  • Loading...
  • tclementdev,
    @tclementdev@mastodon.online avatar

    @mattiem @krzyzanowskim func writeSelection(to pboard: NSPasteboard, type: NSPasteboard.PasteboardType) -> Bool

    mattiem, to random
    @mattiem@mastodon.social avatar

    I was interested in @icanzilb's macro issues (https://mastodon.social/@icanzilb/111144895690777092), and I've been looking at it just a bit. The macro version crashes in the concurrency runtime sometimes and the manually-expanded one does not.

    I'm pretty sure he's found a compiler bug with macros and concurrency. Unless anyone else has any ideas here, I think you should probably stay away from await within your macros.

    tclementdev,
    @tclementdev@mastodon.online avatar

    @icanzilb @mattiem @ctietze I'm not sure it's fair to call compiler generated code that crashes "not supported", I would go with "compiler bug" ;)

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