News for hackers. Stuff that matters.
Re:Abuse is indefensible by Cyph0n on Wednesday November 04, 2015 @08:47AM (#10506375)
But do you not feel offended when you are the one who came up with the idea?
Re:Abuse is indefensible by x1024 on Wednesday November 04, 2015 @08:49AM (#10506398)
They... should be offended? Because it was a bad idea that ruins the Linux Kernel. Kernel development isn't for everyone.
Re:Abuse is indefensible by tptacek on Wednesday November 04, 2015 @08:54AM (#10506426)
Can you (the person who wrote that this code would "ruin" the Linux kernel) explain in as much detail as you can how it would have ruined the Linux kernel?

I'm curious about how much people take what Linus says at face value.

Re:Abuse is indefensible by x1024 on Wednesday November 04, 2015 @09:00AM (#10506479)
Code being safe or unsafe is a pretty objective metric of quality, methinks.
Re:Abuse is indefensible by tptacek on Wednesday November 04, 2015 @09:02AM (#10506500)
I agree. Can you explain how this particular code is "safe" or "unsafe"? Again: I'm curious as to how much of what Linus says is taken at face value on HN.

I'm even more interested now, because the fulcrum of Linus's argument isn't safety.

Re:Abuse is indefensible by x1024 on Wednesday November 04, 2015 @09:10AM (#10506568)
You are committing a logical fallacy. I'm not "the voice of HN", nor am I a representative sample of "what HN thinks".

This is just my opinion.

Using a builtin operation ("addition and comparison of integers") is always safer than using a function that may or may not work the same everywhere. I.e. a nonstandard function.

Also, the proposed code has more levels of indirection, therefore places a higher cognitive load on the reader. These things tend to result in bugs down the road.

And it is also true that "an overflow could still happen", which is mentioned in Linus' critique.

All of these are objective ways to measure how "safe" the code is.

Re:Abuse is indefensible by tptacek on Wednesday November 04, 2015 @09:19AM (#10506644)
No, that's not what Linus is saying. It's close to the opposite of what he's saying (overflow_usub wraps a builtin). You obviously can't simply use the builtin addition and subtraction of unsigned integers in safe code, because in modern C, integers wrap.

Returning to the thread: why are you so comfortable extrapolating from Linus's rant to "this code would ruin the Linux kernel"? You don't grok the code he's talking about.

Is it because "if Linus is arguing against this code with this much ferocity, the code must be really bad?" Because if that's it, you're starting to see the issue some people have with the tone he uses.

Re:Abuse is indefensible by x1024 on Wednesday November 04, 2015 @10:02AM (#10507008)
In the discussion Linus is providing his suggested code, which is literally "just a builtin addition", but your opinion is that "He says that you can't use builtin addition".

OK, sure.

Re:Abuse is indefensible by tptacek on Wednesday November 04, 2015 @10:05AM (#10507029)
That is not in fact what Linus is saying. At this point you might want to take my word for it.
Re:Abuse is indefensible by ceejayoz on Wednesday November 04, 2015 @09:04AM (#10506524)
> Because it was a bad idea that ruins the Linux Kernel.

That seems a bit hyperbolic.

> Kernel development isn't for everyone.

Very little is "for everyone". That's not an excuse to offer criticism in a nasty manner. The article links to a nicer response that's a) shorter and b) a lot more likely to educate and build up a better contributor.

Re:Abuse is indefensible by cholantesh on Wednesday November 04, 2015 @09:57AM (#10506965)
I'd go even further - kernel development isn't just 'not for everyone', it's for very few. Relatively speaking, how many people are competent enough to contribute to the kernel? Those that even make the attempt are doing so voluntarily - if the reward from that is to be entreated with a hyperbolic rant, why would they bother going any further?
Re:Abuse is indefensible by tptacek on Wednesday November 04, 2015 @11:41AM (#10507733)
You all realize that this argument cuts both ways, and probably even cuts against Linus harder, right?

By the time Linus is ranting at someone at LKML, the person he's ranting at has --- statistically, at least --- already qualified themselves as especially competent. These people aren't arguing over Rails template languages.

I'm coming to realize that the sociology of Linus LKML rants is pretty fascinating.

Re:Abuse is indefensible by Cyph0n on Wednesday November 04, 2015 @09:03AM (#10506510)
I was referring to OP's general opinion.
Re:Abuse is indefensible by nabla9 on Wednesday November 04, 2015 @09:05AM (#10506531)
I would feel strong negative emotions for sure. That would be fine. I want to feel emotions and be challenged.

I would be extremely motivated to prove Linus wrong. If I would realize I was wrong, I would lick my wounds and be hurt. The hurt felt would be related to the amount of work and effort I would have invested. I would not claim that Linus is responsible for my emotional state. I was challenged and I lost.

Identifying with your ideas is fine in moderation but taking lasting personal offense is when your ideas forcefully rejected is madness.

Re:Abuse is indefensible by GeoffreyP on Wednesday November 04, 2015 @08:51AM (#10506413)
Non-attachment, experience, maturity, and a host of other techniques.
Re:Abuse is indefensible by Kristine1975 on Wednesday November 04, 2015 @08:56AM (#10506440)
But then I don't care, according to the GP...