Stream: wg-traits

Topic: weekly meeting 2019-02-25


nikomatsakis (Feb 25 2019 at 19:01, on Zulip):

Hi @WG-compiler-traits -- it's our regular monday triage.

nikomatsakis (Feb 25 2019 at 19:02, on Zulip):

A few of us got together earlier today to try and make progress towards planning out a roadmap. I'm uploading the video now, but you can also check out the paper doc

nikomatsakis (Feb 25 2019 at 19:03, on Zulip):

we didn't quite get as far as a specific proposal but I think we made a lot of progress, I was just trying to drill a bit more

nikomatsakis (Feb 25 2019 at 19:03, on Zulip):

btw, I've created a WG-Traits directory in Paper

nikomatsakis (Feb 25 2019 at 19:03, on Zulip):

and I think I'm tempted to use this as a "home" planning documents and things, instead of a dedicated GH repo

nikomatsakis (Feb 25 2019 at 19:04, on Zulip):

I can add anyone who asks to the "Rust team" group

nikomatsakis (Feb 25 2019 at 19:04, on Zulip):

which should give you some permissions

nikomatsakis (Feb 25 2019 at 19:05, on Zulip):

I was just starting to try and distill the info from that paper into a series of specific proposals but I didn't quite get that far

nikomatsakis (Feb 25 2019 at 19:05, on Zulip):

though I did e.g. write up some notes about GATs

Sunjay Varma (Feb 25 2019 at 19:05, on Zulip):

Requested access to the folder

nikomatsakis (Feb 25 2019 at 19:06, on Zulip):

@Sunjay Varma I invited you to join the Rust group

nikomatsakis (Feb 25 2019 at 19:06, on Zulip):

maybe it's worth talking about the GATs example just a bit

nikomatsakis (Feb 25 2019 at 19:06, on Zulip):

cause I'm curious to get feedback from folks about it

nikomatsakis (Feb 25 2019 at 19:07, on Zulip):

obviously, this is something that chalk handles with aplomb, but I also think it's something we can integrate fairly easily into rustc, at least at some level

scalexm (Feb 25 2019 at 19:07, on Zulip):

(I’m semi-afk) when can we « revisit the existing rules » for implied bounds? (Also what does that mean at all: do like some kind of recorded session on how they currently work and the open questions if any?)

nikomatsakis (Feb 25 2019 at 19:07, on Zulip):

and -- thinking back on the NLL experience etc -- I think we should expect that integrating chalk in a "shippable" state will take some time. I could easily see it taking a year.

nikomatsakis (Feb 25 2019 at 19:08, on Zulip):

(I could also see it being much faster, but there are a lot of unknowns, and it's a foundation part of the compiler)

nikomatsakis (Feb 25 2019 at 19:08, on Zulip):

(I’m semi-afk) when can we « revisit the existing rules » for implied bounds? (Also what does that mean at all: do like some kind of recorded session on how they currently work and the open questions if any?)

good question. I think the process I imagined @scalexm was yes a recorded session where we dig into the rules and try to spread knowledge around, and then translating that into edits to existing write-ups which form a kind of "spec"

nikomatsakis (Feb 25 2019 at 19:09, on Zulip):

perhaps also exploring some of the variants proposed (e.g., limiting across crates and stuff)

scalexm (Feb 25 2019 at 19:10, on Zulip):

@nikomatsakis sounds good

nikomatsakis (Feb 25 2019 at 19:11, on Zulip):

anyway, so back to GATs

nikomatsakis (Feb 25 2019 at 19:12, on Zulip):

the thing I was thinking is that if we were to try and stand up an implementation on rustc as it is now

nikomatsakis (Feb 25 2019 at 19:12, on Zulip):

I could imagine pursuing this by writing up some mentoring instructions, but it seems like something where we would like to recruit somebody to work on it -- or, maybe, even 2 people who could collaborate a bit.

nikomatsakis (Feb 25 2019 at 19:14, on Zulip):

anyway, maybe that's too far into the weeds. But I'm basically trying to puzzle out how to "run" this effort best

Aaron Turon (Feb 25 2019 at 19:14, on Zulip):

@nikomatsakis to clarify, are we hoping to come out of this meeting with some rough set of "assignments" of people to tasks? or not yet to that stage?

nikomatsakis (Feb 25 2019 at 19:15, on Zulip):

A few of us got together earlier today to try and make progress towards planning out a roadmap. I'm uploading the video now, but you can also check out the paper doc

actually, maybe I should also explain what the structure was here. We basically grouped things into the "kind" of work required, and then tried to pick one or two items from each one that seemed like the most promising for pursuing immediately.

nikomatsakis (Feb 25 2019 at 19:15, on Zulip):

nikomatsakis to clarify, are we hoping to come out of this meeting with some rough set of "assignments" of people to tasks? or not yet to that stage?

I feel like we probably won't get quite that far

nikomatsakis (Feb 25 2019 at 19:15, on Zulip):

but maybe :)

