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.

Do Not Turn Child Protection into Internet Access Control

https://news.dyne.org/child-protection-is-not-access-control/
169•smartmic•1h ago•50 comments

Tinybox- offline AI device 120B parameters

https://tinygrad.org/#tinybox
172•albelfio•2h ago•100 comments

Some things just take time

https://lucumr.pocoo.org/2026/3/20/some-things-just-take-time/
414•vaylian•7h ago•140 comments

Professional video editing, right in the browser with WebGPU and WASM

https://tooscut.app/
12•mohebifar•58m ago•1 comments

Grafeo – A fast, lean, embeddable graph database built in Rust

https://grafeo.dev/
157•0x1997•7h ago•54 comments

Electronics for Kids, 2nd Edition

https://nostarch.com/electronics-for-kids-2e
44•0x54MUR41•2d ago•6 comments

Show HN: Termcraft – terminal-first 2D sandbox survival in Rust

https://github.com/pagel-s/termcraft
50•sebosch•3h ago•3 comments

How Invisalign became the biggest user of 3D printers

https://www.wired.com/story/how-invisalign-became-the-worlds-biggest-3d-printing-company/
109•mikhael•2d ago•79 comments

The seven hour explosion nobody could explain

https://phys.org/news/2026-03-hour-explosion.html
60•mellosouls•4d ago•7 comments

No evidence cannabis helps anxiety, depression, or PTSD

https://www.sciencedaily.com/releases/2026/03/260319044656.htm
84•nothrowaways•2h ago•63 comments

Hide macOS Tahoe's Menu Icons

https://512pixels.net/2026/03/hide-macos-tahoes-menu-icons-with-this-one-simple-trick/
43•soheilpro•4h ago•16 comments

No Semicolons Needed

https://terts.dev/blog/no-semicolons-needed/
16•karakoram•3h ago•20 comments

The paddle wheel aircraft carriers of Lake Michigan

https://signoregalilei.com/2026/03/08/the-paddle-wheel-aircraft-carriers-of-lake-michigan/
16•surprisetalk•4d ago•2 comments

ZJIT removes redundant object loads and stores

https://railsatscale.com/2026-03-18-how-zjit-removes-redundant-object-loads-and-stores/
63•tekknolagi•3d ago•9 comments

Thinking Fast, Slow, and Artificial: How AI Is Reshaping Human Reasoning

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6097646
71•Anon84•6h ago•42 comments

Common Lisp Development Tooling

https://www.creativetension.co/posts/common-lisp-development-tooling
15•0bytematt•2h ago•1 comments

Esqueleto Tutorial

https://entropicthoughts.com/esqueleto-tutorial
5•ibobev•4d ago•0 comments

Ubuntu 26.04 Ends 46 Years of Silent sudo Passwords

https://pbxscience.com/ubuntu-26-04-ends-46-years-of-silent-sudo-passwords/
282•akersten•17h ago•291 comments

Meta's Omnilingual MT for 1,600 Languages

https://ai.meta.com/research/publications/omnilingual-mt-machine-translation-for-1600-languages/?...
109•j0e1•3d ago•30 comments

Show HN: Atomic – self-hosted, semantically-connected personal knowledge base

https://github.com/kenforthewin/atomic
13•kenforthewin•2h ago•0 comments

Books of the Century by Le Monde

https://standardebooks.org/collections/le-mondes-100-books-of-the-century
83•zlu•2d ago•49 comments

Hawaii's worst flooding in 20 years threatens dam, prompts evacuations

https://www.nbcnews.com/weather/floods/hawaii-worst-flooding-in-20-years-rcna264573
32•geox•2h ago•9 comments

A Japanese glossary of chopsticks faux pas (2022)

https://www.nippon.com/en/japan-data/h01362/
442•cainxinth•1d ago•342 comments

Show HN: Joonote – A note-taking app on your lock screen and notification panel

https://joonote.com/
29•kilgarenone•7h ago•19 comments

Mamba-3

https://www.together.ai/blog/mamba-3
265•matt_d•3d ago•50 comments

Blocking Internet Archive Won't Stop AI, but Will Erase Web's Historical Record

https://www.eff.org/deeplinks/2026/03/blocking-internet-archive-wont-stop-ai-it-will-erase-webs-h...
464•pabs3•14h ago•131 comments

FFmpeg 101 (2024)

https://blogs.igalia.com/llepage/ffmpeg-101/
200•vinhnx•19h ago•8 comments

OpenCode – Open source AI coding agent

https://opencode.ai/
1179•rbanffy•1d ago•578 comments

Molly guard in reverse

https://unsung.aresluna.org/molly-guard-in-reverse/
203•surprisetalk•1d ago•82 comments

A pig's brain has been frozen with its cellular activity locked in place

https://www.newscientist.com/article/2520204-major-leap-towards-reanimation-after-death-as-mammal...
89•Brajeshwar•8h ago•126 comments