HN user

orlp

8,720 karma

Developer at https://pola.rs/.

Publish a blog at https://orlp.net/blog/.

Other socials:

    http://github.com/orlp/  
    https://stackoverflow.com/users/565635/orlp  
    https://linkedin.com/in/orson-peters/
Posts18
Comments669
View on HN

I think if you interpret it charitably it means that any bug in the emitted machine code is already a likely memory-unsafe miscompilation if it is ran.

The compiler itself might be perfectly "memory safe" but the generated binary fundamentally is always at risk (besides WebAssembly I suppose).

I'm fully aware of the separation of compiler and binary, and being able to compile untrusted code safely is nice, but a perfectly safe compiler that generates vulnerable binaries isn't that much better.

That's a GCC skill issue. You can do it in five branchless instructions for unsigned by splitting the unsigned up in two 32-bit halves, converting those to floats simply by inserting their values as mantissa into constants 2^52 and 2^(52 + 32). This conversion is exact.

Then to finish the conversion you subtract 2^52 and 2^(52 + 32) respectively from the halves and add them together.

    vmovq       xmm0, rdi
    vpunpckldq  xmm0, xmm0, xmmword ptr [rip + .CONST1]
    vsubpd      xmm0, xmm0, xmmword ptr [rip + .CONST2]
    vshufpd     xmm1, xmm0, xmm0, 1
    vaddsd      xmm0, xmm1, xmm0
Here CONST1 = [0x43300000, 0x45300000, 0, 0] and CONST2 = [0, 0x43300000, 0, 0x45300000].

First, this article is mostly (AI?) regurgitation. This is much better: https://smalldatum.blogspot.com/2026/01/common-prefix-skippi....

Second, I have independently invented this (quicksort on string prefixes) at my time at CWI, although I didn't end up publishing it, because...

Third, this was already published in the original 1961 Quicksort paper by Hoare: https://www.cs.ox.ac.uk/files/6226/H2006%20-%20Historic%20Qu.... Near the end, the section on "Multi-word keys" describes a quicksort that partitions on just the first word, and only accesses the next word for the equality partition. And funnily enough this paper credits P. Shackleton for this, thus this idea was thought of even before the Quicksort paper came out.

So as is usual for software patents, this patent never should have been awarded.

Is there really anything about them that's bad? Or any worse than other things?

A full-on nuclear war will literally make a large portion of our planet uninhabitable for anyone for centuries, and leave the rest severely crippled and contaminated.

Sorry I know we're supposed to be kind and whatnot in these comments but I can't help but explicitly state that your comment is one of the dumbest things I've read on this site in a while. I hope you otherwise have a good day.

Copyright being as long as it is is a theft of our culture. I (and many of our generation) grew up with Pokemon, it's a common experience for many of us. A classic of our culture. Except we're not allowed to use it, remix it, build our own versions, etc. We still do, of course, but it's all illegal.

It didn't used to be this way.

I think 20-30 years of copyright should be plenty to extract whatever profits you deserve from the fruits of your labor. Anything beyond that is just holding culture hostage for the benefit of a few. It doesn't serve society in any meaningful way.

Since pdqsort (an older project of mine) was mentioned, I felt it wouldn't be entirely inappropriate to mention that I've since then collaborated with Lukas Bergdoll to provide two high-quality sort implementations for the Rust standard library, ipnsort (unstable) and driftsort (stable).

So if you use Rust, you get these by simply calling [T]::sort(_unstable). Great performance out of the box :)

On my machine (Apple M2), using the benchmarks from the repository on Apple clang 17 and Rust 1.98 nightly:

    Sorting 50 million doubles:
    ipnsort             0.79s
    blqs                0.90s
    driftsort           1.13s   (stable)
    std::sort           1.22s
    std::stable_sort    4.64s   (stable)

    Sorting 50 million (i32, i32) structs:
    ipnsort             0.82s
    blqs                0.89s
    driftsort           1.07s   (stable)
    std::sort           3.09s
    std::stable_sort    3.15s   (stable)

And now for a cool party trick, let's repeat the 50 million doubles experiment again, but have the first 90% already sorted, last 10% random:
    driftsort           0.29s   (stable)
    ipnsort             0.81s
    std::sort           1.15s
    std::stable_sort    1.63s   (stable)
    blqs                1.89s

The input space is 32 + 32 = 64 bits. The output space is 64 bits. So the best you can do is an 1-to-1 mapping.

However, since a * b = b * a, our input space has a lot of duplicate outputs. So from this alone you can conclude roughly half of the output space must be uncovered by any input pair, simply because there aren't enough input pairs.

So you're just outright accusing GameStop of fraud?

I have no idea why you interpret my words that way. I just meant that I didn't want to analyze the cash portion of their offer any further and just wanted to take it at face value.

Alright, my company MEME offers to buy Apple then for $1 plus 100% of MEME's stock, which is worth more than Apple then since it will own Apple.

If you word it like this it's just a hostile proposed change of leadership. Weird way to apply to become CEO of eBay, but sure.

Yes, that goes into the '50% cash' part of the offer. With a 20B credit line and 7.5B cash from their own coffers (which they claim to have, so let's believe them on their word there), you cover the cash portion.

The issue is the non-cash portion of the offer. They claim that the remaining 27.5B is covered by GameStop stock. But that's more than double the market cap of GameStop.

GameStop doesn't have (even close to) $55.5B. Their offer from the letter is literally impossible:

Our offer is $125.00 per share, comprising 50% cash and 50% GameStop common stock

Even if you magically included all existing GameStop stock in the offer, it still would not comprise 50% of $55.5B.

EDIT: looks like it's not impossible and I misunderstood. It's a proposed change of leadership with a $25B injection of cash to sweeten the deal. GameStop would issue shares which would capture the original eBay value (since GameStop would own eBay after the trade), making that part a wash. At least assuming people owning eBay stock currently would value the combined company at at least the sum of their parts, which is a big if.

Vec::set_len is by no means deprecated. The lint you linked only covers a very specific unsound pattern using set_len.

I've flagged the post, the title is editorialized, the title on the blog post is "MiniMax M2.7: The Agentic Model That Helped Build Itself" (at least at the time of writing this).

In university? No, absolutely not straight away.

The point of a CS degree is to know the fundamentals of computing, not the latest best practices in programming that abstract the fundamentals.

Why do you find it in interesting that someone chose something mainstream? Isn't that the definition of mainstream, that it's a common choice?

In modern usage (e.g. in gaming communities) "carries" has become not only ambitransitive but also a noun.

If something "carries" or is "a carry", it means it is so strong it metaphorically carries the rest of the setup with it. For example:

This card carries.

These two are the carries of the team.