Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
teo_zero
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
91.
▲
by
teo_zero
4mo ago
Nitpicking the C variant: > #define BLQS_CMP(a, b) ((a) < (b)) A function that returns true when one operand is Less Than the other, should be called BLQS_LT. The CMP abbreviation is idiomatic for a function that returns -1,0, or 1.
92.
▲
by
teo_zero
4mo ago
In modern CPUs a mispredicted branch is much more expensive than a memory write. The unsaid assumption is that the array is filled with random values between 0 and 1000, so the "if" condition has a 50% of chances to be true. The b
93.
▲
by
teo_zero
4mo ago
True. But it's often all or nothing: you can't surf the web without the ads.
94.
▲
by
teo_zero
4mo ago
> doesn't allow windows to stay on top. Are you sure that windows that, without your consent, are allowed to stay on top and grab your input are a good idea? And spawned by Chrome? As if we hadn't already enough ad-ware, click
95.
▲
by
teo_zero
4mo ago
> unprivileged X11 programs that use the Scroll Lock light as an indicator I didn't know such apps existed! What do they use it for?
96.
▲
by
teo_zero
4mo ago
UTF-8 notoriously doesn't prevent ambiguous encoding by construction, but only prohibiting it in the specs. It's known as overlong encoding. It's up to the encoder/decoder to prevent, correct, or reject it. This burden o
97.
▲
by
teo_zero
4mo ago
Nice. But you've just invented Zig!
98.
▲
by
teo_zero
4mo ago
> int c[] = ..., that is always going to be on the stack Why? In the following code, only c will be allocated on the stack: int a[]={1,2,3}; foo() { static int b[]={1,2,3}; int c[]={1,2,3}; }
99.
▲
by
teo_zero
4mo ago
Some EVs use them to let the driver change the "drag" of the electric motors. Imagine the "L" (sometimes "B") position of automatic gear but with finer control than all-or-nothing.
100.
▲
by
teo_zero
4mo ago
> cars don't need start buttons, physical keys What would you rather have?
101.
▲
by
teo_zero
4mo ago
When digital cameras replaced traditional ones, we thought it would make photography more democratic: each of us would be Helmut Newton for 15 minutes. But it didn't give us the beautiful portraits and inspired lanscapes we expected, o
102.
▲
by
teo_zero
4mo ago
I'd love to have 3 extra keys to assign to Ctrl-c, Ctrl-v and Alt-tab, but I keep bumping into these issues: RGB lights and other typical gaming design; proprietary app to install; huge real estate occupied on the desk.
103.
▲
by
teo_zero
4mo ago
But how do you authenticate to the wifi if the old PC doesn't have WPA capabilities?
104.
▲
by
teo_zero
4mo ago
You assume that human consumption means immediate human consumption. By this metric, there's no need for video encoders faster than the movie's own FPS, either.
105.
▲
by
teo_zero
5mo ago
The author forgot to add "fused" here, like they did in other parts of the same section. Non-fused: foreach i y[i] = cos(x[i]) foreach i z[i] = cos(y[i]) Fused, no intermediate variable: foreach i t = cos(
106.
▲
by
teo_zero
5mo ago
Interesting project! I'm eagerly reading through it. Probably I would have made different choices. For example, I'd rather have many modules that can be individually included, than one giant file. Also from a purely aesthetic poin
107.
▲
by
teo_zero
5mo ago
Yes, some restrictions seem arbitrary. Just like why these two types are not compatible: struct a {int data;}; struct b {int data;}; I know, I know, changing it would break existing code, etc.
108.
▲
by
teo_zero
5mo ago
> If I want good results, I have to write intrinsics. Any good book / article / tutorial to begin learning it? Most docs I've tried assume you already know what you can do and focus on how to express it in assembly or
109.
▲
by
teo_zero
5mo ago
> > The idea that Windows doesn't have it's own weird, mysterious, issues is hilarious to me. > That's not what the author said. It is exactly what the author said. TFA makes a point that Windows' issues are w
110.
▲
by
teo_zero
5mo ago
A tombstone must be distinct from an empty element. In your example, you wouldn't stop at "d" because you haven't found an empty yet.
111.
▲
by
teo_zero
5mo ago
Now I'm curious: is a metric buttload much larger than an imperial one?
112.
▲
by
teo_zero
5mo ago
Technical analysis tells you that a stock is in its upwards trend. You invest all your money on it without thinking twice. The price goes down and you lose thousands of dollars. Is it a tool problem? LLMs spit out a sequence of tokens that
113.
▲
by
teo_zero
5mo ago
Mmm... so when looking for a non-existent key you have to go through the whole table. Hardly O(1)! A better strategy would be to first search the given range for the first empty slot, and exclude everything after that point. Then proceed lo
114.
▲
by
teo_zero
5mo ago
To be fair, you should say that over 97% of the Linux Foundation's budget goes not to the Linux kernel . There's more to Linux than the kernel.
115.
▲
by
teo_zero
5mo ago
> Affected: Linux 6.15 – 6.19 [...] Fix: commit 770594e (not yet in any stable branch at time of writing). Is it considered good pactice to publish a vulnerability not yet patched in any stable branch?
116.
▲
by
teo_zero
5mo ago
And for those commands that do not deserve a physical button and are only accessible via touch, please adhere to a few simple rules. 1. Put them always in the same place. Especially the "back" or "exit" button! 2. Each b
117.
▲
by
teo_zero
5mo ago
> I really can't stand the c-style naming conventions. Honestly I don't see much difference between upb_MiniTable_FindFieldByNumber and upb::MiniTable::FindFieldByNumber
118.
▲
by
teo_zero
5mo ago
TL;DR the author developed an algorithm to solve this specific problem: > The popular Roaring Bitmap format uses arrays of 16-bit integers of size ranging from 1 to 4096. We sometimes have to check whether a value is present. There'
119.
▲
by
teo_zero
5mo ago
To be fair, vi has got its dose of "modal editing is difficult to learn" criticism for years. Why shouldn't zed receive the same treatment if configuring LSP is a pain point for many newcomers?
120.
▲
by
teo_zero
5mo ago
> There are going to be skilless vibecoders and then there are going to be experienced devs (like OP) who figured out their AI workflow to multiply their productivity 2-5x. Are you sure OP belongs in the second group? He explicitly said
More ›