HNHacker News
TopNewBestAskShowJobs

hxtk

454 karma · joined August 12, 2015

submissionscomments
hxtk··on How Uber Protects Against Retry Storms
In gRPC, the statuses it returns in trailers can include arbitrary details, and Google has a well-known proto for common ones in `google/rpc/error_details.proto`. One such detail is RetryInfo [1].

When we implement retries where I work, the general rule is that if a request is suitable for retry, it should include the RetryInfo in the error status and use it as the base delay for the exponential backoff. The absence of that detail means don’t retry, and we have a client interceptor that parses the response status and retries according to that logic.

1: https://github.com/googleapis/googleapis/blob/bba4c646b1f85a...

hxtk··on How Uber Protects Against Retry Storms
I’d like to mention it since Uber has a really cool load shedder [1], also implemented similarly by Netflix [2] and failsafe-go [3]. It basically looks for points where more requests per second suddenly cause a significant increase in latency and calls that the concurrency limit.

1: https://www.uber.com/us/en/blog/cinnamon-using-century-old-t...

2: https://github.com/Netflix/concurrency-limits

3: https://failsafe-go.dev/adaptive-limiter/

hxtk··on Children's stunted lungs show recovery in ultra low emission zone
The point isn’t that the HEPA filter won’t work under those conditions, it’s that if you can get away with not separating the clean and dirty air, you can achieve better filtration overall with a higher flow, lower resistance filter at a lower noise level. HEPA filters shine in use cases where you need single-pass filtration, like vacuum cleaner output filters or clean room air filters. If you don’t separate clean and dirty air, the filter will still work, but you aren’t taking advantage of its main distinguishing quality, which is its single-pass filtration performance.

If you get to recycle the air through the filter several times, MERV-13 offers much better performance tradeoffs for a residential air purifier because you can recycle the air through it much faster at acceptable noise levels. My home air purifier recycles the volume of my home every 15 minutes or so, vs HEPA filters which produce totally clean air, but since it just mixes with the dirty air that doesn’t matter as much as the rate at which it cleans air.

hxtk··on Protobuf has LSP support
The LSP is one of the subcommands provided by the buf binary. My LSP configuration for protobuf is `buf lsp serve`.
hxtk··on US citizen charged after GrapheneOS phone wipes during airport search
It’s also a fairly traumatic thing to people through and I can imagine it does a lot of damage to people’s faith in law enforcement. Personal anecdote: when I was a teenager some cops gave me a list of fabricated evidence that I’d committed a crime, not intending to ever show a court; just trying to get me to confess. They said they’d go easy on me if I confessed but if I held out then they would petition the court to have me tried as an adult and sent to “big boy” prison. They also told me my parents were cooperating in the investigation and didn’t tell me. The whole ordeal basically made sure no one in my previously quite pro-cop family would ever trust an LEO again.
hxtk··on Go Analysis Framework: modular static analysis by go team
Someone in the thread about the Ruff update ingenuously said they wished Go had something like Ruff, being unaware of this framework. In that thread, someone seemed to take it as a sign that many people who might care to know about this don't yet, so they made a dedicated post for it.
hxtk··on Postgres LISTEN/NOTIFY actually scales
Personally I love it for cache invalidation. I used it on an older especially on project originally built without caching in mind that then added caching for immutable data without caching for mutable data in mind. It fell to me to add caching of mutable data. I found it rather convenient to put NOTIFY triggers on cached tables and have a LISTENer that will delete the corresponding rows from memcached when it gets a notification. It’s basically impossible to out-scale it in that use case because the scale is intrinsically linked to number of writes the leader in your database processes.
hxtk··on U.S. pulling ocean sensors a 'shock' for Canadian research as El Niño nears
That number, incidentally, is the entire NATO military budget. Which scares me because I can imagine someone planning on taking action that would result in the dissolution of NATO thinking they can make up the difference that way and choosing that number with that in mind.
hxtk··on You can just say it
When I read what someone has written, I learn things beyond its literal text from the fact that I’m reading it, which implies it was worth effort for them to put into so many words and send to me through the medium they chose and put the level of care that they chose into their wording.

The LLM erases those choices and erases the cost of verbosity so there’s much less for me to learn from a message, and much less I stand to learn about a person though repeated exchanges to help me better contextualize future messages I receive from them.

hxtk··on Rewrite Bun in Rust has been merged
I don't know if the intent was to deceive, but the comments certainly had the effect of deceiving me. I came away from that first thread thinking, "Ah, so the 'story' here is that someone on the project tried an experiment on a branch that they probably should have put in a branch on their personal fork." I was no longer thinking it was a serious possibility that an AI rewrite would get merged.
hxtk··on Rewrite Bun in Rust has been merged
I think relatively few people are probably running Bun in production, but as a dependency management system and bundler for the JavaScript ecosystem, it's similar to `uv` from the Python ecosystem in how much faster it is compared to the most popular alternatives so it's fairly popular in that space.
hxtk··on Ask HN: What are you working on? (May 2026)
I made a Python tool to build distroless container images for projects managed by uv. It draws inspiration from Ko from the Go ecosystem and works with/depends on uv from the Python ecosystem, so I smashed them together and called it Kuvo: https://github.com/hxtk/kuvo

