Live data from Hacker News

C++ Standards Contributor Expelled for 'The Undefined Behavior Question'

slashdot.org

61–70 of 122 posts

Re: C++ Standards Contributor Expelled for 'The Undefined Behavior Question'

#61
post #31

This appears to be the source of the backlash: https://izzys.casa/2024/11/on-safe-cxx/

while not the direct subject of this issue, that blog post is completely unhinged.

as a sibling comment said: "idiots all around".

or perhaps simply extremely bad at interpreting and handling social skills and emotions.

Re: C++ Standards Contributor Expelled for 'The Undefined Behavior Question'

#62

The author of the paper is not competent in the subject matter. A compiler can make assumptions that behavior is well defined, and it can also identify situations where it is confirmed undefined. All of that reasoning happens before runtime. For instance, and unreachable assertion works by invoking undefined behavior. What identified by the function-call-like syntax unreachable(). If we have: S; unreachable(); then,…

As it is based on my C paper, I can comment on this. While the compiler reasons at translation-time the question is whether an operation that UB is allowed to affect previous observable behavior at run-time. We looked at this and came to the conclusions that 1) the wording of the C standard never really allowed this (but the C++ standard did), 2) it is completely useless for worthwhile optimizations, 3) examples where compilers exploited this intentionally turned out to be buggy, 4) it makes UB even more dangerous. So we made sure the C standard clarifies that UB can not travel backwards in in time.

I agree the title of the paper is unfortunate. I do not believe the author was intentionally trying to send an antisemitic message, but I do not know him well (I corresponded with him about his other paper)

Re: C++ Standards Contributor Expelled for 'The Undefined Behavior Question'

#63
post #62

The author of the paper is not competent in the subject matter. A compiler can make assumptions that behavior is well defined, and it can also identify situations where it is confirmed undefined. All of that reasoning happens before runtime. For instance, and unreachable assertion works by invoking undefined behavior. What identified by the function-call-like syntax unreachable(). If we have: S; unreachable(); then,…

As it is based on my C paper, I can comment on this. While the compiler reasons at translation-time the question is whether an operation that UB is allowed to affect previous observable behavior at run-time. We looked at this and came to the conclusions that 1) the wording of the C standard never really allowed this (but the C++ standard did), 2) it is completely useless for worthwhile optimizations, 3) examples wher…

Observable behavior is a formal concept: a normative term in ISO C.

If statement S has observable behavior, then that may not be removed by an optimization.

But if S is declared as not being reached, does it still have observable behavior?

Is my example considered a case of UB affecting prior observable behavior? Why or why not?

Re: C++ Standards Contributor Expelled for 'The Undefined Behavior Question'

#64
This seems insane. I think there must be part of the story we're not hearing.

Not saying I'd agree with it even with the whole story, I don't know, but I am dubious of this being the full story, because in fact communities are not _that_ crazy.

Re: C++ Standards Contributor Expelled for 'The Undefined Behavior Question'

#65
post #62

Earlier quoted context omitted.

As it is based on my C paper, I can comment on this. While the compiler reasons at translation-time the question is whether an operation that UB is allowed to affect previous observable behavior at run-time. We looked at this and came to the conclusions that 1) the wording of the C standard never really allowed this (but the C++ standard did), 2) it is completely useless for worthwhile optimizations, 3) examples wher…

Observable behavior is a formal concept: a normative term in ISO C. If statement S has observable behavior, then that may not be removed by an optimization. But if S is declared as not being reached, does it still have observable behavior? Is my example considered a case of UB affecting prior observable behavior? Why or why not?

For:

  A; // observable
  B; // UB
and when A is reachable, the compiler can not remove A even if it sees at compile-time that B has UB when executed. This is the case in C but not in C++.

If A is not reachable, the code will never be executed at run-time, so while there is no UB at run-time this is irrelevant as the code can simply be removed anyway because it is not reachable. For "unreachable()" the question is tricky and I think this might need to be clarified specifically.

Re: C++ Standards Contributor Expelled for 'The Undefined Behavior Question'

#66
post #65

Earlier quoted context omitted.

Observable behavior is a formal concept: a normative term in ISO C. If statement S has observable behavior, then that may not be removed by an optimization. But if S is declared as not being reached, does it still have observable behavior? Is my example considered a case of UB affecting prior observable behavior? Why or why not?

For: A; // observable B; // UB and when A is reachable, the compiler can not remove A even if it sees at compile-time that B has UB when executed. This is the case in C but not in C++. If A is not reachable, the code will never be executed at run-time, so while there is no UB at run-time this is irrelevant as the code can simply be removed anyway because it is not reachable. For "unreachable()" the question is tricky…

