HNHacker News
TopNewBestAskShowJobs

ben0x539

4,454 karma · joined September 23, 2010

submissionscomments
ben0x539··on Ancient tools thought to be made by humans were made by monkeys: archaeologists
- me when i reread some really old code i wrote
ben0x539··on Fixing for loops in Go 1.22
Right, the wild thing for me is when you mutate `i` in the loop body. So at the same time `i` is scoped to the iteration so that you can capture it, but also mutating it affects the loop-scoped `i` that is incremented between iterations and checked for the termination condition. The iteration-scoped `i` is assigned back to the loop-scoped `i` at the end of the loop body. So if you have a closure close over `i` in the loop body and mutate it, whether that mutation affects the actual loop variable depends on whether the closure is called during the iteration it was created in or during a later iteration. Kinda spooky, but sure, less of a footgun than the original behavior.
ben0x539··on Fixing for loops in Go 1.22
Seems like a pragmatic decision where the breakyness of the change is mitigated by the module versioning thing. Old code gets the old behavior, code written in newly created or updated modules gets the new behavior. Everybody is happy, compared to the alternative where this ships in a mythical go v2 which nobody uses while this sort of bug keeps sneaking people's actual work.
ben0x539··on Fixing for loops in Go 1.22
But isn't it completely wild that the `for (let i =`... version works like that? What does the loop 'desugar' into if written as a while-loop?
ben0x539··on Fixing for loops in Go 1.22
Yeah I don't think it's so much "we explicitly rely on this behavior, how dare you change this" as "somewhere in our mountains of maintenance-mode code that haven't seen the sun shine through an editor window in years, this behavior cancels out another bug that we never noticed". Tooling should be able to detect when code relies on this, but it's still gonna cost some non-zero amount of developer effort to touch ancient code and safely roll out a new version if it needs to be actively addressed.
ben0x539··on Fixing for loops in Go 1.22
I assume that if compiling with 1.22 or later, you still get all the benefits from that version like other new features, bug fixes or perf improvements, just not this particular change.
ben0x539··on Credit card debt collection
> The Democrats would have done the exact same if given the opportunity

What would the Democrats be doing if they had a supreme court majority? I don't really follow US politics that closely but I got the impression that the Democrats were mostly about not rocking the boat too much?

ben0x539··on Any sufficiently advanced uninstaller is indistinguishable from malware
Of course they're smart enough to have a proper inode-based filesystem. They're probably just not smart enough to swap out the file system their customers are using without their customers getting mad at them.
ben0x539··on Microsoft has not stopped forcing Edge on Windows 11 users
How is it more acceptable because it's a combination of two things? Lots of objectionable outcomes are a combination of multiple factors!
ben0x539··on Snoop unto them as they snoop unto you
I like the feeling of hanging out with likeminded people or friends and showing each other the cool stuff we're working on. Asking for (or receiving!) even nominal amounts of money makes it a completely different kind of interaction and puts me in a completely different mindstate.

In my experience, doing the math on monetary value of time spent on random activities or interactions just makes everybody sad and doesn't lead to better decisionmaking.

ben0x539··on Remove my name from the [Rust] project
Ah, I didn't think of it at all, I was only thinking about a hypothetical responsibility of whoever is in charge of the git repository, not the extra github flavoring.
ben0x539··on Remove my name from the [Rust] project
Are there legal reason the information has to be kept in the Github repo? Maybe the Rust foundation could keep it in a PDF on some office computer somewhere.
ben0x539··on Remove my name from the [Rust] project
Of course it's technically feasible. You do the filter-branch thing and then you force-push.

Sure, it would be very inconvenient for everybody who has a clone of the repo, but I don't think that's a convincing argument to a nation state trying to enforce regulations.

ben0x539··on Using LD_PRELOAD to cheat, inject features and investigate programs
On unixy systems, they put a restriction into Nethack to limit the game's "wizard mode" (the fuck-around mode where you can't die and just create all kinds of stuff out of thin air, etc) to the unix user with the username "wizard": https://nethackwiki.com/wiki/Wizard_mode#Unix

