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.

GNU Unifont

https://unifoundry.com/unifont/index.html
15•remywang•16m ago•2 comments

Security issues with electronic invoices

https://invoice.secvuln.info/
22•todsacerdoti•44m ago•9 comments

SQLite JSON at full index speed using generated columns

https://www.dbpro.app/blog/sqlite-json-virtual-columns-indexing
266•upmostly•7h ago•87 comments

4 billion if statements (2023)

https://andreasjhkarlsson.github.io//jekyll/update/2023/12/27/4-billion-if-statements.html
512•damethos•6d ago•148 comments

Async DNS

https://flak.tedunangst.com/post/async-dns
78•todsacerdoti•4h ago•20 comments

Motion (YC W20) Is Hiring Senior Staff Front End Engineers

https://jobs.ashbyhq.com/motion/715d9646-27d4-44f6-9229-61eb0380ae39
1•ethanyu94•12m ago

CM0 – A new Raspberry Pi you can't buy

https://www.jeffgeerling.com/blog/2025/cm0-new-raspberry-pi-you-cant-buy
119•speckx•5h ago•22 comments

String theory inspires a brilliant, baffling new math proof

https://www.quantamagazine.org/string-theory-inspires-a-brilliant-baffling-new-math-proof-20251212/
71•ArmageddonIt•4h ago•52 comments

Pg_ClickHouse: A Postgres extension for querying ClickHouse

https://clickhouse.com/blog/introducing-pg_clickhouse
13•spathak•2d ago•1 comments

Secondary school maths showing that AI systems don't think

https://www.raspberrypi.org/blog/secondary-school-maths-showing-that-ai-systems-dont-think/
50•zdw•4h ago•109 comments

New Kindle feature uses AI to answer questions about books

https://reactormag.com/new-kindle-feature-ai-answer-questions-books-authors/
44•mindracer•49m ago•81 comments

Google releases its new Google Sans Flex font as open source

https://www.omgubuntu.co.uk/2025/11/google-sans-flex-font-ubuntu
125•CharlesW•3h ago•44 comments

Microservices should form a polytree

https://bytesauna.com/post/microservices
71•mapehe•4d ago•73 comments

Epic celebrates "the end of the Apple Tax" after court win in iOS payments case

https://arstechnica.com/tech-policy/2025/12/epic-celebrates-the-end-of-the-apple-tax-after-appeal...
271•nobody9999•5h ago•151 comments

Bit flips: How cosmic rays grounded a fleet of aircraft

https://www.bbc.com/future/article/20251201-how-cosmic-rays-grounded-thousands-of-aircraft
27•signa11•4d ago•27 comments

Home Depot GitHub token exposed for a year, granted access to internal systems

https://techcrunch.com/2025/12/12/home-depot-exposed-access-to-internal-systems-for-a-year-says-r...
107•kernelrocks•2h ago•61 comments

Fedora: Open-source repository for long-term digital preservation

https://fedorarepository.org/
85•cernocky•7h ago•39 comments

Good conversations have lots of doorknobs (2022)

https://www.experimental-history.com/p/good-conversations-have-lots-of-doorknobs
13•bertwagner•4d ago•1 comments

Rats Play Doom

https://ratsplaydoom.com/
5•ano-ther•57m ago•0 comments

The true story of the Windows 3.1 'Hot Dog Stand' color scheme

https://www.pcgamer.com/software/windows/windows-3-1-included-a-red-and-yellow-hot-dog-stand-colo...
56•naves•2h ago•9 comments

From text to token: How tokenization pipelines work

https://www.paradedb.com/blog/when-tokenization-becomes-token
94•philippemnoel•1d ago•18 comments

The tiniest yet real telescope I've built

https://lucassifoni.info/blog/miniscope-tiny-telescope/
230•chantepierre•13h ago•60 comments

Open sourcing the Remix Store

https://remix.run/blog/oss-remix-store
12•doppp•3d ago•0 comments

BpfJailer: eBPF Mandatory Access Control [pdf]

https://lpc.events/event/19/contributions/2159/attachments/1833/3929/BpfJailer%20LPC%202025.pdf
44•voxadam•6h ago•4 comments

Framework Raises DDR5 Memory Prices by 50% for DIY Laptops

https://www.phoronix.com/news/Framework-50p-DDR5-Memory
133•mikece•5h ago•118 comments

Benn Jordan’s flock camera jammer will send you to jail in Florida now [video]

https://www.youtube.com/watch?v=qEllWdK4l_A
122•givemeethekeys•2h ago•93 comments

Nuclear energy key to decarbonising Europe, says EESC

https://www.eesc.europa.eu/en/news-media/news/nuclear-energy-key-decarbonising-europe-says-eesc
61•mpweiher•3h ago•59 comments

Japan law opening phone app stores to go into effect

https://www3.nhk.or.jp/nhkworld/en/news/20251210_B1/
94•shlip•4h ago•19 comments

Guarding My Git Forge Against AI Scrapers

https://vulpinecitrus.info/blog/guarding-git-forge-ai-scrapers/
141•todsacerdoti•13h ago•92 comments

Octo: A Chip8 IDE

https://github.com/JohnEarnest/Octo
71•tosh•6d ago•10 comments