Recent submissions

Comment · 12 hours ago
Okay. Good point, that is quite a bit shorter than I first thought of

A rough benchmark of a version of that against the original shows it to be close to twice as fast for unpredictable input with GCC (4.5 ns vs 2.72 ns) on my old machine. With predictable input where x values often are the same the original version is quicker

    int sparse_8_jump(int x, int val) {
        unsigned int idx = (unsigned int)x >> 3;
        if (idx > 5)
            return 0;
        if (x & 7)
            return 0;
        
        switch (idx) {
            case 0:
                return f0(val);
            case 1:
                return f1(val);
            case 2:
                return f2(val);
            case 3:
                return f3(val);
            case 5:
                return f4(val);
            default:
                return 0;
        }
    }
Comment · 15 hours ago
> The switch in sparse_8 could be simplified by dividing x by eight before the jump. Interestingly, gcc doesn't find this simplification.

It could not because that would ensure that 7 values for each case would be handled by function calls instead of the default case - 0/8 is 0, but 3/8 is also 0

Comment · 21 days ago
There are some unconfirmed rumors going that the maximum password length for the API was 8 characters...
Comment · 21 days ago
Privatization

It was run by DXC Technology, the Danish branch of a US software house.

When doing a contract on such programs the Danish government must take the cheapest offer by rule

Comment · 26 days ago
When you change your address you can click a checkbox saying you want a protected name/address. This means that companies that have you as customers/clients won't be able to get the new address, mail won't be redirected, etc

I did it accidentally during my last move and it was a pain in the behind

And it expires after a year by default so it feels rather pointless

Comment · 26 days ago
Altman at it again?
Comment · 1 month ago
More moving parts would mean a much more complex system which would heighten maintenance cost and likely lower successful interceptions per working system significantly.

I'm sure the Ukrainians can draw two curves and see where they intercept

Comment · 1 month ago
Opposite for me. Late 30s but I drink more or the same.

But I don't drink my go-to Zinfandel anymore as it has a big ass flag printed on the box. It's embarrassing feeling the cashier's judgemental gaze. They know I'm a drunk of course but I don't want them thinking I support the US

Tell the wine makers to stop putting that flag on there and maybe exports may pick up again

Comment · 1 month ago
I guess it's the only con that will take money to have DHH give a keynote about some sycophantic BS
Comment · 1 month ago
I'm curious what you think that may be.

The situation you're imagining is one of a global all encompassing depression caused by a single government.

Not unthinkable, but the Americans would feel that deeply. Do you think they want to?

Comment · 1 month ago
We agree that China won't care long term. They cannot lose in the current setup

In my view the worst that can happen for China is that Trump gets limited by anything. He's hurting US relations more than he's hurting China short or long-term. Relations take longer to build than trade

"Don't interrupt your opponent when they're making a mistake"

Comment · 1 month ago
Stability and sanity is not happening whether the conflicts stop in Yemen+Hormuz or not. At that point it's just going to go back to tarriff wars and new terror campaigns that the US admin will start somewhere else
Comment · 2 months ago
It uses Direct2D which most of the post is about.

They added the support by slopping a Direct2D emulation layer together.

Comment · 2 months ago
Neat idea in its core but its still tailscale underneath

The only thing that convinces me that tailscale isn't a CIA op is how badly it works for real uses

Comment · 4 months ago
I don't think many will.

But I think they should. Not only for the practical reason, but because it leads to better software in my opinion

Limitations foster creativity. Abundance kills innovation.

In my company: - All computers are refurbished and at least 10 years old. - Cloud deployments use Hetzner or self hosted machines. - All hardware in general is a bit dodgy. Our main CI/CD setup is on a very unreliable network with varying availability and bandwidth

It can be annoying once in a while but it reflects our customers reality. And it catches a lot of usability and performance bugs that we wouldn't otherwise catch

I can only recommend it

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton