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.

First, make me care

https://gwern.net/blog/2026/make-me-care
263•andsoitis•5h ago•91 comments

A macOS app that blurs your screen when you slouch

https://github.com/tldev/posturr
441•dnw•8h ago•155 comments

Case study: Creative math – How AI fakes proofs

https://tomaszmachnik.pl/case-study-math-en.html
14•musculus•1h ago•3 comments

Show HN: A small programming language where everything is a value

https://github.com/Jcparkyn/herd
15•jcparkyn•1h ago•0 comments

Oneplus phone update introduces hardware anti-rollback

https://consumerrights.wiki/w/Oneplus_phone_update_introduces_hardware_anti-rollback
312•validatori•3h ago•135 comments

I was right about ATProto key management

https://notes.nora.codes/atproto-again/
98•todsacerdoti•4h ago•56 comments

The behavioral cost of personalized pricing

https://digitalseams.com/blog/the-behavioral-cost-of-personalized-pricing
43•bobbiechen•5h ago•19 comments

Doom has been ported to an earbud

https://doombuds.com
319•arin-s•11h ago•101 comments

Spanish track was fractured before high-speed train disaster, report finds

https://www.bbc.com/news/articles/c1m77dmxlvlo
116•Rygian•5h ago•103 comments

Using PostgreSQL as a Dead Letter Queue for Event-Driven Systems

https://www.diljitpr.net/blog-post-postgresql-dlq
152•tanelpoder•8h ago•48 comments

A flawed paper in management science has been cited more than 6k times

https://statmodeling.stat.columbia.edu/2026/01/22/aking/
607•timr•15h ago•322 comments

The '3.5% rule': How a small minority can change the world (2019)

https://www.bbc.com/future/article/20190513-it-only-takes-35-of-people-to-change-the-world
139•choult•2h ago•113 comments

Bitwise conversion of doubles using only FP multiplication and addition (2020)

https://dougallj.wordpress.com/2020/05/10/bitwise-conversion-of-doubles-using-only-floating-point...
12•vitaut•9h ago•0 comments

Show HN: An interactive map of US lighthouses and navigational aids

https://www.lighthouses.app/
17•idd2•6h ago•4 comments

Web-based image editor modeled after Deluxe Paint

https://github.com/steffest/DPaint-js
167•bananaboy•11h ago•15 comments

Infinite pancakes, anyone?

https://www.nytimes.com/2026/01/20/science/infinite-pancake-math-puzzle.html
14•cainxinth•3d ago•3 comments

ICE using Palantir tool that feeds on Medicaid data

https://www.eff.org/deeplinks/2026/01/report-ice-using-palantir-tool-feeds-medicaid-data
810•JKCalhoun•6h ago•462 comments

Ask HN: How do you keep system context from rotting over time?

23•kennethops•5d ago•26 comments

Introduction to PostgreSQL Indexes

https://dlt.github.io/blog/posts/introduction-to-postgresql-indexes/
279•dlt•16h ago•14 comments

Optimizing GPU Programs from Java Using Babylon and Hat

https://openjdk.org/projects/babylon/articles/hat-matmul/hat-matmul
21•pjmlp•5d ago•2 comments

Show HN: Bonsplit – Tabs and splits for native macOS apps

https://bonsplit.alasdairmonk.com
193•sgottit•12h ago•26 comments

LED lighting undermines visual performance unless supplemented by wider spectra

https://www.nature.com/articles/s41598-026-35389-6
48•bookofjoe•2h ago•21 comments

Show HN: Netfence – Like Envoy for eBPF Filters

https://github.com/danthegoodman1/netfence
38•dangoodmanUT•9h ago•6 comments

Hackable personal news reader in bash pipes

https://github.com/haron/news.sh
16•haron•5d ago•5 comments

Show HN: Fence – Sandbox CLI commands with network/filesystem restrictions

https://github.com/Use-Tusk/fence
59•jy-tan•5d ago•14 comments

Show HN: TUI for managing XDG default applications

https://github.com/mitjafelicijan/xdgctl
111•mitjafelicijan•13h ago•38 comments

Data Leak Exposes 149M Logins, Including Gmail, Facebook

https://www.techrepublic.com/article/news-149-million-passwords-exposed-infostealer-database/
72•saikatsg•4h ago•13 comments

Nango (YC W23, Dev Infrastructure) Is Hiring Remotely

https://jobs.ashbyhq.com/Nango
1•bastienbeurier•12h ago

Publishing on the ATmosphere

https://tynanistyping.offprint.app/a/3mcsvjjceei23-publishing-on-the-atmosphere
29•danabramov•5d ago•19 comments

Jurassic Park - Tablet device on Nedry's desk? (2012)

https://www.therpf.com/forums/threads/jurassic-park-tablet-device-on-nedrys-desk.169883/
143•exvi•14h ago•60 comments