Stream: t-lang/wg-unsafe-code-guidelines

Topic: meeting 2018-10-25


avadacatavra (Oct 24 2018 at 23:21, on Zulip):

Hi everyone--reminder that we'll be meeting tomorrow right here :)

avadacatavra (Oct 25 2018 at 11:03, on Zulip):

I'm currently working on an introduction to the representation section:
- why does data representation/layout matter: ABI compatibility, optimizations, any others?
- overview of type properties (borrowing heavily from https://gankro.github.io/blah/rust-layouts-and-abis/)

I don't think I'll have the PR submitted before the meeting today, so if there's anything you think should be in an intro, let me know :)

RalfJ (Oct 25 2018 at 11:06, on Zulip):

why does data representation/layout matter: ABI compatibility, optimizations, any others?

transmute

avadacatavra (Oct 25 2018 at 11:14, on Zulip):

Today's meeting agenda:

Meetings and DST : will we be changing the meeting time? Will DST make the current time a hardship for anyone? Updates will be communicated via the invite (ping @nikomatsakis if you aren't on the invite and want to be)

Current discussion status
- Is the structs and tuples chapter ready for merge?
- Is the union chapter ready for merge?
- Is the int/floating point chapter done? (no, but I should have a PR later today)
- Writeups needed: enum, fn pointers, references, raw pointers
- Are we doing a separate chapter on vector types? How is that discussion going?

Are we done with the discussions in the issues? If so, we should aim to have writeup PRs by the next meeting and start discussing the next topic. I propose that the next topic be Validity invariants.

RustFest : I won't be attending, but if others are, do you want to do a f2f?

Mozlando : I will be attending. Is there any interest in a f2f?

Any other agenda items I might have missed?

nikomatsakis (Oct 25 2018 at 15:03, on Zulip):

I just pushed an update to the structs-and-tuples chapter to summarize the behavior around empty structs and things in a bit more detail. Hopefully accurate. =)

nikomatsakis (Oct 25 2018 at 15:03, on Zulip):

Are we done with the discussions in the issues? If so, we should aim to have writeup PRs by the next meeting and start discussing the next topic. I propose that the next topic be Validity invariants.

:+1: from me

avadacatavra (Oct 25 2018 at 15:11, on Zulip):

Meeting starting in 5! Does anyone have any other topics to add before we get started?

RalfJ (Oct 25 2018 at 15:16, on Zulip):

hi all!

avadacatavra (Oct 25 2018 at 15:16, on Zulip):

Hi everyone!

Alan Jeffrey (Oct 25 2018 at 15:16, on Zulip):

Hi!

avadacatavra (Oct 25 2018 at 15:17, on Zulip):

Thanks to @nikomatsakis and @RalfJ for their excellent work on structs/tuples and unions

Aaron Weiss (Oct 25 2018 at 15:17, on Zulip):

Hello!

avadacatavra (Oct 25 2018 at 15:17, on Zulip):

I think that the struct/tuple discussion is nearly wrapped up (maybe merging later today?)

avadacatavra (Oct 25 2018 at 15:17, on Zulip):

When do we think that the union chapter will be done?

RalfJ (Oct 25 2018 at 15:20, on Zulip):

there seem to be two open comments

RalfJ (Oct 25 2018 at 15:20, on Zulip):

one is disagreement about whether we should include invariant things (I think we shouldnt)

RalfJ (Oct 25 2018 at 15:21, on Zulip):

though I agree that maybe once we have both invariant and representation "done", it might be worth structuring them together

avadacatavra (Oct 25 2018 at 15:21, on Zulip):

I agree--invariants are the next topic :)

RalfJ (Oct 25 2018 at 15:21, on Zulip):

i.e., struct invariant goes with struct layout, etc.

Nicole Mazzuca (Oct 25 2018 at 15:21, on Zulip):

the other looks like just a typo?

avadacatavra (Oct 25 2018 at 15:21, on Zulip):

sounds like we should have both merged by end of today then!

RalfJ (Oct 25 2018 at 15:21, on Zulip):

and then @nikomatsakis said sth about repr(C) and ABI

RalfJ (Oct 25 2018 at 15:21, on Zulip):

which I dont entirely follow

RalfJ (Oct 25 2018 at 15:22, on Zulip):

I guess it's just that if a union is passed by-value to C it must be repr(C)?

RalfJ (Oct 25 2018 at 15:22, on Zulip):

but that's true for anything, I thought?

avadacatavra (Oct 25 2018 at 15:22, on Zulip):

I'd say take the discussion offline

RalfJ (Oct 25 2018 at 15:22, on Zulip):

okay, I will ask in the thread

avadacatavra (Oct 25 2018 at 15:22, on Zulip):

