Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wizeman
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
41 ms
·
271.
▲
by
wizeman
4y ago
> But less satisfying, it looks like clang optimizes out the entire zero-initialization logic, presumably because it assumes the expression ((size_t *)p)[-1] is undefined behavior. Yeah, I also noticed that is undefined behavior! > Ma
272.
▲
by
wizeman
4y ago
> You just need certain parts of the returned allocation to be castable to size_t, and there's no way for the compiler to prove that wrong if it doesn't know the internals of the allocator. The underlying allocation could be a
273.
▲
by
wizeman
4y ago
> malloc just returns a pointer, which could be in the middle of an array if malloc were an ordinary user-defined function. Yes, but even in that case, it would have to be an array of `size_t` objects for the pointer cast `(size_t *)` in
274.
▲
by
wizeman
4y ago
> Not necessarily. The energy generated may be used for purposes such as heating people’s homes, or industrial processes essential for creating medicine, operating schools and hospitals etc. ... or securing a global, permissionless, dece
275.
▲
by
wizeman
4y ago
If that's the case, we should definitely ban fossil fuel generation plants. Or at least, tax them heavily. Since they're the ones actually doing the "global harm".
276.
▲
by
wizeman
4y ago
What does the military have to do with the USD? Many countries had a military and that didn't stop their currencies from completely collapsing.
277.
▲
by
wizeman
4y ago
> There is nothing inherently wrong with banks lending out your deposits. There wouldn't be anything inherently wrong with it 1) if they didn't do it by default 2) if banks informed their customers appropriately, including the
278.
▲
by
wizeman
4y ago
> Even in the worst case, because a credit card is an abstraction over my bank account, I have the option to refuse to pay and won't lose my shirt or otherwise become despondent. That may also have unintended consequences for victim
279.
▲
by
wizeman
4y ago
> Deleting a virtual card is tremendously easier than revoking my primary credit card number and updating all the vendors that are using it. It's quite easy to use a virtual card once and then delete it immediately. Still harder and
280.
▲
by
wizeman
4y ago
You're still exposing your virtual card number which gives permission to charge money from your actual credit card. Normal credit cards can also be individually managed, frozen and deleted but that doesn't prevent unauthorized cha
281.
▲
by
wizeman
4y ago
> These laws don't bind individual citizens, but companies offering services. Right. EU companies whose websites are accessed by individual citizens and usually have assets stored by US companies, such as CDNs.
282.
▲
by
wizeman
4y ago
Out of curiosity, why is shorting better in that situation rather than just selling part of what you're already holding? I mean, why is being long $100k USDT and short $50k USDT at the same time better than just being long $50k USDT? I
283.
▲
by
wizeman
4y ago
> You’re hand waving away way too much complexity. Please do build this system. Keep in mind that addressing 63bits of memory with huge tables on will use up > 2 Tera worth of PTEs which translate to what, 16 Terabit worth of memory?
284.
▲
by
wizeman
4y ago
> > saying "signed overflow is completely undefined" simply means that you are not allowed to do that > No, saying "signed overflow is a compile-time error" means you're not allowed to do that. In the vast
285.
▲
by
wizeman
4y ago
> If x > TYPEOFX_MAX or y > TYPEOFY_MAX-2, then this can already happen with the more (maximally) vague "signed overflow is completely undefined" policy; wider intermediates just mean that code is not allowed to do other
286.
▲
by
wizeman
4y ago
> > Signed integer expression simplification [...] > This is easily addressed by allowing (but not requiring) implementations to keep wider intermediate results on signed overflow, to a unspecified width at least as wide as the ope
287.
▲
by
wizeman
4y ago
> The system you describe simply doesn’t exist, standards or no. A 64-bit kernel can’t hand out 64-bits worth of addresses because no CPU built today supports it. "Today" being the important part. That could change tomorrow. I
288.
▲
by
wizeman
4y ago
Well, then you have moved the goal post, because initially you didn't ask for performance measurements, you asked for proof that compilers can optimize code better if they can assume signed arithmetic won't overflow. And the blog
289.
▲
by
wizeman
4y ago
> > I think C doesn't guarantee that 'size_t' is at least as large as a 'signed int' > That doesn't matter, because size_t is large enough to hold any array index (that's kind of[0] the defining p
290.
▲
by
wizeman
4y ago
> Everyone says that and they have no proof. Here's an entire blog post with proof: https://kristerw.blogspot.com/2016/02/how-undefined-signed-o...
291.
▲
by
wizeman
4y ago
> C does not guarantee a 64 bit type exists. Isn't (signed/unsigned) 'long long int' mandatory since C99? It says: 'There are five standard signed integer types, designated as signed char, short int, int, long in
292.
▲
by
wizeman
4y ago
Well, that's not something the C standard (or POSIX, etc) guarantees, is it? Conceptually, a 64-bit kernel today could allow your program to allocate (almost) the entire 64-bit address space, assuming it does memory overcommit (like Li
293.
▲
by
wizeman
4y ago
> A serious mistake in C. Well, that's arguable. This "mistake" could be fixed in C tomorrow without breaking the semantics of any existing C code, but notice that this hasn't been "fixed" in any of the late
294.
▲
by
wizeman
4y ago
That's not exactly the same approach, because you're doing unsigned addition while the Go code is doing signed addition. And technically speaking, I think C doesn't guarantee that 'size_t' is at least as large as a
295.
▲
by
wizeman
4y ago
This wouldn't work for C/C++ because in these languages signed integer overflow is undefined behavior.
296.
▲
by
wizeman
4y ago
> it's getting a critical mass of the Internet to reconfigure their DNS, in an environment where the last several years shows well-funded shops blowing themselves up just trying to get this done. You mentioned yourself that DNSSEC c
297.
▲
by
wizeman
4y ago
What would happen next is that the attacker would succeed in getting his certificate for mail.google.com signed by the CA (remember, there are certificate authorities including Let's Encrypt that sign certificates based on DNS response
298.
▲
by
wizeman
4y ago
I'm not actually an expert on this, so I can't say for sure. I know of only 2 compatibility issues, by order of decreasing importance (IMHO): 1) Some DNS servers don't yet support DNSSEC (presumably including the DNS servers
299.
▲
by
wizeman
4y ago
> you don't have all the available keys, because servers can selectively change their responses Well, that's the entire point of the log, isn't it? To make sure that everybody is seeing the same keys. If the keys you got f
300.
▲
by
wizeman
4y ago
> macOS, iOS, and Windows are more than a resolv.conf change away from fully validating DNSSEC. You're right, good point. Let's give up on DNSSEC then. :)
More ›