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

Comments

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

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

Multiprocessing all the way!

emmelaich•7mo ago
(2021)

Good article!

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

LLM from scratch, part 28 – training a base model from scratch on an RTX 3090

https://www.gilesthomas.com/2025/12/llm-from-scratch-28-training-a-base-model-from-scratch
165•gpjt•6d ago•27 comments

Show HN: AlgoDrill – Interactive drills to stop forgetting LeetCode patterns

https://algodrill.io
42•henwfan•2h ago•28 comments

The Joy of Playing Grandia, on Sega Saturn

https://www.segasaturnshiro.com/2025/11/27/the-joy-of-playing-grandia-on-sega-saturn/
78•tosh•3h ago•34 comments

Transformers know more than they can tell: Learning the Collatz sequence

https://www.arxiv.org/pdf/2511.10811
14•Xcelerate•5d ago•0 comments

Why frozen test fixtures are a problem on large projects and how to avoid them

https://radanskoric.com/articles/frozen-test-fixtures
9•amalinovic•1h ago•1 comments

ZX Spectrum Next on the Internet: Xberry Pi ESP01 and Pi Zero Upgrades

https://retrogamecoders.com/zx-spectrum-next-on-the-internet-xberry-pi-esp01-and-pi-zero-upgrades/
17•ibobev•2h ago•0 comments

Icons in Menus Everywhere – Send Help

https://blog.jim-nielsen.com/2025/icons-in-menus/
624•ArmageddonIt•17h ago•253 comments

Epsilon: A WASM virtual machine written in Go

https://github.com/ziggy42/epsilon
69•ziggy42•1w ago•22 comments

No ARIA is better than bad ARIA

https://www.w3.org/WAI/ARIA/apg/practices/read-me-first/
87•robin_reala•6d ago•49 comments

A deep dive into QEMU: The Tiny Code Generator (TCG), part 1

https://airbus-seclab.github.io/qemu_blog/tcg_p1.html
24•costco•6d ago•1 comments

The universal weight subspace hypothesis

https://arxiv.org/abs/2512.05117
307•lukeplato•13h ago•106 comments

Kroger acknowledges that its bet on robotics went too far

https://www.grocerydive.com/news/kroger-ocado-close-automated-fulfillment-centers-robotics-grocer...
194•JumpCrisscross•13h ago•183 comments

Brent's Encapsulated C Programming Rules (2020)

https://retroscience.net/brents-c-programming-rules.html
11•p2detar•2h ago•5 comments

Manual: Spaces

https://type.today/en/journal/spaces
77•doener•13h ago•8 comments

Jepsen: NATS 2.12.1

https://jepsen.io/analyses/nats-2.12.1
385•aphyr•18h ago•143 comments

Strong earthquake hits northern Japan, tsunami warning issued

https://www3.nhk.or.jp/nhkworld/en/news/20251209_02/
328•lattis•22h ago•151 comments

Microsoft increases Office 365 and Microsoft 365 license prices

https://office365itpros.com/2025/12/08/microsoft-365-pricing-increase/
407•taubek•23h ago•475 comments

Has the cost of building software dropped 90%?

https://martinalderson.com/posts/has-the-cost-of-software-just-dropped-90-percent/
316•martinald•18h ago•480 comments

AMD GPU Debugger

https://thegeeko.me/blog/amd-gpu-debugging/
261•ibobev•21h ago•49 comments

Let's put Tailscale on a jailbroken Kindle

https://tailscale.com/blog/tailscale-jailbroken-kindle
298•Quizzical4230•20h ago•73 comments

Launch HN: Nia (YC S25) – Give better context to coding agents

https://www.trynia.ai/
121•jellyotsiro•20h ago•76 comments

Trials avoid high risk patients and underestimate drug harms

https://www.nber.org/papers/w34534
137•bikenaga•18h ago•45 comments

IBM to acquire Confluent

https://www.confluent.io/blog/ibm-to-acquire-confluent/
410•abd12•23h ago•330 comments

Horses: AI progress is steady. Human equivalence is sudden

https://andyljones.com/posts/horses.html
459•pbui•13h ago•372 comments

Paramount launches hostile bid for Warner Bros

https://www.cnbc.com/2025/12/08/paramount-skydance-hostile-bid-wbd-netflix.html
338•gniting•23h ago•359 comments

Hunting for North Korean Fiber Optic Cables

https://nkinternet.com/2025/12/08/hunting-for-north-korean-fiber-optic-cables/
264•Bezod•20h ago•103 comments

Cassette tapes are making a comeback?

https://theconversation.com/cassette-tapes-are-making-a-comeback-yes-really-268108
112•devonnull•5d ago•194 comments

A thousand-year-long composition turns 25 (2024)

https://longplayer.org/news/2024/12/31/a-thousand-year-long-composition-turns-25/
28•1659447091•6h ago•5 comments

The Lost Machine Automats and Self-Service Cafeterias of NYC (2023)

https://www.untappedcities.com/automats-cafeterias-nyc/
80•walterbell•12h ago•27 comments

Show HN: Fanfa – Interactive and animated Mermaid diagrams

https://fanfa.dev/
124•bairess•5d ago•28 comments