MurphyA/hacker-news huggingface dataset:
by gavinhoward | 2025-07-13 05:33:16+00:00
As the author of a semi-famous post about how Zig has function colors [1], I decided to read up on this.

I see that blocking I/O is an option:

> The most basic implementation of `Io` is one that maps to blocking I/O operations.

So far, so good, but blocking I/O is not async.

There is a thread pool that uses blocking I/O. Still good so far, but blocking I/O is still not async.

Then there's green threads:

> This implementation uses `io_uring` on Linux and similar APIs on other OSs for performing I/O combined with a thread pool. The key difference is that in this implementation OS threads will juggle multiple async tasks in the form of green threads.

Okay, they went the Go route on this one. Still (sort of) not async, but there is an important limitation:

> This implementation requires having the ability to perform stack swapping on the target platform, meaning that it will not support WASM, for example.

But still no function colors, right?

Unfortunately not:

> This implementation [stackless coroutines] won’t be available immediately like the previous ones because it depends on reintroducing a special function calling convention and rewriting function bodies into state machines that don’t require an explicit stack to run.

(Emphasis added.)

And the function colors appear again.

Now, to be fair, since there are multiple implementation options, you can avoid function colors, especially since `Io` is a value. But those options are either:

* Use blocking I/O.

* Use threads with blocking I/O.

* Use green threads, which Rust removed [2] for good reasons [3]. It only works in Go because of the garbage collector.

In short, the real options are:

* Block (not async).

* Use green threads (with their problems).

* Function colors.

It doesn't appear that the function colors problem has been defeated. Also, it appears to me that the Zig team decided to have every concurrency technique in the hope that it would appear innovative.

[1]: https://gavinhoward.com/2022/04/i-believe-zig-has-function-c...

[2]: https://github.com/aturon/rfcs/blob/remove-runtime/active/00...

[3]: https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p13...
by scotty79 | 2025-07-13 05:36:08+00:00
> I just can't see how AI code editors like Windsurf or Cursor, without any proprietary model, can be valued at billions.

Windsurf used to be GPU rental company before they decided to make a text editor. I imagine they own a lot of silicon they are running their coding assistant on.

https://www.afp.com/en/infos/windsurf-launches-first-gpu-clu...

It's not a rinky-dinky startup that just forked VS Code in a month.
by eestrada | 2025-07-13 05:36:31+00:00
Although I'm not wild about the new `io` parameter popping up everywhere, I love the fact that it allows multiple implementations (thread based, fiber based, etc.) and avoids forcing the user to know and/or care about the implementation, much like the Allocator interface.

Overall, I think it's a win. Especially if there is a stdlib implementation that is a no overhead, bogstock, synchronous, blocking io implementation. It follows the "don't pay for things you don't use" attitude of the rest of zig.
by ndiddy | 2025-07-13 05:37:58+00:00
The actual point of these laws isn't to stop minors from viewing the material, it's to stop sites from hosting the material entirely. They're using "protect the kids from obscene content" as a wedge to get popular support. Acting like some technical solution to make authenticating as an adult more user-friendly would make the politicians who want this implemented happy is disingenuous. Let's take a look at how Tennessee has legislated their ID check should be implemented:

- ID must be verified either by matching a photo of the user to their photo ID, or by processing private transactional data (i.e. a credit card transaction).

- The user must verify their ID at the start of the session, and every hour the session is active.

- Historical anonymized ID verification data must be retained for at least 7 years.

- Anyone running a site that's viewable in Tennessee without the above ID verification rules is committing a class C felony, regardless of what state they reside in or host their site in.

This is clearly an attempt to stop any content they label as "obscene" (using a very broad definition of "obscenity") from being viewable at all in Tennessee. It's a completely unreasonable set of hoops to jump through that solely exists as a fig leaf because they know that making a law banning the content entirely would be ruled unconstitutional.
by hn_throwaway_99 | 2025-07-13 05:38:52+00:00
It still seemed weird to me, and I'm trying to view it in the most generous light possible.

When I was younger there were folks who were just known as "the people who threw parties", simply because they loved throwing parties. They didn't view it as some expenditure where they expected any mutual return - the party was the return.

