HNHacker News
TopNewBestAskShowJobs

lofenfew

144 karma · joined February 12, 2024

submissionscomments
lofenfew··on I avoid async/await in JavaScript (2022)
>We literally exchanged callback hell to async hell, and said it was better, but I'm not strictly convinced of this.

It's obviously better. It's a bit unfortunate how much the history of the design decision shines through in the current solution, but it's unequivocally an improvement.

I would prefer an approach where calls to "async" functions are implicitly awaited unless a keyword turns then into a promise, and all functions are implictly treated as async as needed, unless a keyword specifies that they return a promise, which should be awaited instead. This would make the majority case clearer, and force you to make the minority case explicit where it's currently implicit.

I don't think this would help your coworkers who don't understand promises very much though.

lofenfew··on Things I've learned building a modern TUI Framework (2022)
> There is a heuristic where you write various sequences and ask the terminal for the cursor position, which should make an educated guess as the Unicode version. Unfortunately from testing we've discovered that terminals still render emoji unpredictably even if you think you know the Unicode database used.

Rather than using this as a heuristic, couldn't you simply use this whenever you need to determine the width of a string? Write it to the terminal, if it ends up going farther than you expected, then you need to wrap it somewhere. I used a trick like this at one point after I got annoyed with wcwidth.

lofenfew··on What Happens When Ozempic Takes over Your Town
Simpler explanation is that people with addictive personalities both are more likely to get addicted to opioids and to be obese and benefit from ozempic.
lofenfew··on Firefox Sidebar and Vertical tabs: try them out
The truly unfortunate thing is that it was the perfect such platform, then they took it away in the name of security.
lofenfew··on Third Party Cookies Must Be Removed from the Web Platform
third party cookies track you across the web, on every site you visit, so long as the third party is in common. first party cookies are categorically different. I don't think the proposal is even the removal of third party cookies per se, rather that they be partitioned into silos based on the first party site. So there's no need for a workaround using first party cookies, but the capabilities exposed by cookies become categorically different.
lofenfew··on A (not so) small library for terminal based game development
This is parenting 101 for anything non-permanent. For a piece of software it's basically common sense.
lofenfew··on The Byte Order Fiasco (2021)
"Can't happen" comes from the fact that the compiler optimizes for defined behaviour, not undefined behaviour. Making defined behaviour fast at the expense of undefined behaviour looks the same as assuming undefined behaviour can't happen in a number of cases. Eg. if you dereference a pointer then check it for null, naturally the compiler will remove the later check. We can describe that as the compiler making the defined case fast, or we could describe it as the compiler assuming the pointer "can't" be null. The latter description is easy to think about, and generalizes broadly enough, to be a common way of describing it.
lofenfew··on Highlighting Journalism on Mastodon
> The support for this tag is currently rolled out on mastodon.social and any other server that uses a recent Mastodon nightly release, but the feature will only show up for links to moderator-approved websites. In the future we would like to make the feature available to all without a manual review process.

quick way to ruin the party. odd that they don't even try and explain why. "we would like to" sounds completely hypothetical too, as in "if we cure evil and banish death to the underworld, perhaps one day we will be able to", rather than "when it comes out of beta it will be available to everyone".

lofenfew··on Is there ever a good reason to disable swap?
I generally want my applications to be oom killed when they run out of physical memory, not when they run out of swap. The latter is much slower and more painful.
lofenfew··on Glish: A version of English where every word is only one syllable
Conclusion from the video:

"""

Meed for 30 like WTF is

that well I guess it technically matched

my requirements so I'll give it a B

minus and call it a a it does generally

reduce the number of syllables in a

paragraph by 30%

I suppose it even has some kind of pro

to it I was kind of hoping it would be

mostly intelligible for English speakers

without having to learn a bunch of new

words but that's not exactly the case

there's just too many words to make a

mapping that's immediately obvious and

unambiguous at least with my simple

method most individual word mapping seem

"""

If the goal was to be intelligible, you could probably adapt the method to be more successful. For one, I would drop the requirement to not create more homophones. Since you're hoping people will guess what the word means based on what it sounds like, you can afford to have it sound like several things and let them distinguish based on context. Besides that, according to the established rules, you could turn a single multisyllabic word into multiple monosyllabic words. Suppose you turned "better" into "more good". This is technically monosyllabic, and immediately obvious in meaning to any english speaker. You might also squeeze multiple synonyms into a single word, for example "attempt" could be turned into "try", rather than attempting to come up with a legible one syllable variant of it. Doing these things wouldn't be as faithful to the seeming goals of the project, but the result might be more interesting in terms of semi-comprehensible english.

