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.

Surveillance vendors caught abusing access to telcos to track people's locations

https://techcrunch.com/2026/04/23/surveillance-vendors-caught-abusing-access-to-telcos-to-track-p...
174•mentalgear•1h ago•49 comments

Sneaky spam in conversational replies to blog posts

https://shkspr.mobi/blog/2026/04/sneaky-spam-in-conversational-replies-to-blog-posts/
54•ColinWright•2h ago•25 comments

Show HN: Honker – Postgres NOTIFY/LISTEN Semantics for SQLite

https://github.com/russellromney/honker
73•russellthehippo•2h ago•11 comments

I am building a cloud

https://crawshaw.io/blog/building-a-cloud
604•bumbledraven•9h ago•309 comments

Alberta startup sells no-tech tractors for half price

https://wheelfront.com/this-alberta-startup-sells-no-tech-tractors-for-half-price/
1916•Kaibeezy•21h ago•639 comments

Your hex editor should color-code bytes

https://simonomi.dev/blog/color-code-your-bytes/
238•tobr•2d ago•70 comments

Apple fixes bug that cops used to extract deleted chat messages from iPhones

https://techcrunch.com/2026/04/22/apple-fixes-bug-that-cops-used-to-extract-deleted-chat-messages...
687•cdrnsf•17h ago•171 comments

A Renaissance gambling dispute spawned probability theory

https://www.scientificamerican.com/article/how-a-renaissance-gambling-dispute-spawned-probability...
19•sohkamyung•2d ago•1 comments

Writing a C Compiler, in Zig

https://ar-ms.me/thoughts/c-compiler-1-zig/
50•tosh•4h ago•13 comments

Jiga (YC W21) Is Hiring

https://jiga.io/about-us/
1•grmmph•2h ago

We found a stable Firefox identifier linking all your private Tor identities

https://fingerprint.com/blog/firefox-tor-indexeddb-privacy-vulnerability/
794•danpinto•20h ago•234 comments

The Onion to Take over InfoWars

https://www.nytimes.com/2026/04/20/business/infowars-alex-jones-the-onion.html
304•lxm•2d ago•109 comments

Isopods of the world

https://isopod.site/
60•debesyla•2d ago•21 comments

5x5 Pixel font for tiny screens

https://maurycyz.com/projects/mcufont/
700•zdw•3d ago•143 comments

Show HN: Built a daily game where you sort historical events chronologically

https://hisorty.app/
38•damiannn•3h ago•36 comments

Work with the Garage Door Up

https://notes.andymatuschak.org/Work_with_the_garage_door_up
26•jxmorris12•1d ago•14 comments

Arch Linux Now Has a Bit-for-Bit Reproducible Docker Image

https://antiz.fr/blog/archlinux-now-has-a-reproducible-docker-image/
142•maxloh•12h ago•51 comments

Raylib v6.0

https://github.com/raysan5/raylib/releases/tag/6.0
33•rydgel•1h ago•1 comments

Our newsroom AI policy

https://arstechnica.com/staff/2026/04/our-newsroom-ai-policy/
104•zdw•8h ago•73 comments

A True Life Hack: What Physical 'Life Force' Turns Biology's Wheels?

https://www.quantamagazine.org/what-physical-life-force-turns-biologys-wheels-20260420/
127•Prof_Sigmund•2d ago•23 comments

Over-editing refers to a model modifying code beyond what is necessary

https://nrehiew.github.io/blog/minimal_editing/
388•pella•20h ago•224 comments

Highlights from Git 2.54

https://github.blog/open-source/git/highlights-from-git-2-54/
64•ingve•2d ago•31 comments

Website streamed live directly from a model

https://flipbook.page/
341•sethbannon•20h ago•90 comments

An amateur historian's favorite books about the Silk Road

https://bookdna.com/best-books/silk-road
44•bwb•2d ago•15 comments

Technical, cognitive, and intent debt

https://martinfowler.com/fragments/2026-04-02.html
288•theorchid•21h ago•77 comments

Ping-pong robot beats top-level human players

https://www.reuters.com/sports/ping-pong-robot-ace-makes-history-by-beating-top-level-human-playe...
143•wslh•22h ago•197 comments

Parallel agents in Zed

https://zed.dev/blog/parallel-agents
249•ajeetdsouza•20h ago•137 comments

Books are not too expensive

https://www.millersbookreview.com/p/no-books-are-not-remotely-too-expensive
78•herbertl•2d ago•91 comments

Qwen3.6-27B: Flagship-Level Coding in a 27B Dense Model

https://qwen.ai/blog?id=qwen3.6-27b
896•mfiguiere•1d ago•415 comments

Tempest vs. Tempest: The Making and Remaking of Atari's Iconic Video Game

https://tempest.homemade.systems
94•mwenge•13h ago•28 comments