News for hackers. Stuff that matters.
Re:Ask HN: Codebases with great, easy to read code? by simonw on Monday March 21, 2022 @09:58AM (#30754181)
One recent example: I wanted to know if the SQLite package in Python took any steps to avoid calling "interrupt" on a closed connection, which the SQLite C documentation warns against.

A couple of searches against https://github.com/python/cpython lead me to this code here: https://github.com/python/cpython/blob/4674fd4e938eb4a29ccd5...

Re:Ask HN: Codebases with great, easy to read code? by gerhardhaering on Monday March 21, 2022 @10:44AM (#30754704)
It's nice that code that I wrote more than a decade ago is mentioned here.
Re:Ask HN: Codebases with great, easy to read code? by simonw on Monday March 21, 2022 @12:21PM (#30755940)
Thank you very much for building this, I benefit from it every day!

Since you're here... there was actually a question raised on the SQLite forum about that code and whether it is genuinely safe against a specific race condition... and I don't have nearly enough Python C knowledge to know the answer!

Does this look like it could be a problem to you? https://sqlite.org/forum/forumpost/f37ae374cc

Re:Ask HN: Codebases with great, easy to read code? by edelans on Monday March 21, 2022 @11:02AM (#30754908)
And it's even nicer that you get the chance to see it !