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

Comments

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

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

Multiprocessing all the way!

emmelaich•9mo ago
(2021)

Good article!

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

I Pitched a Roller Coaster to Disneyland at Age 10 in 1978

https://wordglyph.xyz/one-piece-at-a-time
76•wordglyph•2h ago•23 comments

Diode – Build, program, and simulate hardware

https://www.withdiode.com/
281•rossant•3d ago•61 comments

Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148

https://hacks.mozilla.org/2026/02/goodbye-innerhtml-hello-sethtml-stronger-xss-protection-in-fire...
134•todsacerdoti•2h ago•60 comments

λProlog: Logic programming in higher-order logic

https://www.lix.polytechnique.fr/Labo/Dale.Miller/lProlog/
83•ux266478•3d ago•17 comments

Terence Tao, at 8 years old (1984) [pdf]

https://gwern.net/doc/iq/high/smpy/1984-clements.pdf
394•gurjeet•23h ago•211 comments

IRS Tactics Against Meta Open a New Front in the Corporate Tax Fight

https://www.nytimes.com/2026/02/24/business/irs-meta-corporate-taxes.html
37•mitchbob•2h ago•42 comments

A distributed queue in a single JSON file on object storage

https://turbopuffer.com/blog/object-storage-queue
87•Sirupsen•3d ago•31 comments

Tiny QR code achieved using electron microscope technology

https://newatlas.com/technology/smallest-qr-code-bacteria-tu-wien/
10•jonbaer•3d ago•6 comments

The Missing Semester of Your CS Education – Revised for 2026

https://missing.csail.mit.edu/
177•anishathalye•23h ago•50 comments

Show HN: enveil – hide your .env secrets from prAIng eyes

https://github.com/GreatScott/enveil
151•parkaboy•10h ago•89 comments

I Ported Coreboot to the ThinkPad X270

https://dork.dev/posts/2026-02-20-ported-coreboot/
249•todsacerdoti•15h ago•52 comments

Discord cuts ties with Peter Thiel-backed verification software

https://fortune.com/2026/02/24/discord-peter-thiel-backed-persona-identity-verification-breach/
108•robtherobber•3h ago•39 comments

Show HN: X86CSS – An x86 CPU emulator written in CSS

https://lyra.horse/x86css/
199•rebane2001•13h ago•67 comments

The Age Verification Trap: Verifying age undermines everyone's data protection

https://spectrum.ieee.org/age-verification
1574•oldnetguy•1d ago•1197 comments

Unsung heroes: Flickr's URLs scheme

https://unsung.aresluna.org/unsung-heroes-flickrs-urls-scheme/
175•onli•3d ago•66 comments

Blood test boosts Alzheimer's diagnosis accuracy to 94.5%, clinical study shows

https://medicalxpress.com/news/2026-02-blood-boosts-alzheimer-diagnosis-accuracy.html
358•wglb•12h ago•144 comments

Show HN: Steerling-8B, a language model that can explain any token it generates

https://www.guidelabs.ai/post/steerling-8b-base-model-release/
253•adebayoj•14h ago•75 comments

We installed a single turnstile to feel secure

https://idiallo.com/blog/installed-single-turnstile-for-security-theater
14•firefoxd•1d ago•0 comments

Making Wolfram tech available as a foundation tool for LLM systems

https://writings.stephenwolfram.com/2026/02/making-wolfram-tech-available-as-a-foundation-tool-fo...
241•surprisetalk•17h ago•136 comments

Firefox 148 Launches with AI Kill Switch Feature and More Enhancements

https://serverhost.com/blog/firefox-148-launches-with-exciting-ai-kill-switch-feature-and-more-en...
381•shaunpud•9h ago•321 comments

Decimal-Java is a library to convert java.math.BigDecimal to and from IEEE-754r

https://github.com/FirebirdSQL/decimal-java
28•mariuz•6h ago•4 comments

“Car Wash” test with 53 models

https://opper.ai/blog/car-wash-test
311•felix089•19h ago•376 comments

ATAboy is a USB adapter for legacy CHS only style IDE (PATA) drives

https://github.com/redruM0381/ATAboy
37•zdw•3d ago•30 comments

UNIX99, a UNIX-like OS for the TI-99/4A (2025)

https://forums.atariage.com/topic/380883-unix99-a-unix-like-os-for-the-ti-994a/page/5/#findCommen...
195•marcodiego•19h ago•60 comments

Hetzner Prices increase 30-40%

https://docs.hetzner.com/general/infrastructure-and-availability/price-adjustment/
361•williausrohr•1d ago•565 comments

Graph Topology and Battle Royale Mechanics

https://blog.lukesalamone.com/posts/beam-search-graph-pruning/
33•salamo•2d ago•2 comments

A simple web we own

https://rsdoiel.github.io/blog/2026/02/21/a_simple_web_we_own.html
286•speckx•23h ago•207 comments

Writing code is cheap now

https://simonwillison.net/guides/agentic-engineering-patterns/code-is-cheap/
285•swolpers•22h ago•355 comments

Show HN: PgDog – Scale Postgres without changing the app

https://github.com/pgdogdev/pgdog
295•levkk•23h ago•54 comments

Ladybird adopts Rust, with help from AI

https://ladybird.org/posts/adopting-rust/
1223•adius•1d ago•680 comments