Pinned Tweet
New interactive mini-book: Go concurrency distilled

It gives a brief overview of many concurrency topics in Go, along with examples you can run in the browser. There's also a PDF version.

The book is AI-free.

antonz.org/go-concurrency…
12
85
656
35,997
The situation where a certificate's private key only has 8 bits of randomness instead of 384 is unacceptable.

We should urge all certificate authorities to immediately publish their private keys so that the community can make sure they are random enough.
38
152
3,500
42,019
Given the slop madness happening around, I think I'll switch back to small-scope projects with minimal or no AI usage.

A perfect example so far is Be — a 150-line test assertions package in Go.

github.com/nalgeon/be
2
2
52
2,145
You may have already heard, but the core SQLite team is working on Vec1 — native vector search (ANN) in SQLite.

It supports Euclidean (L2) and cosine distances, and uses SIMD for fast vector operations.

Vec1 is already feature-complete. The only things left are improving test e optimizations.

sqlite.org/vec1
8
57
612
27,762
Solod v0.4 is out!

It's a system-level language with Go syntax, zero runtime, and fast C interop.

The new release ships an automatic C bindings generator, freestanding mode for most of the standard library, and even some Windows support 😅

antonz.org/solod-0.4
7
13
146
6,835
This esteemed function in Go's standard library reads the mantissa and exponent from a string and returns seven individual values.

I guess someone really hated structs, huh 🫠
1
0
49
5,750
This Go expression is a bit unconventional, but it's completely valid:

error.Error(errors.ErrUnsupported)

"errors.ErrUnsupported" is a real, though less well-known, error value defined in the errors package.

"error" is a real interface type, and "Error" is its method.

And method like a regular function, these two calls are equivalent:

var err = errors․New("oops")
err.Error() // "oops"
error.Error(err) // "oops"

So error.Error(errors.ErrUnsupported) is just "unsupported operation"

🤓
1
4
63
15,121
What do you think of this Go expression?
error.Error(errors.ErrUnsupported)
0
0
1
1,661
I have no idea why developers hate examples so much.

Sometimes, I'll see a Go proposal discussion with 50 comments where people argue back and forth, but no one gives a single example about what they're talking about.

To me, that's just crazy — these kinds of discussions go nowhere because no one really knows what the others mean.

Anyway, if you like examples and learning by doing, check out the "Try X in Y minutes" series — interactive guides from C and Postgres to Caddy and Ripgrep.

Or maybe even contribute a guide for your favorite language or tool!

antonz.org/try-x-in-y-min…
10
13
272
15,728
I've updated the "Go features by version" list with the latest changes from 1.27.

This is not a replacement for release notes, but rather a quick summary of major features in any given Go version.

antonz.org/go-features/#1…
1
10
89
4,012
One of Solod's strengths is its zero-overhead C interop. So I took a break from working on the standard library and made a tool that generates Solod bindings for any C library from its headers.

To get started, I also created bindings for some popular C libraries:

— Raylib — Sodium — cryptography and hashing.
— SQLite — in-process database engine.
— Libuv — asynchronous I/O.

github.com/solod-dev/solo…

Now, back to the stdlib :)
7
5
74
6,661
The new JSON package is finally production-ready in Go 1.27, so I've updated my JSON v2 guide.

It explains all the main differences between the json and json/v2 packages, with interactive examples for each one.

Check it out!

antonz.org/go-json-v2
2
35
257
15,578
Anton Zhiyanov retweeted
Latest release of scc v4.0.0 with a blog post, as it starts moving into the code intelligence space boyter.org/posts/sloc-clo…
1
2
8
5,162
Postgres 19 introduces native graph queries (following the SQL/PGQ spec — Property Graph Queries).

It's currently in beta, but if you want to try the graphs feature, I've set up an online playground:

codapi.org/embed/?sandbox…
4
5
46
1,963
My favorite thing about Zig isn't the language itself, but "zig cc".

You can say it's just a "Clang wrapper", but it makes C cross-compilation a lot easier than using Clang on its own.

Need a RISC-V musl build? Just pass target=riscv64-linux-musl. Want bare WebAssembly? target=wasm32-freestanding. How about Windows on ARM? target=aarch64-windows-gnu.

Very convenient.
13
16
263
23,267
Yep! chDB is the DuckDB of the ClickHouse ecosystem (no offense to either party — both are great).

Here's an interactive guide, by the way: antonz.org/trying-chdb
codapi's sandbox collection ships a chDB box: runnable SQL snippets for your docs, in a 256MB container. The runner opens one chdb Session per snippet, so a CREATE TABLE and the SELECT after it share state.

github.com/nalgeon/sandbo…

@ohmypy
1
1
36
5,442
I compiled a Solod program that imports 30 stdlib packages to WebAssembly and did the same with Go and TinyGo.

Solod's binary is 2x smaller than TinyGo's and 16x smaller than Go's 😎

All three binaries are fully self-contained (WASIp1).
9
5
170
6,847
I wish people submitting 100% AI-written PRs would at least start with a paragraph written by a human.

Or maybe I'm expected to have another AI review and merge the PR while I "focus on the ideas"?

What a time to be alive 😅
1
0
16
1,152
Building a freestanding standard library isn't something you can do in one afternoon, but it's still quite feasible.

Here's the approach I used:

antonz.org/going-freestan…
2
7
49
3,529
The goroutine leak detector will become generally available in Go 1.27.

But did you know you can also use synctest (Go 1.25+) to catch goroutine leaks in tests?

See how the two approaches compare:

antonz.org/detecting-goro…
2
20
212
8,354