Now, of course there were some actual expenditures for food/drinks, and also the cleanup time. But the host would simply ask people to pitch in, and people always did.

The "ROI" comment just struck me as a mindset that views relationships transactionally. Yes, relationships are and always have been at least someone transactional (not many folks are going to continue spending time and effort on a relationship they don't feel is adding to their life), but not in this "mathmatical" tabulation of it.
by ipnon | 2025-07-13 05:39:45+00:00
To put it simply, the BEAM lets you swallow all of your dependent services into a consistent API, no matter network distance or machine dependability. In Python it feels like my main thread, DB, job queue, and OS are all speaking different languages. With Elixir I don't spend much time at all getting different services to work together, at least an order of magnitude less.

Elixir is not perfect, but for me working alone dependency hell was the bottleneck with Python. Now the bottleneck is adding features, which is right where it should be.
by Nursie | 2025-07-13 05:41:05+00:00
Cooperative multithreading via setjmp and longjmp has been around in C since the 80s at least.

I’m not sure this is so much hacking as an accepted technique from the old-old days which has somewhat fallen out of favour, especially as C is falling a little outside of the mainstream these days.

Perhaps it’s almost becoming lost knowledge :)
by skybrian | 2025-07-13 05:41:36+00:00
By a similar argument, why should stores check id's when selling alcohol or cigarettes? Raising kids is not their job either.

The answer is because we live in a society. Society is about families, not just adults. Sure, raising kids is primarily the job of the parents, but everyone helps. Sometimes that results in a bit of inconvenience for businesses.

Excluding kids from businesses that are adult-only isn't very kid-friendly, but it's the bare minimum when there are children around.
Show HN: MailDropHQ – Free Disposable Email Without Signup
by jblopez | 2025-07-13 05:41:51+00:00
Hi HN,

I built MailDropHQ – a disposable email generator designed for quick use, no signup, and maximum privacy.

No login or tracking Inboxes expire in 10 minutes Built with Mail.tm API Fully responsive and minimal No cookies, no analytics, no accounts

Use cases: quick app testing, avoiding spam, signups, burner accounts.

Site: https://maildrophq.com Code feedback and privacy thoughts welcome.
by Duanemclemore | 2025-07-13 05:42:00+00:00
It's actually the first in what became a series!

Watermark [0] and The Anthropocene[1] are both phenomenal. In fact, in terms of cinematography, I think Watermark is the best. Manufactured Landscapes was absolutely earth-shattering in my own consideration of humans and our ecologies though.

If you find yourself liking Burtynsky may I also suggest checking out Richard Misrach and the classic book of Manfred Hamm photography, Dead Tech [2].

(We'd be remiss to leave out the contributions of Jennifer Baichwal to all three films and Nicholas de Pencier on The Anthropocene.)

[0] https://www.edwardburtynsky.com/projects/films/watermark

[1] https://www.edwardburtynsky.com/projects/films/anthropocene-...

[2] https://www.amazon.com/Dead-Tech-Guide-Archaeology-Tomorrow/... (Only linked to Amazon because people have posted images)
by imiric | 2025-07-13 05:43:14+00:00
> The other things on that list seem fairly reasonable (if uncertain).

Nah. Thinking that poverty will be significantly reduced, let alone eliminated, in 4 years is simply delusional. Primarily because a reduction of poverty won't happen because of AI, but in spite of it. All AI does is concentrate wealth among the wealthy, and increase inequality. This idea that wealth will trickle down is a fantasy that has been sold by those in power for decades.

And UBI? That's another pipe dream. There have been very limited pilots around the world, but no indication that it's something governments are willing to adopt globally. Let alone those where "socialism" is a boogeyman.

The entire document is full of similar claims that AI will magically solve all our problems. Nevermind the fact that they aggrandize the capabilities of the technology, and think exponential growth is guaranteed. Not only are the timelines wrong, the predictions themselves have no basis in reality. It's pure propaganda produced by tech bros who can't see the world outside of their bubble.
by sandspar | 2025-07-13 05:43:38+00:00
Sounds like a form of social proof combined with low friction following? Authors say it creates a "rich get richer" dynamic. Also I wonder if there's a long-term risk that it creates a "everyone follows the same people" effect which may decrease delight, plus decrease chance of random jackpot posts that come out of nowhere and hook everyone for a day. If I've diagnosed correctly then I'm sure that Bluesky has figured out answers to these but I'm not sure how.
by muzani | 2025-07-13 05:44:43+00:00
"If the productivity gains are so huge, shouldn’t we see those engineers getting promoted super fast or getting rich from building a product extremely fast?"

This is an entirely different question in itself, and isn't really related to AI, but more between productivity and corporations.

Corporations are a pipeline. You have a certain amount of input and a certain amount of output. There is a queue of input stuff. If that queue runs dry, then you have wasted productivity. The pipe manager is being negligent somewhere - either we can cut down on costs by removing the cogs in the machine, or someone further up the pipe isn't producing enough output to satisfy the inputs.

If FE has too much free time, then your options are: 1) pull FE into BE, 2) pull work from BE to FE, 3) get FE to do product stuff like A/B testing or talking to customers, 4) make more FE teams or even have one person in two teams, 5) turn the site into an app or the app into a site, 6) slow them down by making them return to office, 7) fire someone

