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

Comments

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

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

Multiprocessing all the way!

emmelaich•8mo ago
(2021)

Good article!

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

A 40-line fix eliminated a 400x performance gap

https://questdb.com/blog/jvm-current-thread-user-time/
92•bluestreak•2h ago•18 comments

Every GitHub object has two IDs

https://www.greptile.com/blog/github-ids
79•dakshgupta•9h ago•2 comments

The $LANG Programming Language

49•dang•1h ago•5 comments

Are two heads better than one?

https://eieio.games/blog/two-heads-arent-better-than-one/
105•evakhoury•9h ago•24 comments

vLLM large scale serving: DeepSeek 2.2k tok/s/h200 with wide-ep

https://blog.vllm.ai/2025/12/17/large-scale-serving.html
14•robertnishihara•9h ago•0 comments

The Tulip Creative Computer

https://github.com/shorepine/tulipcc
185•apitman•8h ago•38 comments

When hardware goes end-of-life, companies need to open-source the software

https://www.marcia.no/words/eol
148•Marciplan•2h ago•30 comments

Sei (YC W22) Is Hiring a DevOps Engineer (India/In-Office/Chennai/Gurgaon)

https://www.ycombinator.com/companies/sei/jobs/Rn0KPXR-devops-platform-ai-infrastructure-engineer
1•ramkumarvenkat•30m ago

AI Generated Music Barred from Bandcamp

https://old.reddit.com/r/BandCamp/comments/1qbw8ba/ai_generated_music_on_bandcamp/
552•cdrnsf•6h ago•432 comments

Japan's Skyscraper Factories (2021)

https://www.construction-physics.com/p/japans-skyscraper-factories
36•Pikamander2•6d ago•1 comments

We can't have nice things because of AI scrapers

https://blog.metabrainz.org/2025/12/11/we-cant-have-nice-things-because-of-ai-scrapers/
252•LorenDB•3h ago•144 comments

Show HN: Microwave – Native iOS app for videos on ATproto

https://testflight.apple.com/join/cVxV1W3g
9•sinned•8h ago•0 comments

How to make a damn website (2024)

https://lmnt.me/blog/how-to-make-a-damn-website.html
135•birdculture•8h ago•46 comments

Show HN: Nogic – VS Code extension that visualizes your codebase as a graph

https://marketplace.visualstudio.com/items?itemName=Nogic.nogic
63•davelradindra•6h ago•25 comments

The truth behind the 2026 J.P. Morgan Healthcare Conference

https://www.owlposting.com/p/the-truth-behind-the-2026-jp-morgan
11•abhishaike•7h ago•1 comments

Scott Adams has died

https://www.youtube.com/watch?v=Rs_JrOIo3SE
735•ekianjo•10h ago•1208 comments

Revup: Upload once to create multiple, relative GitHub PRs

https://github.com/Skydio/revup
6•krosaen•8h ago•1 comments

A deep dive on agent sandboxes

https://pierce.dev/notes/a-deep-dive-on-agent-sandboxes
27•icyfox•1d ago•6 comments

My first paper: A practical implementation of Rubiks cube based passkeys

https://ieeexplore.ieee.org/document/11280260
43•acorn221•6d ago•17 comments

The insecure evangelism of LLM maximalists

https://lewiscampbell.tech/blog/260114.html
167•todsacerdoti•2h ago•163 comments

Terra - A rolling-release Fedora repository

https://terra.fyralabs.com/
11•doodlesdev•3h ago•2 comments

Is it a joke?

https://novalis.org/blog/2025-11-06-is-it-a-joke.html
15•luu•3h ago•2 comments

Inlining – The Ultimate Optimisation

https://xania.org/202512/17-inlining-the-ultimate-optimisation
44•PaulHoule•4d ago•17 comments

Running Lean at Scale

https://harmonic.fun/news#blog-post-lean
55•eab-•3h ago•3 comments

Influencers and OnlyFans models are dominating U.S. O-1 visa requests

https://www.theguardian.com/us-news/2026/jan/11/onlyfans-influencers-us-o-1-visa
342•bookofjoe•8h ago•246 comments

Confer – End to end encrypted AI chat

https://confer.to/
68•vednig•11h ago•58 comments

Ask HN: Quantum Computation, Computers and Programming

16•rramadass•13h ago•11 comments

Understanding the Types of Data in Data

https://ischool.syracuse.edu/types-of-data/
5•mahirsaid•3d ago•0 comments

Choosing learning over autopilot

https://anniecherkaev.com/choosing-learning-over-autopilot
45•evakhoury•6h ago•32 comments

Show HN: AsciiSketch a free browser-based ASCII art and diagram editor

https://files.littlebird.com.au/ascii-sketch.html
12•schappim•2h ago•4 comments