ohmypy Profile Banner
Anton Zhiyanov Profile
Anton Zhiyanov

@ohmypy

Followers
7K
Following
2K
Media
280
Statuses
2K

Open source maintainer at https://t.co/lVeVYa0cGf. Author & educator at https://t.co/WIgisTWNrF

Joined March 2013
Don't wanna be here? Send us removal request.
@ohmypy
Anton Zhiyanov
4 days
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. https://t.co/aBlt4BLEq1
18
110
731
@ohmypy
Anton Zhiyanov
16 hours
Apparently, the map[T]struct{} trick for implementing sets doesn't save memory in Go 1.24+ You can just use map[T]bool πŸ€”
@rushter
Artem Golubin
23 hours
Wrote a new blog post about my experience debugging hash tables in Go. https://t.co/MnnVNqOgEU
2
6
115
@ohmypy
Anton Zhiyanov
1 day
For interpreted languages, the times shown are only for running the program, since there's no separate compilation step. I had to shorten the Kotlin bar a bit to make it fit within 80 characters πŸ˜… Of course, this ranking will be different for real-world projects with lots of
2
0
27
@ohmypy
Anton Zhiyanov
1 day
Here's a little unscientific chart showing the compile/run times of a "hello world" program in different languages. I used single-core, containerized sandboxes on an ancient CPU, so the exact times aren't very interesting, but relative timings are.
73
11
225
@ohmypy
Anton Zhiyanov
2 days
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. https://t.co/fmVcEXVMvw
2
4
50
@ohmypy
Anton Zhiyanov
3 days
I've created Docker sandboxes for dozens of languages, from Python and Java to Odin and Zig. Running a "hello world" program in these sandboxes takes between 500 ms and 2 sec. But there is one language that takes a full SEVEN seconds to compile "hello world" πŸ™ˆ It's Kotlin.
29
14
641
@ohmypy
Anton Zhiyanov
4 days
Here are some book stats: β€” 15 months from the first chapter to release. β€” Uses Go version 1.25. β€” Over 500 interactive examples. β€” 50 auto-tested exercises (with solutions). β€” 448-page PDF. I'd say it feels more like a 200-page book β€” the high page count is mostly because of
0
0
17
@ohmypy
Anton Zhiyanov
5 days
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 🫑 https://t.co/wUVVENb9El
0
0
27
@ohmypy
Anton Zhiyanov
6 days
Go developers fall into three groups: 1. Those who use context for cancellation. 2. Those who use context to pass values. 3. Those who use context for both cancellation and passing values. It turns out the last group wasn't happy because sometimes you want to cancel the parent
25
27
352
@ohmypy
Anton Zhiyanov
7 days
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. https://t.co/UolNcIOO0M
Tweet card summary image
antonz.org
Automatically erase memory to prevent secret leaks.
5
22
221
@ohmypy
Anton Zhiyanov
9 days
Thank you all for helping me choose the cover for the Go Concurrency book. I didn't expect so much participation, and I really appreciate it! Here's the final version, along with the table of contents.
8
39
560
@ohmypy
Anton Zhiyanov
11 days
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. https://t.co/iPmrnl1zej
Tweet card summary image
antonz.org
CPU cores, threads, goroutines, and the scheduler.
0
28
310
@ohmypy
Anton Zhiyanov
12 days
Naming things is indeed one of the hardest tasks in computer science. Go proposal for errors.AsType (the generic version of As) is another example of this. People suggested all kinds of names: IsA, AsA, AsOf, AsT, Has, and even Find. The committee voted for AsType πŸ˜…
2
2
72
@ohmypy
Anton Zhiyanov
13 days
I'm working on the final chapter of the Go Concurrency book, and I'm rethinking the cover. Which one do you like better?
47
5
133
@ohmypy
Anton Zhiyanov
14 days
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! https://t.co/PQ40uSCw9T
antonz.org
errors.AsType is a modern alternative to errors.As.
18
74
542
@ohmypy
Anton Zhiyanov
17 days
When I wrote about the maphash.Hasher proposal in Go, some people replied saying that Go is turning into Java. I'm not sure why. First, In Java, equals and hashCode are part of the base Object type that everything inherits from. In Go, Hasher is non-intrusive and will only be
2
9
137
@ohmypy
Anton Zhiyanov
19 days
Apparently, in the initial version of this wonderful post, the devs were also called "losers." Later, they were promoted to "rookies". I guess it says quite a lot about the President and Lead Developer πŸ˜…
2
0
103
@ohmypy
Anton Zhiyanov
19 days
Personally, I think GitHub's UI is getting worse, unfortunately. Still, I'm thankful for Actions, Pages, and the other services GitHub offers.
5
0
187
@ohmypy
Anton Zhiyanov
19 days
Is it normal in the Zig community to call other programmers "monkeys"? No one deserves to be called names just because they work on a product you don't like. Neither an SDE I developer at Microsoft, nor the President and Lead Developer of the Zig Software Foundation.
276
25
754