Stream: wg-traits

Topic: meeting 2019.05.06


nikomatsakis (May 06 2019 at 17:37, on Zulip):

Meeting here in ~30 minutes. I've updated the sprint document to contain more of the details from this sprint. I've also tried to open more issues and things, though I suspect we could do better at "opening up" smaller steps and filing issues.

nikomatsakis (May 06 2019 at 18:02, on Zulip):

Hey @WG-traits -- sync?

nikomatsakis (May 06 2019 at 18:02, on Zulip):

See my message above. Last week, I said that I'd do my best to create mentoring instructions, and I've tried :)

detrumi (May 06 2019 at 18:03, on Zulip):

The sprint document is pretty clear, if that's what you mean

nikomatsakis (May 06 2019 at 18:04, on Zulip):

That's what I mean ..

nikomatsakis (May 06 2019 at 18:04, on Zulip):

I guess we can briefly overview what's there

nikomatsakis (May 06 2019 at 18:05, on Zulip):

@Keith Yeung is looking at extending chalk with dyn and impl types, laying the groundwork for trait objects; once that work is done, we'll want to discuss how to integrate those rules into implied bounds (@scalexm has a proposal here)

nikomatsakis (May 06 2019 at 18:06, on Zulip):

@Sunjay Varma is looking at some of the "basics of specialization. I'm separating that work into a few parts. This part is the simpler part, I think. It focuses on "if have a legal specialization (for some definition), how do we adjust the chalk lowering to take that into account"

nikomatsakis (May 06 2019 at 18:06, on Zulip):

The trickier bits will come in later, when we talk about how to determine if a specialization is legal

nikomatsakis (May 06 2019 at 18:07, on Zulip):

actually, under the goal of

# Validate search strategy

there might be some more things to add

nikomatsakis (May 06 2019 at 18:07, on Zulip):

@tmandry -- you had some PR that extended support for builtin traits in some ways, right?

nikomatsakis (May 06 2019 at 18:08, on Zulip):

(in rustc, I think)

tmandry (May 06 2019 at 18:08, on Zulip):

yes, https://github.com/rust-lang/rust/pull/60183

nikomatsakis (May 06 2019 at 18:08, on Zulip):

It occurs to me that we might port some of that work to chalk-solve, which is where I think it belongs in chalk

nikomatsakis (May 06 2019 at 18:09, on Zulip):

There is also probably work to build on the hooks that @Keith Yeung landed, which control the order in which we evaluate goals

detrumi (May 06 2019 at 18:09, on Zulip):

Feels like we're chasing the rustc impl a bit here

Keith Yeung (May 06 2019 at 18:09, on Zulip):

it doesn't really "control" the order just yet; it's merely a framework for now

nikomatsakis (May 06 2019 at 18:10, on Zulip):

Feels like we're chasing the rustc impl a bit here

yeah, I think ideally rustc would depend on chalk-solve, but that's not possible at the moment, so there is some duplication

nikomatsakis (May 06 2019 at 18:10, on Zulip):

the "non-enumerate goal" extends to chalk-engine apply to both

Keith Yeung (May 06 2019 at 18:10, on Zulip):

i have a quick question: do new subgoals get added to the end of the queue during solving?

Keith Yeung (May 06 2019 at 18:11, on Zulip):

if so, then our currently algorithm is pretty much a LIFO (that is, by selecting the last goal in the queue)

nikomatsakis (May 06 2019 at 18:11, on Zulip):

That question is hard to answer; solving doesn't have a queue, for example :)

nikomatsakis (May 06 2019 at 18:11, on Zulip):

Or at least not a "central" queue

nikomatsakis (May 06 2019 at 18:11, on Zulip):

And there aren't new goals

nikomatsakis (May 06 2019 at 18:11, on Zulip):

Well, sometimes there are.

nikomatsakis (May 06 2019 at 18:12, on Zulip):

Actually, this is precisely what I had planned to talk about in the meeting that follows this one

nikomatsakis (May 06 2019 at 18:12, on Zulip):