A Chinese company might have a couple dudes dedicated to answering all questions on APIs and the systems. A Western company will simply not document things or overdocument it to the point that it's too obtuse to read and yet doesn't answer the question. The worst cases I've seen is developing a whole new programming language, which becomes a white elephant maintained by interns.

But the point is, there's mechanisms that kick in and slow down productivity so nobody needs to be laid off. There's also additional mechanisms like engineers being sick of working in 3 teams at once with no documentation, and so they leave.
by nsm | 2025-07-13 05:44:50+00:00
I’m confused about the assertion that green threads perform badly. 3 of the top platforms for high concurrency servers use or plan to use green threads (Go, Erlang, Java). My understanding was that green threads have limitations with C FFI which is why lower level languages don’t use them (Rust). Rust may also have performance concerns since it has other constraints to deal with.
by abrookewood | 2025-07-13 05:45:33+00:00
Yeah, I don't think you deserve the down votes for expressing an opinion (except maybe that it doesn't add a lot to the conversation), but speaking from personal experience, the whole AI coding thing has been pretty amazing for me.

I'm technical, I can read code (even write some of it), but actually completing things or getting started on serious projects is really hard: partly because I am not a professional develop (and so everything is hard) and partly because of time constraints. AI agents address both of these concerns very well and I've been able to produce things I wouldn't have thought possible. Are they ready for Prod? Maybe not, but at least they WORK and that's soo much more than anything I've managed in the past.
by latch | 2025-07-13 05:47:45+00:00
I think having a thread pool on top of some evented IO isn't _that_ uncommon.

You might have a thread pool doing some very specific thing. You can do your own threadpool which wont use the Io interface. But if one of the tasks in the threadpool wanted to read a file, I guess you'd have to pass in the blocking Io implementation.
by fjfaase | 2025-07-13 05:49:33+00:00
I have used this approach, with an almost similar looking define for YIELD myself.

If there is just one instance of a co-routine, which is often the case for embedded software, one could also make use of static variables inside the function. This also makes the code slightly faster.

You need some logic, if for example two co-routines need to access a shared peripheral, such as I2C. Than you might also need to implement a queue. Last year, I worked a bit on a tiny cooperative polling OS, including a transpiler. I did not finish the project, because it was considered too advanced for the project I wanted to use it for. Instead old fashion state machines documented with flow-charts were required. Because everyone can read those, is the argument. I feel that the implementation of state machines is error prone, because it is basically implementing goto statements where the state is like the label. Nasty bugs are easily introduced if you forget a break statement at the right place is my experience.
by comex | 2025-07-13 05:52:56+00:00
But how will that actually work? Your stackless coroutines proposal talks about explicit primitives for defining a coroutine. But what about a function that's not designed for any particular implementation strategy - it just takes an Io and passes it on to some other functions? Will the compiler have a way to compile it as either sync or async, like apparently it did before? It would have to, if you want to avoid function colors. But your proposal doesn't explain anything about that.

