frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

How async/await works in Python (2021)

https://tenthousandmeters.com/blog/python-behind-the-scenes-12-how-asyncawait-works-in-python/
61•sebg•11mo ago

Comments

quentinp•11mo ago
While it stays at the Python level, https://github.com/AndreLouisCaron/a-tale-of-event-loops really helped me to understand how asyncio and Trio are implemented. I had no idea how sleeps worked before reading that post.
incomingpain•11mo ago
Page didnt load for me.

https://realpython.com/async-io-python/

Multiprocessing all the way!

emmelaich•11mo ago
(2021)

Good article!

punnerud•11mo ago
A more simplified version:

Synchronous code is like a single-lane road where cars (tasks) must travel one after another in perfect sequence. If one car stops for gas (waiting for I/O), every car behind it must stop too. While orderly and predictable, this creates massive traffic jams as tasks wait unnecessarily for others to complete before they can proceed.

Pure asynchronous code (with callbacks) is like dispatching multiple cars onto independent routes with no coordination. Cars move freely without waiting for each other, but they arrive at unpredictable times and following their progress becomes chaotic. It's efficient but creates a complex tangle of paths that becomes hard to maintain.

Async/await combines the best of both approaches with a multi-lane highway system. Cars follow clear, synchronous-looking routes (making code readable), but only wait at strategic "await" exit ramps when truly necessary. When a car needs data, it signals with "await", pulls off the highway temporarily, and other cars continue flowing past. Once its operation completes, it merges back into traffic and continues. This gives you the logical simplicity of synchronous code with the performance benefits of asynchronous execution - cars only wait at crossroads when they must, maximizing throughput while maintaining order.

The genius of async/await is that it lets developers write code that looks sequential while the runtime handles all the complex traffic management under the hood.

explodes•11mo ago
Excellent write up. I appreciate the level of details here showing the history from the days of old, before async/await were even keywords.
bilsbie•11mo ago
How does the GIL come into play here?
punnerud•11mo ago
GIL is like a "red-cap" on the head for the CPU-core running the task, so you would not be able to run true Async without GIL. Have to hand the "red-cap" back, for the next task.

Instead of using a global lock ("red-cap"), Python objects have introduced a specialized reference counting system that distinguishes between "local" references (owned by a single thread) and "shared" references (accessed by multiple threads).

In that way enabling to remove GIL in the long run, now starting with making it optional.

Qwen3.6-Max-Preview: Smarter, Sharper, Still Evolving

https://qwen.ai/blog?id=qwen3.6-max-preview
281•mfiguiere•3h ago•162 comments

ggsql: A Grammar of Graphics for SQL

https://opensource.posit.co/blog/2026-04-20_ggsql_alpha_release/
216•thomasp85•5h ago•51 comments

GitHub's Fake Star Economy

https://awesomeagents.ai/news/github-fake-stars-investigation/
532•Liriel•9h ago•288 comments

We accepted surveillance as default

https://vivianvoss.net/blog/why-we-accepted-surveillance
102•speckx•1h ago•29 comments

At long last, InfoWars is ours

https://theonion.com/at-long-last-infowars-is-ours/
72•HotGarbage•33m ago•24 comments

The Theory of Interstellar Trade [pdf]

https://www.princeton.edu/~pkrugman/interstellar.pdf
19•AFF87•1h ago•1 comments

Deezer says 44% of songs uploaded to its platform daily are AI-generated

https://techcrunch.com/2026/04/20/deezer-says-44-of-songs-uploaded-to-its-platform-daily-are-ai-g...
121•FiddlerClamp•2h ago•134 comments

Bloom (YC P26) Is Hiring

https://www.ycombinator.com/companies/trybloom/jobs
1•RayFitzgerald•56m ago

10 years ago, someone wrote a test for Servo that included an expiry in 2026

https://mastodon.social/@jdm_/116429380667467307
111•luu•22h ago•69 comments

Kimi K2.6: Advancing Open-Source Coding

https://www.kimi.com/blog/kimi-k2-6
257•meetpateltech•2h ago•123 comments

M 7.4 earthquake – 100 km ENE of Miyako, Japan

https://earthquake.usgs.gov/earthquakes/eventpage/us6000sri7/
197•Someone•7h ago•83 comments

At Long Last, InfoWars Is Ours

https://theonion.info/
103•xnx•32m ago•1 comments

Chernobyl's last wedding

https://www.bbc.com/news/articles/c0q92lx8q75o
27•1659447091•1d ago•5 comments

Sauna effect on heart rate

https://tryterra.co/research/sauna-effect-on-heart-rate
259•kyriakosel•4h ago•153 comments

Atlassian enables default data collection to train AI

https://letsdatascience.com/news/atlassian-enables-default-data-collection-to-train-ai-f71343d8
311•kevcampb•5h ago•75 comments

WebUSB Extension for Firefox

https://github.com/ArcaneNibble/awawausb
106•tuananh•6h ago•87 comments

All phones sold in the EU to have replaceable batteries from 2027

https://www.theolivepress.es/spain-news/2026/04/20/eu-to-force-replaceable-batteries-in-phones-an...
607•ramonga•4h ago•485 comments

Larry Tesler: A Personal History of Modeless Text Editing and Cut/Copy-Paste (2012)

https://dl.acm.org/doi/epdf/10.1145/2212877.2212896
16•aragonite•3d ago•4 comments

Show HN: Alien – Self-hosting with remote management (written in Rust)

32•alongub•2h ago•6 comments

OpenClaw isn't fooling me. I remember MS-DOS

https://www.flyingpenguin.com/build-an-openclaw-free-secure-always-on-local-ai-agent/
196•feigewalnuss•10h ago•240 comments

I'm never buying another Kindle

https://www.androidauthority.com/amazon-kindle-2026-3657863/
107•mikhael•2h ago•90 comments

Focused microwaves allow 3D printers to fuse circuits onto almost anything

https://newatlas.com/electronics/meta-nfc-focused-microwaves-circuits/
121•breve•2d ago•22 comments

I prompted ChatGPT, Claude, Perplexity, and Gemini and watched my Nginx logs

https://surfacedby.com/blog/nginx-logs-ai-traffic-vs-referral-traffic
96•startages•2h ago•18 comments

Ask HN: How to solve the cold start problem for a two-sided marketplace?

91•alegd•4h ago•96 comments

NSA is using Anthropic's Mythos despite blacklist

https://www.axios.com/2026/04/19/nsa-anthropic-mythos-pentagon
359•Palmik•7h ago•262 comments

Up to 8M Bees Are Living in an Underground Network Beneath This Cemetery

https://www.discovermagazine.com/up-to-8-million-bees-are-living-in-an-underground-network-beneat...
145•janandonly•2d ago•23 comments

IPC medley: message-queue peeking, io_uring, and bus1

https://lwn.net/Articles/1065490/
30•signa11•3d ago•0 comments

AI chatbots could be making you stupider

https://www.bbc.com/future/article/20260417-ai-chatbots-could-be-making-you-stupider
17•1vuio0pswjnm7•4h ago•11 comments

I Made the "Next-Level" Camera and I love it

https://thelibre.news/i-made-the-next-level-camera-and-i-love-it/
192•ndr•3d ago•66 comments

SDF Public Access Unix System

https://sdf.org/?ssh
155•neehao•1d ago•75 comments