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.

Claude Code Unpacked : A visual guide

https://ccunpacked.dev/
656•autocracy101•8h ago•204 comments

CERN levels up with new superconducting karts

https://home.cern/news/news/engineering/cern-levels-new-superconducting-karts
208•fnands•5h ago•49 comments

Show HN: Sycamore – next gen Rust UI library powered by fine-grained reactivity

https://sycamore.dev
16•lukechu10•48m ago•10 comments

I Quit. The Clankers Won

https://dbushell.com/2026/04/01/i-quit-the-clankers-won/
135•domysee•4h ago•89 comments

Intuiting Pratt Parsing

https://louis.co.nz/2026/03/26/pratt-parsing.html
60•signa11•2d ago•12 comments

Show HN: CLI to order groceries via reverse-engineered REWE API (Haskell)

https://github.com/yannick-cw/korb
126•wazHFsRy•2d ago•48 comments

Claude Wrote a Full FreeBSD Remote Kernel RCE with Root Shell (CVE-2026-4747)

https://github.com/califio/publications/blob/main/MADBugs/CVE-2026-4747/write-up.md
95•ishqdehlvi•7h ago•31 comments

Wasmer (YC S19) Is Hiring – Rust and DevRel Positions

https://www.workatastartup.com/companies/wasmer
1•syrusakbary•1h ago

Chess in SQL

https://www.dbpro.app/blog/chess-in-pure-sql
97•upmostly•2d ago•21 comments

A dot a day keeps the clutter away

https://scottlawsonbc.com/post/dot-system
397•scottlawson•16h ago•112 comments

Show HN: 1-Bit Bonsai, the First Commercially Viable 1-Bit LLMs

https://prismml.com/
311•PrismML•16h ago•123 comments

TinyLoRA – Learning to Reason in 13 Parameters

https://arxiv.org/abs/2602.04118
200•sorenjan•5d ago•26 comments

TruffleRuby

https://chrisseaton.com/truffleruby/
150•tosh•3d ago•16 comments

Consider the Greenland Shark (2020)

https://www.lrb.co.uk/the-paper/v42/n09/katherine-rundell/consider-the-greenland-shark
5•mooreds•5d ago•0 comments

MiniStack (replacement for LocalStack)

https://ministack.org/
257•kerblang•16h ago•48 comments

The Claude Code Source Leak: fake tools, frustration regexes, undercover mode

https://alex000kim.com/posts/2026-03-31-claude-code-source-leak/
1245•alex000kim•1d ago•504 comments

Why the US Navy won't blast the Iranians and 'open' Strait of Hormuz

https://responsiblestatecraft.org/iran-strait-of-hormuz/
398•KoftaBob•1d ago•1071 comments

Bring Back MiniDV with This Raspberry Pi FireWire Hat

https://www.jeffgeerling.com/blog/2026/minidv-with-raspberry-pi-firewire-hat/
76•ingve•3d ago•14 comments

Neanderthals survived on a knife's edge for 350k years

https://www.science.org/content/article/neanderthals-survived-knife-s-edge-350-000-years
178•Hooke•12h ago•132 comments

Slop is not necessarily the future

https://www.greptile.com/blog/ai-slopware-future
263•dakshgupta•22h ago•423 comments

In Case of Emergency, Make Burrito Bison 3 (2017)

https://juicybeast.com/2017/08/03/in-case-of-emergency-make-burrito-bison-3/
16•amarcheschi•1d ago•6 comments

A Mysterious Numbers Station Is Broadcasting Through the Iran War

https://www.wired.com/story/a-mysterious-numbers-station-is-broadcasting-through-the-iran-war/
27•thinkingemote•1h ago•24 comments

4D Doom

https://github.com/danieldugas/HYPERHELL
232•chronolitus•4d ago•56 comments

OpenAI closes funding round at an $852B valuation

https://www.cnbc.com/2026/03/31/openai-funding-round-ipo.html
472•surprisetalk•17h ago•424 comments

CEO of largest public hospital says he's ready to replace radiologists with AI

https://radiologybusiness.com/topics/artificial-intelligence/ceo-americas-largest-public-hospital...
6•thunderbong•18m ago•1 comments

Open source CAD in the browser (Solvespace)

https://solvespace.com/webver.pl
343•phkahler•1d ago•108 comments

Axios compromised on NPM – Malicious versions drop remote access trojan

https://www.stepsecurity.io/blog/axios-compromised-on-npm-malicious-versions-drop-remote-access-t...
1867•mtud•1d ago•753 comments

6o6 v1.1: Faster 6502-on-6502 virtualization for a C64/Apple II Apple-1 emulator

http://oldvcr.blogspot.com/2026/03/6o6-v11-faster-6502-on-6502.html
17•classichasclass•3d ago•0 comments

Teenage Engineering's PO-32 acoustic modem and synth implementation

https://github.com/ericlewis/libpo32
132•ericlewis•4d ago•26 comments

Ordinary Lab Gloves May Have Skewed Microplastic Data

https://nautil.us/ordinary-lab-gloves-may-have-skewed-microplastic-data-1279386
119•WaitWaitWha•15h ago•43 comments