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.

Autoresearch on an old research idea

https://ykumar.me/blog/eclip-autoresearch/
208•ykumards•4h ago•64 comments

iPhone 17 Pro Demonstrated Running a 400B LLM

https://twitter.com/anemll/status/2035901335984611412
420•anemll•8h ago•224 comments

FCC Updates Covered List to Include Foreign-Made Consumer Routers

https://www.fcc.gov/document/fcc-updates-covered-list-include-foreign-made-consumer-routers
28•moonka•1h ago•2 comments

Printable Claude Code Cheat Sheet (auto-updated daily)

https://cc.storyfox.cz
16•phasE89•1h ago•5 comments

How I'm Productive with Claude Code

https://neilkakkar.com/productive-with-claude-code.html
71•neilkakkar•1h ago•42 comments

FCC Adds Routers Produced in Foreign Countries to Covered List

https://www.fcc.gov/document/fcc-adds-routers-produced-foreign-countries-covered-list
10•kotaKat•46m ago•1 comments

Local Stack Archived their GitHub repo and requires an account to run

https://github.com/localstack/localstack
117•ecshafer•3h ago•56 comments

Dune3d: A parametric 3D CAD application

https://github.com/dune3d/dune3d
64•luu•1d ago•18 comments

Finding all regex matches has always been O(n²)

https://iev.ee/blog/the-quadratic-problem-nobody-fixed/
127•lalitmaganti•4d ago•30 comments

Trivy under attack again: Widespread GitHub Actions tag compromise secrets

https://socket.dev/blog/trivy-under-attack-again-github-actions-compromise
131•jicea•1d ago•47 comments

Two pilots dead after plane and ground vehicle collide at LaGuardia

https://www.bbc.com/news/articles/cy01g522ww4o
283•mememememememo•15h ago•463 comments

An incoherent Rust

https://www.boxyuwu.blog/posts/an-incoherent-rust/
77•emschwartz•7h ago•20 comments

BIO: The Bao I/O Coprocessor

https://www.bunniestudios.com/blog/2026/bio-the-bao-i-o-coprocessor/
106•zdw•3d ago•26 comments

US and TotalEnergies reach 'nearly $1B' deal to end offshore wind projects

https://www.lemonde.fr/en/international/article/2026/03/23/us-and-totalenergies-reach-nearly-1-bi...
269•lode•5h ago•187 comments

Bets on US-Iran ceasefire show signs of insider knowledge, say experts

https://www.theguardian.com/us-news/2026/mar/23/bets-us-iran-ceasefire-show-signs-of-insider-know...
139•trocado•2h ago•118 comments

Conway's Game of Life, in real life

https://lcamtuf.coredump.cx/blog/conway/
10•ahlCVA•4d ago•1 comments

I built an AI receptionist for a mechanic shop

https://www.itsthatlady.dev/blog/building-an-ai-receptionist-for-my-brother/
184•mooreds•12h ago•206 comments

AI Risks "Hypernormal" Science

https://www.asimov.press/p/ai-science
46•mailyk•4h ago•31 comments

An unsolicited guide to being a researcher [pdf]

https://emerge-lab.github.io/papers/an-unsolicited-guide-to-good-research.pdf
149•sebg•4d ago•21 comments

Bombadil: Property-based testing for web UIs

https://github.com/antithesishq/bombadil
213•Klaster_1•4d ago•87 comments

Next-generation electricity is almost here

https://www.gatesnotes.com/work/accelerate-energy-innovation/reader/the-next-generation-of-electr...
13•jonbaer•2h ago•13 comments

Ju Ci (锔瓷): The Ancient Art of Repairing Porcelain

https://thesublimeblog.org/2025/03/13/ju-ci-the-ancient-art-of-repairing-porcelain/
5•lawrenceyan•2d ago•0 comments

Walmart: ChatGPT checkout converted 3x worse than website

https://searchengineland.com/walmart-chatgpt-checkout-converted-worse-472071
386•speckx•4d ago•254 comments

Digs: iOS app that syncs your Discogs collection and lets you browse it offline

https://lustin.fr/blog/building-digs/
36•rlustin•13h ago•16 comments

Migrating to the EU

https://rz01.org/eu-migration/
798•exitnode•12h ago•620 comments

Chat GPT 5.2 cannot explain the German word "geschniegelt"

https://old.reddit.com/r/ChatGPT/comments/1r4goxh/chat_gpt_52_cannot_explain_the_word_geschniegelt/
19•doener•57m ago•4 comments

The machine didn't take your craft, you gave it up

https://www.davidabram.dev/musings/the-machine-didnt-take-your-craft/
7•thm•2h ago•2 comments

America tells private firms to "hack back"

https://www.economist.com/united-states/2026/03/22/america-tells-private-firms-to-hack-back
76•andsoitis•9h ago•89 comments

“Collaboration” is bullshit

https://www.joanwestenberg.com/collaboration-is-bullshit/
261•mitchbob•21h ago•140 comments

Is it a pint?

https://isitapint.com/
164•cainxinth•6h ago•140 comments