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.

Why does it take so long to release black fan versions?

https://www.noctua.at/en/expertise/blog/how-can-it-take-so-long-to-release-black-fan-versions
97•buildbot•2h ago•29 comments

Spirit Airlines Is Winding Down All Operations

https://www.spiritrestructuring.com/
26•CaliforniaKarl•57m ago•24 comments

Job Postings for Software Engineers Are Rapidly Rising

https://www.citadelsecurities.com/news-and-insights/2026-global-intelligence-crisis/
155•delichon•5h ago•85 comments

Ti-84 Evo

https://education.ti.com/en/products/calculators/graphing-calculators/ti-84-evo
418•thatxliner•11h ago•368 comments

Ask.com has closed

https://www.ask.com/
206•supermdguy•3h ago•106 comments

Artemis II Photo Timeline

https://artemistimeline.com/#artemis-ii-walkout-nhq202604010003
168•geerlingguy•2d ago•12 comments

New research suggests people can communicate and practice skills while dreaming

https://www.newyorker.com/culture/annals-of-inquiry/its-possible-to-learn-in-our-sleep-should-we
316•XzetaU8•13h ago•180 comments

LFM2-24B-A2B: Scaling Up the LFM2 Architecture

https://www.liquid.ai/blog/lfm2-24b-a2b
25•nateb2022•2d ago•5 comments

To Restore an Island Paradise, Add Fungi

https://e360.yale.edu/digest/atoll-islands-sea-level-rise-fungi
50•Brajeshwar•2d ago•6 comments

Integer Overflow Checking Cost

https://danluu.com/integer-overflow/
17•iwsk•2d ago•4 comments

CollectWise (YC F24) Is Hiring

https://www.ycombinator.com/companies/collectwise/jobs/rEWfZ6R-senior-forward-deployed-engineer
1•OBrien_1107•2h ago

K3k: Kubernetes in Kubernetes

https://github.com/rancher/k3k
29•jzebedee•3h ago•14 comments

I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA

152•proberts•16h ago•211 comments

I built the Playwright for desktop apps. 80% token savings

https://github.com/lahfir/agent-desktop
53•lahfir•5h ago•16 comments

Eka’s robotic claw feels like we're approaching a ChatGPT moment

https://www.wired.com/story/when-robots-have-their-chatgpt-moment-remember-these-pincers/
130•zdw•2d ago•175 comments

Lib0xc: A set of C standard library-adjacent APIs for safer systems programming

https://github.com/microsoft/lib0xc
136•wooster•12h ago•49 comments

Ask HN: Who is hiring? (May 2026)

255•whoishiring•16h ago•270 comments

A Gopher Meets a Crab

https://miren.dev/blog/gopher-meets-crab
6•radimm•2d ago•0 comments

Direct electrochemical black coffee quality appraisal using cyclic voltammetry

https://www.nature.com/articles/s41467-026-71526-5
44•bookofjoe•2d ago•13 comments

Show HN: WhatCable, a tiny menu bar app for inspecting USB-C cables

https://github.com/darrylmorley/whatcable
484•sleepingNomad•22h ago•141 comments

A Report on Burnout in Open Source Software Communities (2025) [pdf]

https://mirandaheath.website/static/oss_burnout_report_mh_25.pdf
62•susam•8h ago•12 comments

The smelly baby problem

https://www.worksinprogress.news/p/how-disposable-diapers-conquered
164•dionysou•2d ago•105 comments

Whohas – Command-line utility for cross-distro, cross-repository package search

https://github.com/whohas/whohas
140•peter_d_sherman•16h ago•32 comments

Create an MP4 video of a web page scrolling at a steady speed

https://github.com/upenn/web-scroll-video
19•shawnzam•4h ago•6 comments

Apocalypse Early Warning System

https://ews.kylemcdonald.net/
160•carlsborg•15h ago•88 comments

Chasing a SharedKey signature mismatch: fix azurerm_storage_table_entity

https://topaz.thecloudtheory.com/blog/debugging-table-entity-auth/
11•kamilmrzyglod•1d ago•4 comments

Show HN: Stop playing my matchstick puzzles, start building your own in seconds

https://mathstick.github.io
3•trangram•2h ago•3 comments

The gay jailbreak technique (2025)

https://github.com/Exocija/ZetaLib/blob/main/The%20Gay%20Jailbreak/The%20Gay%20Jailbreak.md
487•bobsmooth•14h ago•199 comments

City Learns Flock Accessed Cameras in Children's Gymnastics Room as a Sales Demo

https://www.404media.co/city-learns-flock-accessed-cameras-in-childrens-gymnastics-room-as-a-sale...
384•joshcsimmons•12h ago•104 comments

Whimsical Animations Course Open House

https://courses.joshwcomeau.com/wham/open-house/00-introduction
87•SpyCoder77•11h ago•9 comments