But it sounds like both are nearly ready to wrap up

avadacatavra (Oct 25 2018 at 15:22, on Zulip):

@Nicole Mazzuca iirc you'd volunteered for the fn pointers writeup?

Nicole Mazzuca (Oct 25 2018 at 15:23, on Zulip):

yep, I'm just apparently really bad at starting it

Nicole Mazzuca (Oct 25 2018 at 15:23, on Zulip):

I'll do it by end of day

avadacatavra (Oct 25 2018 at 15:24, on Zulip):

Wonderful!

avadacatavra (Oct 25 2018 at 15:24, on Zulip):

So, I saw that an issue about vectors is in the repo now--will that get it's own section, or is it part of an existing one

nikomatsakis (Oct 25 2018 at 15:25, on Zulip):

o/ sorry I'm late, took longer to walk home than anticipated

nikomatsakis (Oct 25 2018 at 15:25, on Zulip):

/me reads back-scroll

avadacatavra (Oct 25 2018 at 15:25, on Zulip):

Also, is packed/align a separate issue, or part of an existing section?

avadacatavra (Oct 25 2018 at 15:25, on Zulip):

/me looks at last weeks notes and see that she signed up for references and pointers and forgot...oops

avadacatavra (Oct 25 2018 at 15:26, on Zulip):

Is anyone else interested in doing the ref/pointer writeup? I'm happy to still do it, but won't have time until next week

nikomatsakis (Oct 25 2018 at 15:27, on Zulip):

Also, is packed/align a separate issue, or part of an existing section?

I covered them in the structs section

Alan Jeffrey (Oct 25 2018 at 15:27, on Zulip):

@avadacatavra an issue about vectors? Hmm, I guess that means there's a general issue about whether we're doing guidelines just for Rust or for Rust+std.

nikomatsakis (Oct 25 2018 at 15:27, on Zulip):

but I .. suppose they can be applied to other types

nikomatsakis (Oct 25 2018 at 15:27, on Zulip):

there's no perfect organization :)

nikomatsakis (Oct 25 2018 at 15:27, on Zulip):

(same sort of applies to #[repr(C)], as @RalfJ just noted)

avadacatavra (Oct 25 2018 at 15:27, on Zulip):

@nikomatsakis in the interests of moving on to new and exciting things, let's leave them where they are and we can always reorganize in editing later on

nikomatsakis (Oct 25 2018 at 15:27, on Zulip):

but I .. suppose they can be applied to other types

can they? at least align presumably canbe?

nikomatsakis (Oct 25 2018 at 15:28, on Zulip):

agreed

RalfJ (Oct 25 2018 at 15:28, on Zulip):

seems like there should be a chapter on repr attributes?

nikomatsakis (Oct 25 2018 at 15:28, on Zulip):

I was thinking there should be a section, even if it just says e.g. "see the section on repr(C) included with each type for details about that sort of type"

avadacatavra (Oct 25 2018 at 15:28, on Zulip):

seems like there should be a section on repr attributes?
isn't that in niko's section? or am i thinking of something else

avadacatavra (Oct 25 2018 at 15:28, on Zulip):

ok

nikomatsakis (Oct 25 2018 at 15:28, on Zulip):

I aslo don't want to waste too much time "perfecting" it

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

seems like something we can cleanup async

RalfJ (Oct 25 2018 at 15:29, on Zulip):

niko is talking about a subsection of the struct/tuples chapter

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

(maybe we can open an issue though)

RalfJ (Oct 25 2018 at 15:29, on Zulip):

I think

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

(correct)

avadacatavra (Oct 25 2018 at 15:29, on Zulip):

gankro's post has all of those, so i'll talk to them and see if they're ok with me stealing the repr section

Nicole Mazzuca (Oct 25 2018 at 15:29, on Zulip):

it'd be great to move the meeting slightly, btw, because I need to leave right now for class :P

Nicole Mazzuca (Oct 25 2018 at 15:29, on Zulip):

o7

RalfJ (Oct 25 2018 at 15:29, on Zulip):

I meant something on the same organizational level as the chapters:

Nicole Mazzuca (Oct 25 2018 at 15:29, on Zulip):

gankro's post is really good

avadacatavra (Oct 25 2018 at 15:30, on Zulip):

ok so the sections that need writeups then are:

avadacatavra (Oct 25 2018 at 15:30, on Zulip):

1. enums
2. refs and pointers

avadacatavra (Oct 25 2018 at 15:30, on Zulip):

3. ? vectors

RalfJ (Oct 25 2018 at 15:30, on Zulip):

it'd be great to move the meeting slightly, btw, because I need to leave right now for class :P

what are your constraints and which timezone youre going to be in next week? I think we were going to talk about the time in the light of DST later anyway.

nikomatsakis (Oct 25 2018 at 15:31, on Zulip):

what is the vector issue? I should check tha tout

nikomatsakis (Oct 25 2018 at 15:31, on Zulip):

oh, like SIMD

avadacatavra (Oct 25 2018 at 15:32, on Zulip):

I'd like to make sure that all of the current issues have writeups by our next meeting, so if anyone is interested in doing a writeup, ping me (or comment on the issue

nikomatsakis (Oct 25 2018 at 15:32, on Zulip):

I also would like to see that happen

nikomatsakis (Oct 25 2018 at 15:33, on Zulip):

I suppose I can do another write-up if needed

avadacatavra (Oct 25 2018 at 15:33, on Zulip):

That way, we can start discussing VALIDITY INVARIANTS

nikomatsakis (Oct 25 2018 at 15:33, on Zulip):

woohoo!

avadacatavra (Oct 25 2018 at 15:33, on Zulip):

@nikomatsakis i'm hoping that we can find someone else to (partially to give you a break and partially to give someone else an opportunity). if there's no takers by next week, i'll take you up on that

RalfJ (Oct 25 2018 at 15:34, on Zulip):

"validity invariants -- where structs are easy and unions hard" ;)

