Damn, VSCode becomes more and more overwhelmed with features.
Now the new auto-suggestions in the terminal. Afair there is no AI in termainal yet.
Time to move to VSCodium?
Now the new auto-suggestions in the terminal. Afair there is no AI in termainal yet.
Time to move to VSCodium?
Any jj (jujutsu, new git, kinda) fans here? Do you really enjoy switching to the alternative?
Curious to hear any team/company improvements (if any lol)
Curious to hear any team/company improvements (if any lol)
> Gin is a very bad software library
And you know what? This is true. Like a bunch of other stuff.
https://eblog.fly.dev/ginbad.html
And you know what? This is true. Like a bunch of other stuff.
https://eblog.fly.dev/ginbad.html
I might be wrong, but doing an incident review a month later feels way too late.
Sure, you note everything during the incident, so it’s all documented (lol) but c’mon.
You lose the context, you miss the ideas. It’s like looking at a picture full of dots with no lines connecting them.
I just don’t get it. It’s like performing an autopsy after the burial way too late, goddammit.
Sure, you note everything during the incident, so it’s all documented (lol) but c’mon.
You lose the context, you miss the ideas. It’s like looking at a picture full of dots with no lines connecting them.
I just don’t get it. It’s like performing an autopsy after the burial way too late, goddammit.
I think I can confidently say that the following pattern is wrong in all cases. B ut it works… until it doesn’t.
Not convinced? Let's rewrite with
Even if this still doesn't convince you, this issue is documented in
https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/waitgroup
The problem is that
The runtime may schedule the goroutine later, so the counter might not be incremented yet.
Voila, now you've to debug why you missing data that was consumed but not processed!
And the fix is quite simple: any goroutine management should happen before the goroutine start:
{
...
for {
go process(...)
}
// some logic around atomicCounter waiting for a zero
}
func process(...) {
atomicCounter.Add(1)
defer atomicCounter.Add(-1)
}
Not convinced? Let's rewrite with
sync.WaitGroup:{
...
for {
go process(...)
}
// some logic around sync.WaitGroup.Wait()
}
func process(...) {
wg.Add(1)
defer wg.Done()
}
Even if this still doesn't convince you, this issue is documented in
go vet:https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/waitgroup
The problem is that
atomicCounter is updated inside a goroutine that happens instantly but there is no real guarantee that this will happen instantly.The runtime may schedule the goroutine later, so the counter might not be incremented yet.
Voila, now you've to debug why you missing data that was consumed but not processed!
And the fix is quite simple: any goroutine management should happen before the goroutine start:
{
...
for {
wg.Add(1)
go process(...)
}
// some logic around sync.WaitGroup.Wait()
}
func process(...) {
defer wg.Done()
}pkg.go.dev
waitgroup package - golang.org/x/tools/go/analysis/passes/waitgroup - Go Packages
Package waitgroup defines an Analyzer that detects simple misuses of sync.WaitGroup.
I made smth (tbh, I just open-sourced 1 internal pkg), 3 funcs but used dozens of times across the codebase.
https://github.com/cristalhq/ordx
Fuzz and race tests are always welcome.
https://github.com/cristalhq/ordx
cmp := ordx.RankCmp([]string{"low", "medium", "high"})
fmt.Println(cmp("low", "high"))
fmt.Println(cmp("high", "low"))
fmt.Println(cmp("medium", "medium"))
// Output:
// -1
// 1
// 0
Fuzz and race tests are always welcome.
GitHub
GitHub - cristalhq/ordx: Comparison helpers in Go
Comparison helpers in Go. Contribute to cristalhq/ordx development by creating an account on GitHub.
Any good
(links to blogs are also appreciated)
cloud-init configs for a small server for pet projects? Thanks in advance.(links to blogs are also appreciated)
oleg_log
I freaking love Google's open source. Just a pure engineering beauty, ass always. project $ scc . ─────────────────────── Language Code ─────────────────────── Go 46_539 Not great, not terrible. Go.mod/sum is also small as possible:…
Took more time to polish than I expected but at least binary went from 36Mb to 16Mb, yay.
https://github.com/cristalhq/fcm
(there are few things to add but nothing critical)
https://github.com/cristalhq/fcm
(there are few things to add but nothing critical)
GitHub
GitHub - cristalhq/fcm: Firebase Cloud Messaging client in Go
Firebase Cloud Messaging client in Go. Contribute to cristalhq/fcm development by creating an account on GitHub.
∏ρ؃uñçτØρ Øπτµç∑ | 👁🗨››››
Photo
Telegram
oleg_log
Если скучно, почитайте историю сооснователя Cloudflare. Талантливый был человек.
the resident genius, the guy who could focus for hours, code pouring from his fingertips while death metal blasted in his headphones. He was the master architect whose vision…
the resident genius, the guy who could focus for hours, code pouring from his fingertips while death metal blasted in his headphones. He was the master architect whose vision…
Good one. Have literally the same feedback. Cool tech but mostly useless.
https://johnjames.blog/posts/graphql-the-enterprise-honeymoon-is-over
https://johnjames.blog/posts/graphql-the-enterprise-honeymoon-is-over
johnjames.blog
GraphQL: the enterprise honeymoon is over
A production-tested take on GraphQL in enterprise systems, why the honeymoon phase fades, and when its complexity outweighs the benefits.
https://codemanship.wordpress.com/2025/12/14/the-gorman-paradox-where-are-all-the-ai-generated-apps/
Codemanship's Blog
The Gorman Paradox: Where Are All The AI-Generated Apps?
In 1950, while discussing the recent wave of flying saucer reports over lunch with colleagues at Los Alamos National Laboratory in New Mexico, physicist Enrico Fermi asked a simple question. There …