Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?
Slashdot Deals: Deal of the Day - Pay What You Want for the Learn to Code Bundle, includes AngularJS, Python, HTML5, Ruby, and more. ×

Comment Re:Rats! (Score 1) 457

You are confusing logic and meta-logic. In a a suitable logic (per Gödel theorem), p or not p is provable. Only the meta-logical statement "every proposition of the logic can be proven or refuted" is false. This doesn't make the principle of bivalence meaningless, but simply illustrates the limits of the axiomatic method. Intuitionist logic doesn't help at all since Gödel theorem apply to it as well.

There might be reasons to be intuitionist but Gödel theorem is not one of them.

Comment Horny Chinese (Score 1) 371

I love the gratuitous boob shot at 3:27 in the video. It makes it difficult to take this seriously.

Also, when I first saw the first picture, I thought, Hey, what are these giant humanoid robots for ?

Hum. I guess it is time for my midazolam shot.

Comment Missing Option... (Score 5, Insightful) 572

...I oppose the use of the term "piracy" to refer to copyright infringement.

I share media with fellow human beings. I however don't board ships, don't hold people hostage and don't kill anyone.

Slashdot of all places should know better than to propagate the rhetoric of media conglomerates.

Comment Re:Wait, what? (Score 1) 391

Why the fuck doesn't slashdot has an edit option.
Ignore the second post, it is complete bullshit.

In the first post, replace the second-to-last paragraph by:
If however offset is non NULL, then tun might or might not be NULL, and the test might be reached. It therefore must be preserved.

Then add at the end of the post, by test I mean both the if and its body.

Comment Re:Wait, what? (Score 1) 391

I'd like to make the last paragraph more precise,

If sk is not the first member of tun, the compiler can remove the if (since the condition is always true), but it must preserve the body of the if. If it doesn't keep the body, it is a bug.

On the other hand, if sk is the first member of tun, the compiler can remove the if and its body.

Comment Re:Wait, what? (Score 1) 391

You are correct in saying that it is tun + offset which is dereferenced (not tun itself).

(BTW tun is obviously a pointer in the code given, no need to take its address.)

That means that the compiler knows, if it reaches the if, that tun+offset is not NULL, but not necessarily that tun is not NULL.

That would be true in general. But what everyone here seems to have missed, is that offset is known at compile time.

If offset is NULL, then either tun is NULL and we enter the realm of undefined behavior and the compiler is permitted to remove the check, or tune is not NULL in which case the test is dead code.

If however offset is non NULL, then tun must be non NULL if the test is reached.

To summarize, if sk is the first member of tun (offset zero), then the compiler has all rights to remove the test. If not, this is a compiler bug.

"I've finally learned what `upward compatible' means. It means we get to keep all our old mistakes." -- Dennie van Tassel