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

Comments

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

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

Multiprocessing all the way!

emmelaich•10mo ago
(2021)

Good article!

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

Flighty Airports

https://flighty.com/airports
217•skogstokig•5h ago•73 comments

VitruvianOS – Desktop Linux Inspired by the BeOS

https://v-os.dev
48•felixding•2h ago•15 comments

Goodbye to Sora

https://twitter.com/soraofficialapp/status/2036532795984715896
562•mikeocool•9h ago•421 comments

Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller

https://videojs.org/blog/videojs-v10-beta-hello-world-again
302•Heff•11h ago•56 comments

I wanted to build vertical SaaS for pest control, so I took a technician job

https://www.onhand.pro/p/i-wanted-to-build-vertical-saas-for-pest-control-i-took-a-technician-job...
248•tezclarke•8h ago•110 comments

Show HN: DuckDB community extension for prefiltered HNSW using ACORN-1

https://github.com/cigrainger/duckdb-hnsw-acorn
25•cigrainger•2h ago•1 comments

Apple Business

https://www.apple.com/newsroom/2026/03/introducing-apple-business-a-new-all-in-one-platform-for-b...
570•soheilpro•14h ago•335 comments

Tell HN: Litellm 1.82.7 and 1.82.8 on PyPI are compromised

https://github.com/BerriAI/litellm/issues/24512
580•dot_treo•17h ago•402 comments

Arm AGI CPU

https://newsroom.arm.com/blog/introducing-arm-agi-cpu
312•RealityVoid•12h ago•237 comments

Miscellanea: The War in Iran

https://acoup.blog/2026/03/25/miscellanea-the-war-in-iran/
11•decimalenough•1h ago•0 comments

Meta ordered to pay $375M in New Mexico trial over child exploitation

https://www.reuters.com/sustainability/boards-policy-regulation/jury-orders-meta-pay-375-mln-new-...
43•gostsamo•1h ago•11 comments

Implementing automatic eSIM installation on Android

https://medium.com/proandroiddev/integration-of-automatic-esim-installation-on-android-6c5f6d7124cb
5•nesterenkopavel•9m ago•0 comments

Intel Device Modeling Language for virtual platforms

https://github.com/intel/device-modeling-language
16•transpute•3d ago•0 comments

You can run a DNS server (2025)

https://simonsafar.com/2025/running_dns/
27•surprisetalk•4d ago•10 comments

Why did the chicken cross the road?

https://taylor.town/other-side
10•surprisetalk•17h ago•0 comments

An Aural Companion for Decades, CBS News Radio Crackles to a Close

https://www.nytimes.com/2026/03/21/business/media/cbs-news-radio-appraisal.html
47•tintinnabula•3d ago•11 comments

A Compiler Writing Journey

https://github.com/DoctorWkt/acwj
57•ibobev•6h ago•4 comments

Algorithm Visualizer

https://algorithm-visualizer.org/
56•vinhnx•4d ago•3 comments

TurboQuant: Redefining AI efficiency with extreme compression

https://research.google/blog/turboquant-redefining-ai-efficiency-with-extreme-compression/
6•ray__•50m ago•0 comments

Show HN: Email.md – Markdown to responsive, email-safe HTML

https://www.emailmd.dev/
251•dancablam•13h ago•58 comments

Wine 11 rewrites how Linux runs Windows games at kernel with massive speed gains

https://www.xda-developers.com/wine-11-rewrites-linux-runs-windows-games-speed-gains/
794•felineflock•11h ago•271 comments

Hypura – A storage-tier-aware LLM inference scheduler for Apple Silicon

https://github.com/t8/hypura
196•tatef•13h ago•75 comments

Show HN: Gemini can now natively embed video, so I built sub-second video search

https://github.com/ssrajadh/sentrysearch
291•sohamrj•14h ago•82 comments

What happened to GEM?

https://dfarq.homeip.net/whatever-happened-to-gem/
62•naves•4d ago•29 comments

Social media bans and digital curfews to be trialled on UK teenagers

https://www.bbc.com/news/articles/cn89g3ngkyzo
5•1659447091•1h ago•0 comments

Hypothesis, Antithesis, synthesis

https://antithesis.com/blog/2026/hegel/
230•alpaylan•14h ago•82 comments

Missile defense is NP-complete

https://smu160.github.io/posts/missile-defense-is-np-complete/
295•O3marchnative•16h ago•302 comments

How the world’s first electric grid was built

https://worksinprogress.co/issue/how-the-worlds-first-electric-grid-was-built/
73•zdw•4d ago•21 comments

Show HN: AI Roundtable – Let 200 models debate your question

https://opper.ai/ai-roundtable/
32•felix089•10h ago•32 comments

Lago (YC S21) Is Hiring

https://getlago.notion.site/Lago-Product-Engineer-AI-Agents-for-Growth-327ef63110d280cdb030ccf429...
1•AnhTho_FR•12h ago