The only real problem with the original code is that it's hard to read and the performance benefits better be worth making the code more cumbersome. If the code is in a loop that runs millions of times, then Linus may be wrong here(I didn't look deep into this).
It's network code. I presume "mtu" is maximum transfer unit and "hlen" is header length. So this is something that will be done at most for every packet (this is the maximum. It's possible that it's only called once). Either way, while you may want to be pretty efficient here, we're not really at a cycle counting levels of speed requirements.
Ah yes, of course. Because HFT is so broadly useful to society that programming languages should be specifically designed to accommodate it.
And it's not that it's too complicated. It's that outside of some very specific niches, counting individual instructions just isn't worth the extra complexity for less readable code. Quite frankly I'm surprised it is worth it even for HFT.
Seems that overflow_usub() will always be less readable than a condition then a subtraction. It's a pretty obscure function - searching for it reveals most of the discussion is about this specific patch. It will save an instruction or two with appropriate compilers, by using the JC instruction rather than a CMP/JZ and in really performance critical code this will matter, but most code benefits more from readability than that extra instruction.
Quite a large one. Lots of customers. We'd really expect a company this size to be able to resist some teenage script kiddies. The nature of the breech means that a lot of customer details have been compromised.
Go look at the patriot act and tell me that our esteemed representatives read through and understood what they were putting in place. I dare you to say that with a straight face.
A lot of them did. They're authoritarians. They wanted authoritarian laws. The PATRIOT act did exactly what it was intended to do. Side effects were well known and well understood.
I will tell you what I bet you 100 dollars that in an hours time I can find at least 5 laws attempted to be passed in the past 2 years in the US that are complete BS and show that the lawmakers have NO clue what the ramifications are.
I've seen two stories about ridiculous interpretations of alleged laws in the past month. One of the laws never even existed. If you can find me laws that have been shown to be idiotic in the courts rather than media speculation I might take you up on that.
I've read a lot of computer law stories recently. All of them seem to take a slant of "politicians are idiots who don't understand computers". But when I've read them, the interpretation of "tech journalists are idiots who don't understand the law" seems a much more valid conclusion.
In most political systems, several people are involved in drafting these laws. Is it really likely that none of them thought through the possible ramifications?
Journalists, on the other hand, tend to work alone. And they often believe what other journalists write. Is it perhaps possible, that the journalist misinterpreted the wording of the bill?
I agree. Astronomers are smart enough to be able to compensate for a known few seconds of arc offset between the astronomical time and clock time. For the rest of us, having the timezone drift to the side is not going to cause any noticeable difference in the position of the sun for several centuries.
Did find this on wikipedia though
Under the proposal, leap seconds would be technically replaced by leap hours as an attempt to satisfy the legal requirements of several ITU-R member nations that civil time be astronomically tied to the Sun. So I guess these nations might still be causing problems, disliking this clunky workaround.
Remember - Cameron was elected by a very small minority of the British people (~20%), because of the way the antiquated electoral system has failed. He most certainly has no democratic mandate to rule.
What would you consider a mandate, and what British PM has ever achieved that sort of level of support?
David Cameron made a speech. He said the government wants it to be impossible for terrorists to hide from the security services.
Tech media sites assumed that Cameron knew exactly what he was talking about while at the same time having no idea what he was talking about. They concluded that the only way this would be achievable would be to ban encryption. In fact, given that pretty much everyone who talked about it mentioned WhatsApp and Snapchat, and no other services, it makes it pretty obvious they were getting this from each other.
Nobody thought that Cameron didn't have a clue what he was asking for. Nobody considered that he does actually have the option to compromise; Cameron's actually pretty good at that. Everyone assumed that this vague speech was explicit unwavering government policy to ban WhatsApp and Snapchat based on a stupid echo chamber and ridiculous assumptions.
Internet regulation is only needed when there's a monopoly. Otherwise we can rely on competition to provide a service that people want. Each European country has its own telecoms system, which may or may not hold a monopoly. No company or cartel has control over Europe though.
Some countries might. But there's the thing; just because Europe didn't pass the full regulations, doesn't mean the individual member states can't.
Freedm of speech, as a principle rather than a law extends further than government though. SXSW has a choice of whether to offer a platform or not, and clearly wants to do so. It's pretty reprehensible of the protesters preventing them from doing so.
Sony would have to knowingly and willfully be misrepresenting themselves. Not only that, but the prosecution would need to prove this beyond reasonable doubt.
The perjury clause only really prevents outright deliberate fraudulent abuse of the provisions.
Net Neutrality is needed in the US because there's essentially no competition. It's a regulation on a monopoly operator.
Many European countries have competition in the telecoms sector. Any action perceived as unfair throttling will see their customers go elsewhere.
The problem is, regulation is a blunt instrument. If I want decent broadband speed for Netflix, I don't care if everything else is slower. However, it might be in Netflix's interests to offer ISPs a cut to allow higher broadband speeds for its service only. Beneficial to the ISP, to the customer and to Netflix. Strict net neutrality doesn't allow this. Make an exception and you end up with loopholes, and I'm sure there are other potential scenarios where you simply don't want neutrality.
It's network code. I presume "mtu" is maximum transfer unit and "hlen" is header length. So this is something that will be done at most for every packet (this is the maximum. It's possible that it's only called once). Either way, while you may want to be pretty efficient here, we're not really at a cycle counting levels of speed requirements.
Useful, but a fatal error feels a bit heavy handed.
An obvious application to me would be a bigint library where, when you have an overflow, you simply want to add one to the next element.
Ah yes, of course. Because HFT is so broadly useful to society that programming languages should be specifically designed to accommodate it.
And it's not that it's too complicated. It's that outside of some very specific niches, counting individual instructions just isn't worth the extra complexity for less readable code. Quite frankly I'm surprised it is worth it even for HFT.
I've often wished that languages other than assembler would support an overflow flag.
I guess the probable is working out semantics for something that does have very limited use.
Seems that overflow_usub() will always be less readable than a condition then a subtraction. It's a pretty obscure function - searching for it reveals most of the discussion is about this specific patch. It will save an instruction or two with appropriate compilers, by using the JC instruction rather than a CMP/JZ and in really performance critical code this will matter, but most code benefits more from readability than that extra instruction.
British Internet and mobile phone company.
Quite a large one. Lots of customers. We'd really expect a company this size to be able to resist some teenage script kiddies. The nature of the breech means that a lot of customer details have been compromised.
A lot of them did. They're authoritarians. They wanted authoritarian laws. The PATRIOT act did exactly what it was intended to do. Side effects were well known and well understood.
I've seen two stories about ridiculous interpretations of alleged laws in the past month. One of the laws never even existed. If you can find me laws that have been shown to be idiotic in the courts rather than media speculation I might take you up on that.
I've read a lot of computer law stories recently. All of them seem to take a slant of "politicians are idiots who don't understand computers". But when I've read them, the interpretation of "tech journalists are idiots who don't understand the law" seems a much more valid conclusion.
In most political systems, several people are involved in drafting these laws. Is it really likely that none of them thought through the possible ramifications?
Journalists, on the other hand, tend to work alone. And they often believe what other journalists write. Is it perhaps possible, that the journalist misinterpreted the wording of the bill?
I agree. Astronomers are smart enough to be able to compensate for a known few seconds of arc offset between the astronomical time and clock time. For the rest of us, having the timezone drift to the side is not going to cause any noticeable difference in the position of the sun for several centuries.
Did find this on wikipedia though Under the proposal, leap seconds would be technically replaced by leap hours as an attempt to satisfy the legal requirements of several ITU-R member nations that civil time be astronomically tied to the Sun. So I guess these nations might still be causing problems, disliking this clunky workaround.
True. When you bake everything at 1400K, your ceramics come out nicely but cakes tend to get a little burnt.
He got less than 50% of the popular vote and only about 37% of the voting population picked him. And he's the most successful PM since the war.
And you are?
Well, yes... Most governments want to spy on their citizens. I am not defending this.
I'm just pointing out the idiocy of people who infer specifics based on a wild interpretation of a speech.
"Dijkstra's a dick"
-- 91degrees
Influential and important to CompSci, certainly but that doesn't mean he wasn't a bit up himself at times. Not everything he says is gospel.
Fine. If it's a cartel or a monopoly.
What would you consider a mandate, and what British PM has ever achieved that sort of level of support?
David Cameron made a speech. He said the government wants it to be impossible for terrorists to hide from the security services.
Tech media sites assumed that Cameron knew exactly what he was talking about while at the same time having no idea what he was talking about. They concluded that the only way this would be achievable would be to ban encryption. In fact, given that pretty much everyone who talked about it mentioned WhatsApp and Snapchat, and no other services, it makes it pretty obvious they were getting this from each other.
Of course people took this speech as gospel and completely ignored other statements saying this was not going to happen, just like they'll ignore this
Nobody thought that Cameron didn't have a clue what he was asking for. Nobody considered that he does actually have the option to compromise; Cameron's actually pretty good at that. Everyone assumed that this vague speech was explicit unwavering government policy to ban WhatsApp and Snapchat based on a stupid echo chamber and ridiculous assumptions.
An oligarchy is not competition. It's a cartel.
If you have a cartel then you should regulate.
Internet regulation is only needed when there's a monopoly. Otherwise we can rely on competition to provide a service that people want. Each European country has its own telecoms system, which may or may not hold a monopoly. No company or cartel has control over Europe though.
Some countries might. But there's the thing; just because Europe didn't pass the full regulations, doesn't mean the individual member states can't.
Freedm of speech, as a principle rather than a law extends further than government though. SXSW has a choice of whether to offer a platform or not, and clearly wants to do so. It's pretty reprehensible of the protesters preventing them from doing so.
Yeah. What an idiot. Let's all yell at each other and ignore what the other side is saying instead. That's something that really makes progress.
And yes, I realise I'm probably guilty of the same thing myself. So, tell me why I'm wrong and then apply the same reasoning to the broader debate.
Relevant xkcd^H^H^H^HSMBC for a change.
Perjury is a criminal complaint though.
Sony would have to knowingly and willfully be misrepresenting themselves. Not only that, but the prosecution would need to prove this beyond reasonable doubt.
The perjury clause only really prevents outright deliberate fraudulent abuse of the provisions.
So, it's round.
A lot of words to use to say that.
Net Neutrality is needed in the US because there's essentially no competition. It's a regulation on a monopoly operator.
Many European countries have competition in the telecoms sector. Any action perceived as unfair throttling will see their customers go elsewhere.
The problem is, regulation is a blunt instrument. If I want decent broadband speed for Netflix, I don't care if everything else is slower. However, it might be in Netflix's interests to offer ISPs a cut to allow higher broadband speeds for its service only. Beneficial to the ISP, to the customer and to Netflix. Strict net neutrality doesn't allow this. Make an exception and you end up with loopholes, and I'm sure there are other potential scenarios where you simply don't want neutrality.