Klaus Post
@klauspost.com
130 followers 48 following 74 posts
Making Go stuff go brrrrrrrrrrrrrrrrrrr
Posts Media Videos Starter Packs
klauspost.com
Vibe coding is no joke. With good guidance and review it is extremely powerful.
Reposted by Klaus Post
filippo.abyssdomain.expert
TIL that you can compress .zip files with Zstandard (pkware.cachefly.net/webdocs/case... compression method 93), and that libzip and 7-Zip support that.

libzip.org/news/release...
github.com/ip7z/7zip/re...
klauspost.com
Why does my custom domain handle switch to "⚠ Invalid Handle" every month or so? @support.bsky.team
klauspost.com
Un-archived github.com/klauspost/cr... repo after getting a bit more than 2x on IEEE CRC32 using AVX512. Will submit upstream to #golang, but if you want to test it out early check out the repo.
Benchmark of IEEE CRC32.
klauspost.com
New #golang cpuid release. As always github.com/klauspost/cp...
klauspost.com
IMO #golang is missing a clean way to send exact typed (and wrapped) errors across the wire between 2 similar binaries.

GOB would be ok, but registration isn't really feasible in big applications.
klauspost.com
This kinda implies that it is all 32 bit systems?
klauspost.com
Album sounds amazing! On my wishlist for next Bandcamp Friday!
klauspost.com
most are more like this....
klauspost.com
Would a #golang MinLZ compressor level with a better "worst case" speed be useful? Overly dramatic example...
klauspost.com
Realizing I needed to add a mutex to protect an RNG call, I almost ended up with this.... Need more coffee 🫘
klauspost.com
Sent in in. Now I can only 🤞
klauspost.com
Now @klauspost.com - wish that my old profile link would redirect to my new one, though. @bsky.app
klauspost.com
Yeah, that is what I tried to say. You definitely have to be aware of the difference to a() || b() || c() that terminates.

Not a solution for everything, but pretty good when you want everything to run unconditionally.
klauspost.com
cmp.Or is so neat for error handling in #golang - just remember that *all* params are evaluated in order, and first error is returned.
// serialize serializes p as json.
func (p *someThing) serialize() ([]byte, error) {
	var dst bytes.Buffer
	comp := minlz.NewWriter(&dst)
	err := cmp.Or(json.NewEncoder(comp).Encode(p), comp.Close())
	return dst.Bytes(), err
}
klauspost.com
Don't waste your money. It's just a cover band.
klauspost.com
Photek is a name I haven't heard for many years - in both meanings. Sounds good still!
klauspost.com
Would have loved to participate, but other stuff is in the way. So fun and well-organized! <3