oleg_log
1.73K subscribers
1.88K photos
131 videos
9 files
2.82K links
Shelter for antisocial programmers "Oleg"

halp: @olegkovalov
web: https://olegk.dev
fov: @oleg_fov
chat: @oleg_log_blabla
podcast: @generictalks
Download Telegram
Hey, Linux gamers. Any suggestions on Linux distro?
> When you have terraform, every problem's a nail.

https://www.youtube.com/watch?v=uU06vKlCNXk
Startup interview: please send us code you’re proud of, and we’ll review it and make a decision.

On one hand, it’s cool - no dumb LeetCode. On the other hand…it’s kind of hard to find something you’re reaaaally proud of that actually shows your skills or whatever.

Is this something new/popular on the market? I mean this type of interview.
Please open Telegram to view this post
VIEW IN TELEGRAM
Any cool programming languages to share?

Gleam, C3, Hare, etc
Python's struct module API is kinda impressive. Reminds me Malbolge.

struct.pack('<IHB', 100, 3, 255)
struct.pack('>2Q', 1, 2)
struct.pack('!f', 3.14)


Thanks to LLM's this is now not that hard to read. Yes, Go's time, I'm looking at you.
Isn’t it strange to sit in fullscreen vim on a 4k display? 🤨
Forgive my OCD, but I can’t accept this:

if got := tt.in.RawString(); got != tt.want {
t.Errorf("got %q, want %q", got, tt.want)
}


What the hell is got? Why can’t it be beautiful, stylish, sexy, ultimate, 4 letters (!!!!) have?

Look at this ideal code:
if have := tt.in.RawString(); have != tt.want {
t.Errorf("\nhave: %s\nwant: %s", have, tt.want)
}


Yes, the extra \n is my preference - it makes comparing two lines much easier:
have: foo-bar-baz
want: foo-baz-bar


But even without that, got is a bad choice. Argh.
oleg_log
Forgive my OCD, but I can’t accept this: if got := tt.in.RawString(); got != tt.want { t.Errorf("got %q, want %q", got, tt.want) } What the hell is got? Why can’t it be beautiful, stylish, sexy, ultimate, 4 letters (!!!!) have? Look at this ideal code:…
Few more:
1. have & want, not want & have
because x != 3 and not 3 != x

2. Errorf instead of Fatalf
in most cases you don't care to run next tests, or so (debatable but whatever)

3. just %s (maybe with single quotes)
additional escaping via %q creates noise with \ when you've quotes by bad luck :(
Download .exe for the faster Internet is never old!

https://atlas-cfosspeed.com/
Everyone hypes Zig’s compile-time execution, but most examples end up being Sudoku, chess, or other abstract math problems.

Yeah, there are cases where comptime is genuinely useful, but they’re far less hype-worthy. Compile time doesn’t simplify glue code, sorry.
This media is not supported in your browser
VIEW IN TELEGRAM
Are we AGI yet? (Github's home page)
At least now I know why WiFi on my Mac is a shitshow

$ uptime 
11:23 up 60 days
3 SEV-1 incidents in one day. Non-related. Different teams. Different projects. How was your Monday?