Klaus Post
@klauspost.com
📤 135
📥 48
📝 79
Making Go stuff go brrrrrrrrrrrrrrrrrrr
Compression library for
#golang
v1.18.2 released. If you are running v1.18.1 (specifically) please upgrade.
5 days ago
0
2
1
func ifElse[V any](cond bool, trueVal, falseVal V) V { if cond { return trueVal } return falseVal } At least it is more readable than ? :
24 days ago
0
2
0
Now even more
#golang
msgp codegen in v1.5.0. Now with generics. Generates code 1000x faster than your LLM! :D Give it a spin:
github.com/tinylib/msgp...
about 1 month ago
0
0
0
Released v1.18.1 of the
#golang
compression library. You know what to do! Link as always
github.com/klauspost/co...
about 1 month ago
1
9
1
Vibe coding is no joke. With good guidance and review it is extremely powerful.
3 months ago
0
1
0
reposted by
Klaus Post
Filippo Valsorda
3 months ago
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...
2
36
8
Why does my custom domain handle switch to "⚠ Invalid Handle" every month or so?
@support.bsky.team
3 months ago
0
0
0
Whoever did
#golang
"modernize" - thank you!
pkg.go.dev/golang.org/x...
loading . . .
modernize package - golang.org/x/tools/gopls/internal/analysis/modernize - Go Packages
https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize
3 months ago
0
1
4
Excellent blog post about hooking up Go into Java for erasure coding:
kohlschuetter.github.io/blog/posts/2...
loading . . .
Faster Reed-Solomon Erasure Coding in Java with Go & FFM
Backblaze’s Java-based Reed-Solomon Erasure Coding library is great tech, but comparatively slow. Let’s add some optimized Go, and get a whopping speedup.
https://kohlschuetter.github.io/blog/posts/2025/08/11/jagors/
4 months ago
0
8
4
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.
5 months ago
0
6
0
New
#golang
cpuid release. As always
github.com/klauspost/cp...
5 months ago
0
1
0
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.
5 months ago
0
4
1
🙄
#golang
6 months ago
0
1
1
Finally a
#golang
SIMD proposal I can get behind in overall terms! <3
github.com/golang/go/is...
loading . . .
proposal: simd: architecture-specific SIMD intrinsics under a GOEXPERIMENT · Issue #73787 · golang/go
Proposal Details SIMD is crucial for achieving high performance in many modern workloads. While Go currently allows access to SIMD via hand-written assembly, this approach has significant drawbacks...
https://github.com/golang/go/issues/73787
7 months ago
0
3
1
Would a
#golang
MinLZ compressor level with a better "worst case" speed be useful? Overly dramatic example...
7 months ago
1
1
0
Realizing I needed to add a mutex to protect an RNG call, I almost ended up with this.... Need more coffee 🫘
7 months ago
0
0
0
Sent in in. Now I can only 🤞
7 months ago
0
4
0
Now
@klauspost.com
- wish that my old profile link would redirect to my new one, though.
@bsky.app
8 months ago
0
0
0
cmp.Or is so neat for error handling in
#golang
- just remember that *all* params are evaluated in order, and first error is returned.
8 months ago
1
8
0
I with just released about 2 years of work on improving compression with a fixed encoding LZ77 style compressor for
#golang
Our goal was to improve compression by combining and tweaking the best aspects of LZ4 and Snappy. Check it out:
github.com/minio/minlz
loading . . .
GitHub - minio/minlz: MinLZ is a LZ77 compressor, focused on realtime data compression
MinLZ is a LZ77 compressor, focused on realtime data compression - minio/minlz
https://github.com/minio/minlz
9 months ago
3
35
11
New
#golang
compression package release. Mainly focused on non-assembly performance. Now uses "unsafe" - use "nounsafe" tag to disable. As always here:
github.com/klauspost/co...
10 months ago
0
3
1
Wait? The
#golang
github.com/golang/snappy
has been archived? Any background on this?
10 months ago
0
0
0
Time to upgrade all CI scripts ;)
add a skeleton here at some point
10 months ago
0
0
0
Helped a friend a bit to make a
#golang
concurrent version of the excellent age stream format by
@filippo.abyssdomain.expert
Check it out if it sounds interesting:
github.com/bifrosta/age...
loading . . .
GitHub - bifrosta/age-concurrent
Contribute to bifrosta/age-concurrent development by creating an account on GitHub.
https://github.com/bifrosta/age-concurrent
10 months ago
1
13
3
Average shopping experience on
@bandcamp.com
10 months ago
0
1
0
😜
10 months ago
0
3
0
reposted by
Klaus Post
Peter Hellberg
10 months ago
The
@fireflyzero.bsky.social
ROM file format is a Zip archive compressed with Zstandard. For fun I wrote a small CLI in Go to extract these using the lovely compress module by
@klauspost.bsky.social
(Note that you could just as well use `firefly_cli import <file>`)
gist.github.com/peterhellber...
loading . . .
A quick and dirty decompressor for Firefly Zero carts (Which are Zip files compressed using ZSTD)
A quick and dirty decompressor for Firefly Zero carts (Which are Zip files compressed using ZSTD) - unzipzstd.go
https://gist.github.com/peterhellberg/6402e95154d57ef8ac886f6b36c398d1
3
3
1
Pretty fast, pretty random, endless, seekable
#golang
Reader:
pkg.go.dev/github.com/m...
(16KB internal block of random data, xor with 32B value based on offset ⊕ per instance value) Made for benchmarks, not crypto, it is trivially predictable. ~20GB/s with Go single core. ~60GB/s with amd64 asm.
loading . . .
rng package - github.com/minio/pkg/v3/rng - Go Packages
https://pkg.go.dev/github.com/minio/pkg/
[email protected]
/rng#Reader
11 months ago
0
2
0
doom-captcha.vercel.app
loading . . .
DOOM® CAPTCHA
Prove you're human by playing DOOM
https://doom-captcha.vercel.app/
11 months ago
0
0
0
My album of 2024: Vows by MATTE BLVCK Simply an all-killer album, that just keeps developing. Styles vary between tracks, but solid all the way the way through, with a modern touch and even some instrumentals. Check it out if you are a bit into dark synth:
matteblackus.bandcamp.com/album/vows
loading . . .
Vows, by MATTE BLVCK
9 track album
https://matteblackus.bandcamp.com/album/vows
11 months ago
1
1
0
Best 5 minute TLDR of CGO in
#golang
I can think of. Maybe a bit overstated, but an "approach with caution" is probably a good takeaway from a 5 minute video.
youtu.be/8mU7KIF6l-k
loading . . .
Why CGO is Dangerous
YouTube video by Rachel Lettuce
https://youtu.be/8mU7KIF6l-k
11 months ago
0
4
0
Teaser for next year :)
11 months ago
1
3
0
How many % speed improvement is worth it for "unsafe" in
#golang
? Should build tags be opt-in or opt-out?
12 months ago
1
0
0
Is it just me, or can we drop "naming things" in favor of "timeouts" in "two hard things in computer science"?
12 months ago
1
2
0
Trying something new: Pop-up coliving/coworking. I will be in Bansko, Bulgaria in June next year. Join if you also want to try digital-nomad-lite. Driving from .dk - so DM if you want a lift from along the route. Link if you are interested:
casabasilico.online/coliving-ban...
loading . . .
Coliving Bansko Bulgaria
Casa Basilico next adventure is in Bansko, Bulgaria. We offer private rooms are going to cook pasta every night!
https://casabasilico.online/coliving-bansko-bulgaria
about 1 year ago
0
4
0
Double negative... Most intuitive example... I *guess* this means `if (s3:if-none-match == null) == false`
about 1 year ago
0
0
0
Love how javascript games are basically open source (ok, "source available" for the zealots). Let me just add some more coins.....
about 1 year ago
0
1
0
This issue feels like a
#golang
job interview.. So I made it one :D Here if you want a serious challenge (less allocs = better):
go.dev/play/p/M-O6r...
about 1 year ago
1
1
0
Hello Blue Sky
about 1 year ago
0
4
0
you reached the end!!
feeds!
log in