1,425 karma · joined Dec 2, 2015 (10y ago) · 427 submissions
Paratrooper to programmer.
http://github.com/jschaf
hn@schafer.dev
comment 3d ago · link · parent
> You begin high-level and then dive into the details.
Also common in writing as tl;dr or bottom line up front (BLUF).
For a more detailed treatment, see Tufte: https://diverdi.colostate.edu/all_courses/%20oral%20presenta...
comment 1mo ago · link · parent
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.
comment 1mo ago · link · parent
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.
comment 2mo ago · link · parent
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...
comment 7mo ago · link · parent
[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
comment 7mo ago · link · parent
comment 8mo ago · link · parent
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.
comment 8mo ago · link · parent
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.
comment 11mo ago · link · parent
Here’s a good issue describing the tradeoffs between a lock table and advisory locks.
comment 1y ago · link · parent
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...