Stream: wg-traits

Topic: meeting 2019.05.27


nikomatsakis (May 27 2019 at 12:29, on Zulip):

Hey @WG-traits -- it's a holiday here in the US so I won't be around today again. Sorry about that. The good news is that I expect to be more responsive starting tomorrow. Feel free to have the meeting today or not, I'll try to catch up.

For my part, I do have one thing to announce: on the plane ride coming home from PLISS I spent some time thinking about the "non-enumerable" problem. I didn't like my previous solution for various reasons -- I'm not sure how much I had enumerated (no pun intended) the problems I was seeing there, but suffice to say I didn't think it was going to work. The good news is that I came up with another approach for dynamically reordering things. I implemented it on the plane and it seems to be working well. I'm going to try to write-up the idea -- it seems so simple that surely somebody else has already done it somewhere -- but the TL;DR is that the callback for returning the program clauses to solve a goal (e.g., ?T: Sized) now returns an Option<Vec<...>> instead of just a Vec<..>. If you return None, it is called "floundering" and it means that we cannot (or choose not...) generate the full set of rules, more type information is needed (a sort of ambiguous result). This propagates back up the query as far as needed.

nikomatsakis (May 27 2019 at 12:30, on Zulip):

If you're curious, the work is on the "flounder" branch in my fork

nikomatsakis (May 27 2019 at 12:33, on Zulip):

The term "floundering" comes from the fact that if the SLG solver is forced to solve a negative goal that contains unbound variables, like not { ?T: Debug }, it is said to have "floundered" -- in general, the idea is to wait to solve such goals until ?T is known. This is basically what my branch does for things like ?T: Sized -- it defers solving them until later, when ?T would be known. If ?T never becomes known, then the whole table "flounders" and pushes the problem further up.

matklad (May 27 2019 at 12:35, on Zulip):

Awesome! We definitely have non-enumerable things in spades in rust-analyzer :)

nikomatsakis (May 27 2019 at 13:15, on Zulip):

yeah, sorry I've not been responding to the "fuel" conversation, I'll try to get on that

Last update: Nov 18 2019 at 01:40UTC