Stream: t-compiler/wg-polonius

Topic: hybrid algorithm polonius#100


nikomatsakis (Mar 07 2019 at 22:20, on Zulip):

Here is a topic to discuss the hybrid algorithm work (polonius#100).

lqd (Mar 07 2019 at 22:39, on Zulip):

@Albin Stjerna until Matthew's intro you can take a look at polonius-engine: your new algorithm will need to be added in the algorithms list, its behaviour hooked up here to call your function linking the "location insensitive" algorithm function to the "optimized full analysis" algorithm function — so in your variant's module, your function will basically have the same signature as those 2.

nikomatsakis (Mar 07 2019 at 22:40, on Zulip):

I moved your comment over here @lqd ;)

lqd (Mar 07 2019 at 22:40, on Zulip):

I was wondering what sort of wizardry was happening

lqd (Mar 07 2019 at 22:42, on Zulip):

tests are in the parent crate however, the one including a CLI, test data, etc here — but we really need to refactor them :)

Albin Stjerna (Mar 07 2019 at 22:43, on Zulip):

tests are in the parent crate however, the one including a CLI, test data, etc here but we really need to refactor them :)

Sounds like something that could be done as part of my work? Usually refactoring things is not a bad way of getting into them as an intermediate step

lqd (Mar 07 2019 at 22:44, on Zulip):

I'd think so, as long as we know what to do

lqd (Mar 07 2019 at 22:46, on Zulip):

you could for sure, but working on the analyses themselves etc would be more interesting I presume

Albin Stjerna (Mar 07 2019 at 22:47, on Zulip):

Yeah, there's always an infinite number of things to do I guess

lqd (Mar 07 2019 at 22:47, on Zulip):

right

lqd (Mar 07 2019 at 22:48, on Zulip):

in any case those pointers will give you a head start until us Europeans catch up with your time :)

Albin Stjerna (Mar 07 2019 at 22:50, on Zulip):

Yes! And no worries, I'm visiting my girlfriend, whom I will not see again for several months, in Australia, I am perfectly fine with being very low-intensity for a few more days until I get back home

lqd (Mar 07 2019 at 22:52, on Zulip):

understandable :) enjoy your stay!

Albin Stjerna (Mar 11 2019 at 05:25, on Zulip):

Ok, now I have something: https://github.com/rust-lang/polonius/pull/102

nikomatsakis (Mar 11 2019 at 20:22, on Zulip):

@Albin Stjerna that actually looks fairly close to what I would expect =)

nikomatsakis (Mar 11 2019 at 20:23, on Zulip):

Perhaps a good "next step" would be to have the compiler use it by default, as well

nikomatsakis (Mar 11 2019 at 20:26, on Zulip):

What do you think about this idea?

Albin Stjerna (Mar 12 2019 at 00:07, on Zulip):

It sounds like a good idea and I’ll investigate it!

Albin Stjerna (Mar 12 2019 at 00:08, on Zulip):

Also, please remember that I am very new to Rust itself, so if anyone notices anything weird or non-idiomatic in my code I’d really appreciate feedback!

Jake Goulding (Mar 12 2019 at 00:10, on Zulip):

weird or non-idiomatic

A big benefit of working in a separate crate like polonius is that you can aggressively run clippy and rustfmt to help keep you in the right area.

Albin Stjerna (Mar 12 2019 at 00:10, on Zulip):

Right, clippy. I forgot about that!

nikomatsakis (Mar 12 2019 at 16:59, on Zulip):

we've never used clippy before on the crate (I do't generally run it), so it may have lots of strange lints, I don't know

nikomatsakis (Mar 12 2019 at 16:59, on Zulip):

though I am interested in starting to run it

Jake Goulding (Mar 12 2019 at 17:11, on Zulip):

Personally, I'm a fan in turning on the default Clippy recommendations in CI and perhaps allowing things as needed. I'll also sporadically add in the "all clippy warnings ever" to see if there are things I agree with.

Albin Stjerna (Mar 13 2019 at 10:18, on Zulip):

I ran it now and there are some warnings, in my code among other things (I fixed it). Some of the warnings for the rest of the code seems worth fixing but not as part of my PR, I think.

I’ve also started working on @nikomatsakis’s idea of making all_facts a reference to save some copying, but it wasn’t as easy as I had expected. Haven’t given up yet though!

nikomatsakis (Mar 13 2019 at 18:12, on Zulip):

@Albin Stjerna great; I just realized our Polonius WG meeting wasn't marked weekly

nikomatsakis (Mar 13 2019 at 18:12, on Zulip):

I guess I'll change that

nikomatsakis (Mar 13 2019 at 18:12, on Zulip):

that time still working for ya?

nikomatsakis (Mar 13 2019 at 18:13, on Zulip):

I changed it to 16:00-16:30 UTC-04:00, on the premise that we should need less time to "check on progress"

nikomatsakis (Mar 13 2019 at 18:13, on Zulip):

that said, it's probably a good idea to start looking at the next steps...

Albin Stjerna (Mar 14 2019 at 03:17, on Zulip):

Yes! It’s 21:00 Stockholm time, which is almost guaranteed not to collide with anything ever

nikomatsakis (Mar 14 2019 at 14:34, on Zulip):

@Albin Stjerna I think it'll change after the next week or so when you shift to DST

Albin Stjerna (Mar 14 2019 at 19:37, on Zulip):

Ok, a slightly-less-copying version is now pushed as well!

nikomatsakis (Mar 14 2019 at 20:13, on Zulip):

awesome!

Last update: Nov 15 2019 at 20:00UTC