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.

CBP tapped into the online advertising ecosystem to track peoples’ movements

https://www.404media.co/cbp-tapped-into-the-online-advertising-ecosystem-to-track-peoples-movements/
300•ece•1d ago•131 comments

GPT-5.4

https://openai.com/index/introducing-gpt-5-4/
624•mudkipdev•7h ago•549 comments

Where things stand with the Department of War

https://www.anthropic.com/news/where-stand-department-war
112•surprisetalk•1h ago•67 comments

The next generations of Bubble Tea, Lip Gloss, and Bubbles are available now

https://charm.land/blog/v2/
80•atkrad•2h ago•20 comments

A standard protocol to handle and discard low-effort, AI-Generated pull requests

https://406.fail/
81•Muhammad523•3h ago•20 comments

The Brand Age

https://paulgraham.com/brandage.html
214•bigwheels•7h ago•193 comments

10% of Firefox crashes are caused by bitflips

https://mas.to/@gabrielesvelto/116171750653898304
255•marvinborner•1d ago•146 comments

Good software knows when to stop

https://ogirardot.writizzy.com/p/good-software-knows-when-to-stop
333•ssaboum•11h ago•184 comments

Wikipedia was in read-only mode following mass admin account compromise

https://www.wikimediastatus.net
871•greyface-•9h ago•308 comments

Hardware hotplug events on Linux, the gory details

https://arcanenibble.github.io/hardware-hotplug-events-on-linux-the-gory-details.html
116•todsacerdoti•3d ago•5 comments

A ternary plot of citrus geneology

https://www.jlauf.com/writing/citrus/
85•jlauf•2d ago•9 comments

A GitHub Issue Title Compromised 4k Developer Machines

https://grith.ai/blog/clinejection-when-your-ai-tool-installs-another
311•edf13•9h ago•70 comments

Show HN: Jido 2.0, Elixir Agent Framework

https://jido.run/blog/jido-2-0-is-here
248•mikehostetler•9h ago•53 comments

OpenTitan Shipping in Production

https://opensource.googleblog.com/2026/03/opentitan-shipping-in-production.html
83•rayhaanj•6h ago•10 comments

Structured AI (YC F25) Is Hiring

https://www.ycombinator.com/companies/structured-ai/jobs/3cQY6Cu-mechanical-design-engineer-found...
1•issygreenslade•4h ago

Remotely unlocking an encrypted hard disk

https://jyn.dev/remotely-unlocking-an-encrypted-hard-disk/
80•janandonly•6h ago•49 comments

GLiNER2: Unified Schema-Based Information Extraction

https://github.com/fastino-ai/GLiNER2
40•apwheele•5h ago•3 comments

Judge orders government to begin refunding more than $130B in tariffs

https://www.wsj.com/politics/policy/judge-orders-government-to-begin-refunding-more-than-130-bill...
788•JumpCrisscross•11h ago•591 comments

Proton Mail Helped FBI Unmask Anonymous 'Stop Cop City' Protester

https://www.404media.co/proton-mail-helped-fbi-unmask-anonymous-stop-cop-city-protestor/
192•sedatk•4h ago•95 comments

Converting dash cam videos into Panoramax images

https://www.openstreetmap.org/user/FeetAndInches/diary/408268
28•marklit•3d ago•6 comments

Launch HN: Vela (YC W26) – AI for complex scheduling

35•Gobhanu•7h ago•37 comments

Let's Get Physical

https://m4iler.cloud/posts/lets-get-physical/
99•MBCook•6h ago•15 comments

Optimizing Recommendation Systems with JDK's Vector API

https://netflixtechblog.com/optimizing-recommendation-systems-with-jdks-vector-api-30d2830401ec
65•mariuz•2d ago•4 comments

Datasets for Reconstructing Visual Perception from Brain Data

https://github.com/seelikat/neuro-visual-reconstruction-dataset-index
50•katsee•9h ago•11 comments

Ethiopia gets $350M World Bank financing for its digital ID project (2024)

https://www.mariblock.com/stories/ethiopia-to-get-350-million-world-bank-financing-for-its-digita...
25•tinfoilhatter•4h ago•17 comments

Greg Kroah-Hartman Stretches Support Periods for Key Linux LTS Kernels

https://fossforce.com/2026/03/greg-kroah-hartman-stretches-support-periods-for-key-linux-lts-kern...
65•brideoflinux•3d ago•21 comments

World-first gigabit laser link between aircraft and geostationary satellite

https://www.esa.int/Applications/Connectivity_and_Secure_Communications/World-first_gigabit-per-s...
167•giuliomagnifico•4d ago•65 comments

A man who broke into jail

https://www.newyorker.com/magazine/2026/03/09/alexander-friedmann-profile-prison-reform
108•fortran77•2d ago•50 comments

The Remaking of Thomas Mann

https://www.commonwealmagazine.org/thomas-mann-magic-mountain-jensen
4•benbreen•3d ago•0 comments

Show HN: PageAgent, A GUI agent that lives inside your web app

https://alibaba.github.io/page-agent/
74•simon_luv_pho•8h ago•37 comments