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

Comments

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

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

Multiprocessing all the way!

emmelaich•11mo ago
(2021)

Good article!

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

Cybersecurity looks like proof of work now

https://www.dbreunig.com/2026/04/14/cybersecurity-is-proof-of-work-now.html
204•dbreunig•1d ago•82 comments

I made a terminal pager

https://theleo.zone/posts/pager/
46•speckx•2h ago•7 comments

YouTube now lets you turn off Shorts

https://www.theverge.com/streaming/912898/youtube-shorts-feed-limit-zero-minutes
87•pentagrama•1h ago•29 comments

Ohio prison inmates 'built computers and hid them in ceiling (2017)

https://www.bbc.com/news/technology-39576394
45•harambae•2h ago•20 comments

Google broke its promise to me – now ICE has my data

https://www.eff.org/deeplinks/2026/04/google-broke-its-promise-me-now-ice-has-my-data
1052•Brajeshwar•7h ago•457 comments

PiCore - Raspberry Pi Port of Tiny Core Linux

http://tinycorelinux.net/5.x/armv6/releases/README
72•gregsadetsky•5h ago•5 comments

God sleeps in the minerals

https://wchambliss.wordpress.com/2026/03/03/god-sleeps-in-the-minerals/
441•speckx•11h ago•95 comments

Cal.com is going closed source

https://cal.com/blog/cal-com-goes-closed-source-why
191•Benjamin_Dobell•9h ago•150 comments

Retrofitting JIT Compilers into C Interpreters

https://tratt.net/laurie/blog/2026/retrofitting_jit_compilers_into_c_interpreters.html
31•ltratt•12h ago•8 comments

Live Nation illegally monopolized ticketing market, jury finds

https://www.bloomberg.com/news/articles/2026-04-15/live-nation-illegally-monopolized-ticketing-ma...
365•Alex_Bond•5h ago•111 comments

Hacker News CLI

https://pythonhosted.org/hackernews-cli/commands.html
26•rolph•3h ago•9 comments

Want to write a compiler? Just read these two papers (2008)

https://prog21.dadgum.com/30.html
458•downbad_•15h ago•139 comments

The buns in McDonald's Japan's burger photos are all slightly askew

https://www.mcdonalds.co.jp/en/menu/burger/
189•bckygldstn•3h ago•114 comments

Monsters in the Archives by Caroline Bicks – The Writing Secrets of Stephen King

https://www.theguardian.com/books/2026/mar/30/monsters-in-the-archives-by-caroline-bicks-review-t...
5•lermontov•4d ago•0 comments

Ask HN: Who is using OpenClaw?

192•misterchocolat•5h ago•226 comments

Good sleep, good learning, good life (2012)

https://super-memory.com/articles/sleep.htm
360•downbad_•15h ago•183 comments

Fixing a monitor that goes black, off or blinks due to static electricity (2023)

https://aalonso.dev/blog/2023/how-to-fix-monitor-that-goes-black-off-due-to-static-electricity-in...
110•cyclopeanutopia•3d ago•61 comments

PBS Nova: Terror in Space (1998)

https://www.pbs.org/wgbh/nova/mir/
15•opengrass•4d ago•5 comments

Anna's Archive loses $322M Spotify piracy case without a fight

https://torrentfreak.com/annas-archive-loses-322-million-spotify-piracy-case-without-a-fight/
321•askl•16h ago•353 comments

The Gemini app is now on Mac

https://blog.google/innovation-and-ai/products/gemini-app/gemini-app-now-on-mac-os/
68•thm•7h ago•36 comments

CRISPR takes important step toward silencing Down syndrome’s extra chromosome

https://medicalxpress.com/news/2026-04-crispr-bold-silencing-syndrome-extra.html
71•amichail•8h ago•51 comments

Adaptional (YC S25) is hiring AI engineers

https://www.ycombinator.com/companies/adaptional/jobs/k7W6ge9-founding-engineer
1•acesohc•7h ago

Do you even need a database?

https://www.dbpro.app/blog/do-you-even-need-a-database
197•upmostly•12h ago•241 comments

How can I keep from singing?

https://blog.danieljanus.pl/singing/
42•nathell•1d ago•6 comments

ChatGPT for Excel

https://chatgpt.com/apps/spreadsheets/
97•armcat•3h ago•77 comments

The Universal Constraint Engine: Neuromorphic Computing Without Neural Networks

https://zenodo.org/records/19600206
4•skinney_uce•1h ago•0 comments

Does Gas Town 'steal' usage from users' LLM credits to improve itself?

https://github.com/gastownhall/gastown/issues/3649
202•rektomatic•3h ago•93 comments

Golden eagles' return to English skies

https://www.bbc.co.uk/news/articles/cje4zlxqkqdo
41•techterrier•3d ago•20 comments

Forcing an inversion of control on the SaaS stack

https://www.100x.bot/a/client-side-injection-inversion-of-control-saas
71•shardullavekar•5d ago•43 comments

One interface, every protocol

https://openbindings.com/blog/one-interface-every-protocol
34•clevengermatt•4h ago•3 comments