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.

Wolfram Compute Services

https://writings.stephenwolfram.com/2025/12/instant-supercompute-launching-wolfram-compute-services/
94•nsoonhui•3h ago•35 comments

Self-hosting my photos with Immich

https://michael.stapelberg.ch/posts/2025-11-29-self-hosting-photos-with-immich/
362•birdculture•6d ago•150 comments

Guy Built a Compact Camera Using an Optical Mouse

https://petapixel.com/2025/11/13/this-guy-built-a-compact-camera-using-an-optical-mouse/
73•PaulHoule•2d ago•13 comments

Have I been Flocked? – Check if your license plate is being watched

https://haveibeenflocked.com/
168•pkaeding•7h ago•78 comments

Aurora: The Linux-based ultimate workstation

https://getaurora.dev/en
24•doener•6d ago•8 comments

Ask HN: How many people got VPNs in response to laws like UK Online Safety Act?

39•hodgesrm•1h ago•19 comments

Cloudflare outage on December 5, 2025

https://blog.cloudflare.com/5-december-2025-outage/
667•meetpateltech•19h ago•494 comments

Leaving Intel

https://www.brendangregg.com/blog//2025-12-05/leaving-intel.html
249•speckx•13h ago•123 comments

Making tiny 0.1cc two stroke engine from scratch

https://youtu.be/nKVq9u52A-c?si=KVY6AK7tsudqnbJN
70•pillars•5d ago•9 comments

Gemini 3 Pro: the frontier of vision AI

https://blog.google/technology/developers/gemini-3-pro-vision/
465•xnx•19h ago•230 comments

PalmOS on FisherPrice Pixter Toy

https://dmitry.gr/?r=05.Projects&proj=27.%20rePalm#pixter
86•dmitrygr•7h ago•10 comments

Netflix to Acquire Warner Bros

https://about.netflix.com/en/news/netflix-to-acquire-warner-bros
1597•meetpateltech•22h ago•1200 comments

PC-Man (IBM PC 1983) and the spark of childhood wonder

https://intotheverticalblank.com/2025/12/02/interview-greg-kuperberg/
15•nanochess•3d ago•6 comments

Frinkiac – 3M "The Simpsons" Screencaps

https://frinkiac.com/
105•GlumWoodpecker•3d ago•31 comments

Infracost (YC W21) is hiring Sr Node Eng to make $600B/yr cloud spend proactive

https://www.ycombinator.com/companies/infracost/jobs/Sr9rmHs-senior-product-engineer-node-js
1•akh•4h ago

Adenosine on the common path of rapid antidepressant action: The coffee paradox

https://genomicpress.kglmeridian.com/view/journals/brainmed/aop/article-10.61373-bm025c.0134/arti...
152•PaulHoule•13h ago•79 comments

Ivan Sutherland Sketchpad Demo 1963 [video]

https://www.youtube.com/watch?v=6orsmFndx_o
69•fs_software•3d ago•5 comments

Netflix’s AV1 Journey: From Android to TVs and Beyond

https://netflixtechblog.com/av1-now-powering-30-of-netflix-streaming-02f592242d80
503•CharlesW•1d ago•258 comments

Schizophrenia sufferer mistakes smart fridge ad for psychotic episode

https://old.reddit.com/r/LegalAdviceUK/comments/1pc7999/my_schizophrenic_sister_hospitalised_hers...
140•hliyan•3h ago•82 comments

Patterns for Defensive Programming in Rust

https://corrode.dev/blog/defensive-programming/
268•PaulHoule•18h ago•59 comments

Extra Instructions Of The 65XX Series CPU (1996)

http://www.ffd2.com/fridge/docs/6502-NMOS.extra.opcodes
55•embedding-shape•10h ago•9 comments

Idempotency keys for exactly-once processing

https://www.morling.dev/blog/on-idempotency-keys/
137•defly•4d ago•53 comments

Show HN: A 2mm micro-bearing ring that spins like a real fidget spinner

5•xtafnuihc•3d ago•6 comments

I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA

201•proberts•19h ago•253 comments

The missing standard library for multithreading in JavaScript

https://github.com/W4G1/multithreading
90•W4G1•14h ago•22 comments

Perpetual futures, explained

https://www.bitsaboutmoney.com/archive/perpetual-futures-explained/
101•sirodoht•13h ago•55 comments

Show HN: HCB Mobile – financial app built by 17 y/o, processing $6M/month

https://hackclub.com/fiscal-sponsorship/mobile/
148•mohamad08•3d ago•56 comments

Guide to making a CHIP-8 emulator (2020)

https://tobiasvl.github.io/blog/write-a-chip-8-emulator/
23•AlexeyBrin•6d ago•2 comments

YouTube caught making AI-edits to videos and adding misleading AI summaries

https://www.ynetnews.com/tech-and-digital/article/bj1qbwcklg
305•mystraline•9h ago•161 comments

Tides are weirder than you think

https://signoregalilei.com/2025/11/12/tides-are-weirder-than-you-think/
125•surprisetalk•4d ago•36 comments