Michael (compiler-errors) Goulet's Avatar

Michael (compiler-errors) Goulet

@errs.io

https://errs.io

617
Followers
99
Following
75
Posts
23.11.2023
Joined
Posts Following

Latest posts by Michael (compiler-errors) Goulet @errs.io

"up go" lmao

27.12.2025 22:51 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

i wonder how'd it get there? did they switch to the jamaica line at b'way junction, then up go 6 av?

27.12.2025 22:37 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

starting work next week… hopefully i remember how to program

03.11.2025 19:49 πŸ‘ 29 πŸ” 0 πŸ’¬ 3 πŸ“Œ 0

lexington was horrendous earlier today, northbound 4 trains already 100% packed pulling into fulton and 5 trains were just skipping the station altogether

02.11.2025 20:57 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

don’t forget 8av and central park west

28.10.2025 19:48 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image Post image

121 years of the greatest subway in the world ! #subwayday

27.10.2025 13:27 πŸ‘ 27 πŸ” 3 πŸ’¬ 2 πŸ“Œ 0

khadija al hanafi set was insane last night

10.10.2025 23:29 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

how hard is it to paste an image into an image 😭

26.09.2025 15:58 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

i dislike that one in particular. i'd be fine if it were a cheeky custom error message when the unresolved break target is `rust`, but it's implemented as a custom ICE in the compiler which is kinda annoying

23.09.2025 19:16 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

not afaict, they’re ocaml as far as i can tell :)

09.09.2025 22:39 πŸ‘ 5 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

oh right, this all does remind me of implicits in scala. thanks for the terminology :)

09.09.2025 19:21 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I will note that the Rust compiler does distinguish "instance resolution" from plain ol' "solving goals". In typeck, we only care that a where clause holds, but it doesn't necessarily know what impl a solution comes from until codegen b/c of things like opaques, where clauses that shadow impls, etc.

09.09.2025 17:47 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

but it is a very good point that there is some flexibility lost, though I'm not sure if there isn't a way for traits to themselves implement some kind of rank-2 "kind" and make signatures generic over *those*, for example. it wouldn't be generalizable like functors are, tho.

09.09.2025 17:36 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Right, but I find that often I want my API to be meant for a single "kind" of trait. When I write `sum_values<T: Add>`, I don't want callers to provide an implementation of `Mul`, even tho it provides some binary `t -> t -> output`. So in a way it also kinda makes the API more self descriptive πŸ€”.

09.09.2025 17:35 πŸ‘ 0 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

Another rust could be smarter about this or have chosen a different solver strategy, but lots of reasonable code relies on this incompleteness (we've encountered a lot of cases when working on the new solver lol).

09.09.2025 17:32 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

The compiler today either just bails out with ambiguity if we don't know what to return from `.borrow()` (like we sometimes do) or be incomplete, and I guess we settled on reasonable heuristic of preferring where clauses + associated bounds which is (possibly surprisingly) often what the user wants.

09.09.2025 17:32 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Yeah. The issue stems from the fact that there are essentially two things we're proving here that both involve inference: `O: Borrow<?0>` and `?0: PartialEq<?1>` here, and we don't really do solving at the "intersection" of two different goals even if both taken together would find a valid solution.

09.09.2025 17:32 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

the important part of (2.) is that modules (i.e. impls) themselves don't need names, since theyre uniquely identified by the `module type` being impl'd + the params, and we don't ever *need* to name them directly as a consequence of them being retrievable by this name

09.09.2025 17:27 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

by 1. treating `modules type`s nominally rather than structurally, 2. and uniquely identifying each module with a set of input parameter types (i.e. no impl overlap), we can look up a module's components by name without referencing it directly, via the `module type` + generics

09.09.2025 17:27 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

trying to make sense of ocaml modules and their conceptual relationship to rust traits... rust essentially enables "module inference" which i think is neat, especially thinking about what constraints this requires compared to ocaml where modules need to be named directly in functors

09.09.2025 17:27 πŸ‘ 14 πŸ” 1 πŸ’¬ 2 πŸ“Œ 0

Second example, yeah we prefer associated type bounds over impls so `owned.borrow()` is `&B`, which requires `B: PartialEq`.

09.09.2025 17:02 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

third example shouldn't be a mystery. `owned.borrow()` requires `O: Borrow<_>`. We prefer where clauses over the built-in reflexive `Borrow` impl, so we end up with type `&B`. That means we end up selecting the `B: PartialEq` impl in the where clause (elaborated from `B: Eq`) for the `==`.

09.09.2025 17:02 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

we dont have the implication that the type U in `T: Tr<Assoc = U>` implies all of the bounds of Assoc onto U, unfortunately. Doing so leads to a complexity blowup that the old solver can’t handle and the new solver would probably also choke on.

06.09.2025 16:06 πŸ‘ 7 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I wrote about this sort of corporate mis-allocation of maintainer roles a while back and it's tragic to see such a vivid example. Let maintainers be maintainers!

graydon2.dreamwidth.org/306832.html

05.09.2025 15:50 πŸ‘ 33 πŸ” 5 πŸ’¬ 1 πŸ“Œ 0

thanks! it’s a shame i didn’t get to work on rust for longer, but i hope i made my mark and i’m glad i’m settled job-wise. hope i get to work on rust or something equivalently impactful in the future, we shall see.

05.09.2025 16:06 πŸ‘ 22 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I urge companies to take funding contributors seriously, in ways that aren’t tied to projects and goals. Being a generalist in the compiler meant that often I wasn’t working towards a roadmap, but my contributions *always* paid off in the long term extensibility of the language.

05.09.2025 13:14 πŸ‘ 113 πŸ” 24 πŸ’¬ 2 πŸ“Œ 2

That does mean I’ll be scaling back my Rust contributions over the next few months before I start my new job. Sorry to the folks who were looking forward to stuff I had in the pipeline. I really would’ve liked to deliver async fn in dyn traits or `-Zhigher-ranked-assumptions`.

05.09.2025 13:14 πŸ‘ 42 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Unfortunately, it was not possible to snag a new job working on Rust in the way that I do today (type system/compiler frontend) especially with the freedom I have today, and I couldn't possibly be jobless for an indeterminate amount of time waiting for the right role to show up.

05.09.2025 13:14 πŸ‘ 40 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I’m glad I got the opportunity to do amazing work on Rust over the last 3 years. It’s hard to quantify, but I hope people saw a difference due to my work on async traits/closures, the type system, diagnostics, style team, ICE fixes, internal refactors, speedups, edition 2024 etc.

05.09.2025 13:14 πŸ‘ 61 πŸ” 3 πŸ’¬ 1 πŸ“Œ 0

Today’s my last day at AWS working on the Rust compiler. Unfortunately, back in July I received notice that I had to choose between moving to Boston from NYC, or leaving the company due to RTO policy. I unfortunately couldn’t abandon the city I plan on being my long term home.

05.09.2025 13:14 πŸ‘ 138 πŸ” 11 πŸ’¬ 1 πŸ“Œ 3