It’s a hobby project in a very early state where it technically works but it’s missing several things I think it needs before I’d use it for anything serious. As of right now it isn’t even complete enough to dogfood a minimal container for itself without an intermediate base image because it can’t target a platform compatible with the distroless uv container image.

hxtk··on Appearing productive in the workplace
When I read some written content, before AI, I learned a few different things in order. First, just by its mere existence, I learned that someone had found an idea worth expending some effort to express. Next, I would learn the words of the content. Next, I would usually acquire some kind of knowledge that I was able to synthesize or extract from the content. That last step isn't a given, but it's very likely to happen given the pre-filter implied by the first bit of information I learned.

There's no pre-filter anymore. It's exceedingly hard for me to quickly determine how important a person thinks an idea is or how much thought they've put into it in the age of AI, and so there's no guarantee that if I invest the time to read the content then there will be a proportional amount of meaning available for me to extract. This risk always existed even with works written by humans, but now it's overwhelming and has decreased my overall of exposure to new ideas that I didn't explicitly go looking for because I have a much higher expectation that information placed in front of me unsolicited will just be a waste of my time.

hxtk··on Red Squares – GitHub outages as contributions
The missing status page [1] treats it as downtime any time any component of the system is down, and calculates the overall uptime based on the time that doesn't overlap with any individual category outages, and the overall downtime as any time overlapping with at least one individual category outage to avoid double-counting They show 24h of minor outage on that date.

I'm guessing that this site is taking the downtime in a given day across all services and adding it up, which would mean the worst possible day has 10 days of downtime (a day of downtime for each major category).

1: https://mrshu.github.io/github-statuses/

hxtk··on Who owns the code Claude Code wrote?
This analysis yields very different results under utilitarianism vs rule utilitarianism.

Under the former, you could argue, "What I'm doing is a science or useful art, so if copyright exists to advance those things then taking a more permissive interpretation of copyright to allow my efforts to succeed is in the spirit of the law."

Under the latter, you could argue, "Works get published because as a rule, researchers and artists know they have lawful recourse through copyright if the work gets used without their consent. The absence of that rule incentivizes safeguarding works by treating them as secret and each disclosure as a matter of personal trust, so the existence of that rule promotes the sciences and useful arts."

hxtk··on Lichess and Take Take Take Sign Cooperation Agreement
Cloud is more cost effective the less of it you have because it doesn’t cost 3x more to maintain a kubernetes cluster with thrice the nodes, but it does cost 3x more to rent one. This is even more true for serverless.

I can imagine a lot of small apps buy into serverless at a time where it’s legitimately the most cost-effective solution and then they’re stuck because serverless platforms are easy to lock yourself into.

hxtk··on Ghidra by NSA
The Nightmare Course [1], so named because someone with that skillset (developing zero-days) is a nightmare for security, not because the course itself is a nightmare, and Roppers Academy [2] are both good for learning how to reverse engineer software and look for vulnerabilities.

The nightmare course explicitly talks about how to use Ghidra.

1: https://guyinatuxedo.github.io 2: https://www.roppers.org

hxtk··on Zig – io_uring and Grand Central Dispatch std.Io implementations landed
When I look at historical cases, it seems different from a case today. If I’m a programmer in the 60s wanting async in my “low level language,” what I actually want is to make some of the highest level languages available at the time even more high level in their IO abstractions. As I understand it, C was a high-level language when it was invented, as opposed to assembly with macros. People wanting to add async were extending the state of the art for high level abstraction.

A language doing it today is doing it in the context of an ecosystem where even higher level languages exist and they have made the choice to target a lower level of abstraction.

hxtk··on Zig – io_uring and Grand Central Dispatch std.Io implementations landed
It’s surprising to me how much people seem to want async in low level languages. Async is very nice in Go, but the reason I reach for a language like Zig is to explicitly control those things. I’m happily writing a Zig project right now using libxev as my io_uring abstraction.
hxtk··on An AI agent published a hit piece on me
Apparently there are lots of people who signed up just to check it out but never actually added a mechanism to get paid, signaling no intent to actually be "hired" on the service.
hxtk··on Text classification with Python 3.14's ZSTD module
I've actually been experimenting with that lately. I did a really naive version that tokenizes the input, feeds the max context window up to the token being encoded into an LLM, and uses that to produce a distribution of likely next tokens, then encodes the actual token with Huffman Coding with the LLM's estimated distribution. I could get better results with arithmetic encoding almost certainly.