It's not tricky though. Unreachable invokes UB. It's something like the most canonically reduced version of B that we can write.

(Because unreachable is meant to be used in certain ways, implementations can give it relevant diagnostic powers. But all it means "please make the spot in the program have no defined behavior").

If the implementation cannot remove A on grounds of B being undefined, then you need an awkward special case for when B is the unreachable gizmo.

Re: C++ Standards Contributor Expelled for 'The Undefined Behavior Question'

#67
post #65

Earlier quoted context omitted.

For: A; // observable B; // UB and when A is reachable, the compiler can not remove A even if it sees at compile-time that B has UB when executed. This is the case in C but not in C++. If A is not reachable, the code will never be executed at run-time, so while there is no UB at run-time this is irrelevant as the code can simply be removed anyway because it is not reachable. For "unreachable()" the question is tricky…

It's not tricky though. Unreachable invokes UB. It's something like the most canonically reduced version of B that we can write. (Because unreachable is meant to be used in certain ways, implementations can give it relevant diagnostic powers. But all it means "please make the spot in the program have no defined behavior"). If the implementation cannot remove A on grounds of B being undefined, then you need an awkward…

It is tricky because it not specified simply as UB - at least in C. And the question is whether this specification is already the special case or not, and even if we want this special case or rather only the diagnostic.

Re: C++ Standards Contributor Expelled for 'The Undefined Behavior Question'

#68

What actually happened: https://www.reddit.com/r/programming/comments/1gynl1v/c_stan...

You should know better than to take the word of an anonymous comment and call it fact. Andrew T. (the guy in question) gave this statement on Reddit: https://www.reddit.com/r/programming/comments/1gynl1v/c_stan... The rumors surrounding him appear to have originated from https://izzys.casa/2024/11/on-safe-cxx/ What we know is that he was asked to change the title after people complained, and he pushed back on that, knowing it would result in him being kicked out. He views himself as standing up for his moral principles. He also wants the public attention, since he was the one who posted the story to Reddit on /r/cpp. It honestly makes me sad to watch a guy who went to Stanford and worked at Apple and Google get involved with drama like this.

Re: C++ Standards Contributor Expelled for 'The Undefined Behavior Question'

#69

This slashdot article has a big gap in it 1. Person publishes a thing with a title including the word “Question” 2. People say this title has some resonance to do with the Nazi genocide and ask him to change it 3. He refuses to change it 5. He gets expelled from the committee You see the missing piece? Unlike the title, the body text doesn’t say he was expelled for the title or even for refusing to change it. It says…

I'm not sure if you are being serious or not. If the former, there are two problems with the "employer": (1) finding a problem where there is none, (2) firing a person for sticking to the common sense rather that giving in to meaningless accusations.

It seems like you are assuming quite a bit about 2.

I think what GP was getting at is that is something along the lines of if you were accused of misconduct, and in being called into your manager's office for them to ask you about it you behaved unprofessionally enough they no longer thought you were a good fit for the company regardless of whether the accusation was true, they are entirely justified in wanting to end employment. A falsehood can reveal a separate truth about someone.

E.g. Someone falsely says you are always late to group meetings for a group project, and in being questioned you start throwing out racial slurs. Whether you were late is now a lesser issue, and while you woulf be technically correct to say you were falsely accused of being late to a few meeting and were then fired, that isn't correctly relaying the relevant information about why you were fired.

I have no information about whether this is what happened, but I think this is what the GP was trying to express about the information we have as it was presented.

Re: C++ Standards Contributor Expelled for 'The Undefined Behavior Question'

#70
post #31

This appears to be the source of the backlash: https://izzys.casa/2024/11/on-safe-cxx/

Absolutely unhinged rant accusing everyone of being some kind of Nazi or sexual predator. Seeing the "content warning" and design of the page should already be enough to know exactly what to expect about what you are about to read, and what kind of person wrote it.

Is making note of the fact that an individual was convicted of raping a child now the same as "accusing everyone of being some kind of Nazi or sexual predator"?

Do you have some information that would lead to doubt on Arthur's conviction?

Can you elaborate on what "sort of person" means exactly? Is that just to refer to people who point out that someone in a community has raped a child, been convicted of raping a child and is on a sex offenders register? Or some other category?

I think it's troubling that so many people in the replies are seemingly more offended over some swear words than the literal rape of a child.

Post reply on HN