(chalk-engine crate)

tmandry (May 06 2019 at 18:12, on Zulip):

we do have sub-goals which delegate to other tables, which each have (essentially) a queue of goals, right?

tmandry (May 06 2019 at 18:13, on Zulip):

or sort of an implicit, lazily initialized queue :)

tmandry (May 06 2019 at 18:13, on Zulip):

anyway, we can talk about it later

Sunjay Varma (May 06 2019 at 18:13, on Zulip):

Our video meeting today is about chalk engine, right? We could answer the question there

nikomatsakis (May 06 2019 at 18:14, on Zulip):

right, I think the full answer is that we should cover it in the talk

tmandry (May 06 2019 at 18:14, on Zulip):

yeah, I think ideally rustc would depend on chalk-solve, but that's not possible at the moment, so there is some duplication

just curious, is the primary reason for this the lack of a shared type representation?

nikomatsakis (May 06 2019 at 18:14, on Zulip):

Feels like we're chasing the rustc impl a bit here

to circle back to this, I feel like implementing built-in rules in chalk-solve is probably not a great use of time just now

nikomatsakis (May 06 2019 at 18:14, on Zulip):

just curious, is the primary reason for this the lack of a shared type representation?

yes

nikomatsakis (May 06 2019 at 18:15, on Zulip):

I feel like it .. might be possible to factor that out

nikomatsakis (May 06 2019 at 18:15, on Zulip):

but that's another story

nikomatsakis (May 06 2019 at 18:15, on Zulip):

(this is partly why I had such a fine-grained division of crates to start)

detrumi (May 06 2019 at 18:16, on Zulip):

new insights mean new create structures :slight_smile:

nikomatsakis (May 06 2019 at 18:16, on Zulip):

so I guess the main work item remains trying to implement the 'non-enumerable idea', or come up with a better one; I left some high-level notes on how that should work but I'd like to spend more time on it.

nikomatsakis (May 06 2019 at 18:17, on Zulip):

the next goal was

# Goal: Refactoring and Improving chalk itself

nikomatsakis (May 06 2019 at 18:17, on Zulip):

this is kind of a cleanup task

nikomatsakis (May 06 2019 at 18:17, on Zulip):

as we talked about, trying to rename the crates and make them more logical

nikomatsakis (May 06 2019 at 18:18, on Zulip):

also presently unassigned :)

detrumi (May 06 2019 at 18:18, on Zulip):

Pick me!

nikomatsakis (May 06 2019 at 18:18, on Zulip):

seems good to me :)

nikomatsakis (May 06 2019 at 18:19, on Zulip):

@detrumi I don't think I created a chalk issue, but feel free to do so -- do you feel like you have a "feeling" for what should happen here? I sketched a few notes in the paper doc

nikomatsakis (May 06 2019 at 18:19, on Zulip):

(one thing we might consider, as an aside, is whether we want a components directory vs having the crates all live in the "root directory")

nikomatsakis (May 06 2019 at 18:20, on Zulip):

I'm sort of not that particular on the setup but happy to kibbitz :)

detrumi (May 06 2019 at 18:20, on Zulip):

I'll have to look a bit into it first, but I'd like to know at some point what you have in mind for tests

detrumi (May 06 2019 at 18:21, on Zulip):

Like, do the tests themselves need improvement, or is it mainly organization and the running of them that needs to be improved?

nikomatsakis (May 06 2019 at 18:21, on Zulip):

mostly org

nikomatsakis (May 06 2019 at 18:21, on Zulip):

there are many setups which would be fine

nikomatsakis (May 06 2019 at 18:21, on Zulip):

the main observation is that what is presently the "root crate" is really just an elaborate testing harness

nikomatsakis (May 06 2019 at 18:22, on Zulip):

so it'd probably be better to have chalk-solve by the "root crate", and move that harness and supporting infrastructure into other crates; one way to do this would be to use the cargo tests directory to houes the tests themselves