It outperforms zstd by a long shot (I haven't dedicated the compute horsepower to figuring out what "a long shot" means quantitatively with reasonably small confidence intervals) on natural language, like wikipedia articles or markdown documents, but (using GPT-2) it's about as good as zstd or worse than zstd on things like files in the Kubernetes source repository.

You already get a significant amount of compression just out of the tokenization in some cases ("The quick red fox jumps over the lazy brown dog." encodes to one token per word plus one token for the '.' for the GPT-2 tokenizer), where as with code a lot of your tokens will just represent a single character so the entropy coding is doing all the work, which means your compression is only as good as the accuracy of your LLM, plus the efficiency of your entropy coding.

I would need to be encoding multiple tokens per "word" with Huffman Coding to hit the entropy bounds, since it has a minimum of one bit per character, so if tokens are mostly just one byte then I can't do better than a 12.5% compression ratio with one token per word. And doing otherwise gets computationally infeasible very fast. Arithmetic coding would do much better especially on code because it can encode a word with fractional bits.

I used Huffman coding for my first attempt because it's easier to implement and most libraries don't support dynamically updating the distribution throughout the process.

hxtk··on End of an era for me: no more self-hosted git
Even that functions as a sort of proof of work, requiring a commitment of compute resources that is table stakes for individual users but multiplies the cost of making millions of requests.
hxtk··on Bun v1.3.9
It’s gotten easier of late because Bazel modules are nice and Gazelle has started support plugins so it can do build file generation for other languages.

I don’t like generative AI for rote tasks like this, but I’ve had good luck using generative AI to write deterministic code generators that I can commit to a project and reuse.

hxtk··on Bun v1.3.9
I’m not a fan of generative AI for the use case because it’s rote enough to do deterministically, but deterministic code generation is getting better and better.

Gazelle, the BUILD file generator for Go, now supports plugins and several other languages have Gazelle plugins.

I’ve used AI to generate BUILD file generators before, though. I had good luck getting it to write a script that would analyze a Java project with circular dependencies and aggregate the cycle participants into a single target.

hxtk··on Speed up responses with fast mode
I’ve been experimenting with this today. I still don’t think AI is a very good use of my programming time… but it’s a pretty good use of my non-programming time.

I ran OpenCode with some 30B local models today and it got some useful stuff done while I was doing my budget, folding laundry, etc.

It’s less likely to “one shot” apples to apples compared to the big cloud models; Gemini 3 Pro can one shot reasonably complex coding problems through the chat interface. But through the agent interface where it can run tests, linters, etc. it does a pretty good job for the size of task I find reasonable to outsource to AI.

This is with a high end but not specifically AI-focused desktop that I mostly built with VMs, code compilation tasks, and gaming in mind some three years ago.

hxtk··on The Jeff Dean Facts
Even with the ellipsized link I knew you were talking about one of a few things because the link shows up as `:visited` for me... had to be either BigTable, MapReduce, or Spanner. All good reads.
hxtk··on Eat Real Food
There's some real science there for a couple of reasons. Protein is a macronutrient you can be malnourished if you don't get enough of even if you eat enough calories and the right micronutrients, and if most of your calories are from protein then you're actually probably not getting as many "burnable" calories as you think you are because (1) the amount of protein you need to meet your daily protein needs never enters the citric acid cycle to oxidized for ATP regeneration, (2) protein is the macronutrient that feels the most filling, and (3) excess protein that goes to the liver to be converted into carbs loses around 30% of its net usable calories due to the energy required for that conversion.

The way we count calories is based on how many calories are in a meal vs the resulting scat, and that just isn't an accurate representation of how the body processes protein such that a protein-heavy diet doesn't have as many calories as you probably think it does, which makes it a healthy choice in an environment where most food-related health problems stem from overeating.

However I agree with your skepticism insofar as when they say "prioritizing protein" they probably mean "prioritizing meat," which is more suspect from a health standpoint and looks somewhat suspicious considering the lobbyists involved.

hxtk··on Web development is fun again
This goes further into LLM usage than I prefer to go. I learn so much better when I do the research and make the plan myself that I wouldn’t let an LLM do that part even if I trusted the LLM to do a good job.

I basically don’t outsource stuff to an LLM unless I know roughly what to expect the LLM output to look like and I’m just saving myself a bunch of typing.

“Could you make me a Go module with an API similar to archive/tar.Writer that produces a CPIO archive in the newcx format?” was an example from this project.

hxtk··on Web development is fun again
As I've gotten more experience I've tended to find more fun in tinkering with architectures than tinkering with code. I'm currently working on making a secure zero-trust bare metal kubernetes deployment that relies on an immutable UKI and TPM remote attestation. I'm making heavy use of LLMs for the different implementation details as I experiment with the architecture. As far as I know, to the extent I'm doing anything novel, it's because it's not a reasonable approach for engineering reasons even if it technically works, but I'm learning a lot about how TPMs work and the boot process and the kernel.

I still enjoy writing code as well, but I see them as separate hobbies. LLMs can take my hand-optimized assembly drag racing or the joy of writing a well-crafted library from my cold dead hands, but that's not always what I'm trying to do and I'll gladly have an LLM write my OCI layout directory to CPIO helper or my Bazel rule for putting together a configuration file and building the kernel so that I can spend my time thinking about how the big pieces fit together and how I want to handle trust roots and cold starts.

hxtk··on Unix "find" expressions compiled to bytecode
The latter sounds like a reimplementation of AIDE, which exists in major Linux distributions’ default package managers.

Did you ever compare what you wrote to that?

Page 1 of 6Next →