@dgregor79@sfba.social avatar

dgregor79

@dgregor79@sfba.social

Dad, husband, Swift language designer and Swift/C++/ObjC compiler implementor, Author, Generic Programming aficionado. He/him.

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

marcoarment, to random
@marcoarment@mastodon.social avatar

I was in a good mood today until I tried satisfying some Swift concurrency warnings.

Why is it OK for a Sendable class to wrap access to a var with a computed property using a lock, but it's not OK to make a property wrapper for that pattern?

dgregor79,
@dgregor79@sfba.social avatar

@marcoarment Hey Marco, your property-wrapper solution wasn't going to be possible because property wrappers always create a mutable backing storage variable, and mutable storage within a Sendable class isn't possible. However, your macro here looks like a completely reasonable solution to me to provide what's effectively Objective-C "atomic" properties.

I pulled your macro code into a local package so I could try it out, and I'm not seeing the problems at the callsites that you are running into. The GitHub issue you referenced would affect unit tests using assertMacroExpansion, not the compiler, so I suspect you're hitting something else.

I'd love to get more information so we can address the bug you're hitting. Do you have a project on hand I can try out?

QasimRashid, to random
@QasimRashid@mastodon.social avatar

Final day of the quarter 😳

8 hours until our deadline ✊🏽

157 donors to goal ❤️

If you’re like me—you also despise corporate money in politics. My campaign for Congress is the only campaign in this race that is 100% people funded.

Help me prove that people funded campaigns are the way to go. $11 or $1100—Donate: https://secure.actblue.com/donate/qasim-founding-donor

dgregor79,
@dgregor79@sfba.social avatar

@QasimRashid Donated! 156 to goal

brennansv, to godot
@brennansv@sfba.social avatar

Now you can use Swift to script games built with Godot. https://youtu.be/C7KZxlcLCg4?si=6Ps4TN8tYyDchDuA

dgregor79,
@dgregor79@sfba.social avatar

@brennansv @JetForMe unactionable criticism is just venting and will be ignored

rebeccawatson, to random
@rebeccawatson@mstdn.social avatar

I used to think the best thing I did for society is encouraging critical thinking and progressive ideology. But riding around the Bay Area on my bike with Indy in a backpack with his paws on my shoulder maybe does more. Just a fucking Care Bear Stare happiness machine

dgregor79,
@dgregor79@sfba.social avatar

@rebeccawatson We saw someone today riding a bike with an adorable little dog in a basket attached to the handlebars, and my 8-year-old screamed in delight at the cuteness.

wendysiegelman, to random
@wendysiegelman@mastodon.social avatar

Clarence Thomas Secretly Participated in Koch Network Donor Events - putting him in the extraordinary position of having helped a political network that has brought multiple cases before the Supreme Court.

https://www.propublica.org/article/clarence-thomas-secretly-attended-koch-brothers-donor-events-scotus

dgregor79,
@dgregor79@sfba.social avatar

@wendysiegelman Clarence Thomas continues to shock with how deep the corruption runs. He must be removed from the bench.

dgregor79, to random
@dgregor79@sfba.social avatar

Fantastic post from The Browser Company on interoperability being ’s superpower: https://browsercompany.substack.com/cp/137231709

dgregor79, to random
@dgregor79@sfba.social avatar

I’m not a car guy, but I’ve long held that I’ll replace my i3 when there’s a suitable fully-electric 4-seat convertible with good range. The Fisker Ronin looks amazing and ticks all of the boxes, but ouch that sticker price.

dgregor79,
@dgregor79@sfba.social avatar

@ratkins They did got broke and get sold off as Karma Motors back in 2014-ish, but they appear to have risen from the dead again.

Migueldeicaza, to random
@Migueldeicaza@mastodon.social avatar

Unity’s license change not only screws their customers, but the larger ecosystems

Now everyone needs to put guardrails in place against a greedy executive that might want to double tax you

The only way to stop this cancer from spreading is for it to fail abysmally

Do your part

dgregor79,
@dgregor79@sfba.social avatar

@Migueldeicaza time to dust off SwiftGodot?

Migueldeicaza, (edited ) to random
@Migueldeicaza@mastodon.social avatar

My work on SwiftGodot is my way of repaying society for having put GC pauses on every unity game.

I am sorry.

dgregor79,
@dgregor79@sfba.social avatar

@Migueldeicaza @bitinn it’s good to know that you can be motivated solely by guilt

dgregor79, to random
@dgregor79@sfba.social avatar

SE-0408 "Pack iteration" is under review now! This proposal makes it possible to use Swift's for..in loop with parameter packs in an obvious and powerful way. We'd love your input over at https://forums.swift.org/t/review-se-0408-pack-iteration/67152

drahardja, to austin
@drahardja@sfba.social avatar

Had a conversation with my friends today about why is failing to be the next , despite the “progressive” nature of the city, the lower cost of living, the zero state income tax, and all the incentives they’re pushing to tech companies, and I’m wondering if it’s because it’s LITERALLY SURROUNDED BY .

If you’re not a conservative cis-het white able Christian man (or his cis-het child-bearing wife), Texas literally wants to exterminate you. If you have a uterus, they want to control it. If you want to teach your kid about black history, they want to prevent you. Austin may be an oasis, but it’s very much part of the state.

