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.

Bucketsquatting is (finally) dead

https://onecloudplease.com/blog/bucketsquatting-is-finally-dead
121•boyter•3h ago•50 comments

Willingness to look stupid

https://sharif.io/looking-stupid
406•Samin100•4d ago•133 comments

I traced $2B in grants and 45 states' lobbying behind age‑verification bills

https://old.reddit.com/r/linux/comments/1rshc1f/i_traced_2_billion_in_nonprofit_grants_and_45/
152•shaicoleman•1h ago•33 comments

Executing programs inside transformers with exponentially faster inference

https://www.percepta.ai/blog/can-llms-be-computers
144•u1hcw9nx•1d ago•34 comments

Malus – Clean Room as a Service

https://malus.sh
1307•microflash•22h ago•475 comments

Show HN: What was the world listening to? Music charts, 20 countries (1940–2025)

https://88mph.fm/
10•matteocantiello•2d ago•6 comments

Peter Thiel's Antichrist Lectures

https://apnews.com/article/italy-peter-thiel-paypal-pope-vatican-c3a6c7d2daba501caf8152558ac2d743
64•aureliusm•1h ago•42 comments

Source code of Swedish e-government services has been leaked

https://darkwebinformer.com/full-source-code-of-swedens-e-government-platform-leaked-from-comprom...
70•tavro•2h ago•49 comments

Ceno, browse the web without internet access

https://ceno.app/en/index.html?
46•mohsen1•5h ago•9 comments

Show HN: fftool – A Terminal UI for FFmpeg – Shows Command Before It Runs

https://bensantora.com/posts/fftool-ffmpeg-tui-go/
13•taskset•1h ago•3 comments

Okmain: How to pick an OK main colour of an image

https://dgroshev.com/blog/okmain/
29•dgroshev•3d ago•1 comments

“This is not the computer for you”

https://samhenri.gold/blog/20260312-this-is-not-the-computer-for-you/
542•MBCook•10h ago•221 comments

Vite 8.0 Is Out

https://vite.dev/blog/announcing-vite8
342•kothariji•7h ago•100 comments

ATMs didn’t kill bank teller jobs, but the iPhone did

https://davidoks.blog/p/why-the-atm-didnt-kill-bank-teller
440•colinprince•21h ago•457 comments

Prefix sums at gigabytes per second with ARM NEON

https://lemire.me/blog/2026/03/08/prefix-sums-at-tens-of-gigabytes-per-second-with-arm-neon/
48•mfiguiere•4d ago•4 comments

Bubble Sorted Amen Break

https://parametricavocado.itch.io/amen-sorting
349•eieio•18h ago•104 comments

Shall I implement it? No

https://gist.github.com/bretonium/291f4388e2de89a43b25c135b44e41f0
1328•breton•14h ago•484 comments

Enhancing gut-brain communication reversed cognitive decline in aging mice

https://med.stanford.edu/news/all-news/2026/03/gut-brain-cognitive-decline.html
319•mustaphah•19h ago•136 comments

An old photo of a large BBS (2022)

https://rachelbythebay.com/w/2022/01/26/swcbbs/
204•xbryanx•16h ago•134 comments

IMG_0416 (2024)

https://ben-mini.com/2024/img-0416
110•TigerUniversity•3d ago•23 comments

The Met releases high-def 3D scans of 140 famous art objects

https://www.openculture.com/2026/03/the-met-releases-high-definition-3d-scans-of-140-famous-art-o...
299•coloneltcb•20h ago•59 comments

Understanding the Go Runtime: The Scheduler

https://internals-for-interns.com/posts/go-runtime-scheduler/
121•valyala•3d ago•16 comments

Document poisoning in RAG systems: How attackers corrupt AI's sources

https://aminrj.com/posts/rag-document-poisoning/
125•aminerj•22h ago•50 comments

US private credit defaults hit record 9.2% in 2025, Fitch says

https://www.marketscreener.com/news/us-private-credit-defaults-hit-record-9-2-in-2025-fitch-says-...
379•JumpCrisscross•23h ago•425 comments

AI toys for children misread emotions and respond inappropriately

https://www.bbc.co.uk/news/articles/clyg4wx6nxgo
12•fredley•1h ago•1 comments

Grief and the AI split

https://blog.lmorchard.com/2026/03/11/grief-and-the-ai-split/
163•avernet•13h ago•260 comments

Never snooze a future

https://jacko.io/snooze.html
20•vinhnx•5d ago•6 comments

Celebrating Interesting Flickr Technologies

https://medium.com/@brightcarvings/celebrating-flickr-technology-3c93c8ddecc2
45•steerpike•1d ago•11 comments

Bringing Chrome to ARM64 Linux Devices

https://blog.chromium.org/2026/03/bringing-chrome-to-arm64-linux-devices.html
113•ingve•15h ago•57 comments

Big data on the cheapest MacBook

https://duckdb.org/2026/03/11/big-data-on-the-cheapest-macbook
363•bcye•1d ago•284 comments