HN user

sa46

1,394 karma

Building AI for distributors, contractors, and manufacturers.

Paratrooper to programmer.

http://github.com/jschaf

hn@schafer.dev

Posts0
Comments410
View on HN
No posts found.

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.

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.

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.

Un-Redactor 7 months ago

Wouldn’t a mono space font provide more information since you can extrapolate the exact number of characters?

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.

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.

Page Object (2013) 10 months ago

Page Object Models trade off clarity for encapsulation [and] obscure what's actually happening.

This argument also applies to using a function for abstraction.

I've just written a few dozen e2e tests with Playwright. The code looks like:

    await invoiceDetailPage.selectCustomer(page, 'Acme');
    await invoiceDetailPage.selectCustomerPoNumber(page, '1234567890');
    await invoiceDetailPage.setCustomerReleaseNumber(page, '987654321');
    ...10-15 more lines
Each of those lines is 3 to 20 lines of Playwright code. Aggressive DRY is bad, but Page Object Models are usually worth it to reduce duplication and limit churn from UI changes.

Veterans is just another word for retired military personnel.

A sergeant who leaves after a three-year enlistment is a veteran, but not a retiree.

The distinction matters because military retirees retain some privileges from their service, most importantly, a pension. Those privileges mean retirees fall under the emoluments clause.

However, a veteran not receiving retired pay is not subject to the emoluments clause as they have no relationship with the federal government. The Congressional Research Service states:

Former servicemembers with no military status and not entitled to military retired pay can perform [foreign military service] on the same basis as a U.S. national who never served in the armed services. [1]

Interestingly, this implies a retiree could forfeit their retired pay to avoid being subject to the emoluments clause.

[1] https://www.congress.gov/crs-product/IF12068

This uses global state under the hood.

Looks safe to me. It uses `crypto/rand.Read` which is declared as safe for concurrent use. The cache is accessed via sync.Pool which is thread safe. As a check, I ran the tests with `-race` and it passed.

Funny timing—I tried optimizing the Otel Go SDK a few weeks ago (https://github.com/open-telemetry/opentelemetry-go/issues/67...).

I suspect you could make the tracing SDK 2x faster with some cleverness. The main tricks are:

- Use a faster time.Now(). Go does a fair bit of work to convert to the Go epoch.

- Use atomics instead of a mutex. I sent a PR, but the reviewer caught correctness issues. Atomics are subtle and tricky.

- Directly marshal protos instead of reflection with a hand-rolled library or with https://github.com/VictoriaMetrics/easyproto.

The gold standard is how TiDB implemented tracing (https://www.pingcap.com/blog/how-we-trace-a-kv-database-with...). Since Go purposefully (and reasonably) doesn't currently provide a comparable abstraction for thread-local storage, we can't implement similar tricks like special-casing when a trace is modified on a single thread.

“Simply declaring” is inaccurate description of the Go team’s decision. The team built several proposals, reviewed dozens more, and refined the process by gathering user feedback in multiple channels.

The Go team thoroughly explored the design space for seven years and did not find community consensus.