Maybe that’s why tech people don’t want to move to Austin. Have you seen who does tech every day? The same people they want to kill and control. Maybe that’s why they’re not attracted there. Just spitballin’ here.

“'Where ambition goes to die': These tech workers flocked to Austin during the pandemic. Now they're desperate to get out.”

https://archive.ph/fnXL2

dgregor79,
@dgregor79@sfba.social avatar

@drahardja Austin can’t even reliably be an oasis, because the state of Texas will override any progressive local laws it doesn’t like. It’s not safe for many people to be themselves there.

dgregor79, to random
@dgregor79@sfba.social avatar

The review for a minor improvement to member macros is still ongoing and could use YOUR input: https://forums.swift.org/t/se-0407-member-macro-conformances/66951

jsq, to random
@jsq@mastodon.social avatar

deleted_by_author

  • Loading...
  • dgregor79,
    @dgregor79@sfba.social avatar

    @jsq @fbusch @maxd @ktoso Task.detached always creates a task that will start in the global concurrency pool (not the main actor).

    dgregor79, to random
    @dgregor79@sfba.social avatar

    Closed out a bug filed on June 6, 2014: “Add a macro system to Swift” ;)

    ohunt, to random
    @ohunt@mastodon.social avatar

    No it is not the "carrier's fault" that your half assed "self driving" caused a traffic jam, it's your half assed code. People aren't allowed to stop in the middle of the road just because their phone stopped, JFC. https://www.latimes.com/california/story/2023-08-12/cruise-robotaxis-come-to-a-standstill

    dgregor79,
    @dgregor79@sfba.social avatar

    @ohunt depending on continuous cellular connectivity for the proper operation of an autonomous vehicle is an egregious architectural design problem. These vehicles should be removed from the streets until Cruise can prove that they’ve fixed the software.

    dgregor79, to random
    @dgregor79@sfba.social avatar

    I am quite excited about what this pitch could mean for the usability of Swift's strict concurrency checking model: https://forums.swift.org/t/pitch-safely-sending-non-sendable-values-across-isolation-domains/66566

    _Davidsmith, to random
    @_Davidsmith@mastodon.social avatar

    In the hopes that it saves someone else some frustration…I just discovered you can't have an object in your project with the same name as one of the new Swift Macros. If you do you'll get the not super obvious error “No macro named X”.

    I just ran into this because I had a view named "Preview" in my project which meant that if I tried to use any of the new options, my project wouldn't compile. Renaming my class completely fixed this.

    That look longer than I'd like to admit to work out.

    dgregor79,
    @dgregor79@sfba.social avatar

    @_Davidsmith Thanks for the report! The fix looks like https://github.com/apple/swift/pull/67514

    dgregor79, to random
    @dgregor79@sfba.social avatar

    No, no, you heard it wrong. Threads doesn’t want to be the global town square, it wants to be the global Times Square: throngs of people packed together being constantly bombarded by advertisements from all directions that companies pay millions for.

    cjwirth, to random
    @cjwirth@mas.to avatar

    Has anyone ever flown with United and not regretted it? I’m at 0/n so far

    dgregor79,
    @dgregor79@sfba.social avatar

    @cjwirth @jsq We were coming back to California from Florida a few months back, and the flight got delayed, in spurts, until 10 hours later… then cancelled, so we were rebooked the next day. Then delayed another 3 hours while they waited for crew to arrive. We were fine, but some other passengers heading to London were rerouted via our flight… 2,500 miles in the wrong direction… and may have missed their London connection due to the secondary delay. Utterly ridiculous.

    dgregor79, to random
    @dgregor79@sfba.social avatar

    The Senate needs to reign in SCOTUS. Introduce a bill to and, simultaneously, haul Alito and Thomas in to congressional hearings about their gross misconduct. Democrats needs to visibly and loudly fight for the rights of Americans rather than fundraising off their “stern disapproval” with zero action. The American public is with them on these issues.

    finestructure, to Mac
    @finestructure@mastodon.social avatar

    Studio go brrrrrrrrr

    clang clang clang clang clang clang clang clang clang

    dgregor79,
    @dgregor79@sfba.social avatar

    @compnerd @helge @finestructure It’s entirely plausible that the CC designed macOS and Linux arm64 are using some register that Windows doesn’t want us to touch. I’m not sure anyone has sat down to look at the restrictions for arm64 Windows

    dgregor79,
    @dgregor79@sfba.social avatar

    @finestructure @compnerd @helge Sorry, we went full compiler nerd. CC is the calling convention , and here we’re referring to the lowest level calling convention that defines which values of a call go into which machine registers. CG here is referring to the code generator in the compiler, which implements the calling convention. Each platform can define its own calling convention, and you get exciting bugs if your code generator disagrees with the calling convention for the platform you run on.

    dgregor79, to swift
    @dgregor79@sfba.social avatar

    And another fun macro: Spyable, which X-rays mocks and spies to help with testing: https://forums.swift.org/t/introducing-spyable-a-swift-macro-for-automatic-spies-generation/65572

    dgregor79, to swift
    @dgregor79@sfba.social avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • GTA5RPClips
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • lostlight
  • All magazines