Stream: wg-traits

Topic: weekly meeting 2018-10-29


nikomatsakis (Oct 29 2018 at 17:56, on Zulip):

Note @WG-compiler-traits — meeting in 5 minutes or so

nikomatsakis (Oct 29 2018 at 18:04, on Zulip):

Status document: https://paper.dropbox.com/doc/WG-Traits-Planning-Meeting--ALDA5111ZliLv5zlSgbjvDS2Ag-oDfr6ct8xx63HSAOOmIZX

Sunjay Varma (Oct 29 2018 at 18:07, on Zulip):

Niko you mentioned that there is a calendar event for this meeting? Could you add me via varma.sunjay@gmail.com? Thanks :blush:

nikomatsakis (Oct 29 2018 at 18:10, on Zulip):

I was thinking maybe it'd be a good outcome if people use the meting to jot out some plans for the week

nikomatsakis (Oct 29 2018 at 18:10, on Zulip):

so I added an appropriate section

nikomatsakis (Oct 29 2018 at 18:10, on Zulip):

I was going to try and find.. I think there's one other issue I was thinking would be good to explore soon

nikomatsakis (Oct 29 2018 at 18:10, on Zulip):

not meant as a firm commitment or anything, but good way for us to plan

nikomatsakis (Oct 29 2018 at 18:13, on Zulip):

I also added a few notes on projects that I was thinking would be good for someone with a bit of time, probably will take a few steps, but good way to get feet wet

nikomatsakis (Oct 29 2018 at 18:14, on Zulip):
nikomatsakis (Oct 29 2018 at 18:14, on Zulip):

that section :)

nikomatsakis (Oct 29 2018 at 18:14, on Zulip):

anyway, anything to chat about? One thing I've been wondering about is whether we should schedule a time to work out what work needs to be done on the chalk side, of it makes sense to just keep pushing and circle back

nikomatsakis (Oct 29 2018 at 18:15, on Zulip):

one other thing I've been wondering about is whether we can hack up some sort of initial lazy normalization plan that does not go through Chalk. Now that @scalexm landed the new types to represent 'unnormalized' types and things it occurred to me that it was worth thinking about whether some sort of hack might get things working

nikomatsakis (Oct 29 2018 at 18:16, on Zulip):

(in particular, lazy norm problems are blocking the const evaluation work)

tmandry (Oct 29 2018 at 18:17, on Zulip):

I don't feel like I have near enough context to come up with such a hack

nikomatsakis (Oct 29 2018 at 18:18, on Zulip):

yeah, this is probably more on me :)

nikomatsakis (Oct 29 2018 at 18:18, on Zulip):

to think out anyway

nikomatsakis (Oct 29 2018 at 18:18, on Zulip):

the last time I did this, I encountered problems with cycles iirc

nikomatsakis (Oct 29 2018 at 18:18, on Zulip):

the chalk solver resolves those

nikomatsakis (Oct 29 2018 at 18:18, on Zulip):

but maybe there is another route

nikomatsakis (Oct 29 2018 at 18:18, on Zulip):

that would work "at least as well" as what we have now

nikomatsakis (Oct 29 2018 at 18:18, on Zulip):

the problem was something like this

nikomatsakis (Oct 29 2018 at 18:19, on Zulip):

if you have fn foo<T: Iterator<Item = u32>>() {..}

nikomatsakis (Oct 29 2018 at 18:19, on Zulip):

that is a where clause of <T as Iterator>::Item = u32 -- anyway, somehow or another when trying to figure out what T::Item was, we would up in a cycle -- I guess I can't remember the specifics off-hand

nikomatsakis (Oct 29 2018 at 18:20, on Zulip):

but in chalk we separate out "normalizes to" from "equality" (for precisely this reason)

nikomatsakis (Oct 29 2018 at 18:20, on Zulip):

and maybe something similar can be used in rustc to start

nikomatsakis (Oct 29 2018 at 18:20, on Zulip):

if I do get some time to dig into it, I'll do a little write-up, either would be instructive

tmandry (Oct 29 2018 at 18:21, on Zulip):

ok. later in the week I may pick a code issue to tackle, depending on how things go

nikomatsakis (Oct 29 2018 at 18:21, on Zulip):

I'm trying to decide when it's time to start doing more PR to bring in more folks; we don't have a steady supply of good starter issues

nikomatsakis (Oct 29 2018 at 18:21, on Zulip):

I feel like there will come a time that we do

nikomatsakis (Oct 29 2018 at 18:21, on Zulip):

one thing I would like to think about is making Chalk more accessible

nikomatsakis (Oct 29 2018 at 18:22, on Zulip):

right now I fear it is not as "inviting" as it could be (@Sunjay Varma maybe can attest)

Sunjay Varma (Oct 29 2018 at 18:22, on Zulip):

heh I was just going to say :laughing:

nikomatsakis (Oct 29 2018 at 18:22, on Zulip):

we're going to need to extend it to support some more language features eventually and it seems like it'd be nice if it was .. well .. nice :)

Sunjay Varma (Oct 29 2018 at 18:22, on Zulip):

