frontpage.
newsnewestaskshowjobs

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•1y ago

Comments

quentinp•1y 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•1y ago
Page didnt load for me.

https://realpython.com/async-io-python/

Multiprocessing all the way!

emmelaich•1y ago
(2021)

Good article!

punnerud•1y 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•1y 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•1y ago
How does the GIL come into play here?
punnerud•1y 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.

Kimi K2.7 Code is generally available in GitHub Copilot

https://github.blog/changelog/2026-07-01-kimi-k2-7-is-now-available-in-github-copilot/
77•unliftedq•3h ago•18 comments

ZCode – Harness for GLM-5.2

https://zcode.z.ai/en
359•chvid•9h ago•282 comments

Oomwoo, an open-source robot vacuum you build yourself

https://makerspet.com/blog/building-an-open-source-robot-vacuum-meet-oomwoo/
227•devicelimit•6h ago•41 comments

A new Android malware from Google

https://f-droid.org/2026/07/01/adv-malware.html
169•drewfax•4h ago•62 comments

Bring back crappy forums

https://tedium.co/2026/07/01/online-web-forums-retrospective/
199•pentagrama•5h ago•118 comments

CursorBench 3.1

https://cursor.com/evals
29•handfuloflight•2h ago•15 comments

What to learn to be a graphics programmer

https://blog.demofox.org/2026/07/01/what-to-learn-to-be-a-graphics-programmer/
315•atan2•13h ago•164 comments

Opening up 'Zero-Knowledge Proof' technology to promote privacy in age assurance

https://blog.google/innovation-and-ai/technology/safety-security/opening-up-zero-knowledge-proof-...
137•consumer451•9h ago•123 comments

FFmpeg 9.1's new AAC encoder

https://hydrogenaudio.org/index.php/topic,129691.0.html
358•ledoge•17h ago•109 comments

Ask HN: Who is hiring? (July 2026)

188•whoishiring•16h ago•198 comments

How do wombats poop cubes?

https://www.science.org/content/article/how-do-wombats-poop-cubes-scientists-get-bottom-mystery
103•bushwart•1d ago•44 comments

The Underhanded C Contest

https://underhanded-c.org/
85•ccabraldev•9h ago•10 comments

Qualcomm Linux 2.0

https://www.qualcomm.com/developer/blog/2026/06/qualcomm-linux-2-now-available
96•gilgamesh3•10h ago•36 comments

Show HN: Searchable directory of 22k+ products from worker-owned co-ops

https://www.workerowned.info/
331•IESAI_ski•10h ago•65 comments

Weave Robotics launches Isaac 1, a $7,999 home robot with Fall 2026 deliveries

https://www.weaverobotics.com/isaac-1
150•ryanmerket•13h ago•212 comments

For first time, a cell built from scratch grows and divides

https://www.quantamagazine.org/for-the-first-time-a-cell-built-from-scratch-grows-and-divides-202...
837•defrost•17h ago•274 comments

Learn Vim motions with an ice-cream van

https://thisismodest.com/vimscoops/
49•marcusmichaels•13h ago•9 comments

Internal Combustion Engine (2021)

https://ciechanow.ski/internal-combustion-engine/
314•StefanBatory•18h ago•92 comments

Why jet engines aren't made in China

https://aakash.substack.com/p/why-jet-engines-arent-made-in-china
125•paulpauper•1d ago•104 comments

Monetization Gateway: Charge for any resource behind Cloudflare via x402

https://blog.cloudflare.com/monetization-gateway/
282•soheilpro•17h ago•195 comments

The Wisdom of Quinn the Eskimo (Apple Developer Technical Support Engineer)

https://github.com/macshome/The-Wisdom-of-Quinn
9•gregsadetsky•2d ago•5 comments

Senior SWE-Bench: open-source benchmark that assesses agents as senior engineers

https://senior-swe-bench.snorkel.ai/
65•matt_d•4h ago•56 comments

Ask HN: Who wants to be hired? (July 2026)

124•whoishiring•16h ago•299 comments

The vibration of the pager has a sound all its own

https://www.notyouremergency.com/triage-intro
17•mooreds•3d ago•3 comments

Chip Off The Old Block

https://www.astralcodexten.com/p/chip-off-the-old-block
74•paulpauper•9h ago•7 comments

Proliferate (YC S25) Is Hiring

https://www.ycombinator.com/companies/proliferate/jobs/mMHvKR9-founding-product-engineer
1•pablo24602•10h ago

The Apple Disk II Controller Card (2021)

https://www.bigmessowires.com/2021/11/12/the-amazing-disk-ii-controller-card/
75•stmw•2d ago•20 comments

Launch HN: Parsewise (YC P25) – Reason Across Documents with an API

51•gergelycsegzi•17h ago•50 comments

How We Made IPFS Content Publishing 10x Faster

https://probelab.io/blog/optimistic-provide/
161•dennis-tra•16h ago•54 comments

Healthy but sedentary people show early decline in cellular energy production

https://news.cuanschutz.edu/news-stories/healthy-but-sedentary-individuals-show-early-decline-in-...
113•littlexsparkee•8h ago•73 comments