Telegram Web Link
Easily build SQL queries in Go with builq (TBH, this should be a post on olegk.dev, but meh)

Less than two years ago, I had to write a bunch of SQL queries. The worst part was that all of them were custom/dynamic/configurable/you name it. Guess what? I didn't find a good library that looked good for me.

As a result, I wrote one: https://github.com/cristalhq/builq

Basically, it's just 1 Builder type (in a few forms due to API evolution), a few formatting directives (%s, %$, and %?), and nothing else.

There is nothing like db.Select("foo") from ("bar") or other stuff. It is better to scroll through examples and the GUIDE.md file to get the idea.

I am not sure what features lib misses, but feel free to submit a request 🤷
Are there Zed fans? Name a killing feature compared to VSCode, Sublime Text or any IDE.

I just don't get the excitement around Zed. Collab edit maybe but feels like nothing revolutionary.
Deploy binary like in old times.

For the last 3 years, I have had a mix of services: k8s and just a binary. As you can easily guess, the latter works flawlessly, scp'- like tool, `systemctl restart and done.

TBH, I cannot recall a problem with ssh, like I really cannot. You have a key locally, a key on the bastion machine, and 99% of the stuff is done now.

With k8s, everything is amazing globally: unified deployment, hire and fire humans without a problem. The next one will read the same yaml madness. Indeed nice.

But how much time was wasted in my team on k8s ecosystem is unreal. You can try to argue that the team had a little experience in k8s but not (not full-time k8s ops, that's true).

I think this is mostly a Go feature now; having the ability to deploy binary is a lost art in the 21st century 😢 Ah, YMMV.

PS: yeah, we had a problem with ssh deploys: removing old binaries.
I bet some of you have personal projects running in the cloud. How do you manage them?

Just a repo with TF/CF scripts? Home-made bash scripts? Personal memory-safe high-performance 🚀 HTTP framework? Smth else?

My project is structured in a single repository. Inside, I've included everything I need to manage: the machine, firewall, certificates, load balancer, and monitoring. Each repository also contains the same Taskfile (taskfile.dev) commands for easy deployment or quick machine checks.

How do you structure your projects? I'm curious what you have.
https://loglog.games/blog/leaving-rust-gamedev/
+
https://news.ycombinator.com/item?id=40172033
=
<3

Well, nothing super-duper but with a good coffee can be an interesting reading (and telling yourself "oh, people are dumb on too many things").

Lang war. Lang war never changes.

(PS: HN thread is 900+ comments and growing)
Did you know that Github can be used as a public key wallet?

See https://github.com/<username>.keys

This also reminds me of https://github.com/FiloSottile/whoami.filippo.io

I'm strongly suggesting to check README ^^^ good intro to how SSH behaves.
Go if's with init statement #monran

We all know such expression:
if ok := foo(); !ok {
// ...
}


However, some big-brains prefer to squeeze as much as possible in it:
if err := foo(ctx, logger,
user, &pb.MetaData{...},
&payload, whatever...,
); err != nil {
// ...
}


To be honest, I'm jealous. I want to read this code as easily as the author. I have a bad time trying to understand the point of pushing everything inside if and complicated things.

Is the following version not good enough?
err := foo(ctx, logger,
user, &pb.MetaData{...},
&payload, whatever...,
);
if err != nil {
// ...
}


Argh.
> Unable to find Go version '1.15' for platform darwin and architecture arm64.

Has something changed recently? Looks like week ago everything was fine https://github.com/gobwas/ws/actions

I also don't get this:
> We didn't promote darwin/arm64 to be a primary port until Go 1.16. Since Go 1.15 and Go 1.16 are no longer supported, we don't plan to backfill older binary releases.

https://github.com/golang/go/issues/63626

Anyway, why everything was ok week ago. Github CI cache or wut?
A Cloud-Scale Characterization of Remote Procedure Calls

https://foci.uw.edu/papers/sosp23-rpc.pdf
Nice https://blog.kellybrazil.com/2021/12/03/tips-on-adding-json-output-to-your-cli-app/

Post in 2021, but still cool. Also, I didn't know about the jc tool to make famous commands aware of JSON (to be precise, convert text output to JSON).

JSON is a lingua franca in the IT world, whether you like it or not.
2025/06/29 21:53:47
Back to Top
HTML Embed Code: