Sign in

Anton Zhiyanov

@antonz.org
337 followers 19 following 202 posts

Maintainer at github.com/nalgeon. Author at antonz.org

PostsRepliesMedia
Anton Zhiyanov @antonz.org · 26/09/2026
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-concurren...
antonz.org
Go concurrency distilled
Interactive mini-book on concurrent programming in Go.
0123
Anton Zhiyanov @antonz.org · 12/09/2026
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
antonz.org
Solod 0.4: Better C interop
A strict subset of Go that translates to regular C.
0111
Anton Zhiyanov @antonz.org · 02/09/2026
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 🫠
100
Anton Zhiyanov @antonz.org · 31/08/2026
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.
270
Anton Zhiyanov @antonz.org · 29/08/2026
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. These discussions go nowhere because no one really knows what the others mean.
1120
Anton Zhiyanov @antonz.org · 27/08/2026
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/...
1243
Anton Zhiyanov @antonz.org · 26/08/2026
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 like Raylib, Sodium, and SQLite.
190
Anton Zhiyanov @antonz.org · 25/08/2026
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
antonz.org
JSON evolution in Go: from v1 to v2
Reviewing the key changes in json/v2.
2427
Anton Zhiyanov @antonz.org · 24/08/2026
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/?sandb...
011
Anton Zhiyanov @antonz.org · 22/08/2026
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).
191
Anton Zhiyanov @antonz.org · 20/08/2026
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-freest...
antonz.org
Going freestanding
Porting Go's standard library to platform-agnostic C.
011
Anton Zhiyanov @antonz.org · 17/08/2026
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-go...
antonz.org
Detecting goroutine leaks with synctest/pprof
Explore different types of leaks and how to detect them in modern Go versions.
072
Anton Zhiyanov @antonz.org · 13/08/2026
Running the full Solod stdlib test suite takes 5 seconds (Clang on macOS). It's not as fast as a Go test suite of roughly the same size, but it's still fast enough to provide useful feedback while making changes.
130
Anton Zhiyanov @antonz.org · 10/08/2026
I expect the "javafication" of the Go ecosystem to continue with the addition of generic methods in Go 1.27. We probably won't see unnecessary generic abstractions in the standard library, but plenty of third-party code will gladly take advantage of this wonderful opportunity.
350
Anton Zhiyanov @antonz.org · 09/08/2026
Everyone is creating a new programming language these days, often one that's "like Go but with more features" or "like Rust but simpler". Solod, a systems language for C and Go developers, might look like one of those languages. But it takes a different approach.
261
Anton Zhiyanov @antonz.org · 07/08/2026
Cryptography is one of Go's underrated strengths. The standard library includes many cryptographic algorithms. They're all well-written, well-documented, reasonably concise, and thoroughly audited. Some of them are also very fast!
2171
Anton Zhiyanov @antonz.org · 06/08/2026
Solod now has a logo ☀️ I hope it helps the language really shine :)
030
Anton Zhiyanov @antonz.org · 05/08/2026
I'm starting to port Go's hashing packages to Solod (a subset of Go that translates to C). At first, I thought about porting MD5, but who actually uses it anymore? So I went with SHA-2 instead.
050
Anton Zhiyanov @antonz.org · 03/08/2026
One perfectly reasonable design decision after another. antonz.org/going-backward
antonz.org
Going Backward
Reinventing the generic iterator wheel.
150
Anton Zhiyanov @antonz.org · 27/07/2026
When I stopped writing interactive release notes for Go, I immediately started making them for Solod, the language I'm working on. I guess I just can't stop writing interactive notes 🤔
100
Anton Zhiyanov @antonz.org · 25/07/2026
Solod v0.3 is out! It's a system-level language with Go syntax, zero runtime, and fast C interop. The new release ships concurrency, JSON support, testing and benchmarking tools, and a wider safety net (escape analysis, leak checking, stack traces). antonz.org/solod-0.3
antonz.org
Solod 0.3: Concurrency, JSON, more safety
A strict subset of Go that translates to regular C.
091
Anton Zhiyanov @antonz.org · 22/07/2026
Adding concurrency to Solod (a subset of Go that translates to C) felt great. But my favorite feature in the upcoming release is preventing the most common kind of dangling pointer: returning a pointer to a local variable from a function.
140
Anton Zhiyanov @antonz.org · 21/07/2026
Go has 18 built-in functions (since Go 1.21; there were 15 before that). Personally, I use make, append and len all the time. I never use complex/real/imag or print/println. Everything else falls in between. How about you?
200
Anton Zhiyanov @antonz.org · 20/07/2026
I've put together my own crazy language ranking based on the number of sandbox runs in the Codapi playgrounds. As you can see, Lua is number one, Odin is more popular than C#, and Zig is more popular than C — which obviously doesn't quite reflect the reality 😅
100
Anton Zhiyanov @antonz.org · 16/07/2026
My Go Concurrency book is now available on Amazon: amazon.com/dp/B0H94S2G4K And, of course, it's still free to read on my website: antonz.org/go-concurrency With interactive examples!
032
Anton Zhiyanov @antonz.org · 15/07/2026
The entire Solod language implementation is under 5,000 lines of Go code, plus 700 lines of C built-ins and another 700 lines for tooling. This is only possible because Go's stdlib offers a great lexer and parser, along with a ready-made analysis package in x/tools.
0111
Anton Zhiyanov @antonz.org · 13/07/2026
I don't like the functional options pattern in Go, and I'm pretty disappointed that it ended up in the standard library with the new json/v2 package. An honest, plain Options struct is much better.
031
Anton Zhiyanov @antonz.org · 11/07/2026
Saying goodbye to interactive Go tours: antonz.org/on-go-tours
antonz.org
On interactive Go tours
Wrapping up the series.
550
Anton Zhiyanov @antonz.org · 10/07/2026
Can you match the state-of-the-art Go concurrency model using POSIX threads? Of course not. But what exactly is the difference, and how can you narrow the gap? Here's my take. antonz.org/concurrency-...
antonz.org
Go-flavored concurrency in C
Worker pools, channels, and mutexes - backed by pthreads.
070
Anton Zhiyanov @antonz.org · 05/07/2026
You might not remember, but one of the reasons Go was appreciated in the early 2010s was that it came with great tooling right out of the box, specifically for testing and benchmarking. Now Solod (a subset of Go that translates to C) is getting a testing tool too!
011
Anton Zhiyanov @antonz.org · 02/07/2026
Solod (a subset of Go that translates to C) is getting a concurrency model. Instead of Go's M:N goroutine scheduler, it uses an M:N thread worker pool with a task queue. Much simpler, but still pretty efficient.
040
Anton Zhiyanov @antonz.org · 26/06/2026
Solod v0.2 is out! It's a system-level language with Go syntax, zero runtime, and a familiar standard library. The new release ships networking, UUIDs, WebAssembly, and a freestanding mode. antonz.org/solod-v0-2
antonz.org
Solod v0.2: Networking, new targets, friendlier interop
A system-level language with Go syntax and a familiar standard library.
191
Anton Zhiyanov @antonz.org · 14/06/2026
Big day today! Solod (a subset of Go that translates to C) now comes with a networking package. It's pretty basic, but it's still an important step.
0150
Anton Zhiyanov @antonz.org · 31/05/2026
As you probably know, UUIDs — v4 and v7 — are finally coming to the Go standard library this summer! I decided to port them to Solod (a subset of Go that translates to C) right away. I also added the Version method, which the Go team chose to leave out.
0120
Anton Zhiyanov @antonz.org · 12/05/2026
Solod (a subset of Go that translates to C) now has a freestanding mode. Many standard library packages work fine without needing libc: bytes, strings, slices, maps, mem, math/bits, and utf8. Even the time package mostly works!
051
Reposted by Anton Zhiyanov
Josh Baker @tidwall.bsky.social · 10/05/2026
After many months of planning and development, here it is. Introducing btype. B-tree based collection types for Go. It's hand-crafted to be faster than the current B-trees for Go, Rust, and C++. github.com/tidwall/btype
1131025
Anton Zhiyanov @antonz.org · 09/05/2026
Adding WebAssembly support to Solod (a subset of Go that translates to C) was a breeze. I especially like the size of the resulting .wasm file: — Go: 1.7MB — TinyGo: 111KB — Solod: 9.5KB Who's tiny now, huh? 😁
4423
Anton Zhiyanov @antonz.org · 06/05/2026
Solod v0.1 is out! Go syntax, zero runtime, native C interop — now with a practical stdlib and a bunch of example applications. antonz.org/solod-v0-1
antonz.org
Solod v0.1: Go ergonomics, practical stdlib, native C interop
A system-level language with Go syntax and zero runtime.
152
Anton Zhiyanov @antonz.org · 02/05/2026
Many new programming languages lack practical examples. I don't want to make the same mistake. More apps are coming soon 💪
010
Anton Zhiyanov @antonz.org · 01/05/2026
Now a clanker can write Solod code for you. But where's the fun in that?
010
Anton Zhiyanov @antonz.org · 25/04/2026
Every day, Solod (a subset of Go that translates to C) gets closer to its first official release. Only two stdlib packages left to port — filepath and flag!
0141
Anton Zhiyanov @antonz.org · 16/04/2026
I've been fascinated by RISC-V lately. An open-source processor architecture is a great idea. I hope we'll see a lot more consumer devices and servers using RISC-V chips in the coming years. In the meantime, I've added support for linux/riscv64 to Solod (a subset of Go that translates to C).
080
Anton Zhiyanov @antonz.org · 14/04/2026
When Go introduced iterators in 1.23, they essentially standardized the "callback approach" to iteration, which was already used in some parts of the standard library, such as sync․Map and fs.WalkDir. I actively dislike it.
120
Anton Zhiyanov @antonz.org · 11/04/2026
Made a small progress bar for the first release of Solod (a subset of Go that translates to C). Not quite there yet, but a lot of work is already done!
080
Anton Zhiyanov @antonz.org · 06/04/2026
When I designed Solod (a subset of Go that translates to C), I set a strict rule: no heap allocations in the language or built-ins (only in the standard library). That meant no built-in maps.
100
Anton Zhiyanov @antonz.org · 05/04/2026
Maps are essential in application development. But Go's stdlib uses maps very cautiously. I've ported a dozen core Go packages to C so far and have encountered a map only a couple of times. The fewer maps, the better!
000
Anton Zhiyanov @antonz.org · 03/04/2026
Can a C port of the Go stdlib be faster than the original? I was able to get a 2-4x speed boost with strings.Builder, but couldn't beat Go's substring search. On porting, benchmarks, and optimization: antonz.org/porting-go-s...
antonz.org
Porting Go's strings package to C
With allocators, benchmarks, and some optimizations.
000
Anton Zhiyanov @antonz.org · 01/04/2026
Solod (a subset of Go that translates to C) shines when it comes to C interop. But it's also quite fast on regular Go code. In this strings.Builder benchmark — a common, optimized case in Go — Solod performs 2-4 times faster. And the binary is only 53K (vs. 1.6M with Go).
110
Anton Zhiyanov @antonz.org · 31/03/2026
While porting Go's standard library to C, I try to avoid heap allocations as much as possible. Of course, sometimes there's no way around them, like in os.ReadFile. But often I can use local stack allocations or a buffer provided by the caller instead. It's working pretty well.
010
Anton Zhiyanov @antonz.org · 29/03/2026
If you stare into Go's stdlib long enough, you start seeing things. Dark things. Things you weren't meant to see. Like this function that uses variables named φ and β.
2241