Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
E6300
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
121.
▲
by
E6300
10y ago
This? http://blog.regehr.org/archives/970 The compiler didn't create a security bug by removing the null check. The bug was created by the programmer when he didn't check for null before dereferencing the p
122.
▲
by
E6300
10y ago
> The union ensures that the compiler doesn't move "u.lld = 0" above the first print statement, but usually writing from one type and reading from another is undefined behavior no matter how you accomplish it. I know, but
123.
▲
by
E6300
10y ago
I have to say, I have never encountered a program where compiling without optimizations made no difference. If you have seen that, then I would agree that C was a very, very poor choice for that particular domain.
124.
▲
by
E6300
10y ago
> Therefore the compiler "proves" a false theorem. In the axiomatic system implied by the standard, the hypothetical compiler being discussed can prove that the null check can be eliminated. The fact that you believe this axiom
125.
▲
by
E6300
10y ago
> What's the best way to "fix" strict aliasing without disabling the undefined behavior around it? Using a union? I had this discussion with another C++ programmer and we came to the conclusion that, if you care to avoid t
126.
▲
by
E6300
10y ago
If you want to phrase it like that, a compiler tries to prove conjectures and performs actions (usually code and data elimination) based on whether it can prove them or their negatives. Sometimes it can't do either. I don't see wh
127.
▲
by
E6300
10y ago
My point is that by leaving a behavior to be defined by the implementation you're not making it any easier to write portable code, but you may be making some optimizations impossible.
128.
▲
by
E6300
10y ago
> This is a kind of Department of Motor Vehicles Bureaucrat thinking. Sorry, but modern compilers are basically automatic theorem provers. They'll use whatever means necessary to get every last drop of performance. If you play cowbo
129.
▲
by
E6300
10y ago
You can if, for example, the function is static. Also there could be a link-time optimization pass. The linker can see all calls to that function, unless the function is exported.
130.
▲
by
E6300
10y ago
Implementation-defined behavior at best just tells you that the behavior is guaranteed to be deterministic (or not). You still cannot reason about the behavior of the program by just looking at the source. And I'm not sure if optimizat
131.
▲
by
E6300
10y ago
> Under what set of logic does being able to de-reference a pointer confer that it's value is not 0 (which is what the test equates to)? Simple: undefined behavior makes all physically possible behaviors permissible. In reality thou
132.
▲
by
E6300
10y ago
On the other hand, the expected and desirable behavior in one platform might be different from that in another platform. It's possible to overspecify and end up requiring extra code when performing ordinary arithmetic operations, or lo
133.
▲
by
E6300
10y ago
That was unexpected.
134.
▲
by
E6300
10y ago
1. Unless C's variable definition rules are completely different from C++'s, int i; is a full definition, not a declaration. If both definitions appear at the same scope (e.g. global), this will cause either a compiler error or a
135.
▲
by
E6300
10y ago
The video linked in this post will only make sense if you accept that x e^(theta i) and x k are respectively the rotation part and the scaling part of a linear transformation of x. I'm not aware of any other way to intuitively grasp an
136.
▲
by
E6300
10y ago
What I don't get is why someone would bother with complex numbers and their silly notation when linear algebra would work perfectly fine. I know that in certain contexts they are useful. E.g. to avoid losing information when solving po
137.
▲
by
E6300
10y ago
Honestly, after spending months studying the subject, I don't think it's really possible to "get" complex numbers. I just view them as affine transformations written in an unusual notation. I don't think they make s
138.
▲
by
E6300
10y ago
Since you probably have such an app, then you possibly don't have it.
139.
▲
by
E6300
10y ago
> This is exactly the characterization of someone who is being (perhaps ignorantly) oppressive. In such a situation, one has no business trying to argue that they have a bloody clue talking about a subject matter that does not directly a
140.
▲
by
E6300
10y ago
Source?
141.
▲
by
E6300
10y ago
> As for chronic depressives believing "something is wrong with them", why do you think they believe so? Because they are innately aware of that fact, or is it nothing more than a conditioned response? There is a __MASSIVE__ di
142.
▲
by
E6300
10y ago
I don't get your point. Cats also don't refer to themselves as cats, and yet they're still cats. They're cats even if there's no one around to call them cats. Also, this: > the mentally ill only wind up labelling
143.
▲
by
E6300
10y ago
What are you talking about? The most pessimistic estimates predict a sea level rise of 2 m by 2100. Just when are you expecting to retire?
144.
▲
by
E6300
10y ago
> Who is this "we" at the beginning of your sentence, and who is the "them" at the end? Read more carefully. "We" is all of mankind, and "them" is mental illnesses. > It's being affected by
145.
▲
by
E6300
10y ago
How is this "global" tech salaries, when it just shows data from five different countries?
146.
▲
by
E6300
10y ago
> The main table in this post is almost 50kB of HTML Just for fun, I just took a screenshot of that table and made a PNG with indexed colors: 21243 bytes.
147.
▲
by
E6300
10y ago
Yeah... I mentioned that exception in the parenthetical statement.
148.
▲
by
E6300
10y ago
Okay, so how about a list of games that only support DX12, since that's what's being discussed here?
149.
▲
by
E6300
10y ago
Actually, the output of Bison is GPL'd on the same grounds as presented in this case, that a significant portion of it includes code from Bison itself. You can't link and distribute a Bison-generated parser with a non-GPL parser g
150.
▲
by
E6300
10y ago
Is that a list of games that only support DX12, or a list of games that support DX12 and possibly some other API as well?
More ›