Disclaimer: I'm not actually a Zig user, but I am very interested in the design space.
by WalterBright | 2025-07-13 05:53:55+00:00
Does it? I've never heard of anyone being cured of mental illness, just drugs that relieve the symptoms. The body develops resistance to the drugs, the drugs usually come with bad side effects, and patients often go off their meds.

Pilots who develop a heart condition get their license revoked. Every pilot knows this. There's nothing fair about that, either.

Fun fact - my Air Force dad told me that when an airplane was overhauled, the chief mechanic went up on the check ride. That ensured the job was well done.
by johnnyanmac | 2025-07-13 05:57:30+00:00
It was a very tonedeaf take, that's why. Most of the internet is concentrated in the top 100 websites, and 80% of them would not be affected by this law. So you'll still see plenty of bots on Youtube, Discord, Reddit, news sites, and so on.

Blogs with a few comments would go from 5 real commenters to 0 or 1. This does not get the desired result.

----

secondly, I assure you there's plenty of classic spam on servers that don't have good moderation. pre-AI spam never disappeared.
by johanvts | 2025-07-13 05:57:52+00:00
Im hosting my site on an IP in the US, just because it was the best hosting option. If the US laws change so that either a) I am liable or b) the hosting provider wont host me. Then of course I would have to move to another, non US, provider. And I wouldn’t be alone so the U.S internet would probably be a lot smaller than it is now.
by Manuel_D | 2025-07-13 05:57:59+00:00
The majority of patients stop experiencing gender dysphoria. The analogy to a married person "stuck in the closet" is not correct: in that scenario this person is still same-sex attracted but suppresses that desire. In the case of ~80% of gender dysphoric youth, they stop desiring to be the cross-sex gender altogether. They are not refraining from transition on account of doubting their ability to pass after having gone through natal puberty.
by deathanatos | 2025-07-13 05:58:46+00:00
> Would you mind citing some of the research supporting that it’s a good idea to take a knife to a baby’s penis?

First,

> In medicine, an indication is a valid reason to use a certain test, medication, procedure, or surgery.

From https://pmc.ncbi.nlm.nih.gov/articles/PMC2128632/ ,

> What are the absolute medical indications for circumcision?

> Medical indications […] occur in 1.5% and 1% of boys respectively.

That is, the overwhelming majority (>98%) of circumcisions in the US are not done for medical reasons. As the article states,

> Nearly all circumcisions are carried out for cultural or religious reasons.

Lastly, this:

> The most impactful benefit of circumcision is the lower cervical cancer incidence.

Is an illogical argument for circumcision as it is being discussed here, at birth.

> It seems strange to blame infant penises for higher cancer rates, but if there’s science to support the claim, it shouldn’t be dismissed out of hand.

… the claim is absurd. There's no science to support it.

The argument as raised above stands: why is circumcision — done at birth and without the consent of the patient — permissible, but puberty blockers — done far closer to adulthood and with the consent of the patient — are impermissible?
by adinisom | 2025-07-13 05:59:16+00:00
Yes, 100%. State transitions are "goto" by another name. State machines have their place but tend to be write-only (hard to read and modify) so are ideally small and few. Worked at a place that drank Miro Samek's "Practical Statecharts in C/C++" kool-aid... caused lots of problems. So instead I use this pattern everywhere that I can linearize control flow. And if I need a state machine with this pattern I can just use goto.

Agreed re: making the state a static variable inside the function. Great for simple coroutines. I made it a pointer in the example for two reasons:

- Demonstrates access to the state variables with very little visual noise... "s->"

- For sub-coroutines that can be called from multiple places such as "delay" you make the state variable the first argument. The caller's state contains the sub-coroutine's state and the caller passes it to the sub-coroutine. The top level coroutine's state ends up becoming "the stack" allocated at compile-time.
Show HN: Smart Guardian – a privacy-first Chrome extension to protect kids
by saber123 | 2025-07-13 05:59:25+00:00
Hi HN

I built Smart Guardian, a free and open-source Chrome extension that helps families protect children online. It works 100% offline (no data leaves the device) and scans webpages based on customizable keywords (e.g., violence, porn, drugs) and blocks access when needed.