lofenfew··on Show HN: Markdown HN profiles at {user}.at.hn
might be slightly easier to set up DoH with a service you trust as the provider. Most browsers have a setting for it.
lofenfew··on Brain overgrowth dictates autism severity, new research suggests
If its not genetic, which autism isn't, then it has nothing to do with eugenics. People have the right to choose how they raise children, trying to dictate that is much more similar to eugenics imo
lofenfew··on How Waymo outlasted the competition and made robo-taxis a real business
>At least in North America, a hexagonal sign is always a stop sign.

the back of a stop sign is often a slow sign, or a do not enter sign. The same shape of sign, but different meaning from different directions. The slow variant is often held by construction workers, hence the GPs example.

lofenfew··on API Shouldn't Redirect HTTP to HTTPS
There's absolutely nothing you can do to prevent an active MITM attack over HTTP
lofenfew··on My $2.2k laptop can't drive two screens
What a stupid response. I imagine you were among those who flagged this post as well. "ergo the price is irrelevant" the price is relevant for other people considering purchasing macs. "then the onus is on him to have researched the device's full functionality prior to the spending any amount in any currency" god forbid he help others in their research. "Sounds a bit to me like the author of this blog is feeling a little guilty and self conscious about being apart of this subset of 'non-fine-print-readers'." A subset maybe, but not a proper subset given nobody bar nobody reads every dot of fine print before every purchasing decision. What was the point of this comment?
lofenfew··on Cloudflare took down our website
Courts generally require termination of contract to require a good reason, even when the clause says it can happen at the company's discretion. That doesn't lock them out of a court case, though it certain opens up which reasons cloudflare could argue the termination happened for.
lofenfew··on Cloudflare took down our website
> Unfortunately companies can chose who they want to do business with but it shouldn't be like this.

If you have a contract with them then they can't arbitrarily choose who they do business with. OP would presumably have a chance at a lawsuit against cloudflare here, the success of which would depend on how well cloudflare argued the ToS violation. A lawsuit might not be worth pursuing here, but this isn't a case of "it can't be helped".

lofenfew··on Tmux is worse-is-better
I wouldn't say sixel is worse is better, since that would imply it had general success. Drawing with block characters/braille characters is worse is better.
lofenfew··on M2dir: Treating mails as files without going crazy

  [^ <] *div
turns out you can parse html with regex
lofenfew··on Bluesky adds direct messages
why "at this point"? nostr was designed after activitypub was, in order to solve problems in activitypub. No substantial evolution has happened in activitypub in the interim to invalidate these improvements.
lofenfew··on Don't study or work on LLMs
If you're interested in building the next generation of that model, sure. If you just want to use it the weights are sufficient.
lofenfew··on Is artificial consciousness achievable? Lessons from the human brain
"If I had more time I would have written a shorter letter"
lofenfew··on Is artificial consciousness achievable? Lessons from the human brain
"Transmission" is per se bidirectional. The individual on the other end has received it, whether they understand it or can do anything useful with it is up to them.
lofenfew··on Why a New Yorker Story on a Notorious Murder Case Is Blocked in Britain
Your original comment presented it as if you'd come up with it or evaluated it yourself, rather than merely repeating a biased story someone else wrote. This seems far more dishonest than anything I did.
lofenfew··on Why a New Yorker Story on a Notorious Murder Case Is Blocked in Britain
I don't know either, I'm just making a reliable statement about any piece of journalism.
lofenfew··on Why a New Yorker Story on a Notorious Murder Case Is Blocked in Britain
That's how the new yorker story presented it, yes, but there is good reason to doubt this sequence of events.
lofenfew··on Ask HN: What nonfiction books do you keep rereading?
> If it were a lie, why would so many take that to the point of their own death?

Consider a weaker question: if it weren't a lie, why would so many take that to the point of their own death? While most people are usually opposed to lying, if they felt their reason for lying was important enough - and if they're willing to die for it then it must be - they could easily overcome that.

lofenfew··on Small Things
Everyone else copies apples boxes now.

>windows has ads and malware built into the OS

windows "ads" are suggestions about what software to use, the same as mac has

>the charge you for os upgrades

not for either 11 or 10

> The laptop hardware doesn’t cut corners. Yes, it’s expensive, but everyone knows of its quality. in 5 years it still has value. Try and sell a 5 year old windows laptop.

you can find plenty on resellers at a considerable fraction of their original price, same as with mac hardware. obviously laptops that were cheap when they were sold don't fetch much.

> I pay more to not be the product, and to have privacy.

you pay for a fashion statement. nobodies blaming you for that, but lets be honest

lofenfew··on Two giants in the satellite telecom industry join forces to counter Starlink
You need to get a technician out to adjust the dish with GEO. With starlink, you just plop it on the ground somewhere.
lofenfew··on Run0, a systemd based alternative to sudo, announced
What's the difference between this and ptracing the bash session that you run sudo under?
← PreviousPage 2 of 3Next →