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.

What an unprocessed photo looks like

https://maurycyz.com/misc/raw_photo/
1088•zdw•9h ago•201 comments

Staying ahead of censors in 2025

https://forum.torproject.org/t/staying-ahead-of-censors-in-2025-what-weve-learned-from-fighting-c...
59•ggeorgovassilis•1h ago•14 comments

You can make up HTML tags

https://maurycyz.com/misc/make-up-tags/
178•todsacerdoti•4h ago•71 comments

Show HN: Z80-μLM, a 'Conversational AI' That Fits in 40KB

https://github.com/HarryR/z80ai
47•quesomaster9000•2h ago•10 comments

My First Meshtastic Network

https://rickcarlino.com/notes/electronics/my-first-meshtastic-network.html
27•rickcarlino•2h ago•6 comments

Show HN: My not-for-profit search engine with no ads, no AI, & all DDG bangs

https://nilch.org
27•UnmappedStack•2h ago•3 comments

Binaries

https://fzakaria.com/2025/12/28/huge-binaries
15•todsacerdoti•2h ago•3 comments

Unity's Mono problem: Why your C# code runs slower than it should

https://marekfiser.com/blog/mono-vs-dot-net-in-unity/
169•iliketrains•9h ago•78 comments

As AI gobbles up chips, prices for devices may rise

https://www.npr.org/2025/12/28/nx-s1-5656190/ai-chips-memory-prices-ram
122•geox•8h ago•133 comments

Software engineers should be a little bit cynical

https://www.seangoedecke.com/a-little-bit-cynical/
167•zdw•10h ago•114 comments

MongoBleed Explained Simply

https://bigdata.2minutestreaming.com/p/mongobleed-explained-simply
167•todsacerdoti•10h ago•62 comments

Researchers discover molecular difference in autistic brains

https://medicine.yale.edu/news-article/molecular-difference-in-autistic-brains/
111•amichail•9h ago•64 comments

Growing up in “404 Not Found”: China's nuclear city in the Gobi Desert

https://substack.com/inbox/post/182743659
750•Vincent_Yan404•1d ago•331 comments

PySDR: A Guide to SDR and DSP Using Python

https://pysdr.org/content/intro.html
164•kklisura•11h ago•8 comments

Line scan camera image processing

https://daniel.lawrence.lu/blog/2025-09-21-line-scan-camera-image-processing/
23•vasco•3d ago•1 comments

Spherical Cow

https://lib.rs/crates/spherical-cow
84•Natfan•8h ago•7 comments

Show HN: My app just won best iOS Japanese learning tool of 2025 award (blog)

https://skerritt.blog/best-japanese-learning-tools-2025-award-show/
92•wahnfrieden•7h ago•14 comments

A bitwise reproducible deep learning framework

https://github.com/microsoft/RepDL
17•noosphr•6d ago•0 comments

Mouse: Computer Programming Language

http://mouse.davidgsimpson.com/
5•gappy•2d ago•2 comments

Fast GPU Interconnect over Radio

https://spectrum.ieee.org/rf-over-fiber
15•montroser•4h ago•0 comments

Slaughtering Competition Problems with Quantifier Elimination (2021)

https://grossack.site/2021/12/22/qe-competition.html
46•todsacerdoti•8h ago•0 comments

Panoramas of Star Trek Sets

https://mijofr.github.io/st-panorama/
28•jfil•2h ago•3 comments

Finding Jingle Town: Debugging an N64 Game Without Symbols

https://blog.chrislewis.au/finding-jingle-town-debugging-an-n64-game-without-symbols/
24•knackers•5d ago•0 comments

Formulaic Delimiters in the Iliad and the Odyssey

https://glthr.com/formulaic-delimiters-in-the-iliad-and-the-odyssey
9•glth•1d ago•3 comments

Why I Disappeared – My week with minimal internet in a remote island chain

https://www.kenklippenstein.com/p/why-i-disappeared
76•eh_why_not•9h ago•71 comments

Learn computer graphics from scratch and for free

https://www.scratchapixel.com
246•theusus•20h ago•26 comments

62 years in the making: NYC's newest water tunnel nears the finish line

https://ny1.com/nyc/all-boroughs/news/2025/11/09/water--dep--tunnels-
116•eatonphil•8h ago•70 comments

Why I think Valve’s retiring the Steam Deck LCD

https://gardinerbryant.com/why-valves-retiring-the-steam-deck-lcd/
45•Ariarule•3h ago•44 comments

Fast CVVDP implementation in C

https://github.com/halidecx/fcvvdp
29•todsacerdoti•8h ago•1 comments

How to complain (2024)

https://outerproduct.net/trivial/2024-03-25_complain.html
50•ysangkok•8h ago•9 comments