I think the guides are helpful, but we can certainly do a lot to make it even better

Sunjay Varma (Oct 29 2018 at 18:22, on Zulip):

I am really happy to help with that :)

tmandry (Oct 29 2018 at 18:22, on Zulip):

do you two think it's lack of docs, or the code?

nikomatsakis (Oct 29 2018 at 18:22, on Zulip):

I guess I'm not exactly sure what I mean by nice

nikomatsakis (Oct 29 2018 at 18:23, on Zulip):

do you two think it's lack of docs, or the code?

I think maybe a bit of both? Not sure

nikomatsakis (Oct 29 2018 at 18:23, on Zulip):

There is also one specific thing I want to do which is to refactor lowering, @Sunjay Varma maybe this interests you, to be "demand driven"

nikomatsakis (Oct 29 2018 at 18:23, on Zulip):

basically meaning:

nikomatsakis (Oct 29 2018 at 18:23, on Zulip):

make it possible to "lower" a trait at a time

nikomatsakis (Oct 29 2018 at 18:23, on Zulip):

we need to do this for specialization

Sunjay Varma (Oct 29 2018 at 18:23, on Zulip):

Yes I am interested! :smile:

nikomatsakis (Oct 29 2018 at 18:23, on Zulip):

I was thinking of "rebasing" onto salsa, which is a crate that models the rustc query system

nikomatsakis (Oct 29 2018 at 18:24, on Zulip):

and hoping this might be an opportunity to cleanup the code so it is more modular

nikomatsakis (Oct 29 2018 at 18:24, on Zulip):

which @tmandry is one of my "feelings" of what makes it kind of complex

nikomatsakis (Oct 29 2018 at 18:24, on Zulip):

perhaps improved now that I factored out some crates but I think there's still room for more

tmandry (Oct 29 2018 at 18:24, on Zulip):

using salsa would be pretty cool

tmandry (Oct 29 2018 at 18:24, on Zulip):

yes I think that refactoring definitely helped some

Sunjay Varma (Oct 29 2018 at 18:25, on Zulip):

@tmandry It's a bit of both. Chalk requires some expertise in logic programming and quite a bit of expertise in rustc. We're improving over time, but it is still hard to get started

nikomatsakis (Oct 29 2018 at 18:25, on Zulip):

improving the repl might be nice too

tmandry (Oct 29 2018 at 18:25, on Zulip):

I can attest it's hard to get started as well :)

nikomatsakis (Oct 29 2018 at 18:25, on Zulip):

I'm not sure exactly how

Sunjay Varma (Oct 29 2018 at 18:25, on Zulip):

I've been doing this for several months now and I still feel like I don't know nearly enough (though that is of course very much on me as well for not having/putting in the time needed)

nikomatsakis (Oct 29 2018 at 18:25, on Zulip):

but I imagine we could make it easier to interactively explore and visualize what's going on

nikomatsakis (Oct 29 2018 at 18:26, on Zulip):

in my ideal world

Josh Huber (Oct 29 2018 at 18:26, on Zulip):

I've got some extra cycles over the next few weeks, so I'd be happy to play the guinea pig on some starter issue(s). I think, given the level of expertise required, it might be out of reach for me, but I'm willing to give it a go, with some mentoring.

nikomatsakis (Oct 29 2018 at 18:26, on Zulip):

we'd have a VScode plugin in or something

nikomatsakis (Oct 29 2018 at 18:26, on Zulip):

where you can hover over some impls and it will show you the lowered logic :)

Sunjay Varma (Oct 29 2018 at 18:26, on Zulip):

Yes being able to see what the query solver is doing would be great

tmandry (Oct 29 2018 at 18:26, on Zulip):

yeah, I can see chalk as being the ideal "entry point" for this stuff, but it's not there yet

Sunjay Varma (Oct 29 2018 at 18:27, on Zulip):

I wish I wasn't completely swamped all the time so I could put more time into this. I think I could do a lot to help make it easier to get started

tmandry (Oct 29 2018 at 18:27, on Zulip):

interesting idea @ vscode plugin

Sunjay Varma (Oct 29 2018 at 18:27, on Zulip):

Hoping to be able to do that in a few months :)

scalexm (Oct 29 2018 at 18:27, on Zulip):

it would be good to have an up to date documentation to start with, and in particular one describing what is the actual purpose of chalk because people seem to be confused about that

Sunjay Varma (Oct 29 2018 at 18:27, on Zulip):

(depends on how things go this week actually!)

Sunjay Varma (Oct 29 2018 at 18:28, on Zulip):

@nikomatsakis It also depends on the scale at which you want to add people to work on this

tmandry (Oct 29 2018 at 18:28, on Zulip):

it would be good to have an up to date documentation to start with

I can prioritize this for this week

Sunjay Varma (Oct 29 2018 at 18:28, on Zulip):

If you only need a few more people we can probably suffice with just some improved docs

Sunjay Varma (Oct 29 2018 at 18:28, on Zulip):

and some mentorship

Sunjay Varma (Oct 29 2018 at 18:28, on Zulip):

If you need something longer lasting we should put in more thought

