Stream: wg-traits

Topic: weekly meeting 2019-01-28


nikomatsakis (Jan 28 2019 at 19:04, on Zulip):

Hi @WG-compiler-traits, how goes? :wave:

I'm just coming off another call. Be back in a sec.

nikomatsakis (Jan 28 2019 at 19:10, on Zulip):

(back)

nikomatsakis (Jan 28 2019 at 19:11, on Zulip):

one thing I was thinking about

nikomatsakis (Jan 28 2019 at 19:11, on Zulip):

I'm not exactly sure how many folks are coming to All Hands, but I think a number of us from this group

nikomatsakis (Jan 28 2019 at 19:11, on Zulip):

I'm not 100% sure yet of what the meeting strutures will be, but I'm contemplating the idea of having at least one (maybe two) breakout sessions where people can do some focused design on something and then talk about it

nikomatsakis (Jan 28 2019 at 19:12, on Zulip):

and I thought it might be interesting to brainstorm what some trait-related things might be

nikomatsakis (Jan 28 2019 at 19:12, on Zulip):

one thing that jumped to mind was dyn Trait upcast

nikomatsakis (Jan 28 2019 at 19:12, on Zulip):

basically walking through what it would take to make that really work at runtime etc

nikomatsakis (Jan 28 2019 at 19:13, on Zulip):

I do think it's a good idea also to use some time to talk about chalk, but I'm not 100% sure in what form. I think I was planning on having at least one meeting to kind of go over the lowering rules, probably talk some about implied bounds, maybe dive into some of the more advanced stuff -- but this would be a longer, focused meeting.

centril (Jan 28 2019 at 19:13, on Zulip):

re. runtime aspects of upcasting; does that tie into multi trait objects?

nikomatsakis (Jan 28 2019 at 19:13, on Zulip):

I definitely think when it comes to chalk it's worth separating out the sort of "high-level" stuff from the "integrating into rustc" details

nikomatsakis (Jan 28 2019 at 19:14, on Zulip):

re. runtime aspects of upcasting; does that tie into multi trait objects?

I'd prefer to try and separate them

nikomatsakis (Jan 28 2019 at 19:14, on Zulip):

but that is another thing that might be good for the list

nikomatsakis (Jan 28 2019 at 19:14, on Zulip):

(and/or maybe they are inseparable? but I think probably not)

nikomatsakis (Jan 28 2019 at 19:15, on Zulip):

I think my goal here would be for folks to talk it out, sketch a design, with the goal of identifying not only how to do things, but which things are more complex than you might think and require broader discussion (maybe even lang team discusison)

nikomatsakis (Jan 28 2019 at 19:17, on Zulip):

I have a google spreadsheet you can click on to see my current thinking, though I have to circle back with aturon to get an idea of current timing etc

centril (Jan 28 2019 at 19:18, on Zulip):

(It does feel like they are linked at least; e.g. dyn A + B -> dyn A is a sort of upcast; but depending on how multi trait objects are represented that could be easy or hard?)

nikomatsakis (Jan 28 2019 at 19:19, on Zulip):

@scalexm, in terms of chalk implementation, I was thinking that one topic that may be worth "breaking out" is discussing the algorithm for "given a goal to prove, what are the potentially relevant program clauses" -- i.e., what queries do we want for that, etc

scalexm (Jan 28 2019 at 19:19, on Zulip):

@nikomatsakis Mmh ok

scalexm (Jan 28 2019 at 19:20, on Zulip):

The algorithm as it exists right now is not overly complicated

scalexm (Jan 28 2019 at 19:20, on Zulip):

But we may discuss how to enhance it for sure

nikomatsakis (Jan 28 2019 at 19:20, on Zulip):

(It does feel like they are linked at least; e.g. dyn A + B -> dyn A is a sort of upcast; but depending on how multi trait objects are represented that could be easy or hard?)

yes, they are certainly linked but I think that link may be largely one-way. I had always imagined that dyn (A+B) would have two distinct vtables, but you could of course model it with one "meta vtable". Either way though, I think this is sort of building on the case of dyn A to dyn B (where A: B)

nikomatsakis (Jan 28 2019 at 19:20, on Zulip):

But we may discuss how to enhance it for sure

this is what I imagined, but maybe it's not worthwhile?

