Linus Rants About C Programming Semantics (iu.edu) 576
jones_supa writes: "Christ people. This is just sh*t," begins Linus Torvalds in his message on the Linux Kernel Mailing List. Torvalds is grumpy because some new code added to the IPv6 subsystem has created conflicts. "The conflict I get is due to stupid new gcc header file crap," he writes. "But what makes me upset is that the crap is for completely bogus reasons." The new improved code uses fancy stuff that wants magical built-in compiler support and has silly wrapper functions for when it doesn't exist. Linus provides an alternative that contains a single and understandable conditional, which looks cleaner and generates better code.
Linus rants about EVERYTHING (Score:3, Insightful)
Film at eleven
Re: (Score:2, Funny)
...except systemd, which will soon become linuxd.
When create the most used operating system (Score:2)
on the planet you have, criticize Linus can you.
Re: When create the most used operating system (Score:4, Informative)
Do or not do. There is no criticize.
Re:When create the most used operating system (Score:4, Funny)
I never understood why people do that. It's the equivalent of having the first line of your letter be on the outside of the envelope.....or the first line of your e-mail be in the subject line......
Oh wait --- car analogy required.....
It's like having the ignition switch located on the hood of your car.
Re:When create the most used operating system (Score:5, Interesting)
What the hell do you expect, "Dear Sir"?
Look, in emails, and all the way through Usenet and frigging dial up BBS systems ... the start of a thread IS the subject line.
I don't get this bitching about actually using the damned subject line for exactly what they've been used for 30+ years.
Do you expect some random salutation or other piece of text completely unrelated to the body?
We don't need a damned car analogy, we need to stop having a bunch of whiny idiots trying to redefine WTF the subject line is there for, and how it's been used for decades.
The purose of comment subjects (Score:4, Insightful)
the start of a thread IS the subject line.
No. The subject is a summary, or 'subject' if you will, of the post/email/missive.
That way, you can dismiss a thread based on it's subject, and not have to descend into a thread to see what it's actually about.
Get a clue before ranting, low-id.
It's no (Score:5, Funny)
worse than (Score:4, Funny)
chaining (Score:5, Funny)
Re: (Score:3)
no
Re:Linus rants about EVERYTHING (Score:4, Informative)
He already ranted [theregister.co.uk] about SystemD code.
Re: (Score:3)
So systemd is insidiously taking over the world while the majority are unaware?
Re: (Score:3)
...except systemd, which will soon become linuxd.
Re: (Score:2)
Re:Linus rants about EVERYTHING (Score:5, Insightful)
You know, ranting about pointless language additions which add to complexity for no real purpose is something Linus should be ranting about.
Shiny code for the sake of shiny code produces bloat, and frequently quit bad code.
I'm sure most coders have known someone who always put in 'clever' code which was far less good than the author thought it was.
This looks distinctly like code which is too clever for its own good.
Re: (Score:2)
This looks distinctly like code which is too clever for its own good.
Not at all. It looks like someone who isn't confident that they can write good, reasonably secure code so tries to rely on a macro to do security for them. Or perhaps they feel that using a framework of macros is better in principal, e.g. because it is known secure code, which again seems naive.
Re: (Score:3)
Re: Linus rants about EVERYTHING (Score:4, Informative)
I have to agree. I was ready to read a melodramatic rant over slightly new semantics, but I instead found a completely justified and reasonable criticism of horribly unreadable (and kind of broken) code. With some extra swearing thrown in for Linusness.
Remember, coders, if you're doing anything with code that will be used by others or reused by you, readability is crucial. I'm not talking about comments unless the code itself needs to be less readable (e.g. Performance in a hot spot). I mean the code itself.
And, by code that others may use or you may re-use, I mean all code.
There are advantages to having a consistent flavo (Score:3)
A his strong voice is one of the reasons Linux is so popular. I fear for the day a committee makes thedecisions
Re: (Score:3)
What's worse - he's often right in his rants.
Re: Linus rants about EVERYTHING (Score:3)
"if you want boxed mac-n-cheese"
You're doing it wrong.
Not programming semantics, but the coder (Score:5, Insightful)
.
Such code is the result of coders who rely on the compiler too much, and their brains too little.
.
"You and I learned C when it was programmers, not compilers, which had to be intelligent."
- - - Terry Lambert
Re: (Score:2, Interesting)
.Such code is the result of coders who rely on the compiler too much, and their brains too little.
I work in .Net -- *ducks* -- and it happens quite often that people rely on Intellisense and the fact that their code compiles as validation it is correct. We don't have to allocate memory, so we don't think about how we use objects that require database calls; we don't think about scope; there's a plug-in that will refactor code for you, so there's another crutch to give us more time to think about what we will be doing when we get off work.
Also, get off my lawn.
Re: (Score:2)
If only Slashdot had some type of crutch to tell you when you didn't properly close your <blockquote>.
I've done it too so I'm not innocent either, but sometimes even people who do use their brains can benefit from relying on tools to help them out from time to time.
Re: (Score:3)
Moderation of replies to edits would need history (Score:3)
There's zero technical reason why an "undo" function can't be added to almost any software system
I can think of a couple. It's harder to remove elements from some kinds of full-text index, especially a probabilistic index, than it is to add them. And each comment would then need revision history so that moderators can tell to what text each comment was actually replying. Do we want individual revisions to be searchable?
Re:Not programming semantics, but the coder (Score:5, Funny)
Even better is having an "Undo" button (or in the case of a forum like this, an "Edit" button).
The reason for not having UNDO should be obvious:
Someone writes a post saying, 'Bieber is such a dick! Post below if you agree.' Hundreds do.
Then the OP edits the post to read, 'Dick tastes great! Post below if you agree.'
Re:Not programming semantics, but the coder (Score:4, Funny)
Reminds me of a friend of mine who used to check if a pointer was NULL, then if it was not and finally for other cases:
if(!p) ... ... ...
{
}
else if(p)
{
}
else
{
}
His reasoning: the compiler could have a bug and this way you would catch that bug.
Re: (Score:2)
More ordinarily you have assume that the compiler generates correct code and if it doesn't, particularly on something as trivial as an if-else then really you shouldn't be using that compiler.
Re: (Score:3)
Modern compilers won't notice the pointer changing between those two conditionals, with it being loaded into a register that won't be modified in another thread. Some compilers may realize that it's impossible to enter the third block, and simply purge the code. In either case, the third block is pure fluff that should be removed.
If you're in the rare situation where said pointer can change suddenly, then you should:
Re:Not programming semantics, but the coder (Score:5, Funny)
His reasoning: the compiler could have a bug and this way you would catch that bug.
That's why all my variables are upper case and only use vowels. One day there might be a bug with lower case consonants, and then all you suckers will be laughing on the other side of your faces!
Re: (Score:3)
His reasoning: the compiler could have a bug and this way you would catch that bug.
Well, I'll give him one thing: Any compiler that accepts this code without at least giving a warning about dead code does have a bug (unless p is volatile). So it does detect buggy compilers.
Re: (Score:3)
To be honest, this is something I would also do on slightly more complex sequence of if-then-else-if that are supposed to try all possibilities. Similarly, I always try to enforce the 'default:' on switch statement even if I know that all possible values are tested.
That may be unnecessary at the time I write the code but that can save my ass if someone decides to make a small 'harmless' change in a few months or years.
The funny thing is that in C++, it is actually possible to reach the final 'else' assuming
Re: Not programming semantics, but the coder (Score:2)
Re: Not programming semantics, but the coder (Score:2)
C for intuitionists who reject the law of the excluded middle.
Title of his biography? (Score:2)
Re: (Score:2)
Linus Rants.
I would honestly love to see a biography that was based around his rants. It'd be an awesome read, I'm sure.
I would honestly love to see a biography that was based around his rants. It'd be an awesome read, I'm sure.
True enough. Besides, there's not enough material for a book, "Linus Calmly & Respectfully Discusses."
GOOD. He's doing his job (Score:3, Insightful)
Linus is doing his job, making sure that the Linux kernel code continues to maintain quality and supportability. I read the thread, the code is shit, and Linus called it out. I don't care about his language or the tone of his message. He's right. Linus could stomp kittens flat and I wouldn't care, as long as that kitten-stomping was in the pursuit of making the Linux kernel better. Enough of this fake controversy about Linus and his communication style, already.
Re: (Score:3)
Linus could stomp kittens flat and I wouldn't care, as long as that kitten-stomping was in the pursuit of making the Linux kernel better.
To be fair, next Thursday is Finland's national Kitten Stomping Day, so it might not be purely in pursuit of improving the kernel.
Re: (Score:2)
Put your Viking helmet on! Spread that mayonnaise on the lawn! [youtube.com]
Oh wait, you said kittens, not weasels...
Re:GOOD. He's doing his job (Score:5, Insightful)
Nope.
Frankly, the purpose of the rant was to cause that piece of excrement to be replaced with something reasonable AND to give notice to other programmers that that kind of sloppy shit is not acceptable. As for those who complain that his rant was unnecessary and hurt someone's feelings, I have to ask you "Who submitted the sloppy code?" I don't see any names in the rant. Yes, I know that one could take a look at the commit logs to determine who it was, but in all honestly, I seriously doubt that anyone will. So the idiot who committed that piece of shit wasn't called out by name or publically humiliated.
It's Justified (Score:2, Troll)
Now, if only Bill Gates would learn to rant and rave passionately about the quality of his product - instead of counting his coins and pretending to be a philanthropist.
I wonder if... (Score:3)
Have a Snickers Linus (Score:5, Funny)
Linus is right. (Score:5, Insightful)
It's horrible, horrible code.
I'm not a C developer, but I know C and have been developing for 20+ years in various other C like languages. The thing Linus is ranting against is absolutely true. The first example is very clear what it does. Assign a variable. The second (new) code is fucked up, and completely unclear what's going on. Check some kind of boundary condition, then some weird shit going on that I don't understand?
The 3rd example is back to clarity. Check some boundary conditions, then assign the variable. I'd have never guessed the 2nd example does that without reading the 3rd.
I also happen to agree with Linus about not "toning it down". There's other ways to manage the kind of stupid bullshit that goes on in software development, but one effective way is going apeshit over shit like this. Linus's way isn't the ONLY way, but it does work. Developers tend to be filled with prima-donnas that think everything they produce is gods gift to coding. Sometimes the only way to get through is just yelling at the top of your lungs about shitty fucking code.
We live in an increasingly hyper-sensitive society where some people want to control speech in a fascist way. I'm so tired of all this bullshit about how it's "disrespectful to women", or other such crap. That seems to be the garbage dump reason for everything someone doesn't like that doesn't fit somewhere else. Just claim rascism, sexism, etc, even when it totally doesn't fit.
Oh, and please stop with the "The LEFT is trying to silence us.. blah blah blah" nonsense. This isn't "The Left" any more than the westboro babtist church are christians, or the nutjobs that open carry guns into Starbucks is "The Right". All of those are just radical elements of the political divide that have inserted themseves where they get the least criticism for their crazy ideas.
Re:Linus is right. (Score:4, Informative)
static inline bool overflow_usub(unsigned int a, unsigned int b,
unsigned int *res)
{
*res = a - b;
return *res > a ? true : false;
}
So the 2 conditionals from the patch are completely idiotic and wrong.
`overflow_ubus` not only makes an unnecessary assignment to `mtu`, but does a check after that assignment, and then you need another check for it outside of `overflow_ubus`.
In general, the proposed patch conditionals could be rewritten as
unsigned int oldmtu = mtu;
mtu -= hlen + sizeof(struct frag_hdr);
if (mtu > oldmtu || mtu <= 7)
goto fail_toobig;
Now that's ugly!
overflow_usub is seriously bogus (Score:3)
Re: (Score:3)
Re:Linus is right. (Score:4, Interesting)
Much more understandable, ignored and forgotten about. Fuck that, at least his way is getting some attention which may get the shit fixed.
Re: (Score:3)
> I don't see why being professional is so complicated:
Why is everyone trying to change linus? He's the god that gave us this fucking kernel, but everyone thinks they have the right to change how he communicates with the people he works with on his kernel?
If you don't like linus, or the way he communicates, fine... don't listen to him, ignore him, don't work with him, go make your own kernel and mailing lists etc... why does every PC idiot out there think they have the right to tell others how to communi
Incorrect headline (Score:4, Informative)
Not that this will surprise much of anyone, but the headline is wrong. Linus did not rant about C programming semantics. He ranted about a specific C function and the style used to perform a sanity check.
Microaggressions (Score:2, Funny)
I have NO IDEA who this Linus guy is, but his microaggressive behavior will not be tolerated in the Open Source community. I doubt he was much of a contributor to Open Source, but we need to ban him as he is creating a toxic environment in my safe space. No big loss.
Is there a use for overflow_usub? (Score:4, Insightful)
Re: (Score:3, Informative)
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0103r0.html
I guess the compiler developers and the IETC are all just idiots.
We use these functions in HFT all the time. Too bad it's too "complicated" for kernel developers to understand...
Anyone have a link to source code? (Score:2)
Just curious what it looks like in context.
Wow, that does look terrible. (Score:2)
And next thing, someone who doesn't know about short circuit evaluation in C will swap the two conditionals.
Re: (Score:2)
someone who doesn't know about short circuit evaluation in C will
be unlikely to write kernel code, much less submit upstream
Disagree with the language used... (Score:3, Insightful)
Two points:
a) I agree with him on the code, but I am not a competent coder myself.
b) I disagree with the form of communication and that is an area where I am competent.
As Linus expects others to write proper code, I expect people to conduct proper communication.
Same rules apply: If it does not improve the flow of information, it does not belong in the email. Some swearwords don't bring any points across that could not be covered by "professional english" subset ;-). I think "sh*t" and "crap" may be considered validly applied here. But beyond that, it generates an unnecessary conflict at rc7 time. ï
Re: (Score:3)
As Linus expects others to write proper code, I expect people to conduct proper communication.
Linus expects proper code from those who contribute to his project: what you do in your own project is your business. Similarly, you are free to expect people to conduct "proper communication" within the communities *you* control, but not to force your expectations to communities *other people* control.
Re: (Score:2)
Look in the mail Linus wrote ;-).
Re: (Score:2)
As I wrote, i don't complain about "sh*t" or "crap".
But he writes the author is "incompetent and out to lunch" and accuses him to do things for "compiler-masturbation".
My main point is: this serves no purpose. It does not make anything clearer or help the discussion (rather to the contrary).
I don't want to have every sentence corrected by ten people and checked for gluten ;-). I just think, even a genius can afford a bare minimum of civility.
Shiny loses out again (Score:3)
Imagine that. Someone thinking, "Ohhh, shiny! Let's try this because it's new and cool."
Instead of, "I need something to get the job done in the simplest fashion."
There's a reason analog light switches are still around. They just work. No bullshit about having to talk to a computer to decide what to do. Clean and simple. Just like code should be.
Best Line Ever (Score:2)
Re: (Score:3)
Compilers have needs and desires, too.
reality (Score:4, Interesting)
Hannes seems to have a valid point that boundary checking should be standardized in some way. Rasmus backs him up and mentions the result of the rant is they'll end up discarding his more comprehensive work on the issue: http://lkml.iu.edu/hypermail/l... [iu.edu]
Linus seems to be saying all boundary checks should be ad-hoc because the new syntax is to hard to GET OFF OF HIS LAWN. Because it is dog poop.
Re:reality (Score:4, Informative)
The new syntax only works on certain versions of the GNU compilers. It's also more convoluted, just as easy to get wrong (i.e. the guy himself admits there's a possibility of the same kinds of mistakes as without it), non-standard, and harder to read - especially if you are unfamiliar with a GNU-only syntax.
Read the rant, then look at the code.
clever morons (Score:5, Insightful)
open source world is getting overrun by high IQ morons, that put in bloat, hyped fads, and needless complexity. they indulge in mental masturbation rather than good design
Re:clever morons (Score:4, Insightful)
Does kernel have numeric overflow vulnerabilities? (Score:3)
Like Linus, I also write the simpler form of this kind of code when writing in C/C++.
Unlike Linus, I feel bad about it! My colleagues point out places where arithmetic overflows might lead to crashes. Honestly I find it really difficult to think through the overflow issues for *every single* plus, minus and multiply operator in my code. I think it's like cryptography in that sense -- most regular programmers, including good programmers, don't look at arithmetic operators from the perspective of attackers.
In this case, does Linus' code have the exact same behavior on all possible inputs including overflow-causing inputs? If not, which of the two behaviors is the desired one?
Are there places (maybe including this one) where the kernel code doesn't guard properly against arithmetic overflow? Will the newfound attention bring hackers scrutinizing it for overflow flaws?
Linus is right only for people of his caliber.... (Score:5, Interesting)
Both in the technical sense and in the human sense.
Technical: People at Linus' caliber understand exactly the rules for signed/unsigned integer promotion and where underflow is defined (as wrap) and where it's undefined[1]. Consequently he wrote perfectly-correct code for detecting the underflow and bailing out safely. Programmers at mere mortal levels of skill, however, routinely mess this up, often causing exploitable security bugs (believe me, I do code security audits as part of a real honest living). My advice for everyone (contra Linus!) is always always always use the compiler intrinsics [gnu.org] for integer math. Feel free to decline this advice if you are a Linus level wizard (if you were, of course, you would already feel free to decline it) but if you have to wonder if you are, you probably aren't.
Linus seems to think that the kernel should only be written by folks that don't need that kind of help -- and for that I won't argue with him. It's his baby and he can chose whether to have a small number of über-developers or a larger number of mortals. Which goes straight to the second point:
Human: People at Linus' caliber thrive on negative feedback. At their level, positive feedback means nothing because there's nothing he can learn from someone praising his work. He wrote a kernel, he knows he's good. Meanwhile negative feedback is useful (unless trivially discountable): if the complaint is right, he'll correct something he was doing wrong; if the complaint is wrong, he'll be forced to think through why. In any event, he could never imagine why someone would sugar-coat their opinion on any matter.
So it seems like his mode of communication is meant to answer that question for the former: he wants people of his caliber that don't write ugly code using arithmetic crutches and don't care about strongly worded criticism. There's nothing invalid about that either -- maybe it's true that the best model is that Linuses work in the kernel and the rest of us go up into userland where we use crutches like memory protection and higher-level constructs :-)
[1] And when behavior is undefined, a smarter compiler can remove the code-path entirely -- the kernel itself was hit by such a bug [lwn.net] where GCC legally removed a NULL check because the pointer was dereferenced before the check. See also this reference. Then there's the sad fact that people still argue against the clear language rules that say that assert( 100 + some_int > some_int ); can always be optimized away [gnu.org].
Developers following the KICC principle (Score:4, Insightful)
KICC = Keep it Complicated and Crappy
I recently ran into a similar example in Java, where Java 8 has introduce the class java.util.Optional. This is used by certain other Java 8 classes as a return type.
What does Optional do? It provides an object that contains an object. If that inner object is null, the method isPresent() returns fall. So now, instead of:
if (widget != null) { widget.doSomething()) ... }
You can write
if (optional.isPresent()) { widget = optional.get(); widget.doSomething()) ... }
Of course, if you don't quite trust the class giving you the Optional, you get to write
if (optional != null && optional.isPresent()) { widget = optional.get(); widget.doSomething()) ... }
This serves no useful purpose, except to make code more complex. Stupid, stupid, stupid...
The claim, of course, is that this marvelous class is designed to work with lambdas. The thing is, lambdas themselves are an idiocy in Java. Lambda expressions are inherent in purely functional languages, but they are semantically out of place in a declarative language.
BOTH code Snipets have readability Problems (Score:3)
If you do not know what usub is, is difficult to determine what is is doing. In that, Linus is right. But look inside the Parenthesis:
" (mtu, hlen + sizeof(struct frag_hdr), &mtu) || mtu = 7) "
Here is a very Clear OR. The guys are checking for the MTU Being to big OR too small...
Linus offers this code:
"if (mtu hlen + sizeof(struct frag_hdr) + 8)"
Which obfuscates the OR comparison...
And Both Call the label "fail_toobig" intead of a more readable "fail_MTU_outofbounds"
Or am I missing Something?
Re: Not saying I disagree with Torvalds (Score:5, Informative)
It's literally just a few rants out of thousands of friendly messages per year - and Linus only rants if crappy code comes from someone who is trusted by Linus (such as the networking maintainer here) and who should really know better.
Re: (Score:2, Insightful)
get by without public shaming rants
If you fuck up publicly, then the public criticism is appropriate and well deserved.
if your boss came in to the office and started ranting about a couple of admittedly bad lines in your code in front of everyone now and then, he would be fired pretty quickly
That's just flat out not true. I've worked for bosses who have done, and continue to do, far worse than anything I've seen Linus do. And guess what? They not only still have jobs, they get promoted.
Re: (Score:3)
"It's literally one punch in the balls out of thousands of friendly hand-shakes per year."
Yeah, I wouldn't submit patches to him either. The GP is right, if your boss came in to the office and started ranting about a couple of admittedly bad lines in your code in front of everyone now and then, he would be fired pretty quickly. People say Linus needs to be like that when controlling a large open source project like the Linux kernel, but plenty of other large open source projects get by without public shaming rants. Major sub-systems in Linux, for example.
So the complaint is that the kernel development does everything in the open, including airing dirty laundry, while other projects keep disagreements quiet behind the scenes (at least until something is forked). Personally, I don't like to be yelled at any more than the next person, but I would prefer open and transparent.
Re:Not saying I disagree with Torvalds (Score:4, Interesting)
This is someone you wouldn't want to work for.
Actually, I don't mind working with people who rant often, as long as they have good reason to do so.
In fact I'd rather work with people yelling at me about how shitty my code is and telling me why than a whole pasture of cows mooing about how good I am no matter what I do.
Re: (Score:3, Insightful)
Re: (Score:2)
Re:Not saying I disagree with Torvalds (Score:5, Insightful)
To each his own, but all in all I'd rather not work for a douchebag. Even if he's a really talented douchebag, he's still a douchebag. Real managers supervise without being an asshole.
I don't mind working for a professional who holds to high standards and doesn't mind telling me when my code is crap, but I'm not going to work for a douchebag that reprimands me in front of everybody.
Professional and effective managers always reprimand in private, and praise in public. DON'T work for someone who doesn't follow that rule, life is too short.
Re:Not saying I disagree with Torvalds (Score:4, Insightful)
Oh young one.. There is a basic level of human decency and professionalism which we all do well to maintain. Unfortunately this is a rare quality in many organizations these days.
I suspect that if your boss called your efforts crap in full ear shot of your peers, even if he was correct, you'd be a bit miffed at him/her for embarrassing you in public. It may change your behavior, but it also will change your attitude to them due to being rudely treated. Most folks have issues when they "loose face" in public and a wise professional manager avoids creating issues when possible. It only makes sense to go out of your way to avoid offending others, even in circumstances where you don't think you should have to bother. Wise people bend over backwards to avoid creating problems, trust me.
For instance, as a software developer in a large organization, I ALWAYS assume that any software problem I find, or get's reported to me is MY FAULT, even when it's not. I will either *fix* the problem, or if I cannot do that, I will enlist others to "help me" figure out how to fix it. I never say "See, it's your problem to fix." but keep showing them the evidence and asking them how I can fix it. When it is their problem, they will eventually realize this but because I've not been rubbing their nose in it I don't have to fix the relationship the next time something rolls around. The other option is to just shoot your coworkers full of holes, and the first time you are wrong about who's at fault it was, you are the hard nosed worker looking to get out of responsibly.
Do I have to do this? No, but it establishes you as the guy that knows your stuff, who is willing to work with others on stuff that's not his responsibility and exposes you to details from the larger picture. You are the nice hard worker that everybody trusts.
Re: (Score:2)
Re:Not saying I disagree with Torvalds (Score:5, Insightful)
Why? Because you're a delicate little flower with easily offended sensibilities?
I've worked for all types, and with all types. A little bit of "colorful" language doesn't bother me, and in many cases I'd prefer someone who can come to me and say "Hey, you fucked up, this is a pile of shit" than someone who smiles, gives me calm reassurances about my efforts, and then drives a knife into my back.
Yes, sometimes he goes a bit over the top. But in many cases, it's more a matter of the receiving party needing to grow a thicker skin.
A-fucking-men.
In my career, my skills in direct proportion to the speed at which I was criticized multiplied by directness and the skill of the other party.
As a lead, I really struggle with the special little snowflakes that need to be told how great of a job they're doing and how much they are appreciated and ... makes me want to vomit. I make sure that they either don't last long or learn to break their emotional attachment to "their" code.
Re: (Score:3)
No no. You have to do it like Linus to be effective. These gentle criticisms aren't going to cut it. Let me demonstrate
What the f$&@ is this sentence even supposed to mean? This is clearly written by a total idiot. What kind of total sh!&head would ever submit a sentence like this. Get your sh!& together and f$&@ing learn to write you worthless piece of crap.
See. That's the only way anyone learns
Re: (Score:3)
Yep, you are right. I accidentally the word "grows".
I have a phantom word problem where, if I think the word in my head as I write, then as I read it back, the word "appears" there, even when it isn't.
But I'm not ashamed to admit I fucked it up :P
Re:Not saying I disagree with Torvalds (Score:4, Insightful)
Linux development is done on public mailing lists. Everyone knows this going in. If Linus rants about "your" code in public, he's sending a clear message.
He has passion. Snowflakes don't understand passion.
Re: (Score:2)
I bet assembly gives you an aneurysm.
goto is perfectly fine here. (Score:2)
It's not ugly if it's used in this context (usually involving breaking out of several levels of loops/conditionals, and/or go to one specific error handling code snippet from several points in the function).
Re:goto is perfectly fine here. (Score:4, Informative)
Part of the reason is this: while it's provable that you can use ifs and whiles to eliminate all gotos, the proof also demonstrates that code-length may grow exponentially in the number of gotos eliminated.
Re:Not the case. (Score:5, Informative)
Re: (Score:2)
Unlike you, Linus is not a drooling moron. He knows when goto is the best tool for the job. He doesn't have irrational fears like fucked-up retards such as yourself.
Re: (Score:2)
Goto is good in this case since it avoids nasty 'if's in many places. You complain because you're a noob.
Re:Linux is for Cows (Score:4, Funny)
Re: (Score:3)
http://systemexplorer.net/file... [systemexplorer.net]
I guess we should avoid your crap, it looks like it is marked as malware. Good luck getting that removed.
Re:yet he allowed systemd..... (Score:5, Insightful)
but yet he allowed the crap that is systemd in the house
Linus doesn't have control over places that systemd are 'in the house'. The biggest notable chunk that would be even remotely perceived as letting systemd into the kernel is kdbus, and that hasn't been merged. Even then, I have heard arguments that it isn't particularly systemd specific. Knowing about dbus, makes me shudder about the concept of kdbus, but folks assure me I don't understand kdbus, which I confess could be true.
Linus basically doesn't have much to say about systemd today, it's beyond the scope of his attention. He has mentioned he is at least not horribly opposed to it, but neither has he gave it a huge endorsement either. He has ranted about code that came to the kernel from at least one of systemd's notable contributors, but not about the concept/project as a whole.
But all that aside, no one should treat Linus' word as the one true word of the whole ecosystem. If he loves it, hates it, or does not care, either way the larger community has to decide.
Re: (Score:2)
At least without context, the tone seems a bit severe for the rejection, and could bolster the case of those that argue that a violent shaming is a risk of submitting code, even if it would be your first 'mistake'.
I personally prefer this over some other projects that would merge functional, but ugly code for the sake of not scaring folks away from contributing and not having 'it doesn't work' argument to respond with, but there could be a happy medium.
Re: (Score:2)
they fucked up Qemu, Basilisk, and just about anyone doing JIT a few years back. It's too bad EGCS couldn't break the GNU/Cygwin GCC monopoly.
Re: (Score:3)
If the code relies on undefined or unspecified behavior, it was working correctly only by chance, and could easily break on another platform, or another version of the compiler. It can freely use implementation-defined behavior on a given implementation.
Re: (Score:2)
Yes, but where is the source code?
Re:Sorry you find C so hard to understand, Linus. (Score:5, Insightful)
Shame that the function used in the patch is NOT C, but instead a compiler-supplied and thus compiler-dependent feature that was put into the code in the kernel without any kind of fallback for those who don't have that compiler (e.g. an equivalent header that defines it if it's not already defined).
And Linus' equivalent alternative is valid C99 that works on all compilers, and does EXACTLY THE SAME while being slightly more readable.
Otherwise you might indeed have had a point to make.