nikomatsakis (Feb 25 2019 at 19:17, on Zulip):

sorry, pondering what Iwant to type :)

nikomatsakis (Feb 25 2019 at 19:17, on Zulip):

I think that what I would say is: I feel like we shouldn't try to plan everything all at once, and that I'd kind of like to pick one or two items of various kinds to start focusing on and trying to see what org structure we think works

scalexm (Feb 25 2019 at 19:18, on Zulip):

(Personally I think I have too little time to try to pursue something else in addition to my ongoing work on chalk/design :/)

nikomatsakis (Feb 25 2019 at 19:18, on Zulip):

I feel like GATs are a good item for "improving rustc as it is today", and also maybe an opportunity to do some teaching moments explaining how rustc works today

nikomatsakis (Feb 25 2019 at 19:20, on Zulip):

@scalexm yeah, so I wouldn't expect any one person to do all the things =)

One of my question marks is just what to pursue when it comes to chalk. I feel like ideally we'd continue to pursue and improve chalk in parallel.

centril (Feb 25 2019 at 19:20, on Zulip):

@nikomatsakis to what extent can we do GATs in rustc today? e.g. can we do type Foo<T>; or would we be limited to lifetimes or...?

nikomatsakis (Feb 25 2019 at 19:21, on Zulip):

I think we can do both, but we might have limitations around bounds

centril (Feb 25 2019 at 19:22, on Zulip):

seems reasonable

nikomatsakis (Feb 25 2019 at 19:23, on Zulip):

I guess a reasonable question to ask is how useful that would be

scalexm (Feb 25 2019 at 19:23, on Zulip):

@nikomatsakis pursuing both in parallel seems like a good thing to do yes, so that we can eventually deliver features before the chalk integration is actually complete, while still being able to prototype everything in chalk as usual

scalexm (Feb 25 2019 at 19:23, on Zulip):

Moreover starting to implement GATs in rustc will probably make it more straightforward to have them handled by the chalk trait solver

nikomatsakis (Feb 25 2019 at 19:24, on Zulip):

Yeah. So thinking more about this, I think what I want to have is an idea of the "tracks" of development

nikomatsakis (Feb 25 2019 at 19:25, on Zulip):

I think I propose roughly 2:

but maybe that last one can be split up, or maybe there's a 3rd:

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

the "possible next steps" list we had in the document was kind of like this:

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

along with some notes of my own

nikomatsakis (Feb 25 2019 at 19:29, on Zulip):

I feel like we are not yet at a state where we are ready to be like doing "widespread implementing"

nikomatsakis (Feb 25 2019 at 19:29, on Zulip):

(i.e., writing up a bunch of mentored issues and putting out a call for folks to come and hack)

nikomatsakis (Feb 25 2019 at 19:29, on Zulip):

not to say we can't write any code ;) I think e.g. @scalexm and @Alexander Regueiro have in-progress things that make sense to pursue

nikomatsakis (Feb 25 2019 at 19:33, on Zulip):

I think a question mark for me is that I don't know who -- besides myself -- has time/appetite to try and "independently pursue" lines of inquiry. ;) I don't 100% know what it means, but I think it is "pick a topic that we think is key and drill into it to make an initial plan for what we will do". The nature of this plan depends a bit on the topic. I think @Aaron Turon it might make sense for you to do some of that.

Aaron Turon (Feb 25 2019 at 19:33, on Zulip):

I agree, though at least at first I'll need your help :)

centril (Feb 25 2019 at 19:33, on Zulip):

Specialization --> at this stage I think mostly conceptual work around how to lower to chalk predicates

Is this taking @Aaron Turon's specialize(T: Bound) form and lowering? We'll need to think from lang POV on how to expose this to users also.

nikomatsakis (Feb 25 2019 at 19:33, on Zulip):

Yes, I think there's some of both there

centril (Feb 25 2019 at 19:34, on Zulip):

Well, Aaron floated a syntax which we can use at least temporarily?

nikomatsakis (Feb 25 2019 at 19:34, on Zulip):

I think for specialization maybe a very first step is actually trying to sketch out the "steps" like so -- kind of, what "kind" of spec do we want to support first, and then do the work of trying to make a chalk version of it, and then consider extensions

