Anton Zhiyanov
antonz.org
Anton Zhiyanov
@antonz.org
Open source maintainer at https://github.com/nalgeon. Author & educator at https://antonz.org
Pinned
Gist of Go: Concurrency is out!

Learn Go concurrency from the ground up with 50 auto-tested exercises and tons of interactive examples.

It's a full course + book in one.

antonz.org/go-concurrency
Reposted by Anton Zhiyanov
How to implement "defer" keyword in C (allows to free memory and other resources correctly): implementations with C23/GCC, C11/GCC, GCC/Clang... - Blog Post by Anton Zhiyanov @antonz.org #Programming antonz.org/defer-in-c/
(Un)portable defer in C
Eight ways to implement defer in C.
antonz.org
February 13, 2026 at 8:05 AM
What makes modern systems languages stand out? Many things — but allocators are a big one.

Let's explore how Rust, Zig, Odin, C3, and Hare design their allocators, and then build one in C!

antonz.org/allocators
Allocators from C to Zig
Exploring allocator design in C, C3, Hare, Odin, Rust, and Zig.
antonz.org
February 12, 2026 at 12:34 PM
Go 1.26 is out, and the announcement says:

"Over the next few weeks, follow-up blog posts will cover some of the topics in more detail. Check back later."

So you can wait a few weeks OR you can read my interactive Go 1.26 tour right away:

antonz.org/go-1-26
Go 1.26 interactive tour
New with expressions, type-safe error checking, and faster everything.
antonz.org
February 11, 2026 at 1:33 PM
SwissTable, a high-performance open-addressing hash map originally developed by Google, is becoming more popular in the industry.

First, Rust adopted it for its HashMap type. Then Go started using SwissTable for its map type.

And now — Valkey. Pretty cool!

valkey.io/blog/new-has...
Valkey: A new hash table
Designing a state-of-the art hash table
valkey.io
February 10, 2026 at 4:18 PM
Fancy an allocator in C? It's not Zig, but it's honest work.
February 8, 2026 at 10:13 AM
We don't need to wait for "defer" to be added to the C standard. We already have defer at home!

antonz.org/defer-in-c
(Un)portable defer in C
Eight ways to implement defer in C.
antonz.org
February 5, 2026 at 12:33 PM
The only two features I really miss in C at this point are namespaces and defer.
February 4, 2026 at 5:43 PM
With Go 1.26, you can easily log to multiple targets (like stdout, a file, or a remote server) using just the standard library.

All thanks to slog.MultiHandler, which sends log records to any number of handlers you configure.
January 29, 2026 at 2:56 PM
Who says we can't have nice things in C?

antonz.org/interfaces-i...
Interfaces and traits in C
Implemented with structs and function pointers.
antonz.org
January 22, 2026 at 12:21 PM
With Go 1.26, you can peek into a byte buffer if you're that curious.

The new Buffer.Peek method in the "bytes" package returns the next N bytes from the buffer without advancing it.

The slice returned by Peek is not a copy; modifying it changes the buffer.
January 20, 2026 at 11:33 AM
The most controversial change in Go 1.26 is probably the "reader-less" cryptography.

Current cryptographic APIs, like ecdsa.GenerateKey, often accept an io.Reader as the source of random data:

ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
January 14, 2026 at 3:25 PM
So the second most imported 3rd-party dependency is Google's own UUID package. I wonder what it would take to convince the Go team to add it to stdlib.

Also, I don't think x/crypto and x/net should be here at all. Both are imported by stdlib itself, so they're basically included in every project.
January 11, 2026 at 12:44 PM
Go 1.26 brings the long-awaited vectorized operations (SIMD) in the simd/archsimd package.

Since it's hard to create a portable high-level API, the Go team decided to start with a low-level, architecture-specific one and support only amd64 for now.
January 9, 2026 at 11:24 AM
Go 1.26 received a somewhat under-the-radar language change: recursive type constraints in generics.

Previously, type constraints couldn't directly or indirectly refer to type parameters.

January 8, 2026 at 12:46 PM
Hey @thepudds.bsky.social! Thanks for io.ReadAll in Go 1.26 :)

Why did you choose to use append-make instead of just make for the final slice?

Using append-make sets the slice capacity to the next size class, which seems to go against the idea of having a "perfectly-sized slice", doesn't it?
January 6, 2026 at 2:44 PM
Go 1.26 is coming soon, and the official release notes are pretty dry.

So I prepared an interactive version with lots of examples.

Read on and see!

antonz.org/go-1-26
Go 1.26 interactive tour
New with expressions, type-safe error checking, and faster everything.
antonz.org
January 5, 2026 at 1:40 PM
I've built playgrounds for C3, Hare, Odin, V, and Zig 🤓

You can try them online, embed them on your own website, or self-host and customize.

antonz.org/better-c
'Better C' playgrounds
Playgrounds for C3, Hare, Odin, V, and Zig.
antonz.org
December 27, 2025 at 10:19 AM
Over the years "go fix" became a sad, neglected bag of rewrites for very ancient Go features.

But it's coming back in Go 1.26!

Meet the new "go fix" — reimplemented from scratch, powered by a solid backend, and packed with modern code fixes!

antonz.org/accepted/mod...
Go feature: Modernized go fix
With a fresh set of analyzers and the same backend as go vet.
antonz.org
December 21, 2025 at 10:11 AM
The goroutine leak profile in the upcoming Go 1.26 is a big deal.

But the synctest package, available since 1.24, can also catch leaks just fine. I don't know why no one talks about this.

Anyway, it's time to cover both of them!

antonz.org/detecting-go...
Detecting goroutine leaks in modern Go
Explore different types of leaks and how to detect them with synctest and pprof.
antonz.org
December 18, 2025 at 2:55 PM
I've updated all code sandboxes (say hello to Python 3.14 and Java 25), and added more languages — Dart, Swift, Haskell and Prolog.

Handy for trying a new language online or embedding interactive snippets into your writing.

codapi.org#sandboxes
December 14, 2025 at 2:15 PM
Gist of Go: Concurrency is out!

Learn Go concurrency from the ground up with 50 auto-tested exercises and tons of interactive examples.

It's a full course + book in one.

antonz.org/go-concurrency
December 12, 2025 at 11:10 AM
I added an important part that was missing from the Go Accepted series: the contributors!

These are the people who design and implement the proposals, making it possible for us to enjoy new features and improvements in future Go versions 🫡

Send them some love :)

antonz.org/tags/accepted
December 11, 2025 at 2:03 PM
Accepted! Go 1.26 will include a SECRET package. Don't tell anyone about it 🤫

Just kidding. The package wipes the memory to keep secrets safe — hence the name.

antonz.org/accepted/run...
Go proposal: Secret mode
Automatically erase memory to prevent secret leaks.
antonz.org
December 9, 2025 at 10:31 AM
The new chapter of my Go Concurrency book covers the scheduler and its implementation details.

It's not meant to be a deep dive. But it's short, easy to understand, and will teach you more about goroutine scheduling than many other developers know.

antonz.org/go-concurren...
Gist of Go: Concurrency internals
CPU cores, threads, goroutines, and the scheduler.
antonz.org
December 5, 2025 at 10:28 AM
Accepted! Go 1.26 will introduce errors.AsType — a modern, type-safe alternative to the clunky errors.As.

No reflection. No runtime panics. Concise code. This is big!

antonz.org/accepted/err...
Go proposal: Type-safe error checking
errors.AsType is a modern alternative to errors.As.
antonz.org
December 2, 2025 at 10:07 AM