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•8mo ago

Comments

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

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

Multiprocessing all the way!

emmelaich•8mo ago
(2021)

Good article!

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

“Erdos problem #728 was solved more or less autonomously by AI”

https://mathstodon.xyz/@tao/115855840223258103
402•cod1r•9h ago•228 comments

Changes to Android Open Source Project

https://source.android.com/
79•TechTechTech•2d ago•37 comments

JavaScript Demos in 140 Characters

https://beta.dwitter.net
236•themanmaran•13h ago•49 comments

Oh My Zsh adds bloat

https://rushter.com/blog/zsh-shell/
132•fla•3h ago•117 comments

Start your meetings at 5 minutes past

https://philipotoole.com/start-your-meetings-at-5-minutes-past/
103•otoolep•10h ago•85 comments

The Performance Revolution in JavaScript Tooling

https://blog.appsignal.com/2025/12/03/the-performance-revolution-in-javascript-tooling.html
7•PaulHoule•6d ago•0 comments

RTX 5090 and Raspberry Pi: Can it game?

https://scottjg.com/posts/2026-01-08-crappy-computer-showdown/
212•scottjg•12h ago•81 comments

Greenland sharks maintain vision for centuries through DNA repair mechanism

https://phys.org/news/2026-01-eye-greenland-sharks-vision-centuries.html
77•pseudolus•3d ago•19 comments

Alien: Braun Aromaster KF 20 Coffee Makers (2012)

http://alienexplorations.blogspot.com/1979/05/kf-20-coffee-making-machine.html
21•exvi•1w ago•3 comments

How Markdown took over the world

https://www.anildash.com/2026/01/09/how-markdown-took-over-the-world/
234•zdw•14h ago•185 comments

How will the miracle happen today?

https://kk.org/thetechnium/how-will-the-miracle-happen-today/
430•zdw•5d ago•222 comments

Show HN: Rocket Launch and Orbit Simulator

https://www.donutthejedi.com/
121•donutthejedi•13h ago•35 comments

Show HN: Miditui – a terminal app/UI for MIDI composing, mixing, and playback

https://github.com/minimaxir/miditui
34•minimaxir•1d ago•4 comments

Show HN: Scroll Wikipedia like TikTok

https://quack.sdan.io
227•sdan•14h ago•59 comments

CDC staff 'blindsided' as child vaccine schedule unilaterally overhauled

https://www.unmc.edu/healthsecurity/transmission/2026/01/07/cdc-staff-blindsided-as-child-vaccine...
53•stopbulying•3h ago•9 comments

Scientists discover oldest poison, on 60k-year-old arrows

https://www.nytimes.com/2026/01/07/science/poison-arrows-south-africa.html
114•noleary•1d ago•40 comments

Cloudflare CEO on the Italy fines

https://twitter.com/eastdakota/status/2009654937303896492
505•sidcool•15h ago•696 comments

My article on why AI is great (or terrible) or how to use it

https://matthewrocklin.com/ai-zealotry/
109•akshayka•14h ago•159 comments

OLED, Not for Me

https://nuxx.net/blog/2026/01/09/oled-not-for-me/
77•c0nsumer•4h ago•83 comments

Robotopia: A 3D, first-person, talking simulator

https://elbowgreasegames.substack.com/p/introducing-robotopia-a-3d-first
52•psawaya•1d ago•16 comments

The likely cheapest home-made Michelson interferometer

https://guille.site/posts/3d-printed-michelson/
93•LolWolf•5d ago•58 comments

Kagi releases alpha version of Orion for Linux

https://help.kagi.com/orion/misc/linux-status.html
378•HelloUsername•19h ago•266 comments

How to code Claude Code in 200 lines of code

https://www.mihaileric.com/The-Emperor-Has-No-Clothes/
749•nutellalover•1d ago•230 comments

Favorite Tech Museums

https://aresluna.org/fav-tech-museums/
40•justincormack•4d ago•21 comments

Sigmund Freud's Begonia

https://observer.co.uk/news/first-person/article/emma-freud-sigmund-freuds-begonia
22•dang•10h ago•6 comments

How to store a chess position in 26 bytes (2022)

https://ezzeriesa.notion.site/How-to-store-a-chess-position-in-26-bytes-using-bit-level-magic-df1...
96•kurinikku•17h ago•79 comments

Show HN: I made a memory game to teach you to play piano by ear

https://lend-me-your-ears.specr.net
464•vunderba•15h ago•163 comments

Flock Hardcoded the Password for America's Surveillance Infrastructure 53 Times

https://nexanet.ai/blog/53-times-flocksafety-hardcoded-the-password-for-americas-surveillance-inf...
419•fuck_flock•15h ago•140 comments

Show HN: Similarity = cosine(your_GitHub_stars, Karpathy) Client-side

https://puzer.github.io/github_recommender/
134•puzer•3d ago•36 comments

The rise and fall of the company behind Reader Rabbit (2018)

https://theoutline.com/post/6293/reader-rabbit-history-the-learning-company-zoombinis-carmen-sand...
20•mmcclure•1d ago•2 comments