MurphyA/hacker-news huggingface dataset:
by alembic_fumes | 2025-10-03 21:11:48+00:00
I'm not understanding what the supposed problem with these futures getting cancelled is. Since futures are not tasks, as the post itself acknowledges, does it not logically follow that one should not expect futures to complete if the future is not driven to completion, for one reason or another? What else could even be expected to happen?

The examples presented for "cancel unsafe" futures seem to me like the root of the problem is some sort of misalignment of expectations to the reality:

Example 1: one future cancelled on error in the other

let res = tokio::try_join!( do_stuff_async(), more_async_work(), );

Example 2: data not written out on cancellation

let buffer: &[u8] = /* ... */; writer.write_all(buffer)?;

Both of these cases are claimed to not be cancel-safe, because the work gets interrupted and so not driven to completion. But again, what else is supposed to happen? If you want the work to finish regardless of the async context being cancelled, then don't put it in the same async context but spawn a task instead.

I feel like I must be missing something obvious that keeps me from understanding the author's issue here. I thought work getting dropped on cancellation is exactly how futures are supposed to work. What's the nuance that I'm missing?
by BubbleRings | 2025-10-03 21:12:04+00:00
I created one of the systems that competed with Ringo / Firefly. It was a great experience, and a long story that I hope to write up fully some day. A short summary:

I had The Similarities Engine up on the very early web for a couple of years. I joined some guys and we created a startup with a good bit of angel financing. It failed, but at the last minute, Firefly bought out the tech and code that we had developed, so our investors got a little back of what they put in.

Now I met my wife when I travelled to Poland to work with the programmers that were developing our product, and she is the best thing that ever happened to me, so I don't have ALL regrets about how the startup failed, but let me tell you about the big regret that I do have.

The code that was written in Poland was never used for anything, as far as I know. The only thing of value that Firefly got out of acquiring us is the patent that I wrote on my recommending algorithm. (Yeah yeah go ahead and give me a bunch of grief here for applying for, and having issue, a software patent. It was 1997, a different world, for one thing.)

Anyway, long story short, it all comes down to this one 20 minute phone call with my CEO, where I had to decide whether to take my patent back and kill the deal where NetAngels would sell to Firefly, or give up my patent in the hopes that Firefly stock would be worth something. Firefly didn't succeed and soon after sold to Microsoft for not much. But if I had killed the deal, I really think my then-fiancée and I would not have gotten married, so I think I chose wisely. However...

That patent of mine. It didn't look like much at the time maybe. But what happened is, over time, the Internet came to it. Big time. The patent describes what is basically THE basic collaborative filtering algorithm, and it issued. Microsoft never did anything with it as far as I know, they just kept it in a drawer so nobody could ever use it against them.

So here's the thing. Recently I asked ChatGPT and Claude how much my patent would have been worth, if I had held on to it. If you have regrets in your life about business deals, if you had a few early shares of Google, or some early bitcoin or something but you sold early, let me tell you, I have you beat. I'll let you see the numbers yourself--type this query into your favorite AI (and maybe do me a favor and post a comment here about what numbers it tells you):

A single individual created patent US 5,749,081. He sold it when it had barely issued. How much money do you think he could have made from the patent, if he had held on to it and effectively monetized it, as the early Internet grew to have so many companies using collaborative filtering systems to sell products to users and make money?
by Aurornis | 2025-10-03 21:12:26+00:00
> I actually don't understand why do people believe every pair of curly braces has to be its own separate scope.

It’s much easier to reason about when your variables aren’t going to escape past the end of the block.

In non-GC languages going out of scope can also be a trigger to free the contents of the variable. This is useful for situations like locking where you can put the minimal span of code that requires the lock into a scope and take a lock which automatically unlocks at the end of the scope, for example.

JavaScript’s hoisting and scoping feel natural to people who started in JS, but most people who came from other languages find it surprising.
by inbx0 | 2025-10-03 21:12:54+00:00
The post links to a TS issue [1] that explains

