/dpt/ - Daily Programming Thread

>never had to manage a gazillion project properties for an overbloated solution on an overbloated IDE
That's VS for you - painful
>never had to use more modern DXGI and Direct3D12 interfaces
>never looked into your binary and saw compiler comments from every single object file that you linked in
That's msys2 for you - simply worse.

Attached: im_5_and_what_the_fuck_is_this_even.png (1899x253, 20.78K)

Reminding anons to use github.com/friendlyanon/cmake-init when creating new C++ and C projects!

>cmake
Simply no.

incrementally refactoring my team's code is making me feel less angry with them and more hopeful about the future.

Thank you for using an anime image in the OP.

Attached: 4riuxto19rq01.jpg (809x717, 70.58K)

Given uint8_t x, which of the following would (You) prefer and why?
A) (int8_t)x >= -32
B) x >= 224 || x < 128

#1 is "it is the year 1980 and I am writing Forth and don't even have peephole optimization"
#2 is the option that is aware of what millennia we're in now

Both.
uint8_t x = /*whatever*/;
if((x + 32) < 160)
{}

Ironically, GCC 12 or Clang 13 (both from the current millenium, mind you) are unable to optimize the second expression as well as they could. Clang 14 onwards optimizes both to the same optimal code.

>magical numbers
neither