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.

Claude Code Daily Benchmarks for Degradation Tracking

https://marginlab.ai/trackers/claude-code/
208•qwesr123•2h ago•102 comments

OTelBench: AI struggles with simple SRE tasks (Opus 4.5 scores only 29%)

https://quesma.com/blog/introducing-otel-bench/
27•stared•1h ago•15 comments

How to Choose Colors for Your CLI Applications (2023)

https://blog.xoria.org/terminal-colors/
60•kruuuder•1h ago•30 comments

Europe’s next-generation weather satellite sends back first images

https://www.esa.int/Applications/Observing_the_Earth/Meteorological_missions/meteosat_third_gener...
499•saubeidl•9h ago•74 comments

US cybersecurity chief leaked sensitive government files to ChatGPT: Report

https://www.dexerto.com/entertainment/us-cybersecurity-chief-leaked-sensitive-government-files-to...
48•randycupertino•32m ago•11 comments

Making niche solutions is the point

https://ntietz.com/blog/making-niche-solutions-is-the-point/
28•evakhoury•2d ago•6 comments

Apple to soon take up to 30% cut from all Patreon creators in iOS app

https://www.macrumors.com/2026/01/28/patreon-apple-tax/
793•pier25•19h ago•667 comments

Break Me If You Can: Exploiting PKO and Relay Attacks in 3DES/AES NFC

https://www.breakmeifyoucan.com/
21•noproto•2h ago•6 comments

A lot of population numbers are fake

https://davidoks.blog/p/a-lot-of-population-numbers-are-fake
147•bookofjoe•3h ago•119 comments

The Sovereign Tech Fund Invests in Scala

https://www.scala-lang.org/blog/2026/01/27/sta-invests-in-scala.html
31•bishabosha•4h ago•15 comments

Render Mermaid diagrams as SVGs or ASCII art

https://github.com/lukilabs/beautiful-mermaid
358•mellosouls•14h ago•52 comments

Show HN: ShapedQL – A SQL engine for multi-stage ranking and RAG

https://playground.shaped.ai
49•tullie•2d ago•19 comments

Playing Board Games with Deep Convolutional Neural Network on 8bit Motorola 6809

https://ipsj.ixsq.nii.ac.jp/records/229345
11•mci•2h ago•1 comments

Building a High-Performance Rotating Bloom Filter in Java

https://medium.com/@udaysagar.2177/building-a-high-performance-rotating-bloom-filter-in-java-a9e7...
29•udaysagar•4d ago•2 comments

Apt-bundle: brew bundle for apt

https://github.com/apt-bundle/apt-bundle
29•sadeshmukh•4d ago•14 comments

Deep dive into Turso, the "SQLite rewrite in Rust"

https://kerkour.com/turso-sqlite
58•unsolved73•1h ago•24 comments

Vitamin D and Omega-3 have a larger effect on depression than antidepressants

https://blog.ncase.me/on-depression/
643•mijailt•6h ago•438 comments

Heating homes with the largest particle accelerator

https://home.cern/news/news/cern/heating-homes-worlds-largest-particle-accelerator
3•elashri•56m ago•0 comments

EmulatorJS

https://github.com/EmulatorJS/EmulatorJS
3•avaer•6d ago•0 comments

We can’t send mail farther than 500 miles (2002)

https://web.mit.edu/jemorris/humor/500-miles
549•giancarlostoro•12h ago•85 comments

Mecha Comet – Open Modular Linux Handheld Computer

https://mecha.so/comet
224•Realman78•3d ago•75 comments

Maine’s ‘Lobster Lady’ who fished for nearly a century dies aged 105

https://www.theguardian.com/us-news/2026/jan/28/maine-lobster-lady-dies-aged-105
201•NaOH•14h ago•51 comments

Decompiling Xbox games using PDB debug info

https://i686.me/blog/csplit/
87•orange_redditor•2d ago•12 comments

Tea Chemistry (1997)

https://www.researchgate.net/profile/Matthew-Harbowy/publication/216792045_Tea_Chemistry/links/09...
62•aabiji•5d ago•17 comments

US trade deficit widens by the most in nearly 34 years in November

https://finance.yahoo.com/news/us-trade-deficit-widens-most-144236696.html
19•thomassmith65•1h ago•13 comments

Days numbered for 'risky' lithium-ion batteries

https://www.livescience.com/technology/engineering/days-numbered-for-risky-lithium-ion-batteries-...
11•Brajeshwar•40m ago•2 comments

Questom (YC F25) is hiring an engineer

https://www.ycombinator.com/companies/questom/jobs/UBebsyO-founding-engineer
1•ritanshu•13h ago

Airfoil (2024)

https://ciechanow.ski/airfoil/
506•brk•1d ago•59 comments

Xmake: A cross-platform build utility based on Lua

https://xmake.io/
81•phmx•4d ago•34 comments

Tesla ending Models S and X production

https://www.cnbc.com/2026/01/28/tesla-ending-model-s-x-production.html
475•keyboardJones•17h ago•982 comments