MathMonkeyMan

Joined 7 years ago

Karma
2,667
Submissions
1,126
Member since
Nov 28
View on Hacker News

Recent submissions

Comment · 6 hours ago
You returned a pointer to a temporary. It's nasty but easy to spot.

Would you return `input.c_str()`? You might think twice about that, but it's the same thing. My favorite fix is to take a `std::string_view` as the parameter.

    string_view remove_leading_spaces(string_view input) {
        auto new_start = find_if(input.begin(), input.end(), [](char ch) { return ch != ' '; });
        return string_view(new_start, input.end());
    }
The result of the undefined behavior in your program is surprising, though. As it usually is.
Comment · 1 day ago
I remember reading a blog post or something about VPN providers complying with law enforcement requests. The author said "Those companies can't afford a lawyer. They can't afford a lawyer's _coffee_." I don't know if that's the case here, but I don't expect any network-tech-as-a-service company to put up a fight for anything.
Comment · 4 days ago
Passing allocator pointers around has the advantage of allowing you to customize the allocator when you want, and to ignore it when you want (which is most of the time), i.e. just use the allocator you were given and pass it around like some piece of syntax or ctx in Go.

The trouble comes when you have data structures that manage memory, and you want to associate the allocation strategy with the particular instance of the data structure. Or, worse, you don't store the allocator pointer with the data and you require that all functions operating on the data structure happen to use compatible allocators.

At its simplest, though, passing allocators around is just removing an implicit global variable that is sometimes helpful to customize locally, but nearly impossible to customize locally if left as a global.

Comment · 4 days ago
Cars are different nowadays (hopefully even more reliable), but the '95 Toyota Camry that my parents bought new in 1995 or 1996 lasted until I was done using it in college in 2011. Then my dad sold it for a chunk of cash. The only thing wrong with it was that the roof paint was gone to shit from the Florida sun. You could probably paint it, redo the ceiling fabric, and run it for another 10 years. They sunk a fair amount into it over the years, but nothing catastrophic -- no powertrain issues, no "fixing this AC will cost more than the car" issues. In the six years I drove it I think it needed about $300 of work (something about the steering or suspension).
Comment · 18 days ago
There's also the scene with the baby in Children of Men, and the synthesized long single shot in 1917.
Comment · 20 days ago
I like the writing in this article. The author did warn us, but the punchline takes a while to get to:

> I’d like to be clear that there are legitimate uses of remote attestation. By using a website that requires attested passkeys you can be sure you stay safe from accidentally installing a scammer’s fake passkey application that steals your data – the website will reject such a passkey. You might want an attested Passkey even if the website doesn’t require it, since you can use attestation to verify that your software has not been tampered with by a hacker while you weren’t looking.

> As for reasons to not want attestation: you might want to be able to use software that Twitter (formally X) doesn’t specifically approve of, such as Linux. Or a phone with a refurbished operating system.

So the bad timeline is the one in which the industry gradually transitions to "you can't log on unless everything about your system is exactly as we want." Figures.

Comment · 20 days ago
I was the Gentle Owl. Then I connected to a VPN, opened a private window in the same browser, and didn't maximize the window. Now I'm the Nosy Toucan.

The article's points still stand, but the trick didn't work this one time.

Comment · 20 days ago
But now, as a New Yorker, I can complain. And we love to complain.
Comment · 20 days ago
Comment · 21 days ago
True, but recognize the spin. Pretend that in the last election you were skeptical of the reigning government medical establishment and you did buy into some of the conspiracies, or at least thought they had some element of truth. Assume you were wrong and that you have good enough presence of mind to now feel duped.

I was always team "RFK Jr clearly bad," but to be honest I didn't put much work into forming that opinion.

Comment · 21 days ago
Same thing happened to Cheetahs and, to a greater extent, Florida panthers.
Comment · 21 days ago
> Some obvious wordsmithing here intended to confuse. These are very weak arguments and I do not understand why it is a material concern to a Congressman

Interested to hear more!

> other than an interest to interfere in US commerce on behalf of foreign entities.

No longer interested!

The article does beat around the bush and the headline is clickbait. I assumed from the title that these datacenters were not paying their bills, but instead it's about the extent to which the operators should pay for public infrastructure built due to the datacenter being built. That's an interesting question, but I don't like the goalpost begin moved from "not paying their full costs" to "not paying what I define as a 'fair share'."

Comment · 23 days ago
1631 bytes of text, by my count.

Then I disabled my ad blocker to see how much data comes down. So far it's at 31 MB, but it increases without bound by a few KB per second.

Comment · 27 days ago
Microcontroller! The platform is the peripherals.
Comment · 1 month ago
That's a good point. I'll add that killing someone (even yourself) with a public chat bot is a drawn out affair. With a car it happens all the time.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton