Advertisement · 728 × 90

Posts by Michael (compiler-errors) Goulet

"up go" lmao

3 months ago 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?

3 months ago 1 0 1 0

starting work next week… hopefully i remember how to program

5 months ago 30 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

5 months ago 1 0 0 0

don’t forget 8av and central park west

5 months ago 2 0 0 0
Post image Post image

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

5 months ago 27 3 2 0

khadija al hanafi set was insane last night

6 months ago 4 0 0 0

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

6 months ago 2 0 1 0
Advertisement

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

6 months ago 2 0 1 0

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

7 months ago 5 0 1 0

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

7 months ago 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.

7 months ago 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.

7 months ago 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 🤔.

7 months ago 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).

7 months ago 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.

7 months ago 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.

7 months ago 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

7 months ago 1 0 1 0
Advertisement

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

7 months ago 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

7 months ago 14 1 2 0

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

7 months ago 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 `==`.

7 months ago 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.

7 months ago 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

7 months ago 34 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.

7 months ago 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.

7 months ago 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`.

7 months ago 42 0 1 0
Advertisement

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.

7 months ago 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.

7 months ago 60 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.

7 months ago 137 11 1 3