oleg_log
1.78K subscribers
1.86K photos
129 videos
9 files
2.77K links
Shelter for antisocial programmers "Oleg"

halp: @olegkovalov
web: https://olegk.dev
fov: @oleg_fov
chat: @oleg_log_blabla
podcast: @generictalks

about: https://xn--r1a.website/oleg_log/3200
Download Telegram
lol
>>> chr(sum(range(ord(min(str(not()))))))
'ඞ'
Oh no
Jokes aside. Any recommendations on image resizing in Go?

Ideally without CGO, might be a standalone service(systemd) or as a proxy.

Thanks in advance.
I was today years old when I have discovered Scala2 implicit parameters.

Absolutely disgusting. Like ultimately pro max disgusting.

The funniest thing (to me only?) it got redesigned in Scala 3 with „given” keyword.
Good interview question, happened to me once iirc.

Ok, to paraphrase: it’s was a good question to kick off a deep and thoughtful discussion about language and program design in general.

For someone senior level and higher with a different background, it’s a great topic to discuss.
Go ahead, self-host Postgres

Love this "The real operational complexity" paragraph.

https://pierce.dev/notes/go-ahead-self-host-postgres
> Remember, an LLM is a JPG of all the text of the internet.

😂
Okay, I outsmarted myself. It’s not that I’m in a deep trouble, but it’s something that adds more and more friction and I start hating that.

Here’s the code:

type BlobID uint64

func (id BlobID) MarshalJSON() ([]byte, error) {
return []byte(`"` + id.String() + `"`), nil
}

func (id *BlobID) UnmarshalJSON(b []byte) error {
idd, err := ParseBlobID(string(b[1 : len(b)-1]))
*id = idd
return err
}


BlobID values are stored in a JSONB column in Postgres, just for the context.

The problem is with String() and ParseBlobID() (the implementation isn’t important, but they’re obviously not just thin wrappers around strconv).
I want to get rid of these two functions and simply store the uint64 as a string (i.e. just use strconv).

The question is: how can I make such migration in the simplest way? I can see about 2-3 possible solutions, and I’m curious what you’d suggest and why.

Thanks in advance.
> My experience with writing Rust software tends to be once you've got it working, it stays working.

Somehow, this phrase made me giggle.

https://blog.rust-lang.org/2025/12/19/what-do-people-love-about-rust/
Ignoring case in configuration files is bad. Really, what problem are you trying to solve?

LOG_PRETTY=trUE


Does this happen that often? Is it really hard to switch to normal (lower, hah) casing?

I don’t understand such simplifications that try to solve imaginary problems.
Java’s == and .equal moment, apparently.
And I think this is beautiful

func ctx2fn(ctx context.Context) func() context.Context { return func() context.Context { return ctx } }