Community chat: https://t.me/hamster_kombat_chat_2
Twitter: x.com/hamster_kombat
YouTube: https://www.youtube.com/@HamsterKombat_Official
Bot: https://t.me/hamster_kombat_bot
Game: https://t.me/hamster_kombat_bot/
Last updated 1 month, 4 weeks ago
Your easy, fun crypto trading app for buying and trading any crypto on the market
Last updated 1 month, 3 weeks ago
Turn your endless taps into a financial tool.
Join @tapswap_bot
Collaboration - @taping_Guru
Last updated 3 days, 23 hours ago
The standard library of Go 1.23 now includes the new unique package. The purpose behind this package is to enable the canonicalization of comparable values. In other words, this package lets you deduplicate values so that they point to a single, canonical, unique copy, while efficiently managing the canonical copies under the hood. You might be familiar with this concept already, called “interning”.
Let’s dive in to see how it works, and why it’s useful.
go.dev
New unique package - The Go Programming Language
New package for interning in Go 1.23.
If you use Timer.Reset()
in Go 1.22 or earlier, you may be doing it wrong. Even the book 100 Go Mistakes (which is usually right about Go nuances) got it wrong.
Let's see what the problem might be and how to work around it.
https://antonz.org/timer-reset/
antonz.org
Resetting timers in Go
Chances are you are doing it wrong.
Profile-guided optimisation (PGO) is a technique where CPU profile data for an application is collected and fed back into the next compiler build of Go application. The compiler then uses this CPU profile data to optimise the performance of that build by around 2-14% currently (future releases could likely improve this figure further).
In this article, the Grab tech folks show off their wins and learnings, along with the Dockerfile used to make it happen.
https://engineering.grab.com/profile-guided-optimisation
Enjoy!
Okay based on the first reactions it seemed like the naming convention issue brought by Zach didn't get much reflection in you.
In this case, I'd like to share a more practical guidance I used recently when had to test a k8s operator setup locally.
The topic is:
Go: Testing Kubernetes Applications with EnvTest
Enjoy ?
https://blog.marcnuri.com/go-testing-kubernetes-applications-envtest
www.marcnuri.com
Go: Testing Kubernetes Applications with EnvTest - Marc Nuri
Learn how to use the EnvTest controller-runtime package to test Kubernetes applications such as operators or controllers.
"ok" considered harmful?
“Just like there’s an unwritten law that every error variable in Go must be named err, there’s an unwritten law that every map existence variable in Go must be named ok.”
But Zach thinks we can, and should, look at doing better.
https://www.dolthub.com/blog/2024-05-10-ok-considered-harmful/
https://go.dev/blog/chacha8rand
Explore the recent advancements in randomness within the Go programming language. Authors Russ Cox and Filippo Valsorda, part of the Go team, look closely at the complexities of addressing security requirements for specific use cases and the implementation of the ChaCha(Rand8) algorithm. Discover how these improvements have enhanced random number generation in Go, culminating in the seamless security enhancements introduced in Go 1.22.
go.dev
Secure Randomness in Go 1.22 - The Go Programming Language
ChaCha8Rand is a new cryptographically secure pseudorandom number generator used in Go 1.22.
The Impact of Pre-Allocating Slice Memory on Performance — The author wanted to establish, in numbers, how pre-allocating memory improves performance using quantitative measurements and tools for automated detection.
Oilbeater's Study Room
The Impact of Pre-allocating Slice Memory on Performance in Golang | Oilbeater's Study Room
Initial Thoughts on Go 1.22 — 1.22 is due next month, but the release candidate gives us a look at plenty of changes and improvements coming down the pike, including new default behavior for loop variables in for loops, the ‘rangefunc’ experiment (more on that next), and even some performance improvements.
https://threedots.tech/post/making-games-in-go/
Miłosz uses the much loved Ebitengine to create a simple Asteroids game. There’s a lot to cover, but the steps are small and easy to digest if you’re looking to understand how games are made.
threedots.tech
Making Games in Go for Absolute Beginners
Want to rekindle your passion for coding? Learn how to create video games from scratch using Go and Ebitengine. We break down core concepts like game loops, sprites, and collisions that we've applied in multiple projects. In just one evening, you'll build…
Logging in Go: A Comparison of the Top 8 Libraries
There's probably a 99% chance that if you're logging in Go, you're using a third-party logging framework since the built-in log package lacks even the most basic features required for production logging. This recently changed with the release of Go 1.21 where the new log/slog package for structured, leveled, and context-aware logging was one of the major highlights.
https://betterstack.com/community/guides/logging/best-golang-logging-libraries/
Betterstack
Logging in Go: A Comparison of the Top 9 Libraries | Better Stack Community
This article compares 9 Go logging libraries, discussing and comparing their features, performance, pros and cons, to determine which library is right for you
Community chat: https://t.me/hamster_kombat_chat_2
Twitter: x.com/hamster_kombat
YouTube: https://www.youtube.com/@HamsterKombat_Official
Bot: https://t.me/hamster_kombat_bot
Game: https://t.me/hamster_kombat_bot/
Last updated 1 month, 4 weeks ago
Your easy, fun crypto trading app for buying and trading any crypto on the market
Last updated 1 month, 3 weeks ago
Turn your endless taps into a financial tool.
Join @tapswap_bot
Collaboration - @taping_Guru
Last updated 3 days, 23 hours ago