scalexm (Jan 28 2019 at 19:21, on Zulip):

I don’t know

nikomatsakis (Jan 28 2019 at 19:21, on Zulip):

another implementation detail I think is interesting is how to handle the infernce context, but I think that will be more relevant to discuss in context of IDE

nikomatsakis (Jan 28 2019 at 19:21, on Zulip):

i.e., that's not something to discuss likely entirely in isolation

nikomatsakis (Jan 28 2019 at 19:22, on Zulip):

I also think we can to some extent create new breakout topics on the fly :) I'm mostly brainstorming

scalexm (Jan 28 2019 at 19:22, on Zulip):

Maybe we should try to discuss the chalk integration as a whole, as I think not a lot of people have a clear view of how the process is going, and it may help new people at the All Hands to start being interested in working on it

nikomatsakis (Jan 28 2019 at 19:22, on Zulip):

e.g., maybe if we talk out the chalk lowering rules, a good topic will emerge from that

nikomatsakis (Jan 28 2019 at 19:22, on Zulip):

Maybe we should try to discuss the chalk integration as a whole, as I think not a lot of people have a clear view of how the process is going, and it may help new people at the All Hands to start being interested in working on it

which side of it are you thinking here

nikomatsakis (Jan 28 2019 at 19:22, on Zulip):

like how it works from impl side?

scalexm (Jan 28 2019 at 19:24, on Zulip):

like how it works from impl side?

Yes, I think so?

nikomatsakis (Jan 28 2019 at 19:24, on Zulip):

yes, ok

nikomatsakis (Jan 28 2019 at 19:24, on Zulip):

I was thinking of it for sure

nikomatsakis (Jan 28 2019 at 19:24, on Zulip):

not sure if there will be a slot for that

nikomatsakis (Jan 28 2019 at 19:25, on Zulip):

(although it could take the place of a breakout)

nikomatsakis (Jan 28 2019 at 19:25, on Zulip):

it does feel like it would be a good thing to talk over though

nikomatsakis (Jan 28 2019 at 19:26, on Zulip):

(I'm wondering a bit if there is broader concept worth digging into; e.g., maybe talking about the future of the type checker -- or maybe that's too premature)

nikomatsakis (Jan 28 2019 at 19:26, on Zulip):

so, if we were going to discuss chalk integration, can we outline a bit what that would mean?

nikomatsakis (Jan 28 2019 at 19:26, on Zulip):

I am imagining:

nikomatsakis (Jan 28 2019 at 19:26, on Zulip):
scalexm (Jan 28 2019 at 19:27, on Zulip):

Yes, then we could mention the program_clauses algorithm, which is basically the major callback

nikomatsakis (Jan 28 2019 at 19:27, on Zulip):

and...maybe looking at the different places in rustc that we use trait queries and how they might interact with Chalk. For examine, a question mark for me is how to make method resolution be more chalk-driven (I want it to be the same as normalization)

nikomatsakis (Jan 28 2019 at 19:27, on Zulip):

ah, perhaps lazy normalization ..? it kind of fits into this category

nikomatsakis (Jan 28 2019 at 19:28, on Zulip):

ok, let me take some notes

nikomatsakis (Jan 28 2019 at 19:30, on Zulip):

OK, I noted down those things. It seems like there is some amount of prep that would make sense. Ideally, I think we would sketch this out as something that can be consumed as "homework", and then perhaps quickly walked over in the meeting itself

nikomatsakis (Jan 28 2019 at 19:30, on Zulip):

but some of these topics are mildly dense

nikomatsakis (Jan 28 2019 at 19:31, on Zulip):

i'm not sure how realistic the 'homework' idea is -- or at least, it's a good idea to prep an outline and so forth, but perhaps not to expect people to really grok it until we are able to talk it out live?

nikomatsakis (Jan 28 2019 at 19:31, on Zulip):

I guess another question is who wants to do that prep :)

scalexm (Jan 28 2019 at 19:32, on Zulip):

Homework for us or for the people that will listen to us?

nikomatsakis (Jan 28 2019 at 19:32, on Zulip):

both maybe :)

nikomatsakis (Jan 28 2019 at 19:32, on Zulip):

what I meant though is:

nikomatsakis (Jan 28 2019 at 19:32, on Zulip):

