When people can't find fault in the technical argument, they start attacking other things like. > Oh! He is so rude, He insults so much. If you have a better argument to counter his logic, please post that, it would be more useful for everyone involved. Posting pretty useless comments here is pretty lame.
Linus Torvalds on aliasing
71–80 of 284 posts
Re: Linus Torvalds on aliasing
#72I work with a codebase that implements a sort of OO inheritance in C. It looks like this: #define BASE_FIELDS int a; int b; int c; struct Base { BASE_FIELDS }; struct Derived1 { BASE_FIELDS int d; int e; }; struct Derived2 { BASE_FIELDS int f; int g; }; Then, it has lots of code that accesses Derived objects through a `Base*`, with ->a and so on. Is this against the standard C aliasing rules? If so, how would this ne…
Re: Linus Torvalds on aliasing
#73Come on, this is wonderfully blunt! > In fact, I'll take real toilet paper over standards any day, because at least that way I won't have splinters and ink up my arse.
You can be blunt without being rude. Most of the post is just rudeness.
An Englishman saying "that's interesting" can be more rude than someone else saying "get lost"
Re: Linus Torvalds on aliasing
#74To me, this rant seems more directed at C standards people than the guy he sent it to. That doesn't excuse his vitriol, but I hope people will read between the lines. Sometimes people forget that C was created for writing operating systems. They get in their mind that C is all about high-performance, and that making it competitive with FORTRAN is the way to go. I understand that, but it's not what C was created for.…
Re: Linus Torvalds on aliasing
#75Earlier quoted context omitted.
Suppose you want to look at the bits of a floating point number, as though it were an integer. The type punning way to do that would be to access a double in memory through an integer pointer: double d = 3.14; int64_t *p = (int64_t *) &d; // !!! int64_t n = *p; The union aliasing way would be to makeset the double field in a union and read the integer field back: typedef union { double d; int64_t n; } int_or_double;…
No, type punning via unions is a gcc extension. The standard only allows reading a value as the type it was written with or as char, and an access as char is only good for copying. If a char access used different bit order, that would be OK according to the standard because you couldn't tell unless you violated the standard. It seems every compiler will tolerate a memcpy for type punning, even though this isn't requi…
double d = 3.14;
uint64_t i;
memcpy(&i, &d, sizeof(d));
is perfectly kosher.Re: Linus Torvalds on aliasing
#76Linus has done some (okay, lots of) wonderful stuff. However, his attitude here is pretty extreme. Being incredibly rude, then proceeding to merge said pull request. If Linus is willing to merge the PR, then it can't be that bad. Surely there was a more tactful way to approach this, even for Linus.
Why should he NOT being rude? Has anyone ever answered him in the same way? Has anyone ever publicly explained him that while being a sociopathic nerd he still must comply to some basic rules of conduct like we all do. The guy is willingly putting on and supporting the public image he's got and, obviously, loving it. I know, that he's smart and what not, but why should it be an excuse for being an asshole? I just rea…
Yes.
Back in 2014 several DebConf attendees publicly confronted Torvalds, quoting some of the outrageous things he's written to/at people and making him explain himself. It makes for some rather cringy moments and there is no evidence it had any meaningful impact on him. You may watch it all here:
Re: Linus Torvalds on aliasing
#77Linus has done some (okay, lots of) wonderful stuff. However, his attitude here is pretty extreme. Being incredibly rude, then proceeding to merge said pull request. If Linus is willing to merge the PR, then it can't be that bad. Surely there was a more tactful way to approach this, even for Linus.
Re: Linus Torvalds on aliasing
#78Linus has done some (okay, lots of) wonderful stuff. However, his attitude here is pretty extreme. Being incredibly rude, then proceeding to merge said pull request. If Linus is willing to merge the PR, then it can't be that bad. Surely there was a more tactful way to approach this, even for Linus.
He already writes that he's OK with the code ("can live with it") -- he's against the reasoning that accompanies it.
Re: Linus Torvalds on aliasing
#79Re: Linus Torvalds on aliasing
#80It's important to bear in mind that Linux isn't written in standard C - it's written in a dialect of C implemented by recent-ish versions of GCC (there is a particular minimum GCC version supported), with certain compiler switches. There's nothing wrong with this - it's an important enough project to be able to make those kinds of demands.