TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Linus Torvalds on aliasing

150 pointsby r4umalmost 7 years ago

38 comments

mosselmanalmost 7 years ago
I would go out of my way to avoid people who communicate like this with me. People put time and energy in making software better, at least in their own eyes, for others and then they get textually abused like this by someone who has his fame to protect himself with.<p>He also does no service to his own arguments by peppering them with childish swearing because things like &quot;So standards are not some kind of holy book that has to be revered. Standards too need to be questioned.&quot; can&#x27;t be said enough to some people in the industry.<p>If his reply were written with more tact and less swearing it would be a lot more powerful. We as an industry should demand this of each other, but also of our &#x27;celebrity&#x27; colleagues.
评论 #17263696 未加载
评论 #17263829 未加载
评论 #17264157 未加载
评论 #17263769 未加载
评论 #17263793 未加载
评论 #17264803 未加载
评论 #17263868 未加载
评论 #17263894 未加载
评论 #17263697 未加载
pubbyalmost 7 years ago
To me, this rant seems more directed at C standards people than the guy he sent it to. That doesn&#x27;t excuse his vitriol, but I hope people will read between the lines.<p>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&#x27;s not what C was created for. If the world&#x27;s most famous C programmer and OS guru wants to have strong opinions on the direction of the language, I say allow it.
评论 #17263459 未加载
评论 #17263661 未加载
评论 #17263362 未加载
评论 #17263379 未加载
评论 #17263747 未加载
netulealmost 7 years ago
Notice that after his rant, he still tested the code, and merged it: <a href="https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2018&#x2F;6&#x2F;5&#x2F;774" rel="nofollow">https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2018&#x2F;6&#x2F;5&#x2F;774</a>
评论 #17263724 未加载
评论 #17263346 未加载
评论 #17264011 未加载
cafalmost 7 years ago
It&#x27;s important to bear in mind that Linux isn&#x27;t written in standard C - it&#x27;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.<p>There&#x27;s nothing wrong with this - it&#x27;s an important enough project to be able to make those kinds of demands.
评论 #17263409 未加载
评论 #17263727 未加载
评论 #17270260 未加载
nabla9almost 7 years ago
Swearing and profanity is an art form. Habitual swearing is bad style just like habitual use of smileys and LOL&#x27;s.<p>If Linus would habitually curse in the kernel list, it would have no emphasis effect and it would be a really bad style. Linus using cursing in a rant equals [for wider distribution] and it works perfectly. I can&#x27;t remember a single discussion linked to HN that didn&#x27;t start from cursing. It provided the opportunity for people to be offended. For technical people it&#x27;s a challenge (like a glove slap).<p>Example:<p>* his opinion about hardening: <a href="https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2017&#x2F;11&#x2F;21&#x2F;356" rel="nofollow">https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2017&#x2F;11&#x2F;21&#x2F;356</a><p>* previous message that collected the attention: &quot;Those security people are f*cking morons.&quot; <a href="https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2017&#x2F;11&#x2F;17&#x2F;767" rel="nofollow">https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2017&#x2F;11&#x2F;17&#x2F;767</a>
sandGorgonalmost 7 years ago
&gt; <i>The fact is that gcc documents type punning through unions as the &quot;right way&quot;. You may disagree with that, but putting some theoretical standards language over the explicit and long-time documentation of the main compiler we use is pure and utter bullshit.</i><p>this was the whole point of the rant.
CBLTalmost 7 years ago
Previous discussion: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17242103" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17242103</a>
Benjamin_Dobellalmost 7 years ago
Linus 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&#x27;t be <i>that</i> bad. Surely there was a more tactful way to approach this, even for Linus.
评论 #17263403 未加载
评论 #17263396 未加载
评论 #17262966 未加载
watwutalmost 7 years ago
Linus Torvals says something technical and full of insights while keeping control over emotions - crickets nobody cares.<p>Linus Torvals adds some insults into the above or simple does not even attempts to keep control over his emotional side - half people jump up and down happy like a fourteen years old. Wow, look, he used insult! The other half suddenly turns into prude &quot;I never swear nor insult anyone&quot; Victorian aristocrats - despite having tweet feeds full of, and I am quoting here, &quot;fucks&quot;.
henearkralmost 7 years ago
Am I the only one understanding that finding funny ways to rant is one of Linus&#x27; favourites hobbies? And so that he is not doing that to hurt people, but to entertain? He makes that particularly clear by attending gatherings about pirates&#x27; language, etc. Stop try to change him, because without this humorous spice his release notes would be way too boring.
muxatoralmost 7 years ago
Come on, this is wonderfully blunt!<p>&gt; In fact, I&#x27;ll take real toilet paper over standards any day, because at least that way I won&#x27;t have splinters and ink up my arse.
评论 #17262855 未加载
2bitencryptionalmost 7 years ago
first thing I do when I see a Linus email: ctrl+f &quot;braindamage&quot;.<p>never disappoints.
评论 #17262814 未加载
评论 #17262749 未加载
piinbinaryalmost 7 years ago
Google cache: <a href="http:&#x2F;&#x2F;webcache.googleusercontent.com&#x2F;search?q=cache%3Ahttp%3A%2F%2Fwww.yodaiken.com%2F2018%2F06%2F07%2Ftorvalds-on-aliasing%2F&amp;oq=cache%3Ahttp%3A%2F%2Fwww.yodaiken.com%2F2018%2F06%2F07%2Ftorvalds-on-aliasing%2F&amp;aqs=chrome..69i57j69i58.1183j1j7&amp;sourceid=chrome&amp;ie=UTF-8" rel="nofollow">http:&#x2F;&#x2F;webcache.googleusercontent.com&#x2F;search?q=cache%3Ahttp%...</a>
drdreyalmost 7 years ago
Can someone ELI5 what the issue is with type punning and union aliasing?
评论 #17263011 未加载
评论 #17263022 未加载
xenadu02almost 7 years ago
Make this construct legal behavior without making it 10x slower than clang&#x2F;gcc are today:<p><pre><code> void wat(uint16_t *x, uint16_t *y) { *x = *y; } uint64_t a[100] = { 0 }; wat((uint16_t *)&amp;a[0], (uint16_t *)(((char *)&amp;a[0]) + 1)); </code></pre> When you think you&#x27;ve figured that one out, try this one:<p><pre><code> uint16_t heh = 0xFFFF; extern uint16_t doesAnything(uint16_t *, uint16_t *); void wat(uint16_t *x, uint16_t *y) { *x = *y + doesAnything(&amp;heh, y); } uint64_t a[2] = { 0 }; wat((uint16_t *)&amp;a[0], (uint16_t *)(((char *)&amp;a[0]) + 1));</code></pre>
评论 #17263296 未加载
Forge36almost 7 years ago
How well do they know each other? Is it possible Rafael (the contributor) wasn&#x27;t as upset by this as an outside observer?<p>Linus is obviously being harsh, his words are also preserved publicly as a part of the contribution. He&#x27;s arguing against the logical fallacy. Had he not swore: would we discuss this?
matt4077almost 7 years ago
I&#x27;m in no way offended by Torvalds&#x27; typical expletive-laden rants. But they do strike me as a terrible way to communicate.<p>These outbursts seem to happen every few weeks, and have long seized to surprise. IF anything actually bad ever comes up, he has no further escalation available to raise awareness.<p>It also reminds me of these choleric bosses screaming at someone every day: it&#x27;s almost always a sign that they&#x27;re insecure, sociopaths, or can&#x27;t handle their responsibilities.
评论 #17263966 未加载
minipci1321almost 7 years ago
I never take these &quot;what Linus just said&quot; posts for their face value. To me, it sounds as a half-staged, half-talking-to-buddies, mostly good-natured grudges, for some reason I cannot explain. (That said, I am not contributing to kernel, my very first post to some kernel list got a much worse response for no good reason (not from Linus). It was enough.)<p>But I work in customer support of highly technical products, and I visit various companies very often. By now, I can figure this type of persons from the first communication -- not the ones who does it the way Linus does it (see above), but the real a&amp;^%$%^$les -- owning some inner knowledge unavailable to others, just because they happened to be here from the bigbang and haven&#x27;t evolved since. Boy, is this &quot;rough but just and truthful&quot; attitude counter-productive to projects! I haven&#x27;t seen any exception to that yet.
solotronicsalmost 7 years ago
I never really understood why people complain about Linus personality. If you don&#x27;t like it go somewhere else nobody is forcing you to code for Linux.<p>Fork it and make your own.
评论 #17263348 未加载
评论 #17263026 未加载
评论 #17263017 未加载
thecompilralmost 7 years ago
Can&#x27;t say much changed over the years <a href="https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2003&#x2F;2&#x2F;26&#x2F;158" rel="nofollow">https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2003&#x2F;2&#x2F;26&#x2F;158</a>
ufoalmost 7 years ago
I work with a codebase that implements a sort of OO inheritance in C. It looks like this:<p><pre><code> #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; }; </code></pre> Then, it has lots of code that accesses Derived objects through a `Base*`, with -&gt;a and so on.<p>Is this against the standard C aliasing rules? If so, how would this need to be rewritten to conform to the standard?
评论 #17263127 未加载
评论 #17263845 未加载
评论 #17263373 未加载
jhoechtlalmost 7 years ago
&gt; In fact, I&#x27;ll take real toilet paper over standards any day, because at least that way I won&#x27;t have splinters and ink up my arse.<p>So Linus, made my day!
badpennyalmost 7 years ago
Kind of sad that a person as intelligent as him can get to his age and still not realise that talking to people that way is at best highly ineffective and at worst will make them actively hostile towards you. That&#x27;s not to mention rude and mean-spirited.
评论 #17267463 未加载
评论 #17267479 未加载
okketalmost 7 years ago
Déjà vu (or &quot;dupe&quot;)<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17242103" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=17242103</a>
alexeizalmost 7 years ago
&gt; In fact, I&#x27;ll take real toilet paper over standards any day<p>You can print the Standard on the real toilet paper and have the best of both worlds. Read before wipe!
squarefootalmost 7 years ago
I also wouldn&#x27;t like being addressed like that and if I was I probably would quit working with him, but he gave a very clear explanation why he became more direct in dealing with people. And unless one lives that same experience in his own shoes it&#x27;s not easy to make an opinion.
jeiscalmost 7 years ago
It is people that matter; all software is only made to serve people. One person can be the holder of a solution to an important problem, so that person must be able to express his ideas even when they go against the common wisdom.
pajopalmost 7 years ago
plot twist: Linus actually merged it! :)<p><a href="https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2018&#x2F;6&#x2F;5&#x2F;774" rel="nofollow">https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2018&#x2F;6&#x2F;5&#x2F;774</a>
mistermannalmost 7 years ago
I sometimes wonder what the world of computing, or even the world in general, would look like today if Linus Torvalds hadn&#x27;t existed, or happened to have not gotten into computers.
评论 #17262794 未加载
评论 #17264092 未加载
评论 #17262866 未加载
评论 #17262789 未加载
greymanalmost 7 years ago
Doesn&#x27;t C have something better than that type punning via union to achieve the same effect? I understand Linus reasoning, but still it&#x27;s an ugly hack.
评论 #17263450 未加载
评论 #17263307 未加载
ezoealmost 7 years ago
union wasn&#x27;t designed for the type punning in the first place. It&#x27;s just historically used for type punning.<p>For modern compiler, just use memcpy and compiler can optimize away the memcpy and produce the exactly same code.<p>But the kernel developers has some issues on trusting compiler generated code.
JakeTyoalmost 7 years ago
This guy writes like an angsty teenager. I find it hard to take him seriously.
lifeisstillgoodalmost 7 years ago
I Wish I could write like that.
mundanevoicealmost 7 years ago
When people can&#x27;t find fault in the technical argument, they start attacking other things like. &gt; Oh! He is so rude, He insults so much.<p>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.
评论 #17263495 未加载
评论 #17263372 未加载
mcbitsalmost 7 years ago
Here is a slightly more readable version that&#x27;s not white-on-white, half-pixel-thick text: <a href="https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2018&#x2F;6&#x2F;5&#x2F;769" rel="nofollow">https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2018&#x2F;6&#x2F;5&#x2F;769</a>
评论 #17263184 未加载
nikofeynalmost 7 years ago
i really wish a person many software engineers idolize or at least obviously respect and pay attention to, myself being excluded from these camps, didn’t communicate like a child.<p>it’s an embarrassment for the field.
评论 #17263434 未加载
coding123almost 7 years ago
I think we are at the point where someone just needs to put up a Linus swearing email tracker with analytics and shit and stop posting these threads. We have to come to the realization that the discussion on this is:<p>a) useless- doesn&#x27;t change anything b) the publicity is affecting the other side more<p>So basically Linus is Trump
评论 #17262767 未加载
评论 #17262798 未加载
评论 #17262802 未加载
maxehmookaualmost 7 years ago
<i>raises hand</i> I would love to be able to contribute to the linux kernel one day. But I&#x27;m unlikely to ever become part of the community when its leader behaves like this.
评论 #17263524 未加载
评论 #17263940 未加载