nikomatsakis (Feb 25 2019 at 19:35, on Zulip):

And @Aaron Turon I've been thinking it's a natural choice for you

nikomatsakis (Feb 25 2019 at 19:35, on Zulip):

Though I'm definitely happy to follow along ;)

nikomatsakis (Feb 25 2019 at 19:35, on Zulip):

my one doubt is, is it a good choice priority wise? :)

centril (Feb 25 2019 at 19:35, on Zulip):

@Aaron Turon aren't you working on GATs tho?

Aaron Turon (Feb 25 2019 at 19:35, on Zulip):

so it seems like probably the right immediate step is for some group of "subproject leads" to start fleshing out plans for individual projects, and then we can figure out a resource allocation?

nikomatsakis (Feb 25 2019 at 19:35, on Zulip):

though I continue to feel specialization is pretty important, but I'm not sure on what basis I am making that judgement

nikomatsakis (Feb 25 2019 at 19:36, on Zulip):

so it seems like probably the right immediate step is for some group of "subproject leads" to start fleshing out plans for individual projects, and then we can figure out a resource allocation?

yeah and I think it's ok if we don't have a lot right now

nikomatsakis (Feb 25 2019 at 19:36, on Zulip):

i.e., because we are still sort of working out what it means

Aaron Turon (Feb 25 2019 at 19:36, on Zulip):

agreed, starting small/focused seems wise

Aaron Turon (Feb 25 2019 at 19:37, on Zulip):

and that comes back around, i think, to GATs + Chalk being the "obvious" first targets?

nikomatsakis (Feb 25 2019 at 19:37, on Zulip):

so I think I would like to try and drill into two distinct things this week:

nikomatsakis (Feb 25 2019 at 19:37, on Zulip):

yep, so I think chalk is sort of a wild card in that I think we need to think what we mean when we say chalk

centril (Feb 25 2019 at 19:38, on Zulip):

relative to GATs I think it's less of a hard wall that libs authors hit?

I do like the fact that Aaron's surface syntax specialize(T: Bound) is clearly delineated cause it makes it more evident where many sources of non-parametricity arise from :slight_smile:

nikomatsakis (Feb 25 2019 at 19:38, on Zulip):

(the first bullet item on my list is sort of intersecting with the async-await WG I think we need to start, but I think it ovelaps with this group, and @Alexander Regueiro and I in particular had tlaked about working on it)

nikomatsakis (Feb 25 2019 at 19:39, on Zulip):

well, so, it's maybe worth asking ourselves: I keep hearing GATs are important, but I feel like I odn't know exactly what people want them for

nikomatsakis (Feb 25 2019 at 19:39, on Zulip):

I mean I know reasons I've wanted them

nikomatsakis (Feb 25 2019 at 19:39, on Zulip):

but in terms of (e.g.) blocking async-await work etc

nikomatsakis (Feb 25 2019 at 19:39, on Zulip):

it'd be nice to have specific programs we want to compile

nikomatsakis (Feb 25 2019 at 19:39, on Zulip):

and maybe that's the inital work that is needed on GATs, actually

Aaron Turon (Feb 25 2019 at 19:39, on Zulip):

agreed. i can put together a list on the async side

nikomatsakis (Feb 25 2019 at 19:39, on Zulip):

