HackerLangs
TopNewTrendsCommentsPastAskShowJobs

orlp

8,716 karmajoined 13 tahun yang lalu
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/

Submissions

Rust Is Perfectly Imperfect

0x80.pl
3 points·by orlp·6 bulan yang lalu·1 comments

When Random Isn't

orlp.net
376 points·by orlp·2 tahun yang lalu·147 comments

comments

orlp
·4 hari yang lalu·discuss
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.
orlp
·12 hari yang lalu·discuss
This is a dumb take. It's like not teaching kids 1 + 1 because a calculator can do it for them.
orlp
·13 hari yang lalu·discuss
If your data is sufficiently noisy or your relationship sufficiently simple a linear regression will outperform a SOTA LLM.
orlp
·16 hari yang lalu·discuss
It seems like there aren't extra duties (anymore), but then again it's all very confusing and hard to navigate so who knows.
orlp
·16 hari yang lalu·discuss
You save a lot less after paying import duties.
orlp
·18 hari yang lalu·discuss
Actually, they're making an effort to force your business to not do something.
orlp
·29 hari yang lalu·discuss
> 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.
orlp
·bulan lalu·discuss
https://en.wikipedia.org/wiki/Conscription_in_Iran

FWIW I don't agree with the comment chain's source, I read "regular people" as "civilians" and don't think there was any nasty connotation meant.
orlp
·bulan lalu·discuss
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.
orlp
·bulan lalu·discuss
It's just a play on words, something lightweight drifts in the wind rather than gliding on a wing. It's really not all that deep.
orlp
·bulan lalu·discuss
It's called driftsort because it's derived from another sort I made, glidesort: https://github.com/orlp/glidesort. Glidesort is a bit faster still for large inputs, however it was too large and complex for inclusion in the standard library, and suffered from code size penalties on small inputs. So driftsort is a slimmed down version more appropriate for general purpose.
orlp
·bulan lalu·discuss
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
orlp
·bulan lalu·discuss
When going from float to u8 you should add a triangular dither. It makes a world of difference for grayscale gradients, even in 24bit truecolor.
orlp
·bulan lalu·discuss
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.
orlp
·2 bulan yang lalu·discuss
There's typically only a performance penalty if the unaligned load spans a cache line on modern hardware.
orlp
·2 bulan yang lalu·discuss
No it doesn't have security implications.

If you are insecure because someone has had one of their otherwise completely innocent PRs merged into your repo... you are insecure, period.
orlp
·2 bulan yang lalu·discuss
The person you replied to was talking about selling, not buying.
orlp
·2 bulan yang lalu·discuss
> 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.
orlp
·2 bulan yang lalu·discuss
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.
orlp
·2 bulan yang lalu·discuss
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.