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
Let's explore how Rust, Zig, Odin, C3, and Hare design their allocators, and then build one in C!
antonz.org/allocators
Let's explore how Rust, Zig, Odin, C3, and Hare design their allocators, and then build one in C!
antonz.org/allocators
"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
"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
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...
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...
antonz.org/defer-in-c
antonz.org/defer-in-c
All thanks to slog.MultiHandler, which sends log records to any number of handlers you configure.
All thanks to slog.MultiHandler, which sends log records to any number of handlers you configure.
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.
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.
Current cryptographic APIs, like ecdsa.GenerateKey, often accept an io.Reader as the source of random data:
ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
Current cryptographic APIs, like ecdsa.GenerateKey, often accept an io.Reader as the source of random data:
ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
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.
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.
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.
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.
Previously, type constraints couldn't directly or indirectly refer to type parameters.
↓
Previously, type constraints couldn't directly or indirectly refer to type parameters.
↓
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?
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?
So I prepared an interactive version with lots of examples.
Read on and see!
antonz.org/go-1-26
So I prepared an interactive version with lots of examples.
Read on and see!
antonz.org/go-1-26
You can try them online, embed them on your own website, or self-host and customize.
antonz.org/better-c
You can try them online, embed them on your own website, or self-host and customize.
antonz.org/better-c
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...
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...
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...
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...
Handy for trying a new language online or embedding interactive snippets into your writing.
codapi.org#sandboxes
Handy for trying a new language online or embedding interactive snippets into your writing.
codapi.org#sandboxes
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
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
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
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
Just kidding. The package wipes the memory to keep secrets safe — hence the name.
antonz.org/accepted/run...
Just kidding. The package wipes the memory to keep secrets safe — hence the name.
antonz.org/accepted/run...
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...
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...
No reflection. No runtime panics. Concise code. This is big!
antonz.org/accepted/err...
No reflection. No runtime panics. Concise code. This is big!
antonz.org/accepted/err...