nikomatsakis (Oct 25 2018 at 15:34, on Zulip):

sounds good, i'd also like to see others getting involved

avadacatavra (Oct 25 2018 at 15:34, on Zulip):

/me will start a twitter for the wg or something to publicize ways to get involved

avadacatavra (Oct 25 2018 at 15:34, on Zulip):

Ok so there will be a PR later today about changing the active discussion then!

RalfJ (Oct 25 2018 at 15:34, on Zulip):

before we got the writeups...?

avadacatavra (Oct 25 2018 at 15:35, on Zulip):

@RalfJ I think that we can start the next discussions while we asynchronously refine the writeups

RalfJ (Oct 25 2018 at 15:35, on Zulip):

kk

avadacatavra (Oct 25 2018 at 15:35, on Zulip):

i don't want to get bogged down in not moving on until everything is perfect :)

RalfJ (Oct 25 2018 at 15:36, on Zulip):

true. I'd also not want discussions to overlap too much though.

nikomatsakis (Oct 25 2018 at 15:36, on Zulip):

sounds great

nikomatsakis (Oct 25 2018 at 15:36, on Zulip):

we don't have to merge the PR

nikomatsakis (Oct 25 2018 at 15:36, on Zulip):

but I think having it open is good

RalfJ (Oct 25 2018 at 15:36, on Zulip):

fair enough

avadacatavra (Oct 25 2018 at 15:36, on Zulip):

+1

nikomatsakis (Oct 25 2018 at 15:36, on Zulip):

in particular, the PR ought to kind of clarify the "main threads of discussion"

nikomatsakis (Oct 25 2018 at 15:36, on Zulip):

and iirc that took a bit of back and forth this time

RalfJ (Oct 25 2018 at 15:37, on Zulip):

okay

nikomatsakis (Oct 25 2018 at 15:37, on Zulip):

shall we merge https://github.com/rust-rfcs/unsafe-code-guidelines/pull/31 ?

nikomatsakis (Oct 25 2018 at 15:37, on Zulip):

we can give the commit a bit of time

avadacatavra (Oct 25 2018 at 15:38, on Zulip):

While we're talking about writeups, I want to make a note about how to handle disagreement/bikeshedding/etc. With the work we're doing, I totally expect some of that to happen. Instead of getting too deep in the weeds/bikeshed, I'd prefer to document the discussion and different points (which @nikomatsakis did a great job in the structs/tuples writeup) so that we can continue to make progress and potentially revisit the issues at a later date

avadacatavra (Oct 25 2018 at 15:38, on Zulip):

@nikomatsakis i think it looks good. we can always make more PRs later on if necessary :D

nikomatsakis (Oct 25 2018 at 15:39, on Zulip):

re: disagreement, I agree, I think the idea of opening successively more refined issues felt "ok" — though we do have to ensure that they get wrapped up

nikomatsakis (Oct 25 2018 at 15:39, on Zulip):

one question I am not entirely clear on

nikomatsakis (Oct 25 2018 at 15:39, on Zulip):

what to do with lingering points from previous discussion?

nikomatsakis (Oct 25 2018 at 15:39, on Zulip):

i.e., I think it's ok if we leave "FIXME"-style issues open, but move the "focus of discussion" to something else...

avadacatavra (Oct 25 2018 at 15:39, on Zulip):

I agree--I don't think that we're going to be able to resolve everything immediately

avadacatavra (Oct 25 2018 at 15:40, on Zulip):

I'll think about ways to not let those FIXMEs/TODOs get lost (and if anyone has ideas, ping me)

