Recent submissions

Comment · 1 month ago
Always thought it was strange that fptan also pushes 1 to the register stack. It now makes sense it’s so existing code for the 8087 which was expected to do y/x to get the actual tangent could keep working by doing y/1 on newer processors.
Comment · 1 month ago
My point is that the straight-line non-templated function presented later in the article is significantly more readable, it’s like 8 lines of code with a few shifts and xors.
Comment · 1 month ago
One of the reasons I dislike boost is in the first code sample. What’s the point of implementing what boils down to a 10 line function (as shown in the decompiled output) like this

    typedef xor_combine_engine<
  xor_combine_engine<
    linear_feedback_shift_engine<uint32_t, 32, 31, 13, 12>, 0,
    linear_feedback_shift_engine<uint32_t, 32, 29, 2, 4>, 0>, 0,
  linear_feedback_shift_engine<uint32_t, 32, 28, 3, 17>, 0> taus88;
Comment · 1 month ago
> Base84 distinguishes uppercase and lowercase letters, so different encoded names can compare equal on a case-insensitive filesystem.

I understand for the authors particular application the probability of collision is small, but this makes this encoding completely impractical for filenames generally.

Comment · 2 months ago
> Perhaps surprisingly, the ZIP file puts the central directory - which lists the content of the ZIP file - at the end of the file

This is very common for archive files. It lets you easily append a file to the end of the archive (overwriting the directory) followed by the updated directory. If it were at the start, you’d have to rewrite the entire contents of the archive to grow the directory.

Comment · 2 months ago
Note that compilers are more than happy to delete 'while (true)' if the loop doesn't have side-effects.
Comment · 2 months ago
64 bit cpus have 128 bit mul results if that’s what you mean
Comment · 3 months ago
> The PlayStation 1 didn't have jiggly vertices and warpy textures because of fixed-point

Indeed modern GPUs still use fixed-point rasterizers.

Comment · 3 months ago
+1 for TrenchBroom, it’s amazing software.
Comment · 4 months ago
I wish everyone would just have an option to see the navigation the the gauge cluster.
Comment · 4 months ago
I understand this logic, but at some point it makes sense to design the system for the millions of people on macs rather than make compromises for the sake of dozens of Vision Pro users.
Comment · 4 months ago
Is there a technical reason why apple doesn’t allow HDR to be selectively turned off? I’m surprised this is still not at least an accessibility option.
Comment · 4 months ago
Compilers can’t really, in a meaningful way, change the layout of your data in memory. And you do need to think about your memory layout to get any benefit from SIMD. You’ll notice a lot of compiler auto vectorization insert many instructions just to shuffle data around to get to a usable layout, which negates much of the benefit.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton