HNHacker News
TopNewBestAskShowJobs

gwking

255 karma · joined January 4, 2016

github: gwk
submissionscomments
gwking··on The GitHub wiki is an anti-pattern (2022)
The last paragraph says: > At some point your docs will outgrow a single folder, and then all bets are off. You’ll want a separate repo with its own build process...

My question is, why is this taken as a given? Is it so hard to have docs and code live together in version control after a certain scale? If so, what is the specific problem and what is the cause?

I ask because I've never been that satisfied with the various ways I've tried to organize projects in git. Recently I've been trying to keep the source, tests and docs together in the same tree so that changes are more localized. It seems to be helping me keep track of things, especially with coding agents so eager to make changes all over the place. I find their proclivity to repeat the same idea in multiple locations (agent instructions, docs, docstrings, help strings, comments) especially problematic.

gwking··on Claude Opus 5.5
I appreciate humor here, but there are now a dozen of these comments on every thread about Claude. They no longer adding anything substantial and dilute the discussion.

I don't mean to pick on this comment in particular. The majority of my work day is now spent reading AI generated text, and I look at HN (too much!) because I want to read human commentary. Humans pretending to be obnoxious AI on repeat is net negative to say the least.

gwking··on Sublime Text Build 4213
I started using Zed daily about 6 months ago after 10 years of VS Code. VS Code was having idiotic regressions (like randomly inserting a copy of the final line of a file on save) while they were busy pumping out AI features.

Turns out, Zed is also busy pumping out AI features and the code editing experience is degrading. I'm actively shopping for a replacement.

gwking··on Homebrew 7.0.0
You can download Xcode 27 RC now from https://developer.apple.com/download/applications/.
gwking··on Claude Fable 5.1 and Claude Mythos 5.1
I switched to using Codex for the last two weeks, and while the prose has been better, there have been a lot more technical oversights. I'm now having fable review codex commits and it finds deep issues. I'v also done the reverse where opus/fable do the work and then I have codex revise all of the prose prior to reading anything myself. This has also been effective; I'm not sure which is the better approach.
gwking··on Htmx 4.0
I'm so pumped for v8!
gwking··on We tracked down the 16-year-old WAL-reset SQLite bug
I meant does the rare SQLite bug tend to manifest in litestream for the same reason it showed up in Tailscale.
gwking··on Tracking down the 16-year-old WAL-reset SQLite bug
I wonder if this also affected litestream disproportionately, because litestream also inserts itself into the checkpoint process.
gwking··on Don't stop early: Case-folding source code at memory speed
I wonder if making the index uppercase is strictly better in this sense, or if both upper and lowercase have chars that take more bytes.
gwking··on Building and shipping Mac and iOS apps without opening Xcode
I have one weird trick for people who are exploring this vein. I last opened an Xcode project about five years ago so I could be way behind the times.

Having spent many years fighting with Xcode professionally, I was thrilled when swift build came out, and then appalled at how badly Xcode adopted it. Eventually I realized that you can set up your entire app as a swift package, and then the Xcode project with a single main source file that calls some `app_main()` (or whatever you want to call it) function in your package.

I cannot remember exactly but there was something annoying about setting up a new project; I think by default Xcode assumes that you want a swift package to be treated as a dependency that is checked out from git, but there was a way to drag and drop a local dependency in the same project directory and then it worked.

What this buys you is that files are no longer tracked by Xcode, so renames/merges no longer trigger project.pbxproj surgery. Instead you specify the swift package directories and are done.

I used this for some large personal projects and was very happy with it.

At one point I also wrote my own build tool that imitated all of the steps that Xcode took so that I could truly be Xcode-free. That also worked (and was not even that hard) but I went back to Xcode because the debugger UI was better than what I could get out of VS Code at the time, and especially because I was playing around with the Metal debugger.

gwking··on Building and shipping Mac and iOS apps without opening Xcode
I've been working on a wrapper harness that runs claude as a separate user named `agent`. I tried this about a year ago and couldn't get it to work because of OAuth and the keychain, but took another pass recently and claude had enough self-knowledge about recent changes to say we could do it with CLAUDE_CODE_OAUTH_TOKEN. It has required building a some tooling around permissions setup with ACLs but it works on macOS today.

In terms of risk, I see it as halfway between stock claude with the sandbox and full-blown container or machine isolation.

I was recently thinking that as Claude's own sandbox gets better I'm doubting the ROI on my belt-and-suspenders project, but your comment reminds me why I'm doing it.

It is not currently published open source but I'm happy to talk about it with strangers.

gwking··on Is Meta destroying its engineering organization?
The grocer on my block is so tiny that I hit the max zoom before it shows up. If you pan around fiddle I can occasionally get it to appear, but it effectively does not exist according to google maps.
gwking··on SQLite is all you need for durable workflows
The suitability of Litestream for production disaster recovery is also an open question in my mind. I used 0.3.x for several years and when I tried to upgrade to the 0.5.x series there were runaway disk usage problems that would have caused downtime had they made it to prod. As far as I can tell these have not been entirely addressed, although recent bug reports suggest that they might be getting closer.

I want to love it, and I don't take open source projects like this for granted. But during my last production upgrade I chose to decommission Litestream in favor of a dumber, less granular solution using sqlite3_rsync and nightly backups because there is no point in using a backup system that is not rock solid.

gwking··on Profiling.sampling – Statistical Profiler
The simple answer is, I choose to use Python because I am productive with it. I get a lot done compared to the other languages I have tried. Performance is almost never the limiting factor in my work, nor has it been for the vast majority of the work I've ever been witness to. When it is, it comes up in very particular circumstances, and can usually be fixed algorithmically. Indeed, that is the situation where I have used profilers.

The fact that the base language is an order of magnitude (or two!) slower has almost never mattered. If my work gets to the point where it does, and I have an excuse to go mess around with a rust extension or some cool optimized library, things are going very well.

I've been professional developer for over 20 years now, and I've read this forum obsessively for much of that time. I've seen people write things like, "Most engineers would kill for a 5% speedup" and I think, on what planet? Most engineers have much larger problems that cannot be so easily quantified. Come to think of it, I think that there is an allure to performance optimization due to the fact that it can be so easily quantified.

gwking··on Nucleus Nouns
Interesting that "verb" does not appear in the posted article. I immediately thought of Yegge's kingdom of nouns blog post, which is 20 years old last month! I read it a long time ago and it made an impression on me.

https://steve-yegge.blogspot.com/2006/03/execution-in-kingdo...

gwking··on How much linear memory access is enough?
I’ve casually experimented with this in python a number of times for various hot loops, including those where I’m passing the chunk between c routines. On Apple M1 I’ve never seen a case where chunks larger than 16k mattered. That’s the page size, so totally unsurprising.

Nevertheless it’s been a helpful rule of thumb to not overthink optimizations.

gwking··on Go hard on agents, not on your filesystem
I tried this with Claude code on macOS. I created a new agent user and a wrapper do run Claude has that user, along with some scripts to set permissions and ownership so that I could run simple allow/deny commands. The only problem was that the fancy oauth flow broke. I filed an issue with Anthropic and their ticket bot auto closed it “for lack of interest” or whatever.

I fiddled with transferring the saved token from my keychain to the agent user keychain but it was not straightforward.

If someone knows how to get a subscription to Claude to work on another user via command line I’d love to know about it.

gwking··on Python 3.15's JIT is now back on track
My understanding is that many extension modules are already written to take advantage of multithreading by releasing the GIL when calling into C code. This allows true concurrency in the extension, and also invites all the hazards of multithreading. I wonder how many bugs will be uncovered in such extensions by the free threaded builds, but it seems like the “nuts” choice actually happened a long time ago.
gwking··on Reverse-engineering Viktor and making it open source
From one “old guy” to another:

PJ = private jet

Diamond hands and to the moon are crypto trader slang

Makes me laugh answering this question, because the meaning is all there if you skip over all the meme words.

gwking··on Sqldef: Idempotent schema management tool for MySQL, PostgreSQL, SQLite
I wrote a very rudimentary schema and automatic migration system for SQLite. One problem that I ran into recently was deploying changes that spanned two migrations, because the tool doesn’t know how to step through commits to do successive auto-migrations between schema versions. I guess there are rather obvious ways to handle this if you generate and then commit the full migration sql for each schema change. Nonetheless I’m curious if this is a problem you have had to think about, if you find it interesting or if it sounds like a bad path to go down, and if atlas does anything smart in this department. Thanks in advance!
gwking··on Xcode 26.3 – Developers can leverage coding agents directly in Xcode
For the record, I started using Xcode before it was called that and people have said this almost every year since. As I recall there was a big hit to its quality when they converted it to obj-c’s short lived garbage collection, and it felt like it never got back to reliable after that.
gwking··on Is the RAM shortage killing small VPS hosts?
Speaking for myself, managing a team of 3, the simpler management interface on Hetzner compared to AWS is a major professional advantage.
gwking··on Git Rebase for the Terrified
This may be outdated because git’s defaults have improved a lot over the years. When I first used git on a team was in 2011. As I recall, there were various commands like git log -p that would show nothing for a merge commit. So without extra knowledge of the git flags you would not find what you were looking for if it was in a side path of the merge history. This caused a lot of confusion at times. We switched to a rebase approach because linear history is easier for people to use.

To answer your question directly, if somewhat glibly, I’m glad I rebased every time I go looking for something in the history because I don’t have to think about the history as a graph. It’s easier.

More to your point, there are times when blame on a line does not show the culprit. If you move code, or do anything else to that line, then you have to keep searching. Sometimes it’s easier to look at the entire patch history of a file. If there is a way to repeatedly/recursively blame on a line, that’s cool and I’d love to know about it.

I now manage two junior engineers and I insist that they squash and rebase their work. I’ve seen what happens if they don’t. The merges get tangled and crazy, they include stuff from other branches they didn’t mean to, etc. the squash/rebase flow has been a way to make them responsible for what they put into the history, in a way that is simple enough that they got up to speed and own it.

gwking··on I ported JustHTML from Python to JavaScript with Codex CLI and GPT-5.2 in hours
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··on Announcing the Beta release of ty
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··on Claude CLI deleted my home directory and wiped my Mac
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··on Ask HN: My family business runs on a 1993-era text-based-UI (TUI). Anybody else?
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··on SQLite concurrency and why you should care about it
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··on Migrating from AWS to Hetzner
The servers are always beefy and the software is always blazingly fast. Blazingly beefy is my new joke trademark.
gwking··on VOC injection into a house reveals large surface reservoir sizes
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

Page 1 of 3Next →