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 · 10/09/2026
The Go team is lucky to have you!
030
Anton Zhiyanov @antonz.org · 02/09/2026
Since no one is defending the code author, I guess I'll do it myself :) I haven't actually benchmarked it, but in this case, returning seven values might be justified — if they're passed to the caller through registers instead of the stack. I doubt the author really avoided structs for no reason.
100
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
Of course! f := error.Error println(f(errors.ErrUnsupported)) // unsupported operation
010
Anton Zhiyanov @antonz.org · 31/08/2026
Since you can call any 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" 🤓
020
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 · 30/08/2026
You are right to push
010
Anton Zhiyanov @antonz.org · 29/08/2026
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-m...
antonz.org
Try X in Y minutes
Get a quick taste of your next $thing by studying interactive examples in the browser.
060
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 · 28/08/2026
Can't get excited about the new features anymore. Given the number of people writing about Go, I'd rather focus on other topics that genuinely interest me.
010
Anton Zhiyanov @antonz.org · 28/08/2026
Let me know if you decide to try Solod and have any questions. Happy to help :)
010
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
Your book is really unique! I wish more people would use Go for things besides server programming and tools.
000
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
My pleasure :)
000
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 · 16/08/2026
Sure! Steal like an artist 😁
010
Anton Zhiyanov @antonz.org · 15/08/2026
The Uses and Now sections are an interesting approach 👍
100
Anton Zhiyanov @antonz.org · 13/08/2026
Enabling the address and undefined-behavior sanitizers increases the execution time to 15 seconds, so I usually run them only after everything else is working properly. The slowest ones are GCC container runs with sanitizers or the analyzer. They take 30 to 40 seconds 🫠
000
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
You'll need those Java skills to navigate an inheritance hierarchy implemented with type embedding and generic methods. What a time to be alive!
010
Anton Zhiyanov @antonz.org · 10/08/2026
Honestly? I don't like type embedding in the first place. Once you start adding behavior to embedded types, it's very easy to misuse them and write code that's difficult to maintain. I think Go would be better without type embedding.
010
Anton Zhiyanov @antonz.org · 10/08/2026
I've seen what some people do with struct and interface embedding. Things I can't unsee now.
200
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
Oh great, thanks for letting me know! Is the code publicly available by any chance? I'd love to take a look — any Solod usage in the wild is valuable feedback for me.
000
Anton Zhiyanov @antonz.org · 09/08/2026
Finally, Solod combines this approach with zero-runtime implementation and source-level C interop. Solod relies heavily on Go, and I see that as a strength, not a weakness. Reusing Go's proven tools and stdlib makes Solod more reliable and easier to work with. Relying on Go is a good choice.
020
Anton Zhiyanov @antonz.org · 09/08/2026
Solod is literally a subset of Go. It reuses much of Go's existing tooling, including syntax highlighting, LSP, linters, and the package management system. Solod also reuses a lot of Go's stdlib code, with minimal changes to support manual memory management.
100
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
For example, Go uses platform-specific assembly code for the block step of SHA-256 hashing. My Solod implementation is 10% slower, even with Arm SHA-2 CPU intrinsics. If I use only pure Solod code (just C), it's 7x slower. Go's cryptography is exceptionally well done.
071
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
Thank you :) I'm not a fan of iterators, but I understand and respect why the team created them. The post essentially says that if you're not working on stdlib, you might be better off with the simplest design instead of trying to make it super flexible. Also, I wanted to write some fiction 😁
010
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
The engine is codapi.org Some examples of what you can do with it: Git by example antonz.org/git-by-example Try Ripgrep in Y minutes codapi.org/try/ripgrep Ranking in SQL antonz.org/sql-window-f...
codapi.org
codapi: Interactive code examples
Embed executable code snippets directly into your product documentation, online course or blog post.
000
Anton Zhiyanov @antonz.org · 27/07/2026
By the way, you can easily write blog posts with interactive code examples too. Codapi, the widget and engine I use to run the code, is open source, and the cloud version is free for individual authors.
110
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
It's especially important to catch this, because it's perfectly valid in Go — but not in Solod, which has manual memory management. You can use a memory-unsafe language and still have some nice safety features.
000
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
Everyone neglects complex numbers. Not the kind of thing you reach out to in a typical network server :)
010
Anton Zhiyanov @antonz.org · 21/07/2026
If you want to see something really wild, here are 13 out of 18 Go built-ins packed into one expression 🤪
010
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
By the way, I've just updated the Odin and C3 sandboxes to the latest versions. Feel free to use them to try out these languages in your browser, or maybe even to write an interactive article! codapi.org#sandboxes
codapi.org
codapi: Interactive code examples
Embed executable code snippets directly into your product documentation, online course or blog post.
000