nikomatsakis (May 06 2019 at 18:22, on Zulip):

i.e., the modules full of tests we have today

nikomatsakis (May 06 2019 at 18:22, on Zulip):

there is perhaps further cleanup one could do as well...

detrumi (May 06 2019 at 18:22, on Zulip):

Yup, seems natural

nikomatsakis (May 06 2019 at 18:23, on Zulip):

:check_mark:

nikomatsakis (May 06 2019 at 18:23, on Zulip):

# Goal: rustc-chalk interation improvements

nikomatsakis (May 06 2019 at 18:24, on Zulip):

there is actually more we could write here, I realize, but I feel like the most important is probably to try and "run the solve" and get more specific about what goes wrong. I still feel like there are some unknowns. One thing we do know is a problem is region solving, but I'd sort of like to try and factor that out and see what other problems we hit. Anyway, this is presently unassigned, but I also don't have very discrete tasks broken out because it feels a bit 'exploratory'

nikomatsakis (May 06 2019 at 18:25, on Zulip):

the next ("Lazy norm") is similar -- I still need to follow upon the work I started earlier.

nikomatsakis (May 06 2019 at 18:25, on Zulip):

the last item is "upcasting", which @Alexander Regueiro and @centril have been looking into (and has nothing much to do with chalk) -- I'm not really sure what the steps are there right now

nikomatsakis (May 06 2019 at 18:25, on Zulip):

but if y'all want to briefly update, sounds good

nikomatsakis (May 06 2019 at 18:26, on Zulip):

I guess that about wraps up the tour of what's there -- anybody lurking who wants a task and doesn't have one?

nikomatsakis (May 06 2019 at 18:26, on Zulip):

Or feels stuck?

matklad (May 06 2019 at 18:26, on Zulip):

I have a small note

matklad (May 06 2019 at 18:27, on Zulip):

We've merged chalk PR in rust-analyzer, and we now see it in the profile: https://github.com/rust-analyzer/rust-analyzer/issues/1244#issuecomment-489675789

matklad (May 06 2019 at 18:27, on Zulip):

I haven't looked into this yet, but it might be something interesting to keep in mind

nikomatsakis (May 06 2019 at 18:27, on Zulip):

Ah, great. Yeah, it's not...really ever been optimized? So I would not be surprised to find things are fairly slow. I've got to read more into that integration.

nikomatsakis (May 06 2019 at 18:28, on Zulip):

(Also, it's worth pointing out that the "reproducing rustc" work around built-in bounds etc ought to directly affect rust-analyzer)

nikomatsakis (May 06 2019 at 18:28, on Zulip):

I've been wondering about creating some goals around rust-analyzer and trying to populate them a bit

nikomatsakis (May 06 2019 at 18:29, on Zulip):

Ah, one other thing I jsut remembered is that I'm pretty sure the existing solver has a bug around co-inductive cycles (rustc had a similar bug...) and I need to file an issue with a test case for that...

tmandry (May 06 2019 at 18:30, on Zulip):

also going on is https://github.com/rust-lang/rust/pull/57428, I did an initial review of that

tmandry (May 06 2019 at 18:30, on Zulip):

@nikomatsakis I could use some mentoring so we can finish that :)

nikomatsakis (May 06 2019 at 18:30, on Zulip):

ah, right, let's add that to the list

detrumi (May 06 2019 at 18:30, on Zulip):

I've been wondering about creating some goals around rust-analyzer and trying to populate them a bit

Right, rust-analyzer is pretty good in digging up problems with Chalk atm

nikomatsakis (May 06 2019 at 18:30, on Zulip):

and you + I should schedule a time to chat

nikomatsakis (May 06 2019 at 18:31, on Zulip):

ok, should we do the chalk-engine call now?

Alexander Regueiro (May 07 2019 at 00:06, on Zulip):

@nikomatsakis I've started tinkering around with upcasting now, but I may still lack the big picture view of the code... trying to make sense of eddyb's notes mainly.

Last update: Nov 12 2019 at 15:55UTC