HNHacker News
TopNewBestAskShowJobs

sa46

1,423 karma · joined December 2, 2015

Building AI for distributors, contractors, and manufacturers.

Paratrooper to programmer.

http://github.com/jschaf

hn@schafer.dev

submissionscomments
sa46··on JetBrains Thinkrail
IntelliJ supports pretty decent GitHub code review in the editor. It shows the modified code in the gutter and review comments.

I use it when I need to deeply understand a PR.

sa46··on The United Kingdom generates less electricity per person than in the 1970s
Has anyone done this on the cheap? I've gotten a few quotes with a payback period of 8-12 years, which isn't great.
sa46··on Our AI Midwife
> but this time the author and his wife pushed harder for it to happen

This is the essence of how to make the medical system work for you. Advocate for yourself. AI helps know what to ask, why you should ask, and how to get past the first few layers of dismissals.

sa46··on As A.I. makes law firms more efficient, clients ask: 'Where's my discount?'
I understood the OP's point as follows:

The fee agreement was an hourly rate for producing a legal document. The resulting document looks like it took 10 seconds to produce. The lawyer billed $1000 worth of hours.

So, either the document was much more complex than anticipated (in which case the lawyer should have said so), or the lawyer inflated the hours.

sa46··on As A.I. makes law firms more efficient, clients ask: 'Where's my discount?'
The difference is that lawyers typically charge by the hour. Software is not sold based on how long it took to create.

So, if a lawyer bills $1000 for "10 seconds of work", it smells fraudulent.

If $1000 was a flat rate, then it's similar to software: you're purchasing some IP and passing off legal liability to the lawyer. How long the lawyer spent on it doesn't matter.

sa46··on Platform-independent SIMD in Go
> But you also went 13 years without generics

Go shipped with generics (aka bounded parametric polymorphism), but only for built-in types: slices, arrays, and maps. That, with subtyping via interfaces, handled most demand for generics. The most common pain point was custom containers.

Go was first released in November 2009. Russ Cox posted "The Generic Dilemma" [1] in December 2009. The comments show the generics debate raging from the earliest days.

As a fun side note, I forgot I posted a comment on that post pointing to Ada's generics. I was in college, and Ada was our intro language.

[1]: https://research.swtch.com/generic

> the designers didn't want that complexity inside Go.

Yes, with some nuance. Go's goal of writing server programs didn't require the type-system complexity and run-time hit of user-defined generics. [2]

> Go was intended as a language for writing server programs [...] Polymorphic programming did not seem essential [...] so was initially left out for simplicity. > > Generics are convenient but they come at a cost in complexity in the type system and run-time. It took a while to develop a design that we believe gives value proportionate to the complexity.

[2]: https://go.dev/doc/faq#beginning_generics

Out of curiosity, I collected all proposals for Go's journey to generics. https://gist.github.com/jschaf/eaa7aff1af14ea7276a18a1b7370d...

sa46··on We made Playwright 2x faster and 80% more token efficient
Tests typically drive the browser on the same machine. What round trip are we talking about here? Process-to-process over CDP?
sa46··on I accidentally turned LLM memory into program analysis
Weather is fun choice since it’s a contronym. It has opposing definitions: to endure and to erode.

“He weathered the storm” vs “the stone weathered into an arch”.

sa46··on Codefloe Is a Professionally Hosted Public Git Forge
That’s a great blog post, lots of details, helpful animations, historical context, and an interspersing of war stories.

https://cursor.com/blog/git-at-any-scale

sa46··on GitHub degradation affects Cursor Origin, its new Git platform
I was confused. The title is bad. “its” is ambiguous and usually refers to the first subject in this sentence structure.
sa46··on The Dunning-Kruger effect may just be a data artefact (2020)
Weird take. The author corresponded with Dunning and reproduced the classic graph using random data.
sa46··on Incident Report: May 19, 2026 – GCP Account Suspension
Railway has an overwhelming incentive to pin the blame on Google. This report doesn't answer why Google suspended Railway's account.

I'd wait for more details before adjudicating.

sa46··on Zero-copy protobuf and ConnectRPC for Rust
Presumably, OP refers to the generated rust types which depend on the specific protobuf framework.

