Recent submissions

Comment · 5 hours ago
That's mostly true. If you use a script blocker, most websites work fine, and the ones that don't usually only need one or two scripts enabled out of dozens of running blocked scripts.
Comment · 8 hours ago
The curious task of economics is to demonstrate to men how little they really know about what they imagine they can design.

F. A. Hayek, The Fatal Conceit (1988).

Comment · 9 hours ago
Strangely, I paid for LTSC a year ago, installed it, but moved to Linux and found it does everything I want, even running native Windows programs. I never looked back.
Comment · 9 hours ago
The map is inaccurate because sea levels were much lower, and a lot of extra land and islands existed, which the map doesn't cover.
Comment · 15 hours ago
You are the one detached from reality.

The government funds AI companies by pretending to buy services from them. And that doesn't counts as "government revenue", but just sales. That's why Anthropic sued the Pentagon when it decided not to buy from Anthropic. Those services are fake.

You are detached from reality because your belief is Marxist, and Marxists define Marxism as "dialectical materialism." The dialectic is the Gnostic (religious) superstition that "opposite things are the same," which is intentionally incompatible with the principle of non-contradiction in logic. So Marxism is intentionally illogical and irrational, and that's why you are brainwashed and detached from reality.

Comment · 18 hours ago
A cargo cult wisdom snippet is the belief that compilers automagically apply every possible optimization. But they don't, because compilers don't know everything you know. Compilers have to assume that your code can be subject to side effects you never thought of, that would change the result of the code, so a lot of possible optimizations are avoided.
Comment · 19 hours ago
You are not competing with private companies for the RAM. You are competing with the state because AI has strategic value, so the state subsidizes AI companies with unlimited pockets.

In socialism, it's always the manager of public funds who decides what you want and what you need, and they neither know nor care.

Comment · 19 hours ago
You are wrong because, in capitalism, investors invest their own money. But AI companies are not investing their own money because the state considers AI strategic in the war against China, so all AI companies are state-subsidized. That's why they have unlimited pockets.

Capitalism works for profit, which means that companies have to produce what people want, and what they produce has to be more valuable than the cost of production. Instead, AI companies have massive losses, covered by fake income from the state, and the state doesn't care if you cannot buy RAM.

Everything bought with state money is no longer available to consumers, and it's always the poorest who can no longer buy what has become scarce. So public spending is always paid for by the poorest, even if "the rich are taxed."

Comment · 1 day ago
Altman: You are welcome to invest a little bit of your fortune in making major software developers write more efficient code that stops wasting our RAM. Start with internet browsers and the Windows 11 app that wastes one gigabyte showing the weather.
Comment · 1 day ago
That's not guaranteed. An array or variable could be modified by another thread, meaning that reversing the order of operations could produce a different result. The compiler cannot always assume that such transformations are safe, and that's why the compiler avoids implementing a lot of those optimizations that you expect to be done automagically.

So you cannot expect the compiler to automatically perform every possible optimization. The programmer still needs to understand how the code behaves and write it with performance in mind.

You may be perfectly sure that no other thread modifies the data, but the compiler doesn't know, so it avoids all kind of optimizations.

If you expect the compiler to perform those optimizations automatically, you still have to do things like declare certain variable variables and or function parameters as constant (since the compiler may otherwise have to assume that their values could be modified by side effects/threads, preventing certain optimizations), use specific attributes or annotations on functions, and provide specific compilation flags. That's more complex than simply coding the for loop backwards.

And the worst thing is that frequently the compiler assumes a constant could be modified anyway, and avoids optimizing just in case.

Comment · 1 day ago
You should always check the compiled assembly with Compiler Explorer because compilers sometimes avoid certain optimizations for convoluted reasons, which are hard to predict.
Comment · 1 day ago
I quote from "Optimizing Software in C++" by Agner Fog:

"Comparing an integer to zero is sometimes more efficient than comparing it to any other number. Therefore, it is slightly more efficient to make a loop count down to zero than to make it count up to some positive value, n. But not if the loop counter is used as an array index. The data cache is optimized for accessing arrays forwards, not backwards."

Yet that text was written for older CPUs. Modern CPUs are better at prefetching backwards access patterns, but if you try a microbenchmark with backwards array traversal, you may get misleading results.

Comment · 1 day ago
Checking-the-address is overhead.

It's like checking for overflow in an arithmetic operation. Other languages do the checking, and that's why they're slower. But C++ doesn't check because it offloads the responsibility to the coder, so the coder can write faster code if he makes sure there are no bugs.

If the coder knows there will be four return values and writes them one after the other, the return (or MOV) instructions are distanced the same. The goto hack should work.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton