Recent submissions

Comment · 2 years ago
Comment · 2 years ago
paper is paywalled; just logging into Medium won't do it
Comment · 2 years ago
Comment · 4 years ago
I loved it when I was younger, but I had trouble recommending it more recently because its tone is adjacent to personally attacking people who like Java.
Comment · 4 years ago
Ugh. You are right, and that's sad.
Comment · 4 years ago
> you can't trust that your enums have a value inside their interval

If you don't set the underlying type, assigning a value that doesn't match an enumerator via `static_cast` is undefined behavior. See https://en.cppreference.com/w/cpp/language/enum . (Doing weird pointer casting things is also undefined behavior per the strict aliasing rule, though, come to think of it, I'm not sure whether memcpying an out-of-range value into an enum through the "reinterpret_cast to `char*`" loophole is undefined behavior.)

Comment · 4 years ago
The source displayed at the bottom if this page clearly shows it's just extrapolating from numbers that are older than 2020.
Comment · 5 years ago
> Max Payne ran on a PIII @1GHZ with 128 of RAM

There was a port to the original Xbox, which had only 64 MB of RAM!

Comment · 5 years ago
> without knowing how the code was built

The article links out to Compiler Explorer (https://godbolt.org/), which shows the exact compiler version and options and lets you play with different ones. It shouldn’t matter which compiler — the standard prohibits optimizing this.

Comment · 5 years ago
Is there a reason that the inner save and restore must be separate? Why couldn’t peephole optimization remove them?
Comment · 5 years ago
I had hoped that this article wouldn’t require x86 assembly fluency to read; it really is a “port” of my prior article on x86-64 assembly. I wrote it because mobile developers, at least, probably care more about ARM64 than x86-64. Is there anything I can do to make this article similarly approachable to the x86-64 one?
Comment · 5 years ago
I haven't tried this, don't work for Amazon, and only just found out, but https://aws.amazon.com/ec2/graviton/ says that "Until June 30th 2021, all new and existing AWS customers can try the t4g.micro instances free for up to 750 hours per month". t4g.micro instances are Graviton, which is ARM64. Note that 31 days is only 744 hours. Buyer beware, though: https://aws.amazon.com/ec2/instance-types/ only says the free trial is until March 31, 2021.
Comment · 5 years ago
I ported the article to ARM64. [link redacted]
Comment · 5 years ago
> [name redacted] writes it

I didn’t write it, I just copied the compiler output from Godbolt so that the article could be read on mobile, where Godbolt’s UI doesn’t work so well and switching tabs back and forth is difficult.

Comment · 5 years ago
I’d be happy to port the article to ARM64 if there was sufficient demand for that, but I think it’s still fairly niche among developers, right? (Apple, recent Android, niche server environments?)

Are you talking about ARM64 or ARMv7?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton