Hacker Newsnew | past | comments | ask | show | jobs | submit | sa46's commentslogin

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.


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.


No one forces you to install the pre-commit hook on your local checkout so what you're suggesting is universally the case. You're perfectly free to just run it manually or let it fail in CI or use `--no-verify` when committing to skip the hook if you install it.


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


My guess is that is actually less information than you get from a variable width font.


Either way, fixed or with index lines.


I’ve been very happy with Pganalyze.


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


Do people use advisory locks as the actual locking mechanism? I've always used them to synchronize access to a flag on the target resource, so the advisory lock is only held long enough to query or update that resource as locked. The alternative seems, yes, incredibly brittle.


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.


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


Trickle-down titles? I’m familiar with operator to refer to tier-1 special operations personnel like Seal Team 6 and Delta Force.


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.


I'll give you my jalapeno cheese and crackers for your strawberry dairy shake


Sold if you provide a rock or something.


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...


> is you need to track if you've closed the channel

There is where you can use a function that captures the channel and guarantees that no matter how many times it is called that it only closes the channel once.


I don’t like libs


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: