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•10mo ago

Comments

quentinp•10mo 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•10mo ago
Page didnt load for me.

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

Multiprocessing all the way!

emmelaich•10mo ago
(2021)

Good article!

punnerud•10mo 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•10mo 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•10mo ago
How does the GIL come into play here?
punnerud•10mo 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.

ChatGPT Won't Let You Type Until Cloudflare Reads Your React State

https://www.buchodi.com/chatgpt-wont-let-you-type-until-cloudflare-reads-your-react-state-i-decry...
175•alberto-m•2h ago•113 comments

The Cognitive Dark Forest

https://ryelang.org/blog/posts/cognitive-dark-forest/
134•kaycebasques•2h ago•71 comments

Voyager 1 runs on 69 KB of memory and an 8-track tape recorder

https://techfixated.com/a-1977-time-capsule-voyager-1-runs-on-69-kb-of-memory-and-an-8-track-tape...
327•speckx•6h ago•138 comments

Midnight train from GA: A view of America from the tracks as airports struggle

https://isp.netscape.com/news/story/0001/20260329/e4d8ea591b3b036142c2bf2dee7dff5a
45•walterbell•2h ago•30 comments

Pretext: TypeScript library for multiline text measurement and layout

https://github.com/chenglou/pretext
152•emersonmacro•1d ago•19 comments

C++26 is done ISO C++ standards meeting, Trip Report

https://herbsutter.com/2026/03/29/c26-is-done-trip-report-march-2026-iso-c-standards-meeting-lond...
125•pjmlp•4h ago•99 comments

Show HN: Crazierl – An Erlang Operating System

https://crazierl.org/demo/
17•toast0•1h ago•5 comments

The RISE RISC-V Runners: free, native RISC-V CI on GitHub

https://riseproject.dev/2026/03/24/announcing-the-rise-risc-v-runners-free-native-risc-v-ci-on-gi...
96•thebeardisred•3d ago•22 comments

Ohm's Peg-to-WASM Compiler

https://ohmjs.org/blog/2026/03/12/peg-to-wasm
16•azhenley•2d ago•1 comments

Neovim 0.12.0

https://github.com/neovim/neovim/releases/tag/v0.12.0
238•pawelgrzybek•4h ago•101 comments

More on Version Control

https://bramcohen.com/p/more-on-version-control
34•velmu•2h ago•4 comments

Creating West Coast Buddhism (2024)

https://letter.palladiummag.com/p/creating-west-coast-buddhism
35•surprisetalk•3d ago•11 comments

The rise and fall of IBM's 4 Pi aerospace computers: an illustrated history

https://www.righto.com/2026/03/ibm-4-pi-computer-history.html
56•zdw•5h ago•19 comments

AyaFlow: A high-performance, eBPF-based network traffic analyzer written in Rust

https://github.com/DavidHavoc/ayaFlow
68•tanelpoder•6h ago•4 comments

Show HN: I made a "programming language" looking for feedback

https://github.com/alonsovm44/glupe
18•alonsovm•3h ago•18 comments

Kyushu Railway Company Train Varieties

https://www.jrkyushu.co.jp/english/train/index.html
28•NaOH•3h ago•0 comments

Show HN: QuickBEAM – run JavaScript as supervised Erlang/OTP processes

https://github.com/elixir-volt/quickbeam
58•dannote•1d ago•9 comments

Observations from carbon dioxide monitoring

https://grieve-smith.com/ftn/2026/03/nine-observations-from-carbon-dioxide-monitoring/
33•coloneltcb•2d ago•12 comments

The Epistemology of Microphysics

https://www.edwardfeser.com/unpublishedpapers/microphysics.html
33•danielam•4d ago•19 comments

Miasma: A tool to trap AI web scrapers in an endless poison pit

https://github.com/austin-weeks/miasma
267•LucidLynx•12h ago•194 comments

LinkedIn uses 2.4 GB RAM across two tabs

541•hrncode•13h ago•318 comments

Nitrile and latex gloves may cause overestimation of microplastics

https://news.umich.edu/nitrile-and-latex-gloves-may-cause-overestimation-of-microplastics-u-m-stu...
476•giuliomagnifico•12h ago•212 comments

The road signs that teach travellers about France

https://www.bbc.com/travel/article/20260327-the-road-signs-that-teach-travellers-about-france
8•1659447091•1h ago•1 comments

Police used AI facial recognition to wrongly arrest TN woman for crimes in ND

https://www.cnn.com/2026/03/29/us/angela-lipps-ai-facial-recognition
300•ourmandave•8h ago•116 comments

Full network of clitoral nerves mapped out for first time

https://www.theguardian.com/society/2026/mar/29/full-network-clitoral-nerves-mapped-out-first-tim...
198•onei•6h ago•59 comments

A nearly perfect USB cable tester

https://blog.literarily-starved.com/2026/02/technology-the-nearly-perfect-usb-cable-tester-does-e...
257•birdculture•3d ago•140 comments

Sky Wins Irish Court Order to Unmask 300 Pirate IPTV Users via Revolut Bank

https://torrentfreak.com/sky-wins-irish-court-order-to-unmask-300-pirate-iptv-users-via-revolut-b...
31•nixass•2h ago•3 comments

My MacBook Keyboard Is Broken and It's Insanely Expensive to Fix

https://tobiasberg.net/posts/my-macbook-keyboard-is-broken-and-its-insanely-expensive-to-fix/
97•TobiasBerg•3h ago•102 comments

Netscape News Feed Straight Out of the Late 00s

https://isp.netscape.com/
83•mistyvales•4h ago•18 comments

Show HN: BreezePDF – Free, in-browser PDF editor

https://breezepdf.com/?v=3
60•philjohnson•8h ago•35 comments