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.

Moltbook is the most interesting place on the internet

https://simonwillison.net/2026/Jan/30/moltbook/
19•swolpers•50m ago•10 comments

Microsoft Just Killed the "Cover for Me" Excuse: 365 Now Tracks You in Real-Time

https://ztechtalk.com/microsoft-teams
91•imalerba•47m ago•84 comments

Show HN: Amla Sandbox – WASM bash shell sandbox for AI agents

https://github.com/amlalabs/amla-sandbox
63•souvik1997•3h ago•36 comments

Moltbook

https://www.moltbook.com/
895•teej•14h ago•451 comments

Buttered Crumpet, a custom typeface for Wallace and Gromit

https://jamieclarketype.com/case-study/wallace-and-gromit-font/
150•tobr•2h ago•31 comments

The National Herbarium of Ireland digital collection of Irish plants

https://dri.ie/news/new-collection-in-dri-the-national-herbarium-of-ireland-digital-collection-of...
11•gnabgib•3d ago•1 comments

Emoji Design Convergence Review: 2018-2026

https://blog.emojipedia.org/emoji-design-convergence-review-2018-2026/
20•surprisetalk•3d ago•7 comments

Implementing a tiny CPU rasterizer (2024)

https://lisyarus.github.io/blog/posts/implementing-a-tiny-cpu-rasterizer-part-1.html
61•PaulHoule•4d ago•8 comments

The Engineer who invented the Mars Rover Suspension in his garage [video]

https://www.youtube.com/watch?v=QKSPk_0N4Jc
130•UltraSane•3d ago•22 comments

Quack-Cluster: A Serverless Distributed SQL Query Engine with DuckDB and Ray

https://github.com/kristianaryanto/Quack-Cluster
30•tanelpoder•3d ago•4 comments

OpenClaw – Moltbot Renamed Again

https://openclaw.ai/blog/introducing-openclaw
459•ed•12h ago•237 comments

Lemonade Autonomous Car Insurance (With Tesla FSD Discount)

https://www.lemonade.com/car/explained/self-driving-car-insurance/
11•KellyCriterion•2h ago•30 comments

Wisconsin communities signed secrecy deals for billion-dollar data centers

https://www.wpr.org/news/4-wisconsin-communities-signed-secrecy-deals-billion-dollar-data-centers
247•sseagull•4h ago•264 comments

Richard Feynman Side Hustles

https://twitter.com/carl_feynman/status/2016979540099420428
114•tzury•3h ago•39 comments

How AI assistance impacts the formation of coding skills

https://www.anthropic.com/research/AI-assistance-coding-skills
273•vismit2000•12h ago•217 comments

HumanConsumption.Live – Real-Time Global Animal Consumption Stats

https://www.humanconsumption.live/
19•speckx•2h ago•21 comments

GOG: Linux "the next major frontier" for gaming as it works on a native client

https://www.xda-developers.com/gog-calls-linux-the-next-major-frontier-for-gaming-as-it-works-on-...
484•franczesko•9h ago•283 comments

Pangolin (YC S25) is hiring software engineers (open-source, Go, networking)

https://docs.pangolin.net/careers/join-us
1•miloschwartz•5h ago

PlayStation 2 Recompilation Project Is Absolutely Incredible

https://redgamingtech.com/playstation-2-recompilation-project-is-absolutely-incredible/
518•croes•23h ago•282 comments

Netflix Animation Studios Joins the Blender Development Fund as Corporate Patron

https://www.blender.org/press/netflix-animation-studios-joins-the-blender-development-fund-as-cor...
356•vidyesh•11h ago•64 comments

Track Your Routine – Open-source app for task management

https://github.com/MSF01/TYR
51•perrii•6h ago•25 comments

Grid: Free, local-first, browser-based 3D printing/CNC/laser slicer

https://grid.space/stem/
348•cyrusradfar•19h ago•115 comments

How AI Impacts Skill Formation

https://arxiv.org/abs/2601.20245
186•northfield27•10h ago•5 comments

Show HN: Kolibri, a DIY music club in Sweden

https://kolibrinkpg.com/
100•EastLondonCoder•1d ago•18 comments

Godot 4.6 Release: It's all about your flow

https://godotengine.org/releases/4.6/
165•makepanic•3d ago•60 comments

AGENTS.md outperforms skills in our agent evals

https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals
445•maximedupre•1d ago•171 comments

Detecting Dementia Using Lexical Analysis: Terry Pratchett's Discworld

https://www.mdpi.com/2076-3425/16/1/94
29•maxeda•1h ago•19 comments

Retiring GPT-4o, GPT-4.1, GPT-4.1 mini, and OpenAI o4-mini in ChatGPT

https://openai.com/index/retiring-gpt-4o-and-older-models/
273•rd•20h ago•361 comments

Show HN: Cicada – A scripting language that integrates with C

https://github.com/heltilda/cicada
34•briancr•5h ago•17 comments

Doin' It with a 555: One Chip to Rule Them All

https://aashvik.com/posts/555-revolution/
102•MonkeyClub•3d ago•59 comments