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•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.

Why Japanese companies do so many different things

https://davidoks.blog/p/why-japanese-companies-do-so-many
378•d0ks•6h ago•231 comments

Project Glasswing: An Initial Update

https://www.anthropic.com/research/glasswing-initial-update
153•louiereederson•2h ago•94 comments

Models.dev: open-source database of AI model specs, pricing, and capabilities

https://github.com/anomalyco/models.dev
44•maxloh•1h ago•8 comments

U.S. researchers face new restrictions on publishing with foreign collaborators

https://www.science.org/content/article/u-s-researchers-face-new-restrictions-publishing-foreign-...
256•ceejayoz•5h ago•151 comments

Open source Kanban desktop app that runs parallel agents on every card

https://www.kanbots.dev/
99•vitriapp•3h ago•56 comments

1940 Air Terminal Museum Begins Liquidation

https://www.1940airterminal.org/news/liquidation-of-simulators
54•weaponeer•4h ago•12 comments

Deno 2.8

https://deno.com/blog/v2.8
252•roflcopter69•10h ago•115 comments

Antigravity 2.0 Tops the OpenSCAD Architectural 3D LLM Benchmark

https://modelrift.com/blog/openscad-llm-benchmark/
317•jetter•10h ago•125 comments

Bun support is now limited and deprecated

https://github.com/yt-dlp/yt-dlp/issues/16766
261•tamnd•4h ago•241 comments

Lawmakers Demand Answers as CISA Tries to Contain Data Leak

https://krebsonsecurity.com/2026/05/lawmakers-demand-answers-as-cisa-tries-to-contain-data-leak/
58•speckx•4h ago•10 comments

Thinking in an array language (2022)

https://github.com/razetime/ngn-k-tutorial/blob/main/12-thinking-in-k.md
28•tosh•3h ago•2 comments

Robert X Cringely is back to blogging

https://www.cringely.com/
45•dan_hawkins•6h ago•15 comments

Domain-Camouflaged Injection Attacks Evade Detection in Multi-Agent LLM Systems

https://arxiv.org/abs/2605.22001
16•sbulaev•2h ago•0 comments

A Forth-inspired language for writing websites

https://robida.net/entries/2026/05/21/a-forth-inspired-language-for-writing-websites
85•speckx•6h ago•12 comments

Launch HN: Superset (YC P26) – IDE for the agents era

https://github.com/superset-sh/superset
62•avipeltz•6h ago•72 comments

Wi-Wi Is Wireless Time Sync at 1 Nanosecond

https://www.jeffgeerling.com/blog/2026/wi-wi-is-wireless-time-sync-less-than-5ns/
30•Brajeshwar•2d ago•2 comments

If you’re an LLM, please read this

https://annas-archive.gl/blog/llms-txt.html
667•janandonly•10h ago•382 comments

TorQ: Kdb+ Production Framework

https://github.com/DataIntellectTech/TorQ
19•tosh•4h ago•3 comments

DeepSeek makes the V4 Pro price discount permanent

https://api-docs.deepseek.com/quick_start/pricing
221•Tiberium•5h ago•121 comments

Project Hail Mary – Stellar Navigation Chart

https://valhovey.github.io/gaia-mary/
1110•speleo•1d ago•227 comments

Show HN: ShadowCat – file transfer through QR Codes in a Browser

https://github.com/unprovable/ShadowCat
122•unprovable•10h ago•44 comments

NTSB pulls docket after AI recreates dead pilots' voices

https://arstechnica.com/ai/2026/05/ai-users-re-create-dead-pilots-voices-from-crash-investigation...
14•Lihh27•42m ago•4 comments

The memory shortage is causing a repricing of consumer electronics

https://davidoks.blog/p/ai-is-killing-the-cheap-smartphone
433•d0ks•23h ago•545 comments

How to convert between wealth and income tax

https://paulgraham.com/winc.html
116•bifftastic•5h ago•377 comments

Circle Medical (YC S15) Is Hiring a Mobile Engineer

https://www.ycombinator.com/companies/circle-medical/jobs/onMKAG9-mobile-engineer-android
1•jboula•9h ago

AI has a multiplying effect on existing technical skills

https://www.joshwcomeau.com/email/wham-launch-005-elephant-2-p/
255•moebrowne•8h ago•250 comments

Cleve Moler has died

https://www.mathworks.com/company/aboutus/founders/clevemoler.html
255•mychele•18h ago•26 comments

Slumber a TUI HTTP Client

https://slumber.lucaspickering.me
161•jicea•17h ago•57 comments

Chess invariants

http://muratbuffalo.blogspot.com/2026/05/chess-invariants.html
81•ingve•10h ago•49 comments

Linux Sound Subsystem Also Seeing Many Fixes Driven by AI/LLMs

https://www.phoronix.com/news/Linux-7.1-Sound-Many-Fixes
19•dboon•2h ago•1 comments