Better HN
topnewbestaskshowjobs
Log inSign up

cmovq

907 karma · joined Oct 11, 2022 (4y ago) · 176 submissions

Submissions

comment 1d ago · link · parent

Isn’t the reverse of this project a Linux shell / desktop environment (which is famously not very good) on Windows?

comment 1w ago · link · parent

These days you just author your textures in sRGB, convert them to linear when they’re read, do all the filtering and lighting in linear space and convert the final render target to sRGB (or HDR). Of course this was much more difficult back then with fixed function hardware

comment 1mo ago · link · parent

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 2mo ago · link · parent

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 2mo ago · link · parent

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 2mo ago · link · parent

> 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 2mo ago · link · parent

> 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 3mo ago · link · parent

Note that compilers are more than happy to delete 'while (true)' if the loop doesn't have side-effects.

comment 3mo ago · link · parent

64 bit cpus have 128 bit mul results if that’s what you mean

comment 3mo ago · link · parent

> The PlayStation 1 didn't have jiggly vertices and warpy textures because of fixed-point

Indeed modern GPUs still use fixed-point rasterizers.

comment 4mo ago · link · parent

+1 for TrenchBroom, it’s amazing software.

comment 4mo ago · link · parent

I wish everyone would just have an option to see the navigation the the gauge cluster.

comment 4mo ago · link · parent

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 5mo ago · link · parent

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 5mo ago · link · parent

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.

comment 5mo ago · link · parent

Lenovo is the “weird exception” because thinkpads have always had the Fn key on the bottom left. Just like they still keep the track point.

I would presume most people buying a thinkpad don’t want to buy “the vast majority” of laptops.

comment 5mo ago · link · parent

I had no idea they used the Plan 9 file server for accessing files in WSL. I wonder what the original reasoning for choosing 9P was.

comment 5mo ago · link · parent

That and a reset button.

comment 6mo ago · link · parent

For GeForce cards you can get similar behavior by setting “Prefer maximum performance” which disables some of the low power states.

comment 6mo ago · link · parent

Designated initializers is one area where C feels much more expressive than C++. And that feature has been standard since C99.

comment 7mo ago · link · parent

The Coca Cola company still makes advertisements, even though everyone already knows about Coke. You have to keep your name in the top of your target audience’s mind.

comment 7mo ago · link · parent

Vulkan is a pain for different reasons. Easier to install sure, but you need a few hundred lines of code to set up shader compilation and resources, and you’ll need extensions to deal with GPU addresses like you can with CUDA.

comment 7mo ago · link · parent

Except it’s actually called “cooked mode” [1] and predates the use of the slang.

[1]: https://en.wikipedia.org/wiki/Terminal_mode https://www.linusakesson.net/programming/tty/

comment 7mo ago · link · parent

Software wants to be installed in C:\Program Files so that other software can’t modify their installation without admin permissions. Of course to do that your installer needs to be run as administrator which makes the whole thing rather silly.

comment 7mo ago · link · parent

> The OS then provides a native API to return a user's age bracket (not full date-of-birth)

Call the API every day, when the age bracket changes you can infer the date-of-birth.

123456