@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.

dgregor79, to random
@dgregor79@sfba.social avatar

The fifth (and final!) episode of my guest appearance on the ADSP podcast is up! We talk about more , generics, Swift 6, and data race safety. https://www.adspthepodcast.com/2024/05/31/Episode-184.html

dgregor79, to random
@dgregor79@sfba.social avatar

I had some fun today adding "subcommand group" support to the argument parser library: https://forums.swift.org/t/grouping-subcommands/72219

dgregor79, to random
@dgregor79@sfba.social avatar

Part 4 of 5 on ADSP, this time talking about Swift! https://www.adspthepodcast.com/2024/05/24/Episode-183.html

dgregor79, to random
@dgregor79@sfba.social avatar

If you’re not yet totally sick of hearing me talk… part 3 of my interview on the ADSP podcast is up, where we talk about variadic templates, std::variant, and (finally!) some Swift: https://www.adspthepodcast.com/2024/05/17/Episode-182.html

dgregor79, to random
@dgregor79@sfba.social avatar

2021 me did a quick temporary hack to unblock a critical feature.

2024 me just tripped over it in the dark and fell flat on his face.

2024 me is not amused with 2021 me.

Gandalf saying “I have no memory of this place”

dgregor79, to random
@dgregor79@sfba.social avatar

It’s been about 15 years since C++0x Concepts were removed from the draft that became C++11. I sat down with Conor and Bryce to talk through the goals and design of C++0x concepts, and some of the similarities and differences with the C++20 feature that bears the same name. https://www.adspthepodcast.com/2024/05/03/Episode-180.html

dgregor79, to random
@dgregor79@sfba.social avatar

I’m proud of my friends, former colleagues, and the students of Indiana University Bloomington for standing up and making their voices heard in peaceful protest. I’m also terrified for them, because Indiana has always been a deeply red state that shows serious fascist tendencies, and these (as-yet unconfirmed) reports of snipers on the roof of academic buildings is an unnecessary, dangerous escalation on the part of the state. Stay safe out there.

dgregor79, to random
@dgregor79@sfba.social avatar

My more-than-a-decade-old Brother monochrome laser printer finally failed, so alas, I must replace it. With another Brother laser printer, of course. But this one has color! And was manufactured after AirPrint so I can print from my iOS devices. This is Progress!

dgregor79, to random
@dgregor79@sfba.social avatar

Every time I get a chance to use it, the swift-argument-parser library sparks joy: https://github.com/apple/swift-argument-parser

dgregor79, to random
@dgregor79@sfba.social avatar

Hello C++ folks! I've started a blog series aimed at C++ programmers who are interested in learning . It teaches the breadth of the Swift language, but anchored in the features and idioms of C++. So if you know your Rule Of Fives and your SFINAEs and think you might be interested in Swift, I'd love to hear what you think. Part 1 is something you know of from C++ that Swift takes a bit further: value types. https://www.douggregor.net/posts/swift-for-cxx-practitioners-value-types/

dgregor79, to random
@dgregor79@sfba.social avatar

Here I go building a personal website and trying to focus on content, and @twostraws dangles a shiny new static site generator to distract me.

dgregor79, to random
@dgregor79@sfba.social avatar

Ah, lovely. The old “vector reallocates while someone is holding a pointer into its storage” use-after-free, because of course C++ has no notion of memory exclusivity. No one is smart enough to use this language safely.

dgregor79, to random
@dgregor79@sfba.social avatar

parameter pack iteration is so much fun! This feature is amazing because it takes something that feels like it should be complicated---if you've used C++ variadic templates, you know what I mean---and makes it straightforward. Blog post by @simanerush is up at https://www.swift.org/blog/pack-iteration/

dgregor79, to random
@dgregor79@sfba.social avatar

An important engineering step forward for WebAssembly: we've had Wasm in the main Swift compiler + standard library repository for a while now (merged in from the excellent SwiftWasm project), but CI for it was separate. Now we're getting pull request testing for Wasm + WASI, so we can ensure that it remains healthy on a day-to-day basis on main. This is one of the important milestones along the path to making WebAssembly an officially supported platform. More details from @maxd at https://forums.swift.org/t/stdlib-and-runtime-tests-for-wasm-wasi-now-available-on-swift-ci/70385

dgregor79, to random
@dgregor79@sfba.social avatar

Growing up, I occasionally had no school for snow days. My kids get no school for PG&E-is-too-cheap-to-bury-electrical-lines days at roughly the same frequency.

dgregor79, to random
@dgregor79@sfba.social avatar

Second review of region-based isolation proposal has begun! This is a huge step forward for the usability of concurrency safety. This second review focuses on refinements for issues uncovered in the first first. Check it out at https://forums.swift.org/t/se-0414-second-review-region-based-isolation/69740

dgregor79, to random
@dgregor79@sfba.social avatar

Saw my first Cybertruck in the wild today, and let me tell you… the pictures don’t prepare you for just how hideous this thing is. It’s just so awful.

dgregor79, to random
@dgregor79@sfba.social avatar

Anything that a compiler allows a programmer to write, some programmer will have written, and you will discover that such code exists only at the most inconvenient time.

dgregor79, to random
@dgregor79@sfba.social avatar

Finally landed the first of many standard library updates to replace "rethrows" with generic typed throws: https://github.com/apple/swift/pull/69771. The feature has been a fantastic exercise in generalizing in place: it maintains the same behavior for existing Swift code, maintains the stable ABI of the standard library, and yet any Swift code that adopts typed throws will see typed errors propagate through the standard library in the natural way.

dgregor79, to random
@dgregor79@sfba.social avatar

Real-time picture of me trying to figure out what my next commit should be even though I know the right answer.

dgregor79, to random
@dgregor79@sfba.social avatar

Yesterday’s coding journey involved making a ton of progress on a hard thing, and it started to work well on small examples… however, the way it fit in to the code base required some duplicate logic, and that made my implementation gross. So, now I’ll refactor all of the bits (fixing some little bugs found along the way), and take a second stab at the hard thing once everything is nice around it. This is coding at its most fun :)

dgregor79, to til
@dgregor79@sfba.social avatar

that there's someone building a cross-platform game engine in , mostly by themselves. That's... really cool. https://swiftpackageindex.com/STREGAsGate/GateEngine

dgregor79, to random
@dgregor79@sfba.social avatar

These uncritical articles about various groups vowing not to support Biden in 2024 sure do play right into the hands of the fascists, don’t they? Slow down and think critically, folks.

dgregor79, to random
@dgregor79@sfba.social avatar

An undetected leak caused me to get an astronomical water bill this month. The San Jose Water Company gave me the polite version of the middle finger, so now it’s on to file a complaint with the California Public Utilities Commission. Now I’m basically drafting public policy in my CPUC complaint: smart meters can detect and report leaks immediately, yet water companies have been slow to roll them out. Seems to me that water companies should bear the cost for water overuse due to undetected leaks wherever they have failed to install a smart meter. Right now, they just pass the cost on to the consumer. This policy is better for both consumers and water conservation in general in our drought-stricken state, because it puts a cost on not installing smart meters.

dgregor79, to random
@dgregor79@sfba.social avatar

On this morning after the Thanksgiving holiday, how better to avoid your inbox than... reviewing the proposal for typed throws! https://forums.swift.org/t/se-0413-typed-throws/68507

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