I live in Iran and due to US sanctions, I can’t pay the $5 Chrome Web Store developer fee, so I’m sharing it via GitHub for now.

The extension is lightweight, private, and designed with parents in mind. All feedback and contributions are welcome.

GitHub: https://github.com/RezaeiSaber/Smart-Guardian release page are available on the repo.

Thank you!
by wongarsu | 2025-07-13 06:00:14+00:00
It's ironic how PHP's philosophy of "ignore errors and keep chugging along" has lead to developers habitually adding "or die()" (crash on error) to everything, even in this instance where chugging along at any cost would have been the exactly right behavior

I wonder if they would have spent more thoughts on error handling in a language that defaults to crashing on error (e.g. Java's exceptions)
by johnnyanmac | 2025-07-13 06:00:46+00:00
>I don’t really see a future where Discord would let an AI company post the kind of 24/7 porn+crypto+scams you get in your email spam folder

Discord just changed management and new managment immediately said they are interested in IPO'ing. If trends emerge, it will indeed get overriden by bots like Reddit did around the time it was preparing to IPO. I see it as an inevitability at this point.
by WalterBright | 2025-07-13 06:00:48+00:00
My dad had 20/10 vision. He was always first to identify enemy aircraft. They didn't have onboard radar at the time.

Wearing glasses still has issues. I have astigmatism, and so if I turn my eyes but not my head, I receive a warped view of the world. This is why I was simply terrible at baseball, tennis, etc. My brain could not adapt to this. I have difficulties with depth perception as a result, too.

I was more or less born to be a nerd. It's pointless to fight my fate :-)
by masklinn | 2025-07-13 06:01:14+00:00
> That’s not “the normal way”, it’s just the case when the LHS is immutable.

It’s the default behaviour of |= if you override |, you need to specifically override |= to do otherwise.

> This behavior is congruent to C++

An excellent reason to do something else in and of itself.

> it’s documented and idiomatic.

Documenting a trap does not make it less of a trap. Innocently replacing | by |= induces a massive behavioural change which the user has little reason to expect, and which can easily lead to bugs due to mutating shared data.

> It’d be weird if the in-place operator deeply copied the LHS

I see you understand neither Python nor the behaviour of the | operator.

> problematic for a garbage-collected language in high throughput applications.

dict.update exists, if you specifically need to update the LHS in place it works just fine.
by frumplestlatz | 2025-07-13 06:01:56+00:00
Let’s be clear about what you mean when you say “outside the mainstream”, because that innocuous turn of phrase is doing a lot of work to cover what you’re really saying.

Visa and MasterCard disallow content depicting CSA, rape, incest, bestiality, necrophilia, scatological erotica, torture, extreme sexual violence, and revenge porn.
by johnnyanmac | 2025-07-13 06:03:43+00:00
Did you miss the recent years of some states trying to ban gay/trans books from libraries? Or even just books written by gay/trans authors? It's been part of their playbook for years to try and assosiate transgenderism with pornographic.

You are right, the average voter is not worried about any single enforcement outside of CSAM. The people who will exploit this are not just "your average voter".
by perihelions | 2025-07-13 06:06:06+00:00
> "In the short term, however, the supply-demand mismatch could be alleviated by Beijing’s move to build a stockpile of crude oil to improve its energy security."

> "Chinese entities have snapped up 82m barrels in the past three months to build this inventory, equivalent to the demand of 900,000 barrels a day."

China's gearing up for near-term war; Xi is stockpiling vast amounts of multiple commodities, besides just oil[0]. The country's rapid shift to BEV's dovetails with that, what with crude oil imports being China's largest, and easiest to blockade, external dependency.

[0] https://www.economist.com/finance-and-economics/2024/07/23/w... ("Why is Xi Jinping building secret commodity stockpiles? | Vast new holdings of grain, natural gas and oil suggest trouble ahead")
by adgjlsfhk1 | 2025-07-13 06:07:02+00:00
I have some ethical concerns here. footnote 6 clearly states that Scribble did not do enough work to merit coauthor credit, but if he was one of the primary researches for section 5 of the paper and was responsible for typesetting the entire paper, denying such a good boy sufficient credit for his work is a serious breach of scientific standards.