I had the same issue when looking to adopt ConnectRPC for Go, which uses a custom wrapper type to model requests.

sa46··on Ada, its design, and the language that built the languages
It might interest you to know JS has real private fields, formally introduced in ES2022. [1]

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

sa46··on A tail-call interpreter in (nightly) Rust
A new Go protobuf parser [1] made the rounds here eight months ago [2] with a specialized VM that outperforms the default generated protobuf code by 3x.

[1]: https://mcyoung.xyz/2025/07/16/hyperpb/

[2]: https://news.ycombinator.com/item?id=44591605

sa46··on France's aircraft carrier located in real time by Le Monde through fitness app
About 15 years ago, our brigade conducted a training exercise to test overall readiness. The opposing force (OPFOR) figured out how to triangulate the brigade headquarters' position using Tinder.

Tinder provided 1-mile granularity, so OPFOR would roam around until they had enough points to locate the headquarters. Then, they'd artillery it out of existence. The brigade commander was most displeased—moving a brigade headquarters is not for the weak or fainthearted.

sa46··on A case for Go as the best language for AI agents
govulncheck analyzes symbol usage and only warns if your code reaches the affected symbol(s).

I’m not sure about cargo audit specifically, but most other security advisories are package scoped and will warn if your code transitively references the package, regardless of which symbols your code uses.

sa46··on Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust
The problem is that pre-commit hooks are much slower with a much higher false-positive rate than type checking.

Pre-commit checks should be opt-in with CI as the gate. It's useful to be able to commit code in a failing state.

sa46··on Un-Redactor
Wouldn’t a mono space font provide more information since you can extrapolate the exact number of characters?
sa46··on Go ahead, self-host Postgres
I’ve been very happy with Pganalyze.
sa46··on Locks in PostgreSQL: 3. Other locks (2020)
Advisory locks aren’t all sunshine and rainbows. They can only be unlocked by the Postgres connection that acquired the lock. That means you need to track the connection, typically by dedicating a connection to the job that needs locking.

Here’s a good issue describing the tradeoffs between a lock table and advisory locks.

https://github.com/bensheldon/good_job/discussions/831

sa46··on Transparent leadership beats servant leadership
That's quite a strong claim. I disagree. Military leadership, like business leadership, is imperfect. Both vary based on individuals, the operating environment, and culture.
sa46··on In a U.S. First, New Mexico Opens Doors to Free Child Care for All
Depends on the state and child age. California is on the stricter end of legally mandated ratios:

0-18 months: 1:3

18 months to 3 years: 1:4

3-5 years: 1:5

sa46··on Cursor: Past, Present, and Future
Trickle-down titles? I’m familiar with operator to refer to tier-1 special operations personnel like Seal Team 6 and Delta Force.
sa46··on The myth of outrunning your diet
Sold if you provide a rock or something.
sa46··on The myth of outrunning your diet
Weight loss in Ranger School is additionally “aided” by limiting students to 2 MREs per patrol day (2400 calories) to increase stress.

Anecdotally, I lost 26 lbs in Ranger School.

sa46··on Go subtleties
Why not use the standard-library adjacent semaphore package?

One problem with using a channel as a semaphore is you need to track if you've closed the channel when "releasing".

https://pkg.go.dev/golang.org/x/sync/semaphore#Weighted.Acqu...

sa46··on Private equity is sitting on $5T of existential dread
None of those situations imply the business was poorly run.
sa46··on Private equity is sitting on $5T of existential dread
> Think about it, if a business is fairly priced and well run, PE firms have no incentive to buy it because where do they generate returns?

PE has access to business models unavailable to the original owner.

- Buy all local dentist clinics at an enticing markup then increase rates.

- Buy businesses and migrate them to tech where the PE firm holds an advantage. For example, a PE firm that runs its own payment gateway.

- Buy a business that complements a larger business to reduce churn or increase sales.

sa46··on CPU cache-friendly data structures in Go
Go is certainly capable of async programming. https://en.wikipedia.org/wiki/Asynchrony_(computer_programmi...

> The goroutines run in parallel. Also, don't use complicated words when simple words will do.

That’s not called for, especially since you’re wrong.

Page 1 of 15Next →