Viktor
banner
vbl.bsky.social
Viktor
@vbl.bsky.social
From now on I will think of LLMs as "Liquid Language".
September 9, 2025 at 9:09 AM
Are there established packages for "wide logs" in #golang?

I wanted to accumulate fields and emit 1 slog record for each request. I set up a map in a middleware and then adding to it during flight. But that feels a bit janky.
March 21, 2025 at 11:49 AM
After all, why shouldn't I begin #golang tests with

ctx, l := setup()

where l is a handle to things running "locally". Like a cli for my service api, the db, localstack s3.
February 26, 2025 at 2:51 PM
Stumbled across this amazing jazz channel on youtube.
youtu.be/foHfPB6H19c?...
Do You Like Bill Evans?
YouTube video by Jazz Jane 정의주
youtu.be
February 17, 2025 at 8:31 PM
🌊⛵
February 14, 2025 at 1:45 PM
TIL gopls has code actions for putting func params/struct/fields/etc. on separate lines.

In tests I usually `t.Logf("%#v", got)` then copy paste that in as the `want` variable. Now I can throw out my dodgy treesitter scripting and use gopls proper instead 🚀
December 30, 2024 at 1:55 PM
Just finished The Overstory by Richard Powers. What a great read 🌲🌳🌴
December 15, 2024 at 9:04 PM
When logging in #golang, do you prefer errors as fields that can be queried, or as parts of the message for glanceability. Sort of:

slog.Error("something wrong", "error", err)

or

slog.Errorf(fmt.Errorf("something wrong: %w", err))
December 8, 2024 at 9:21 AM
Finally figured out what kind of audio a bot needs to send to Discord for smooth(-ish) playback. There are lots of tools & helpers but little documentation. The magic sauce was opus audio segments with variable bitrate off.

So ffmpeg flags: -c:a libopus -vbr off
December 5, 2024 at 4:28 PM
I've picked up Caddy for some hobby projects and so far its great. Empty-VPS-to-working-HTTPS-service in no time and very little cruft:

foo.bar.baz {
reverse_proxy localhost:8080
}

Just remember to open those firewalls... all of them...
November 21, 2024 at 6:31 PM
ClickHouse is doing some cool stuff with observability, ingesting data from Otel and so on. I didn't realize until now but there is a Grafana datasource plugin to hook up and visualize that data:
github.com/grafana/clic...

Would be interesting to compare this against other self-hosted obs.
GitHub - grafana/clickhouse-datasource: Grafana Plugin for ClickHouse
Grafana Plugin for ClickHouse. Contribute to grafana/clickhouse-datasource development by creating an account on GitHub.
github.com
November 17, 2024 at 8:19 AM
I set up the LGTM (#grafana et al.) stack on my server to monitor some hobby projects. There were more components than I anticipated, but in the end it sort of works: github.com/vikblom/obsl...
GitHub - vikblom/obslocal
Contribute to vikblom/obslocal development by creating an account on GitHub.
github.com
November 3, 2024 at 2:11 PM
I decided to bundle up my thoughts and starter code for monitoring a Go application before I forget: blog.aniara.dev/posts/go-otel/

Favoring Open Telemetry mostly because I like the idea and want it to be used widely. Even if the API is sometimes awkward. #golang
Go + Open Telemetry
Instrumenting a Go program with Open Telemetry.
blog.aniara.dev
October 25, 2024 at 4:43 PM
I really like the least #golang logger "slog". Makes so much sense to pass in a context when logging, passing that through all the way to the handler, which can grab whatever it needs (typically trace_id).

Only wish slog.LogContext was shorter...
September 22, 2024 at 8:11 AM
Fumbling with a .zip sent by a friend with a Windows computer.

utf-8? of course not lol
is it utf-16? nonono
could it be latin-1? dream on
so windows-1252? get baited sucker

Code Page 865 for "nordic languages", Microsoft what are you smoking.
March 22, 2024 at 8:56 PM
This weeks Go lesson learned: database/sql might (depending on which driver is used) close any and all connections that are used to run a rollback. This causes major connection churn if transactions are over-/mis-used. There is no counter for how many conns are closed like this in DBStats.
August 27, 2023 at 9:38 AM
Hej! 👋
August 27, 2023 at 9:36 AM