
A courageous developer with a passion for hard sci-fi, anime and all sorts of #queer stuff.
Czech republic
Joined April 2010
- Tweets14.2K
- Following298
- Followers152
- Likes3.3K
Pinned Tweet
"Complexity is like a bug light for smart people. Can't resist it even though we know it's bad for us. The stuff is just so cool to work on"
Tomáš Deml retweeted
One really interesting thing you may not have spotted in the release notes of #golang 1.21 is the following line:
"Package initialization order is now specified more precisely"
This is quite a big change, as it impacts how the init() function works. Previously it could be difficult to know what order the init function in different packages would be run (medium.com/@markbates/go-ini…) but this changes that. The new Algorithm is:
- Sort all packages by import path.
- Repeat until the list of packages is empty:Find the first package in the list for which all imports are already initialized.
- Initialize that package and remove it from the list.
This is a positive change, but it does mean that this is a breaking one; you should test your applications thoroughly if you are upgrading to 1.21.
Does this mean we can/should use init more?
I don't think so, no.
Init was always been seen as anti-pattern by many and some style guides such as Thanos(thanos.io/v0.13/coding-style…) go as far a to say "no init". This is because they can cause global changes that have side-effects which can be difficult to track down .
The only init function I use regularly is to setup:
github.com/uber-go/automaxpr… (under the hood it calls init)
How do you use init functions? Does this change change the way you think about them?
Your Computer Should Say What You Tell It To Say eff.org/deeplinks/2023/08/yo…
Brute-forcing a macOS user’s real name from a browser using mDNS fingerprint.com/blog/apple-m…
The great Polish Sea -or- We forgot Poland! devblogs.microsoft.com/oldne…
GopherCon 2018: Bryan C. Mills - Rethinking Classical Concurrency Patterns youtu.be/5zXAHh5tJqQ
css-only-chat: A truly monstrous async web chat using no JS whatsoever on the frontend github.com/kkuchta/css-only-…
Going through a Kubernetes training with autogenerated captions and about half are coming up like this: reddit.com/r/kubernetes/comm… 😂
Portuñol: Blending Spanish and Portuguese multilingual.com/articles/po…
Cyberpunk 2077: Phantom Liberty Feels Like A Whole New Game youtu.be/tm45Bz_EtAQ
Put an io_uring on it - Exploiting the Linux Kernel chompie.rip/Blog+Posts/Put+a…
io_uring disabled across Google platforms security.googleblog.com/2023…
Mind the Gap: Broken Promises of CPU Reservations in Containerized Multi-tenant Clouds tddg.github.io/assets/pdf/so…
Freaky Leaky SMS: Extracting User Locations by Analyzing SMS Timings arxiv.org/abs/2306.07695
Tomáš Deml retweeted
🎙️ Our newest podcast episode is live! form3.co/43XlgLf
Host @classic_addetz is joined by @thedevel, Director at @synadia and #nats expert. He joins us to discuss #eventdriven and #resilient microservice architectures. Then, he gives us a peek into new NATS features.