I'm trying to get it so that the meetings have a certain amount of "pre-reading" for attendees

scalexm (Jan 28 2019 at 19:32, on Zulip):

Yes ok

nikomatsakis (Jan 28 2019 at 19:32, on Zulip):

e.g., for the IDE meeting, there is some overview of how RLS works etc

tmandry (Jan 28 2019 at 19:32, on Zulip):

I'm happy to do it (but currently have more free time than most people do)

tmandry (Jan 28 2019 at 19:33, on Zulip):

that said, I think it would make the meetings much more productive if we don't have to catch everyone up on basics

nikomatsakis (Jan 28 2019 at 19:33, on Zulip):

@tmandry you mean you're happy to try and prep the pre-reading material?

nikomatsakis (Jan 28 2019 at 19:33, on Zulip):

one thing I could imagine:

nikomatsakis (Jan 28 2019 at 19:34, on Zulip):

maybe we create a paper doc and kind of create an outline, and then jointly fill in some details, pointers and things

tmandry (Jan 28 2019 at 19:34, on Zulip):

I meant read the pre-reading material, but to the extent that I can help prepare it, maybe :)

nikomatsakis (Jan 28 2019 at 19:34, on Zulip):

haha ok :) perfect

nikomatsakis (Jan 28 2019 at 19:34, on Zulip):

tbh part of the reason I want to create the pre-material

nikomatsakis (Jan 28 2019 at 19:34, on Zulip):

is more so that the presenters are organized :P

nikomatsakis (Jan 28 2019 at 19:34, on Zulip):

though I'd love for people to read it

nikomatsakis (Jan 28 2019 at 19:34, on Zulip):

I just know how it goes in practice most of the time...

nikomatsakis (Jan 28 2019 at 19:34, on Zulip):

but even having skimmed an outline often gives you a "feeling", even though we'll wind up going over it

tmandry (Jan 28 2019 at 19:35, on Zulip):

makes sense

nikomatsakis (Jan 28 2019 at 19:35, on Zulip):

well, anyway, i'm happy to do some of the prep work, @scalexm not sure how much time you have, I could try to send you the paper doc for additions/edits?

nikomatsakis (Jan 28 2019 at 19:36, on Zulip):

(Oh, meta question: I see we're approaching 30 minutes on this meeting, I'm wondering if we want to change the duration to 30 min or maybe 45 instead of an hour? I'm trying to get away from the default of "1 hr" and try to keep things shorter in general.)

nikomatsakis (Jan 28 2019 at 19:36, on Zulip):

/me reclaims their calendar, one minute at a time

tmandry (Jan 28 2019 at 19:37, on Zulip):

(side note: I'm going through TPL right now and didn't realize how much of the background for chalk was available all in one place)

scalexm (Jan 28 2019 at 19:37, on Zulip):

@nikomatsakis if you have time to start writing a document, I should be able to amend it as needed yes

nikomatsakis (Jan 28 2019 at 19:37, on Zulip):

(also, @scalexm and I had an interesting discussion about implied bounds, and we were debating about a "tweaked" formulation that also sugested some answers to some of our terminology questions from yesterday. )

scalexm (Jan 28 2019 at 19:37, on Zulip):

Or I could do that in the plane :p

nikomatsakis (Jan 28 2019 at 19:38, on Zulip):

ok, I'm going to try and create 2 outlines, one for the Lowering Rules and one for the Implementation Question sides. This may be ambitious, but it seems helpful regardless.

nikomatsakis (Jan 28 2019 at 19:38, on Zulip):

I'll also see what the scheduling looks like :)

nikomatsakis (Jan 28 2019 at 19:38, on Zulip):

I've added the dyn trait stuff to the breakout list, in case we wind up doing that

nikomatsakis (Jan 28 2019 at 19:40, on Zulip):

thanks all for the feedback! :tada:

Alexander Regueiro (Jan 28 2019 at 20:00, on Zulip):

@nikomatsakis +1 to the meeting about upcasting (and multi-trait objects?)

Alexander Regueiro (Jan 28 2019 at 20:00, on Zulip):

@nikomatsakis would also be good to talk about lazy normalisation and some of the things it can solve. I think we need to really prioritise fixing type alias bounds now.

Last update: Nov 12 2019 at 17:00UTC