Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
knorker
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
241.
▲
by
knorker
1y ago
That godbolt illustrates what I've been saying, yes. The godbolt example is exactly what I meant when I said "If you check after dereferencing it, yes it can [remove the check]". In fact we can make the example even shorter:
242.
▲
by
knorker
1y ago
Oh, it's too late to edit my comment, but one more thing: > You are conflating tha language capability with the hardware capability No. I'm talking about the C language and the abstract machine that it defines. I'm very mu
243.
▲
by
knorker
1y ago
> C/C++ do not place restrictions on dereferencing the 0th address. It doesn't. Because it doesn't consider 0th address special. Null pointer though, is special. And it's not necessarily address zero. > Head over t
244.
▲
by
knorker
1y ago
> it means one simple thing: «give me the contents of a memory cell (a byte, a word, a long word etc) at the address of 0» Well… sometimes. If you set a pointer to literal 0, you do not actually make that pointer point to address zero, f
245.
▲
by
knorker
1y ago
Ah yes, unless that conditional returns, UB indeed has time travelling properties. (I mean, spec wise. Manifesting as the compiler "reasoning" that "well I could legally put that load before the check, and that means it'
246.
▲
by
knorker
1y ago
1. No, dereferencing a null pointer will not "cause a sigsegv". It causes UB. In practice, in unix user space, yes it'll probably be SIGSEGV. 2. A null pointer is not a valid pointer: Yeah… Once again my question was "Bu
247.
▲
by
knorker
1y ago
> Why would you be checking the pointer for nullptr after you have dereferenced it? It makes no sense at all Right. It's UB. And that's why the optimization in question is about removing that check. The only reason the optimiza
248.
▲
by
knorker
1y ago
If you check for null pointer before you dereference, then no the compiler cannot elide the check. If you check after dereferencing it, yes it can. But in this case why would you not check before dereferencing? It's the only UB-free
249.
▲
by
knorker
1y ago
But when would it not be a valid pointer, and yet also not a null pointer? A null pointer we can check for easily.
250.
▲
by
knorker
1y ago
Not the sharp edges, no. That's a cybertruck "special".
251.
▲
by
knorker
1y ago
I've touristed in several countries where the church was closed because of a wedding. You are at a loss to imagine something that is extremely common worldwide. Though not "security guards". You don't need security guard
252.
▲
by
knorker
1y ago
More people die every single year from the radiation parts of coal power (excluding accidents), than have died from radiation of nuclear power's entire decades long history, including accidents. Yes, they should be made safe, but we
253.
▲
by
knorker
1y ago
Everything good Greenpeace may have ever done is probably overshadowed by the death and planetary destruction caused by their opposition to nuclear power.
254.
▲
by
knorker
1y ago
> Even if it takes me 4x as long to get to my destination, driving is still better than this. I don't believe this as a real rule. 10min vs 40min, maybe. 1h commute vs 4h commute? I don't believe that you would prefer spending
255.
▲
by
knorker
1y ago
I should add, before anyone tries to "correct" me: Yes, non-CC transactions can also be reversed, of sorts. But again this is not a technical limitation. If you want to avoid counterparty risk due to a deliberate technical and con
256.
▲
by
knorker
1y ago
I literally did, yes. That was not by accident. I spent two sentences on that. That's not a "gotcha". Does this mean that you agree with me that when sending money within the developed world and its functioning banking system
257.
▲
by
knorker
1y ago
> No, because it's subjective whether your interpretation of "fiduciary duty" precludes them from developing an OS. I think it does not, for example. We can disagree in our best assessment if "developing an OS" i
258.
▲
by
knorker
1y ago
Sorry, forgot to reply to this part: > and what happens if something goes wrong? If something goes wrong I have a chance to get my money back. Unlike with cryptocurrency, where it's just gone forever. If fact things have gone wrong
259.
▲
by
knorker
1y ago
> How are you doing it for free How do you mean? Some banks and bank accounts don't charge. > how long does it take It depends. Some transfer types are bank opening hours only, though then it's seconds. Some are batch overni
260.
▲
by
knorker
1y ago
> Over the last few years, stablecoins have become a preferred means to hold and move money (for convenience, etc). Huh? In the western world this is nonsense. I move 6-7 digits regularly, internationally, even between continents, for fr
261.
▲
by
knorker
1y ago
That just sounds like "one clever trick" to not pay taxes, import duties, or follow laws. Or can you explain how these bike importers are being hampered in fiat not by laws, but by technology? Every time I look at this, the "
262.
▲
by
knorker
1y ago
So you're saying there's no right and wrong decision on whether to make your own OS because Meta has not decided whether it's a public corporation with fiduciary duty or a kindergarten for OS hobbyists to have unproductive wa
263.
▲
by
knorker
1y ago
The physical keys are the same ones no matter if it's qwerty or dvorak, of course, so yes you can reach the keys without shifting your wrists over. But some movement is there, and once I reached even 10 wpm or something, it was immedia
264.
▲
by
knorker
1y ago
It's hard, but it's not subjective. There are many factors on whether to use a one handed or two handed backhand in tennis. It's subjective which one feels better, but there exists an objective answer to whether it makes a pa
265.
▲
by
knorker
1y ago
The much reduced hand movement is extremely comfortable, paying dividends every day. And it fixed my RSI. Of course over long periods of time we're bottlenecked by our brains. But the things to write come in bursts, and typing speed bl
266.
▲
by
knorker
1y ago
How is it not?
267.
▲
by
knorker
1y ago
A junior engineer can make an API that can basically live forever as tech debt. (Especially if it's an "API" persisted to disk)
268.
▲
by
knorker
1y ago
Sigh. It's really depressing how a technical discussion on merits of a solution keeps getting reported to HR. I've seen it many times. Someone said your preferred design won't work, and you go to HR. I gladly throw my idea un
269.
▲
by
knorker
1y ago
What I hate most about this latest push is that people in their 30s are trying to convince us all that blocking children's access to porn and such is the issue. As if most people don't agree with that in the abstract. Not only peo
270.
▲
by
knorker
1y ago
Yes, this is step 2, the first iteration.
More ›