ohmypy Profile Banner
Anton Zhiyanov Profile
Anton Zhiyanov

@ohmypy

Followers
6K
Following
2K
Media
239
Statuses
2K

Open source maintainer. Writing interactive technical books at https://t.co/WIgisTXlhd

Joined March 2013
Don't wanna be here? Send us removal request.
@ohmypy
Anton Zhiyanov
8 months
Just a not-so-humble reminder that the best way to add interactive examples to your product docs, online course, or blog is with Codapi. It's lightweight, battle-tested, and open source.
Tweet card summary image
codapi.org
Embed executable code snippets directly into your product documentation, online course or blog post.
0
6
42
@ohmypy
Anton Zhiyanov
3 days
The new chapter of my interactive Go Concurrency book covers signaling, one-time execution, and object pools. If you think channels are the only way for goroutines to communicate, check it out!.
Tweet card summary image
antonz.org
Sending events between goroutines.
0
19
145
@ohmypy
Anton Zhiyanov
5 days
I've updated the list of Go features by version. Now, each feature has ➀ a link to the documentation, ➁ a link to the proposal, and ➂ a link to the commits. It's fascinating to see how Go has changed over the years.
Tweet card summary image
antonz.org
Which major features appeared in which versions of Go.
3
25
122
@ohmypy
Anton Zhiyanov
6 days
I asked several hundred Go developers what they like most about the upcoming 1.25 release. Here are the results:. ➀ JSON v2.➁ GOMAXPROCS, synctest, new GC.➂ WaitGroup.Go
Tweet media one
2
10
92
@ohmypy
Anton Zhiyanov
7 days
Going back to testing, yet another example is the testify/assert package. Similar to Python's TestCase, it has functions like Equal, NotEqual, EqualError, Error, NoError, ErrorAs, ErrorIs, etc. Even Greater and GreaterOrEqual!. While designing my own test assertions package, I
Tweet media one
2
0
8
@ohmypy
Anton Zhiyanov
7 days
Another example of a wide interface is Go's Regexp. Here's a sneak peak:. FindAllString.FindAllStringIndex.FindAllStringSubmatch.FindAllStringSubmatchIndex.FindString.FindStringIndex.FindStringSubmatch.FindStringSubmatchIndex. Compare to a third-party regexp2 package:.
1
0
6
@ohmypy
Anton Zhiyanov
7 days
One crucial piece of advice John Ousterhout gives in his book "Philosophy of Software Design" is about deep modules. Module depth is a way of thinking about cost versus benefit. The benefit provided by a module is its functionality. The cost of a module (in terms of system.
1
3
26
@ohmypy
Anton Zhiyanov
8 days
You don't need testify/assert to write clear, simple, and expressive Go tests.
Tweet card summary image
antonz.org
Equal, Err and True are quite enough.
2
9
28
@ohmypy
Anton Zhiyanov
10 days
Okay, I did it again. I reimplemented Redis using Postgres. Key/value, expiration, maps, lists, sets, and sorted sets — everything in your favorite database. With a Redis-compatible API and wire protocol.
Tweet card summary image
github.com
Redis re-implemented with SQL. Contribute to nalgeon/redka development by creating an account on GitHub.
7
17
175
@ohmypy
Anton Zhiyanov
13 days
The SQL syntax for SQLite and Postgres is *very* similar. Out of the 21 most complex SQLite queries that handle sorted set operations, I only need to change one to make it work with Postgres. The others work as they are.
Tweet media one
0
0
16
@ohmypy
Anton Zhiyanov
14 days
I made it through the blockchain hype wave, but I'm not so sure about the current one. I understand the excitement, but I'd rather see 1/10 of the AI-related posts I see now. Maybe even 1/50.
1
0
16
@ohmypy
Anton Zhiyanov
15 days
Maintaining razor-sharp focus and saying "no" all the time is not what we are good at. But recognizing this is the first step toward achieving simplicity.
0
0
5
@ohmypy
Anton Zhiyanov
15 days
Another reason why simple is difficult is that you have to pick your battles carefully. Nothing is easier than saying "yes" to every feature, but that just leads to a complex, half-baked mess.
1
0
5
@ohmypy
Anton Zhiyanov
15 days
Creating simple products is hard. Most of us have no idea what "simple" really means (not "easy"!), or how to achieve it. We're taught to embrace complexity and even enjoy it.
1
1
18
@ohmypy
Anton Zhiyanov
15 days
It's such a relief to switch from standard library assertions to more concise ones 😅
Tweet media one
Tweet media two
3
0
5
@ohmypy
Anton Zhiyanov
16 days
Not only is @boyter's scc a great tool for counting lines of code, but it also values my work more than anyone ever will. $22,607 for a two-file Go package! That's why I appreciate it so much :)
Tweet media one
0
3
20
@ohmypy
Anton Zhiyanov
16 days
How about a micro test assertions Go package with flexible error checking?. Only 100 loc. I've named it "be" :).
Tweet media one
3
1
29
@ohmypy
Anton Zhiyanov
20 days
I have a wild idea: add PostgreSQL support to Redka (Redis reimplemented in Go with an SQLite backend). And I think I can pull it off! 🙈
Tweet media one
2
3
70
@ohmypy
Anton Zhiyanov
22 days
The new chapter in my interactive Go Concurrency book is about Semaphores. You'll have a Rendezvous with some helpful synchronization tools and even overcome a few Barriers. If you know what I mean 😉.
Tweet card summary image
antonz.org
Limiting the concurrency and waiting for the peers.
0
13
69
@ohmypy
Anton Zhiyanov
23 days
RT @rseroter: JSON handling in @golang 1.25 has some fairly large differences/improvements. @ohmypy has a great post explaining them. http….
Tweet card summary image
antonz.org
Fake clock, new GC, flight recorder and more.
0
2
0
@ohmypy
Anton Zhiyanov
24 days
Oh man, even the best LLMs still struggle with concurrency. Both Gemini 2.5 Pro and Claude 4 told me this is a really bad way to use semaphores and that it causes race conditions 🤦‍♀️
Tweet media one
1
1
31