scalexm (Oct 29 2018 at 18:29, on Zulip):

@nikomatsakis but yeah the VScode plugin definitely seems like a cool idea

Sunjay Varma (Oct 29 2018 at 18:29, on Zulip):

heh we should build it into RLS so everyone can see it :laughter_tears:

Alexander Regueiro (Oct 29 2018 at 18:29, on Zulip):

dreams, dreams...

nikomatsakis (Oct 29 2018 at 18:29, on Zulip):

well @Sunjay Varma I'm not sure but I guess I want to shoot — long term — for a big group. I have wild fantasies of having a big "team" of trait hackers pursuing independent improvements

nikomatsakis (Oct 29 2018 at 18:30, on Zulip):

e.g. someday I want chalk to be running on some kind of VM :P

nikomatsakis (Oct 29 2018 at 18:30, on Zulip):

I feel like investing now in making the code friendly to newcomers will pay off

nikomatsakis (Oct 29 2018 at 18:30, on Zulip):

e.g., as some of us get distracted by other projects,

nikomatsakis (Oct 29 2018 at 18:30, on Zulip):

it'd be great if it's easy for more people to be arriving

tmandry (Oct 29 2018 at 18:31, on Zulip):

e.g. someday I want chalk to be running on some kind of VM

not sure I understand this

tmandry (Oct 29 2018 at 18:31, on Zulip):

maybe we could do a browser-based tool where you paste in some rust code and see it lowered to logic? using webasm or something

nikomatsakis (Oct 29 2018 at 18:31, on Zulip):

I am referring to things like the WAM VM used to efficiently execute Prolog programs

nikomatsakis (Oct 29 2018 at 18:31, on Zulip):

but that's not really important

tmandry (Oct 29 2018 at 18:32, on Zulip):

ah okay

nikomatsakis (Oct 29 2018 at 18:32, on Zulip):

what I mean is: if we can make chalk into a project that people can hack on, I imagine that some folks will come around who have time to do ambitious projects

nikomatsakis (Oct 29 2018 at 18:32, on Zulip):

basically the "glory" of open source ;)

nikomatsakis (Oct 29 2018 at 18:33, on Zulip):

but first we gotta get it standing up and moving :)

nikomatsakis (Oct 29 2018 at 18:33, on Zulip):

anyway I suppose a VScode plugin integration is probably not the first step we should take. but it might be actually not that hard and fun to do, particularly if we rebuild things on salsa with that in mind

nikomatsakis (Oct 29 2018 at 18:34, on Zulip):

anyway...

Sunjay Varma (Oct 29 2018 at 18:34, on Zulip):

Maybe open some issues for these ideas?

nikomatsakis (Oct 29 2018 at 18:34, on Zulip):

maybe..

Sunjay Varma (Oct 29 2018 at 18:34, on Zulip):

That's also a good way to get new people started. One of the hard things about chalk is it isn't clear what to even do

nikomatsakis (Oct 29 2018 at 18:34, on Zulip):

right, so,

nikomatsakis (Oct 29 2018 at 18:34, on Zulip):

I was wondering if we should schedule a time to sync back up and discuss what to do with chalk

nikomatsakis (Oct 29 2018 at 18:34, on Zulip):

I feel like that is kind of helpful to me (to have something I have to do :)

tmandry (Oct 29 2018 at 18:35, on Zulip):

sure

Sunjay Varma (Oct 29 2018 at 18:36, on Zulip):

sure

nikomatsakis (Oct 29 2018 at 18:36, on Zulip):

could maybe do Thursday at this time

Sunjay Varma (Oct 29 2018 at 18:37, on Zulip):

uhh I probably won't be around then, but feel free to go on without me (this week is busy for me anyway :])

nikomatsakis (Oct 29 2018 at 18:37, on Zulip):

actually i'm beginning to think maybe this week isn't the best

nikomatsakis (Oct 29 2018 at 18:37, on Zulip):

maybe I will try to skech out some details and we can discuss next week

nikomatsakis (Oct 29 2018 at 18:38, on Zulip):

reasons:

Sunjay Varma (Oct 29 2018 at 18:38, on Zulip):

sounds good! happy Halloween everyone! :pumpkin:

nikomatsakis (Oct 29 2018 at 18:39, on Zulip):

sounds good! If anybody is lurking and would like to be involved, feel free to reach out

Josh Huber (Oct 29 2018 at 18:42, on Zulip):

Is #55097 still a possibility for a starter issue? If you find cycles to gather mentoring instructions, I'd be interested in giving it a shot. (or a different issue, if there's a more useful/appropriate option.)

nikomatsakis (Oct 29 2018 at 18:48, on Zulip):

@uberjay definitely!

nikomatsakis (Oct 29 2018 at 18:49, on Zulip):

I'll leave some quick notes if you are interested :)

nikomatsakis (Oct 29 2018 at 18:49, on Zulip):

can leave more later

Josh Huber (Oct 29 2018 at 18:51, on Zulip):

Awesome! That sounds great, thank you! :heart:

Last update: Nov 18 2019 at 02:05UTC