> As of TypeScript 5.0, the project's output target was switched from es5 to es2018 as part of a transition to ECMAScript modules. This meant that TypeScript could rely on the emit for native (and often more-succinct) syntax supported between ES2015 and ES2018. One might expect that this would unconditionally make things faster, but surprise we encountered was a slowdown from using let and const natively!

So they don't transpile to ES5, and that is the issue.

1: https://github.com/microsoft/TypeScript/issues/52924
by tim333 | 2025-10-03 21:13:12+00:00
I just feel if you are going to call someone otherwise respected like DHH astonishingly racist it's basic decency to be able to quote one sentence where he is. I'm quite good at reading subtext and to me it reads like DHH: "They're still reeling from the Pakistani rape gangs"... critics: "he's saying he hates brown people". No he didn't. That's what let the rapes go on for years - that if you prosecuted rape you'd be called a racist who went after brown people.

The whole thing reminds me of Hillary's calling Americans deplorable so as to stop Donald Trump. Didn't that work out well?
by zahlman | 2025-10-03 21:13:22+00:00
Relative imports have been supported for approximately forever (https://stackoverflow.com/questions/72852). If you mean "by explicitly specifying a path string" (as opposed to a symbolic name), that has also been supported for approximately forever (https://stackoverflow.com/questions/67631). Today, the `importlib` standard library exposes all the steps of the import process — including figuring out where the source code is, checking the `sys.modules` cache etc. — and lets you hook into everything (in particular, you can bypass the entire "finder" process and turn a file path into a dummy "spec" which is fed to a "loader").

The flexibility of this system also entails that you can in effect define a completely new programming language, describe the process of creating Python bytecode from your custom source, and have clients transparently `import` source in the other language as a result. Or you can define an import process that grabs code from the Internet (not that it would be a good idea...).

If you mean "by explicitly specifying a relative path, and having it be interpreted according to the path of the current module's source code", well first you have to consider that the current module isn't required to have source code. But if it does, then generally it will have been loaded with the default mechanism, which means the module object will have a `__file__` attribute with an absolute path, and you just set your path relative to that.
by animex | 2025-10-03 21:13:37+00:00
That's where I really appreciated Android's ability to sub-out its entire UI to something totally customizable, accessible and able to be locked down. Drag my face contacts of myself and siblings onto the home screen so Mom can just click a face and it calls her contact. On the desktop, Windows is terrible for seniors, MacOS too. iPad can be decent but there are alot of areas where seniors get confuddled and have to call someone in.
by tialaramex | 2025-10-03 21:13:50+00:00
I assume it's a typo or equivalent mistake.

EMV (chip cards) can have a small amount of local smarts, so it is typical for example to insist on going online for a large transaction or if the card has performed too many offline transactions since last going online. The card maker decides these rules, so the bank gets to ensure the cards it issues to customers meet whatever requirements it has decided upon, balancing fraud risk against problems with loss of connectivity or services being down.

So I doubt they'd bother doing some sort of ad hoc revocation technique.
by sailingparrot | 2025-10-03 21:14:05+00:00
Your argument boils down to "people already said some things like this in the past" (ok, and?) and "some people I don't like agree with part of it", which is very weak and doesn't address anything in substance.

You know, you can still want to be able to build housing without having to wait 1 year for permitting or not want to live in a place where making a basic train track is basically impossible because of the number of stakeholders that have to come to a consensus and still vote for Mamdani. You are allowed to have non black and white opinions.

You can even have 1% of the things you think are good in common with Peter Thiel, and that won't immediately turn you into a far right psychopath.

You can even, hear me out, be for less regulation on specific areas where there has been a massive lack of supply but not for "deregulating the economy" in it's entirety!
by quesera | 2025-10-03 21:14:35+00:00
Some people who struggle with this maintain a "personal CRM" system.

Write down some names and notes about people. Re-read them when you're traveling to a place where you're likely to encounter them. Just writing the notes might be enough to solidify the memories for you, but re-reading surely will.

Salespeople do this to feign familiarity, and it's artificial. Don't do that. People you see every few years will not expect you to remember their kids' names or birthdays.

Specifics are often too intimate. But starting with their names, and building on with the simulation of a general memory or two (e.g. "are you still doing a lot of traveling for work?") are fine.
by nozzlegear | 2025-10-03 21:14:57+00:00
I read this recently, and about halfway through I thought "wow, the HN crowd would eat up this anti-surveillance story!" But without spoiling the story, I was thinking just about the opposite of that by the time I got to the end. It really didn't go where I thought it was going to go, which is something I love about Chiang's stories.
by otterdude | 2025-10-03 21:15:44+00:00
All those out of work programmers here's an opprotunity to create some disruption, pad your resume, and possibly create a job.

While we still have a free internet, it would be great to see efforts to create technology to replace centralized social media, cloud-tech, and businesses.

We need to make it so fucking hard for the gov, advertisers to get access to your data that it very expensive to maintain a system like this. And please please please do not work for or lend talent these jerks!
by netsharc | 2025-10-03 21:15:52+00:00
They really should just create "report your fellow users" snitching website.

Oh, I should make such a website and sell it to the Stasi, I'm going to be rich!

Easier would be to hint at Zuck that Trump wants that feature built-in on Facebook, WhatsApp and Instagram, and the subservient billionaire will get right on it.
by znpy | 2025-10-03 21:16:03+00:00
Not really. In my opinion the current behaviour mainly plagues big and very large platforms/communities (think instagram, facebook, reddit).

I think this will create a push for going back to smaller “gated” communities: think phpbb forums from the early 2000s, maybe with invitation-only sign up (similar to lobste.rs, where somebody already in must invite you, and admins can track who-invited-who).

It would probably be a better experience overall.
by drdaeman | 2025-10-03 21:16:05+00:00
I’m not sure education or awareness is a solution. It doesn’t hurt, of course, but I think the real issue is that we’re frequently feeling “low energy” (for my lack of a better term) so entry barriers become important and least-effort options start to win (“just picking a phone/tablet” easily wins here most of time), even if were well aware that they’re not as rewarding.

I blame all the background stress and I think it’s a more important factor.
by londons_explore | 2025-10-03 21:16:39+00:00
The card itself knows its balance and is authorised to approve transactions up to a limit fully offline.

The UK already does this in some shops for low value items for NFC payments. You can tell the offline transactions because they immediately say 'approved' rather than taking a few seconds.

If it turns out the card approved something 'wrongly', for example because you had previously reported the card lost to the bank, then the bank refunds the transaction and claims the value back from the merchant. That's why many merchants have their terminals set to require online payments.
by bediger4000 | 2025-10-03 21:17:12+00:00
No, I meant it. Corporate "trainings" stink. Very bad. But if the "compliance" people don't care enough to make even half-assed training, and instead substitute LLM generated weirdness that demonstrates contempt for me and for the subject matter, I've got a license to misbehave, civilly since this is HN. I promise to make everyone I can uncomfortable in a civil manner about any such generated training.
by 9x39 | 2025-10-03 21:17:19+00:00
He's sort of right but in an unspecific way.

"people should not trust systems that mindlessly play with words to be correct in what those words mean"

Yes, but this applies to any media channel or just other human minds. It's an admonition to think critically about all incoming signals.

"users cannot get a copy of it"

Can't get a copy of my interlocutor's mind, either, for careful verification. Shall I retreat to my offline cave and ruminate deeply with only my own thoughts and perhaps a parrot?

>you also know he's right. If you think he isn't, you either don't understand or you don't _want_ to understand because your job depends on it.

He can't keep getting away with this!
by mrguyorama | 2025-10-03 21:18:03+00:00
No, that's wrong.

The Kinzhal is just a normal ballistic missile. If it is "hypersonic", so were the missiles the US has sitting in bunkers.

China has the first real "hypersonic" weapon.

Besides, Russia's super awesome hypersonic missile that will totally kill the west is regularly intercepted by the Patriot platform. Because it's just a normal ballistic missile, which is what the Patriot is designed to intercept.
by zahlman | 2025-10-03 21:18:48+00:00
> if you make your folder a module by slapping an __init__.py in there then your relative imports will follow the directory tree.

`__init__.py` has nothing to do with making this work. It is neither necessary (as of 3.3, yes, you got it right: see https://peps.python.org/pep-0420/) nor sufficient (careless use of sys.path and absolute imports could make it so that the current folder hasn't been imported yet, so you can't even go "up into" it). The folder will already be represented by a module object.

What `__init__.py` does is:

1. Prevents relative imports from also potentially checking in other paths.

2. Provides a space for code that runs before sub-modules, for example to set useful package attributes such as `__all__` (which controls star-imports).
by stldev | 2025-10-03 21:18:55+00:00
Anyone who has had to contend with social anxiety should be insulted reading this.

Author is trying to frame social anxiety as "rational risk aversion"; it's not. Social anxiety isn't a strategy— it's your brain misfiring and treating normal social interactions as more serious threats. It's not about being liked. It's not about being disliked. At all. Reframing avoidance as "successfully avoiding dislike" just repackages the dysfunction with a motivational poster.
by motohagiography | 2025-10-03 21:19:20+00:00
offline mode has been the limiting factor in almost all electronic payments. there was a convention where the single use keys became limited use keys so that cards could make offline payments in low amounts that could be reconciled later. it created a risk and a vulnerability to be managed, and there was at least one exploit against it if I remember correctly.

imo, the mandate creates an interesting technical constraint on any CBDC standard, where the offline mode limits the effectiveness of a "turn off" of someone's money, as there will always be some feature where they can use their money to buy food and fuel. For now I am interpreting this mandate as constructive to civil liberties.
by Imustaskforhelp | 2025-10-03 21:19:36+00:00
atleast with cheques tho there was a way to safeguard the payments of a cheques by crossing of cheques and when I had learnt about cheques there were a lot of things that can be done via cheques like endorsing etc.

But there was always a risk of cheques being unsafe so that's why there is bank drafts. It seems that this is more similar to bank drafts than cheques.

If you really try to sum it up, I know I am going to do a grave misjustice but even a cash could be thought of a cheque from the govt. (well a cheque is meant to be unconditional but its based on the banking laws of a govt. and cash is a promissory note which is a promise made by the govt. so yeah....)

As another HN commenter pointed out here,this decision might be partially due to swedish culture of how they view cash which you can find here.
by quesera | 2025-10-03 21:20:40+00:00
I think this is deceptive. Superficial interactions seem less anxious, but they are not necessarily representative of what's going on inside the minds of the participants.

Learning to be superficial in superficial situations is a good way to fake your way through social anxiety. It isn't necessarily rewarding in itself, but it does smooth over some otherwise awkward scenarios.

Maintaining the balance is critical, and an important aspect of social maturity.

(It's a waste of time, yes! But being comfortable with a little bit of social inefficiency is essential to casual interactions which often have beneficial repercussions.)
by zahlman | 2025-10-03 21:21:46+00:00
Top-level code should not be able to fail except in incredibly deterministic ways that are tested during development. Failing fast is not as good as not failing at all. Lazy imports mean the power to avoid importing things that don't need to be imported at all on this run. Good design also cares about performance to some extent. On my machine, asking pip to do literally nothing takes several times as long as creating a new virtual environment --without-pip .
by miltonlost | 2025-10-03 21:21:48+00:00
Some other other people: "i can't tell the difference between rotten apples and fresh oranges. therefore all fruit is shit."

But which one do you think is accurate? Here's an article to consider, where ICE broke into an apartment building without warrants to arrest citizens and children. Does this sound like Gestapo tactics or no?: https://chicago.suntimes.com/immigration/2025/10/01/massive-...
by ajross | 2025-10-03 21:22:22+00:00
The reference was to the somewhat bombastic set that like to talk about the reason for the second amendment being a backstop against government tyranny or whatever. You seem to be hiding behind a variant definition that covers only advocacy for the second amendment itself. Maybe you're not in the demographic, but there are a lot of them here on HN.

Or were. They've been extremely quiet the last few months. Turns out tyranny isn't so bad when it's aimed at the people you already hate.
by Animats | 2025-10-03 21:23:11+00:00
This is the back-link problem in Rust. You can do back links with weak pointers, but it's rather verbose and involves extra run-time checks.

I've been trying to figure out a compile-time approach to that problem. Here's an early version of a tech note on that.[1] It looks possible, but there are many issues. But it's important to look at now. The C++ people are trying to figure out safe backlinks.

[1] https://github.com/John-Nagle/technotes/blob/main/docs/rust/...
by Sparkle-san | 2025-10-03 21:23:36+00:00
> The problem isn't really being liked or not being liked, the problem is the cognitive overload of trying to predict what will happen and respond to it in realtime, which is sure to set in when one's mental model of the potential interaction is very uncertain.

I think is a big piece. I have social anxiety and I have a tendency not to answer with what I'm thinking but what I think they want to hear because it's more predictable. This gets amplified tenfold in interviews. In an interview, I know that they're looking for a specific answer when they ask a question, but also that the answer differs from interviewer to interviewer. It's like there's this sub-process that is constantly running trying to figure out what to say, but in some situations it ends up locking up the system because it's using too many resources due to the constraints.
by netsharc | 2025-10-03 21:23:53+00:00
Feh, fine, as I commented, I did think about my own anecdote. To ELI75 it: I had a chance to interact with Sony's Aibo dog, the salesgirl said if you put your hand in front of it, it will yelp. Same as if you stroke the sensor pad on its back. It took a few tries, it did it, and I was delighed. Then I realized it was just some algorithms responding to input/"seeing" someone's hand with motor movements and an audio file of dog barks, there's no dog there happy to see you...
by aftbit | 2025-10-03 21:24:42+00:00
I think this makes a ton of sense in the very specific narrow use case of python CLI tools. For a web app or other long-lived process, startup time is typically not of extreme concern, and having more simplicity and legibility to the import process seems better.

That's not to say this PEP should not be accepted. One could always apply a no-lazy-imports style rule or disable it via global lazy import control.

https://peps.python.org/pep-0810/#global-lazy-imports-contro...
by Animats | 2025-10-03 21:24:58+00:00
Yes. This is a big headache in graphics, where there are big tables indexed by texture index down at the GPU level. Managing those as the content changes, with the GPU using the data while the CPU alters it, leads to huge complexity in Vulkan graphics.

The two times I've had to deal with a really tough debugging problem in Rust, it's been related to some crate which did that.
by colpabar | 2025-10-03 21:25:16+00:00
I would say in that case, the Parent and Child shouldn't need to know about each other - some kind of handler in a different file should.

Although I guess that doesn't work in all cases, like defining foreign key relationships when using an orm (like sqlalchemy) for example. But in the orm case, the way to get around that is... lazy resolution :^)
by mandown2308 | 2025-10-03 21:25:17+00:00
From my understanding what Stallman says is that LLMs don't "understand" what they're saying. They do a probabilistic search of the most appropriate letter (say) that has had come after another letter in the text (or any media) they have been trained on, and they place it similar in resemblance in the text that they produce. This is largely (no pun) dependent on existing data that is there in the world today, and the more the data that LLMs can work through, the better they get at predicting. (Hence the big data center shops today.)

But the limitation is that it cannot "imagine" (as in "imagination is more important than knowledge" by Einstein, who worked on a knowledge problem using imagination, but with the same knowledge resources as his peers.) In this video [1], Stallman talks about his machine trying to understand the "phenomenon" of a physical mechanism, which enables it to "deduce" next steps. I suppose he means it was not doing a probabilistic search on a large dataset to know what should have come next (which makes it human-knowledge dependent), essentially rendering it to an advanced search engine but not AI.

[1] https://youtu.be/V6c7GtVtiGc?si=fhkG2ZA-nsQgrVwm