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.

How NASA built Artemis II’s fault-tolerant computer

https://cacm.acm.org/news/how-nasa-built-artemis-iis-fault-tolerant-computer/
377•speckx•18h ago•133 comments

I still prefer MCP over skills

https://david.coffee/i-still-prefer-mcp-over-skills/
175•gmays•7h ago•150 comments

Native Instant Space Switching on macOS

https://arhan.sh/blog/native-instant-space-switching-on-macos/
508•PaulHoule•14h ago•237 comments

ETH Zurich demonstrates 17,000 qubit array with 99.91% fidelity

https://ethz.ch/en/news-and-events/eth-news/news/2026/04/a-new-trick-brings-stability-to-quantum-...
57•joko42•5h ago•9 comments

We've raised $17M to build what comes after Git

https://blog.gitbutler.com/series-a
130•ellieh•7h ago•271 comments

Generative art over the years

https://blog.veitheller.de/Generative_art_over_the_years.html
148•evakhoury•2d ago•38 comments

Scientists invented a fake disease. AI told people it was real

https://www.nature.com/articles/d41586-026-01100-y
29•latexr•1h ago•12 comments

Charcuterie – Visual similarity Unicode explorer

https://charcuterie.elastiq.ch/
232•rickcarlino•13h ago•42 comments

War on Raze

https://gist.github.com/chrispsn/af6844b80687462814fc39d4b97399a6
10•tosh•3d ago•3 comments

The Art of Risk Management (2017)

https://www.bcg.com/publications/2017/finance-function-excellence-corporate-development-art-risk-...
6•walterbell•2d ago•0 comments

RAM Has a Design Flaw from 1966. I Bypassed It [video]

https://www.youtube.com/watch?v=KKbgulTp3FE
222•surprisetalk•2d ago•59 comments

Artemis II and the invisible hazard on the way to the Moon

https://www.ansto.gov.au/news/artemis-ii-and-invisible-hazard-on-way-to-moon-part-1
8•zeristor•2h ago•7 comments

Unfolder for Mac – A 3D model unfolding tool for creating papercraft

https://www.unfolder.app/
234•codazoda•16h ago•45 comments

Zero-build privacy policies with Astro

https://www.openpolicy.sh/blog/no-build-astro
5•jamie_davenport•1h ago•4 comments

Old laptops in a colo as low cost servers

https://colaptop.pages.dev/
271•argentum47•15h ago•160 comments

CollectWise (YC F24) Is Hiring

https://www.ycombinator.com/companies/collectwise/jobs/Ktc6m6o-ai-agent-engineer
1•OBrien_1107•5h ago

Penguin 'Toxicologists' Find PFAS Chemicals in Remote Patagonia

https://www.ucdavis.edu/health/news/penguin-toxicologists-find-pfas-chemicals-remote-patagonia
9•giuliomagnifico•3h ago•5 comments

Principles of Mechanical Sympathy

https://martinfowler.com/articles/mechanical-sympathy-principles.html
58•zdw•2d ago•7 comments

Afrika Bambaataa, hip-hop pioneer, has died

https://www.bbc.co.uk/news/articles/c2evppm30p7o
122•mellosouls•5h ago•27 comments

Instant 1.0, a backend for AI-coded apps

https://www.instantdb.com/essays/architecture
150•stopachka•15h ago•78 comments

PicoZ80 – Drop-In Z80 Replacement

https://eaw.app/picoz80/
192•rickcarlino•14h ago•31 comments

Research-Driven Agents: When an agent reads before it codes

https://blog.skypilot.co/research-driven-agents/
178•hopechong•16h ago•48 comments

The Raft consensus algorithm explained through "Mean Girls" (2019)

https://www.cockroachlabs.com/blog/raft-is-so-fetch/
82•vermilingua•6h ago•21 comments

VFX HQ: Visual Effects Headquarters (2000)

https://www.vfxhq.com/index.html
11•exvi•2d ago•0 comments

YouTube locked my accounts and I can't cancel my subscription

https://pocketables.com/2026/04/ai-music-corporate-control-and-the-creator-who-cant-even-leave.html
112•digitalhigh•4h ago•72 comments

Hegel, a universal property-based testing protocol and family of PBT libraries

https://hegel.dev
114•PaulHoule•15h ago•32 comments

An AI robot in my home

https://allevato.me/2026/04/07/an-ai-robot-in-my-home
36•kukanani•2d ago•13 comments

Reverse engineering Gemini's SynthID detection

https://github.com/aloshdenny/reverse-SynthID
151•_tk_•13h ago•51 comments

Will I ever own a zettaflop?

https://geohot.github.io//blog/jekyll/update/2026/01/26/own-a-zettaflop.html
96•surprisetalk•3d ago•62 comments

Kagi Product Tips – Customize Your Search Results with URL Redirects

https://blog.kagi.com/tips/redirects
84•treetalker•12h ago•13 comments