Recent submissions

Comment · 1 month ago
Something that came up a bit too briefly in the post: acknowledgement is a major motivation for making software open source. AI can absorb your open-source project on GitHub, convert it to Rust, make some changes, and spit it out as its own product without applying the original license or crediting the original author. My former open-source project is now no longer open source.
Comment · 1 month ago
Comment · 2 months ago
They say they don't do that. But maybe I should be more skeptical.
Comment · 2 months ago
That's exactly why my previous public GitHub repo is now private.
Comment · 2 months ago
Comment · 2 months ago
Comment · 3 months ago
Exactly. Just like using LibGen is prohibited.
Comment · 3 months ago
I also recently made an open-source project with 200 GitHub stars private. I never had a problem with others using it as the basis for their own projects. In fact, that happened, and I received credit for it. But LLMs just hoover up everything, process it, and then spit it back out as if it were their own.
Comment · 3 months ago
Therefore it is srand(1).
Comment · 3 months ago
Both versions use the same input data. I also tried different random initial values and got essentially the same result. I didn't test hundreds of inputs, since that would have been mostly a waste of time in this case. The algorithm and the data distribution remain practically the same. What I'm measuring is the machine code that Clang generates for the hot loop.
Comment · 3 months ago
You're talking about the complexity of the Quicksort algorithm, whereas the article is about code generation.

Both versions sort the same data using the same algorithm. Just a tiny change in the source code caused Clang to generate different machine code.

Using different seed values - (srand(1), srand(2), srand(time(NULL))) essentially leads to the same result. With a good choice of pivot, Quicksort is very close to O(n log n) in practice, so that’s not the key factor here.

The interesting thing is that the generated machine code changes significantly.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton