/dpt/ - Daily Programming Thread

prev
What are you working on, Any Forums?

Attached: 101054927_p0.jpg (1003x1234, 1.27M)

Other urls found in this thread:

github.com/friendlyanon/cmake-init
twitter.com/NSFWRedditImage

AI-generated Lucario and Gardevoir porn.

Attached: 107.jpg (4114x4114, 2.72M)

thank you for using an anime OP.

nth for algorithm user's memory

How do you compile and run things on Windows. I need to make sure something works on Windows but I have no clue how to actually run it.

You smash the bits together until it works. Repeat ad infinitum.
If you don't have time for that: Visual Studio (better) or msys2 (less painful).

>Visual Studio (better) or msys2 (less painful)
What? It's the exact opposite of that.

MSVC or cross-compile from Linux with MinGW

> 60s -> 20s
> don't even rebuild the db
> 20s -> 3s
Ha, ha. Well, that worked. Anyone has a better way, though? I'm thinking of building only the tables required for each test and nothing else.

goto considered based

>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

meant to say if you convert to an appropriate sized integer. the comparison makes no sense as it's currently formulated

Why would anyone do 2 when 1 is more straightforward and readable?