The wiki describes a bunch of ways around this, but they all seemed kinda finicky and annoying, so instead I LD_PRELOADed a shim that made getpwent(3) or whatever it used always return "wizard" as the user name.

ben0x539··on Consumers defrauded on Zelle are left high and dry by the banks that created it [pdf]
> I also found that Zelle is basically just a front-end for the existing ACH Direct Deposit system. [...] > > tl;dr do not ever use Zelle.

I can't figure out how to do ACH transfers to friends with my credit union, and I've been told Zelle is the solution for that. I guess I should stick to Venmo?

ben0x539··on The longest word you can type on the first row
That's sick, thanks for sharing!
ben0x539··on The longest word you can type on the first row
I wonder how fast you could get at typing everything onehanded with some modifier key that mirrors the keyboard. Right hand is probably more useful there.
ben0x539··on AdNauseam: uBlock Origin fork silently clicking ads on behalf of users
man people really post about this browser addon ad nauseam
ben0x539··on Structured logging with slog
I think go loggers have tried to move away from passing log entries as maps for performance reasons.
ben0x539··on Toki Pona: an attempted universal language with only ~120 words
Yeah, not falling for that, clearly an attempt to drastically lower the entropy of people's correct horse battery staple passphrases.
ben0x539··on The inability to simultaneously verify sentience, location, and identity
"Troll farm" is also based on this new usage of the word.
ben0x539··on Pay no attention to the USB port behind the “no USB” sticker
Do you know that the neighbor didn't intentionally make their TV do that?
ben0x539··on Successful room temperature ambient-pressure magnetic levitation of LK-99
I wish people on this website were as enthusiastic about addressing this problem as they are about tech things.
ben0x539··on Successful room temperature ambient-pressure magnetic levitation of LK-99
When AI was 20 years away, people seemed more optimistic about it than now when its inevitable transformative societal impact is seemingly right around the corner, are you sure this is the kind of example they were going for?
ben0x539··on The bigger the interface, the weaker the abstraction
Doesn't that frequently run into other code that well-intentionedly wraps a value of the original interface adding new functionality but not passing through the newer interface, because it simply can't account for all interface smuggling that might be going on? Does sophisticated Go code just not use decorator types like I've run into?
ben0x539··on A world where people pay for software
I figure someone is going to come along who's excited about adapting the dishwasher for their own use cases, since they also don't want to do dishes. Maybe they'll even have it support their social circle's use cases so they never have to help doing their friends' dishes after being over for dinner again.

It's bound to happen at some point, right? There's a lot of people doing dishes.

ben0x539··on A world where people pay for software
I'm 200% convinced there are plenty of people out there who could easily be nerdsniped into building an open source dishwasher! Hackers get up to all kinds of stuff that doesn't seem traditionally fun!
ben0x539··on Ask HN: What is the best thing you learnt or got out of Hacker News?
It's incredibly easy for CO2 levels to get to uncomfy levels in an enclosed living space such as my office at home with no central air and a closed door, especially in the heat of local summer where I will try very hard to not open the windows, or a shitty small meeting room at the overpriced coworking space. It's emitted from my mouth with every breath I take yeah that's exactly the problem. :(

It's definitely not as bad as carbon monoxide poisoning but it's also much easier to inflict on yourself at least to the point where it can make you drowsy and worsen your headaches.

ben0x539··on Coroutines for Go
I'm responding to a comment asking for a justification for sugar for function call based iteration. My comment is an attempt to draw a parallel to the need for sugar for channel based iteration. I'm not trying to suggest channel based iteration as an alternative to coroutines.
ben0x539··on Coroutines for Go
Well, what was wrong with:

    for {
        next := <-channel
        ...
    }
← PreviousPage 5 of 34Next →