nikomatsakis (Oct 25 2018 at 15:40, on Zulip):

as long as there are open issues, it seems .. ok?

nikomatsakis (Oct 25 2018 at 15:40, on Zulip):

we should just make a point to circle back

nikomatsakis (Oct 25 2018 at 15:41, on Zulip):

perhaps around this time when we are deciding on the next "focus" :)

avadacatavra (Oct 25 2018 at 15:41, on Zulip):

wfm

nikomatsakis (Oct 25 2018 at 15:41, on Zulip):

I guess it's like code FIXMEs -- it'd be great if we can log specific things in the future that we are blocked on, if that applies

RalfJ (Oct 25 2018 at 15:41, on Zulip):

I'll think about ways to not let those FIXMEs/TODOs get lost (and if anyone has ideas, ping me)

github labels?

nikomatsakis (Oct 25 2018 at 15:41, on Zulip):

(I imagine there are sometimes circularities -- e.g., with union representation and validity invariants ..)

nikomatsakis (Oct 25 2018 at 15:41, on Zulip):

this btw is why I was shooting for labels like topic-foo and not current-topic

nikomatsakis (Oct 25 2018 at 15:41, on Zulip):

or at least both

nikomatsakis (Oct 25 2018 at 15:42, on Zulip):

so that we can change current topic but still have issues open from the old one :)

avadacatavra (Oct 25 2018 at 15:42, on Zulip):

we have both atm

RalfJ (Oct 25 2018 at 15:42, on Zulip):

we have "current-topic"?

avadacatavra (Oct 25 2018 at 15:42, on Zulip):

which i like

nikomatsakis (Oct 25 2018 at 15:42, on Zulip):

yes, that's fine

RalfJ (Oct 25 2018 at 15:42, on Zulip):

ah both makes sense

avadacatavra (Oct 25 2018 at 15:42, on Zulip):

So, the last thing I wanted to talk about is face to faces

avadacatavra (Oct 25 2018 at 15:42, on Zulip):

I won't be at RustFest Rome (because I'll be in Paris)

nikomatsakis (Oct 25 2018 at 15:42, on Zulip):

we have a lot of open issues right now

nikomatsakis (Oct 25 2018 at 15:43, on Zulip):

I won't be at RustFest Rome (because I'll be in Paris)

me neither :( :(

RalfJ (Oct 25 2018 at 15:43, on Zulip):

(because I'll be in Paris)

so close and yet so far...

avadacatavra (Oct 25 2018 at 15:43, on Zulip):

we have a lot of open issues right now

I'm hoping that we can resolve some of them by next meeting, but I've also noticed that a number of them are future discussions, which i like

avadacatavra (Oct 25 2018 at 15:44, on Zulip):

I'm more than happy to do a f2f at Orlando for anyone who is there--this could be a formal meeting, hacking on stuff, or just hanging out

avadacatavra (Oct 25 2018 at 15:44, on Zulip):

I'm hoping that at one of the rust confs next year, we can do the same

nikomatsakis (Oct 25 2018 at 15:44, on Zulip):

(re: the open issues, it'd be good to have everything assigned that we expect to be closed before we move on)

avadacatavra (Oct 25 2018 at 15:46, on Zulip):

So, for anyone reading this asynchronously, let me know if you want a f2f in orlando or at a rust gathering next year (i should be at more of those unless they're when i already have a vacation like this year)

avadacatavra (Oct 25 2018 at 15:47, on Zulip):

That's all I had on my agenda. Anything else?

nikomatsakis (Oct 25 2018 at 15:47, on Zulip):

(f2f in Orlando seems good)

Alan Jeffrey (Oct 25 2018 at 15:48, on Zulip):

f2f in Orlando works for me, but it will be moz-folks-only I suspect :/

avadacatavra (Oct 25 2018 at 15:48, on Zulip):

yeah...that's why i want to do one at a general rust thing...but we've kinda run out of those

nikomatsakis (Oct 25 2018 at 15:48, on Zulip):

there is Rust LATAM in March :)

RalfJ (Oct 25 2018 at 15:48, on Zulip):

got to catch a bus, talk to you later!

nikomatsakis (Oct 25 2018 at 15:48, on Zulip):

/me plan to go

avadacatavra (Oct 25 2018 at 15:49, on Zulip):

/me can't even think about next years travel yet

nikomatsakis (Oct 25 2018 at 15:50, on Zulip):

thanks all! (esp. @avadacatavra )

avadacatavra (Oct 25 2018 at 15:50, on Zulip):

Great talk--as always, reach out to me if there's anything you want to discuss and I'll post a summary and make a twitter later today!

Last update: Nov 19 2019 at 18:40UTC