so @Aaron Turon what if we actually nominate you to "project lead" the GATs work (I'll assist)

Aaron Turon (Feb 25 2019 at 19:40, on Zulip):

(NB some of the desired traits would require bounds I believe)

nikomatsakis (Feb 25 2019 at 19:40, on Zulip):

but in this phase it's not really about implementing

nikomatsakis (Feb 25 2019 at 19:40, on Zulip):

and more about trying to decide how much impl is urgntly needed, to inform best path

nikomatsakis (Feb 25 2019 at 19:40, on Zulip):

("this phase" hopefully not lasting very long :)

centril (Feb 25 2019 at 19:40, on Zulip):

@nikomatsakis StreamingIterators, making proptest's Strategy work for producing reference types, that sort of things.. Also abstracting over pointer types, etc.

Aaron Turon (Feb 25 2019 at 19:40, on Zulip):

so Aaron Turon what if we actually nominate you to "project lead" the GATs work (I'll assist)

that sounds good to me. (on a personal note I'd also like to find some way to be involved with Chalk, but not necessarily in a "leading" way)

nikomatsakis (Feb 25 2019 at 19:40, on Zulip):

@centril good list, let's make specific examples for each one

nikomatsakis (Feb 25 2019 at 19:41, on Zulip):

so when it comes to chalk, what I think would be good is to maybe schedule a focused hour to talk out what it means and the plan there

nikomatsakis (Feb 25 2019 at 19:41, on Zulip):

it feels like that is a whole meting on its own

nikomatsakis (Feb 25 2019 at 19:41, on Zulip):

@scalexm do you think you'd be able to participate in such a thing?

centril (Feb 25 2019 at 19:41, on Zulip):

@nikomatsakis sure; in the paper doc or somewhere else?

nikomatsakis (Feb 25 2019 at 19:41, on Zulip):

@centril work it out with @Aaron Turon =)

scalexm (Feb 25 2019 at 19:41, on Zulip):

@nikomatsakis yes I think so

Aaron Turon (Feb 25 2019 at 19:42, on Zulip):

that would be really helpful; might also be good to recommend any specific background reading/code perusal

nikomatsakis (Feb 25 2019 at 19:43, on Zulip):

ok so I see four things then:

nikomatsakis (Feb 25 2019 at 19:43, on Zulip):

this feels like a pretty full agenda for this week if we can pull it off :)

nikomatsakis (Feb 25 2019 at 19:43, on Zulip):

yay team

Aaron Turon (Feb 25 2019 at 19:43, on Zulip):

this sounds great @nikomatsakis!

centril (Feb 25 2019 at 19:44, on Zulip):

(As aforementioned, my tasks for the week is the trait Foo = impl Bar; FCP + tests for @Alexander Regueiro )

nikomatsakis (Feb 25 2019 at 19:44, on Zulip):

PS, I'm going to get back to the habit of trying to write a quick summary on internals after meetings

nikomatsakis (Feb 25 2019 at 19:44, on Zulip):

so I'm going to go do that now

Aaron Turon (Feb 25 2019 at 19:45, on Zulip):

PS, I'm going to get back to the habit of trying to write a quick summary on internals after meetings

don't forget you can always assign somebody to be the week's scribe <3

nikomatsakis (Feb 25 2019 at 19:45, on Zulip):

And thanks to all for participating, this is exactly what I hoped we'd achieve. :tada:

nikomatsakis (Feb 25 2019 at 19:45, on Zulip):

ha, true

centril (Feb 25 2019 at 19:45, on Zulip):

I mean I know reasons I've wanted them

@nikomatsakis cool, send them our way :P

nikomatsakis (Feb 25 2019 at 19:46, on Zulip):

don't forget you can always assign somebody to be the week's scribe <3

I'll scribe this time, but I like the idea of trying to make this a rotating duty

nikomatsakis (Feb 25 2019 at 19:47, on Zulip):

/me notes that down for the future

nikomatsakis (Feb 25 2019 at 20:05, on Zulip):

OK I wrote some notes here:

https://github.com/rust-lang/compiler-team/pull/9

Please feel free to make any suggestions if there are important points I missed.

nikomatsakis (Feb 25 2019 at 20:05, on Zulip):

Also, @centril, I actually wasn't sure what to write about this:

my tasks for the week is the trait Foo = impl Bar; FCP + tests for Alexander Regueiro

for one thing, I don't know what trait Foo = impl Bar is =)

nikomatsakis (Feb 25 2019 at 20:05, on Zulip):

I think maybe you mean Iterator<Item: Bar>?

centril (Feb 25 2019 at 20:06, on Zulip):

@nikomatsakis oops, typo; I meant type Foo = impl Bar;

nikomatsakis (Feb 25 2019 at 20:06, on Zulip):

Ah, ok

nikomatsakis (Feb 25 2019 at 20:06, on Zulip):

I was going to say "woah that is a new feature indeed!"

centril (Feb 25 2019 at 20:06, on Zulip):

:P

varkor (Feb 25 2019 at 21:04, on Zulip):

I haven't been keeping wg-traits on my radar recently, but I'm planning to switch my focus here once the (rustc side of) const generics work is done (or at least, merged and without too many outstanding issues)

varkor (Feb 25 2019 at 21:05, on Zulip):

things are progressing in that area too, so hopefully I'll be able to lend a helping hand to whatever work here is the highest priority soon :)

Alexander Regueiro (Feb 25 2019 at 21:14, on Zulip):

@varkor good stuff! what's the non-rustc side of const generics?

varkor (Feb 26 2019 at 20:02, on Zulip):

const generics in chalk, for one

scalexm (Mar 04 2019 at 19:12, on Zulip):

(deleted)

scalexm (Mar 04 2019 at 19:13, on Zulip):

(deleted)

Last update: Nov 12 2019 at 16:50UTC