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.

Your Website Is Not for You

https://websmith.studio/blog/your-website-is-not-for-you/
54•pumbaa•1h ago•26 comments

Running Adobe's 1991 PostScript Interpreter in the Browser

https://www.pagetable.com/?p=1854
10•ingve•44m ago•1 comments

Show HN: Perfect Bluetooth MIDI for Windows

48•mayerwin•2h ago•8 comments

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

https://github.com/darrylmorley/whatcable
170•sleepingNomad•3h ago•58 comments

How Mark Klein told the EFF about Room 641A [book excerpt]

https://thereader.mitpress.mit.edu/the-whistleblower-who-uncovered-the-nsas-big-brother-machine/
629•the-mitr•20h ago•211 comments

Apple accidentally left Claude.md files Apple Support app

https://xcancel.com/aaronp613/status/2049986504617820551
52•andruby•1h ago•18 comments

Show HN: Site Mogging

https://sitemogging.com
10•jilles•1h ago•3 comments

Grok 4.3

https://docs.x.ai/developers/models/grok-4.3
153•simianwords•4h ago•200 comments

New copy of earliest poem in English, written 1,3k years ago, discovered in Rome

https://www.tcd.ie/news_events/articles/2026/caedmons-hymn-discovery/
94•giuliomagnifico•2d ago•59 comments

For Linux kernel vulnerabilities, there is no heads-up to distributions

https://www.openwall.com/lists/oss-security/2026/04/30/10
530•ori_b•19h ago•425 comments

OpenWarp

https://openwarp.zerx.dev
116•zero-lab•10h ago•97 comments

If I could make my own GitHub

https://matduggan.com/if-i-could-make-my-own-github/
30•matricaria•23h ago•68 comments

Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

https://semgrep.dev/blog/2026/malicious-dependency-in-pytorch-lightning-used-for-ai-training/
409•j12y•20h ago•150 comments

Opus 4.7 knows the real Kelsey

https://www.theargumentmag.com/p/i-can-never-talk-to-an-ai-anonymously
377•ilamont•1d ago•199 comments

Softmax, can you derive the Jacobian? And should you care?

https://idlemachines.co.uk/essays/softmax
66•smaddrellmander•3d ago•9 comments

After dissing Anthropic for limiting Mythos, OpenAI restricts access to Cyber

https://techcrunch.com/2026/04/30/after-dissing-anthropic-for-limiting-mythos-openai-restricts-ac...
73•gbourne1•2h ago•43 comments

Maladaptive Frugality

https://herbertlui.net/maladaptive-frugality/
126•herbertl•2d ago•101 comments

The Rotary Un-Smartphone (2023)

https://skysedge.com/telecom/RUSP/index.html
39•tzury•3h ago•6 comments

A beginner's guide to Sourcehut (2025)

https://btxx.org/posts/beginners-guide-sourcehut/
29•bradley_taunt•2h ago•7 comments

How an oil refinery works

https://www.construction-physics.com/p/how-an-oil-refinery-works
446•chmaynard•22h ago•139 comments

Claude Code refuses requests or charges extra if your commits mention "OpenClaw"

https://twitter.com/theo/status/2049645973350363168
1205•elmean•22h ago•662 comments

CPanel and WHM Authentication Bypass – CVE-2026-41940

https://labs.watchtowr.com/the-internet-is-falling-down-falling-down-falling-down-cpanel-whm-auth...
122•zikani_03•13h ago•48 comments

I built a Game Boy emulator in F#

https://nickkossolapov.github.io/fame-boy/building-a-game-boy-emulator-in-fsharp/
293•elvis70•19h ago•68 comments

I Got Sick of Remembering Port Numbers

https://gregraiz.com/blog/local-vibe/
91•graiz•2d ago•84 comments

Auto Polo

https://en.wikipedia.org/wiki/Auto_polo
76•canjobear•2d ago•21 comments

Advanced Quantization Algorithm for LLMs

https://github.com/intel/auto-round
6•lastdong•3h ago•0 comments

Can I disable all data collection from my vehicle?

https://rivian.com/support/article/can-i-disable-all-data-collection-from-my-vehicle
647•Cider9986•16h ago•274 comments

Our agent found a bug with WireGuard in Google Kubernetes Engine

https://lovable.dev/blog/hunting-networking-bugs-in-kubernetes
29•vikeri•4h ago•2 comments

Roboticist-Turned-Teacher Built a Life-Size Replica of Eniac

https://spectrum.ieee.org/roboticist-turned-teacher-eniac-replica
39•oldnetguy•1d ago•8 comments

You can beat the binary search

https://lemire.me/blog/2026/04/27/you-can-beat-the-binary-search/
334•vok•3d ago•144 comments