Recent submissions

Comment · 4 months ago
Fair, but it is less of a burden than just submitting a report with no proposed fix. Also, submitting quality patches regularly seems to be a good way to eventually become a maintainer, provided that both sides are interested (cURL generally is – at least that seemed to be the vibe at the last year's cURL Up event I attended).
Comment · 4 months ago
> but then what?

Then you send the patch upstream, they incorporate and maintain it for you. Congratulations, you just FOSSed.

Comment · 5 months ago
A cache line is simply the unit of data a CPU cache works with (generally 64 bytes, because someone somewhere has probably determined that that is the best line size for general use), much like there are units of data like bytes (8 bits nowadays, but there have been weird ones historically), pages (varies between hardware as well, and may be OS-configurable), etc.

As TFA mentions, a CPU does some predictions about what cache lines to prefetch, e.g. when you do sequential reads. Moreover, the x86_64 instruction set provides a prefetch instruction through which you are able to give the CPU a hint "hey, I'm gonna be using this soon, prepare accordingly, pretty please".

Still, the utility of prefetching is diminished if you only use a single byte from each cache line, because the mechanism generally depends on you doing other work while the next cache line is being fetched. So really the best case scenario is to take as much time as possible to work with what is already fetched, so that there is time for the next unit of data to be fetched in the meantime.

Comment · 6 months ago
Pretty sure if you let only a handful of individuals from an almost-extinct species roam around freely in an uncontrolled environment, chances are pretty high something is going to kill them off before they reproduce, hence why they are almost-extinct.

The zoo provides a controlled environment needed to restore the species.

EDIT: typo/word ordering

Comment · 6 months ago
I expressly said "not be so tightly coupled to LLVM" because I know they're not planning on dropping it altogether. But it is the plan for LLVM and Clang not to be compiled into the Zig binary anymore, because that has proven to be very burdensome. Instead, the plan seems to be to "side-car" it somehow.
Comment · 6 months ago
Comment · 6 months ago
Comment · 6 months ago
How is it a hack? I mean, you may not like the fact that Zig does not provide syntax sugar for interfaces, but how exactly do you think they are implemented in languages that do?
Comment · 7 months ago
It does not need to be an explicit check (i.e. a condition checking that your index is not out of bounds). You may structure your code in such a way that it becomes a mathematical impossibility to exceed the bounds. For a dumb trivial example, you have an array of 500 bytes and are accessing it with an 8-bit unsigned index - there's no explicit bounds check, but you can never exceed its bounds, because the index may only be 0-255.

Of course this is a very artificial and almost nonsensical example, but that is how you optimize bounds checks away - you just make it impossible for the bounds to be exceeded through means other than explicitly checking.

Comment · 7 months ago
First, if a performance optimization is a reliability regression, it was done wrong. A bounds check is removed because something somewhere else is supposed to already guaratee it won't be violated, not just in a vacuum. If the guarantee stands, removing the extra check makes your program faster and there is no reliability regression whatsoever.

And how does performance improve reliability? Well, a more performant service is harder to overwhelm with a flood of requests.

Comment · 7 months ago
That whole section is kind of weird. The mention of operator overloading also seems out of place, since the operator is not overloaded here at all.
Comment · 7 months ago
Not that it fits everyone, but that is basically how the Linux kernel is being developed.
Comment · 7 months ago
That, too, though I'm sure that particular problem is mainly because of the textual animation in the background.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton