Readit News logoReadit News
gwking commented on I ported JustHTML from Python to JavaScript with Codex CLI and GPT-5.2 in hours   simonwillison.net/2025/De... · Posted by u/pbowyer
simonw · a day ago
I think the most interesting thing about this is how it demonstrates that a very particular kind of project is now massively more feasible: library porting projects that can be executed against implementation-independent tests.

The big unlock here is https://github.com/html5lib/html5lib-tests - a collection of 9,000+ HTML5 parser tests that are their own independent file format, e.g. this one: https://github.com/html5lib/html5lib-tests/blob/master/tree-...

The Servo html5ever Rust codebase uses them. Emil's JustHTML Python library used them too. Now my JavaScript version gets to tap into the same collection.

This meant that I could set a coding agent loose to crunch away on porting that Python code to JavaScript and have it keep going until that enormous existing test suite passed.

Sadly conformance test suites like html5lib-tests aren't that common... but they do exist elsewhere. I think it would be interesting to collect as many of those as possible.

gwking · a day ago
I’ve idly wondered about this sort of thing quite a bit. The next step would seem to be taking a project’s implementation dependent tests, converting them to an independent format and verifying them against the original project, then conducting the port.
gwking commented on Announcing the Beta release of ty   astral.sh/blog/ty... · Posted by u/gavide
shrumm · a day ago
Thanks Astral team! We use Pydantic heavily, and it looks like first class support from Ty is slated for the stable release, we'd love to try it.

While we wait... what's everyone's type checking setup? We run both Pyright and Mypy... they catch different errors so we've kept both, but it feels redundant.

https://htmlpreview.github.io/?https://github.com/python/typ... suggests that Pyright is a superset, which hasn't matched our experience.

Though our analysis was ~2 years ago. Anyone with a large Python codebase successfully consolidated to just Pyright?

gwking · a day ago
I appreciate the even tempered question. I’ve been using mypy since its early days, and when pyright was added to vs code I was forced to reckon with their differences. For the most part I found mypy was able to infer more accurately and flexibly. At various times I had to turn pyright off entirely because of false positives. But perhaps someone else would say that I’m leaning on weaknesses of mypy; I think I’m pretty strict but who knows. And like yourself, mine is a rather dated opinion. It used to be that every mypy release was an event, where I’d have a bunch of new errors to fix, but that lessened over the years.

I suspect pyright has caught up a lot but I turned it off again rather recently.

For what it’s worth I did give up on cursor mostly because basedpyright was very counterproductive for me.

I will say that I’ve seen a lot more vehement trash talking about mypy and gushing about pyright than vice versa for quite a few years. It doesn’t quite add up in my mind.

gwking commented on Claude CLI deleted my home directory and wiped my Mac   old.reddit.com/r/ClaudeAI... · Posted by u/tamnd
gwking · 3 days ago
I jumped through a bunch of hoops to get claude code to run as a dedicated user on macOS. This allowed me to set the group ownership and permissions of my work to control exactly what claude can see. With a few one-liner bash scripts to recursively set permissions it worked quite well. Getting the oauth token token into that user's keychain was an utter pain though. Claude Code does a fancy authorization flow that puts the token into the current user's login keychain, and getting it into the other user's login keychain took a lot of futzing. Maybe there is a cleaner way that I missed.

When that token expired I didn't have the patience to go through it again. Using an API key looked like it would be easier.

If this is of interest to anyone else, I filed an issue that has so far gone unacknowledged. Their ticket bot tried to auto-close it after 30 days which I find obnoxious. https://github.com/anthropics/claude-code/issues/9102#issuec...

gwking commented on Ask HN: My family business runs on a 1993-era text-based-UI (TUI). Anybody else?    · Posted by u/urnicus
gwking · a month ago
My first programming "job" was a sort of summer internship when I was 14 for a family owned company called Signature Systems (signature.net). They are still in business. Their product is an operating system called Comet, that if I'm not mistaken was originally a compatibility play bringing software from the previous era of 16 bit microcomputers onto DOS PCs, and then later into Windows. I may be misremembering some of the details but I think at one point a Comet system ran ticket sales at Madison Square Gardens. My summer project was to build a demo using their new support for Windows GUI elements. The last time I spoke with the owners, they told me that they still had customers, including in the textiles industry where loom patterns had been coded in Basic. I often think about it as an example of a legacy system, and smile at the idea of someone thinking they need to rewrite their plaid weave in TypeScript or Rust.

Separately, I have spent the last three years building a web app that replaced a heap of automation scripts for a ~50 person business. These were much more modern than what the OP describes but it had some of the same qualities. The scripts mostly generated google sheets and emails. The replacement is a python web app using SQLite. Moving the company data into a proper database has been a very significant step for them. In some ways, the project feels a lot like custom business software that got built in the 90s.

gwking commented on SQLite concurrency and why you should care about it   jellyfin.org/posts/SQLite... · Posted by u/HunOL
simonw · 2 months ago
Yeah I read the OP and my first instinct was that this is SQLITE_BUSY. I've been collecting posts about that here: https://simonwillison.net/tags/sqlite-busy/
gwking · 2 months ago
One tidbit that I don't see mentioned here yet is that ATTACH requires a lock. I just went looking for the documentation about this and couldn't find it, especially for WAL mode (https://www.sqlite.org/lockingv3.html mentions the super-journal, but the WAL docs do not mention ATTACH at all).

I have a python web app that creates a DB connection per request (not ideal I know) and immediately attaches 3 auxiliary DBs. This is a low traffic site but we have a serious reliability problem when load increases: the ATTACH calls occasionally fail with "database is locked". I don't know if this is because the ATTACH fails immediately without respecting the normal 5 second database timeout or what. To be honest I haven't implemented connection pooling yet because I want to understand what exactly causes this problem.

gwking commented on Migrating from AWS to Hetzner   digitalsociety.coop/posts... · Posted by u/pingoo101010
dematz · 2 months ago
Tangential point but why is it that so often these leaving the cloud posts use the word "beefy" to describe the servers? It's always you don't need cloud because beefy servers handle pretty much any bla bla bla

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...

If anyone from oxide computer or similar is reading, maybe you should rebrand to BEEFY server inc...

gwking · 2 months ago
The servers are always beefy and the software is always blazingly fast. Blazingly beefy is my new joke trademark.
gwking commented on VOC injection into a house reveals large surface reservoir sizes   pnas.org/doi/10.1073/pnas... · Posted by u/PaulHoule
gwking · 2 months ago
I have never seen the word “partition” used in this way before. Hard to search for examples because unrelated computer graphics articles about surface partitioning dominate. I did find this:

Partitioning is the distribution of a solute, S, between two immiscible solvents (such as aqueous and organic phases). It is an equilibrium condition that is described by the following equation:

S(aq) ⇄ S(org)

Interesting to think that a surface can play a role comparable to a solvent. I wonder what a chemist would have to say about it.

https://www.chemicool.com/definition/partitioning.html

gwking commented on Python 3.14 is here. How fast is it?   blog.miguelgrinberg.com/p... · Posted by u/pjmlp
modeless · 2 months ago
What are the reasons why nobody uses pypy?
gwking · 2 months ago
Speaking only for myself, and in all sincerity: every year, there is some feature of the latest CPython version that makes a bigger difference to my work than faster execution would. This year I am looking forward to template strings, zstd, and deferred evaluation of annotations.
gwking commented on Litestar is worth a look   b-list.org/weblog/2025/au... · Posted by u/todsacerdoti
rtpg · 4 months ago
I am really disappointed at the new generation of Python frameworks' documentation, which seem to have the same "docs are tutorials + chatty blog posts which imprecisely describe the APIs" attitude of Javascript libs.

Two words: API Reference.

Have the clinical explanation of methods exposed, with actual breakdowns of what method parameters do. List them all, don't surround it by prose. List out the options! Don't make me dive into the source to find out what I can or can't pass into a parameter!

Having to play this game of "alright I want to know how to use this API, so first I need to figure out what tutorial page _might_ use this" to find the tiny examples that should just be next to the methods I care about in the reference is really frustrating.

gwking · 4 months ago
I’ll second this, and add that docstrings are becoming ever more useful as modern editors learn how to show them inline when I hover over a symbol. Starlette lacks docstrings entirely and it’s a real miss in my opinion.
gwking commented on You can now disable all AI features in Zed   zed.dev/blog/disable-ai-f... · Posted by u/meetpateltech
blurbleblurble · 5 months ago
What kind of configuration did you use for tab completion? Did you try hooking up different LLMs?
gwking · 5 months ago
I paid for a subscription to both cursor and zed, without configuring any different LLMs or other options as far as I recall.

u/gwking

KarmaCake day196January 4, 2016View Original