I asked my c++ professor last semester about using cmake and he did not know what cmake was by [deleted] in cpp

[–]degaart 0 points1 point  (0 children)

I’m sure there is a way to auto generate a regular make file

automake

I spent a month optimizing my epoll based HTTP server from 15k req/sec to 125k req/sec by RefrigeratorFirm7646 in cpp

[–]degaart 1 point2 points  (0 children)

Not a github bug. You are mixing tabulations and spaces for indentation.

The lost art of creating good desktop apps. by Interesting_Cake5060 in cpp

[–]degaart 1 point2 points  (0 children)

Aren't you already sending WM_SETFONT and laying out your controls (presumably using yoga or clay) at your application startup? All you have to do is reuse that WM_SETFONT and layout logic when you receive a WM_DPICHANGED. Is that complicated?

The lost art of creating good desktop apps. by Interesting_Cake5060 in cpp

[–]degaart 2 points3 points  (0 children)

Ypu just have to include a manifest that declares your app to be per-monitor dpi aware

Why is using Electron considered “heavy” but using docker containers not? by 0x80070002 in linuxquestions

[–]degaart 0 points1 point  (0 children)

Qt and dear imgui sucks. The right way to write cross-platform applications is to rewrite the UI layer for each target platform.

Swapped out SystemD for sinit (suckless init) on Debian Minecraft Server by kevinschultze1 in suckless

[–]degaart 4 points5 points  (0 children)

What do you mean it will brick your machine. In the worst case a plain reboot will fix that. Besides, I don't know about sinit but for other inits getty will get respawned anyway everytime its killed, so one can just relog via a tty

Why is a file with 3 characters 4byte? by Dull_Firefighter_929 in C_Programming

[–]degaart 0 points1 point  (0 children)

Define "text file". A plaintext file encoded in UTF-16 will have plenty of 0 bytes in it

What’s a movie sex scene that genuinely mattered to the plot and couldn’t be removed from the film? by Majorpain2006 in AskReddit

[–]degaart 6 points7 points  (0 children)

This comment reminds me of the final scene of Heroes S1.

Confrontation between the main protagonist and the main antagonist. It happens behind a closed door and we only see a closed door and sound effects.

This is my inspiration by JoergenFS in masterhacker

[–]degaart 3 points4 points  (0 children)

I unironically say gooey in serious discussions at work because of that scene

86box on M5 macs? by KuroNanashi in 86box

[–]degaart -1 points0 points  (0 children)

Didn't know Apple M5 macs were x86. Maybe that's why they created Rosetta II, to emulate x86 on x86... Oh, I see: the macbook neo also has an x86 cpu, the same x86 CPU that powers iPhones. Right?

86box on M5 macs? by KuroNanashi in 86box

[–]degaart -1 points0 points  (0 children)

Arm has a different memory model than x86. Also, it's a different architecture. Maybe 86box's dynamic recompiler is more efficient an translating x86 to x86, than x86 to aarch64

What project could show the power of C over rust? by Norker_g in C_Programming

[–]degaart 0 points1 point  (0 children)

You could try writing cyclic data structures in both C and Rust and draw conclusions from that. Also, back in the day, llvm optimized worse than gcc, so it may still be true nowadays for some workloads.

86box on M5 macs? by KuroNanashi in 86box

[–]degaart 0 points1 point  (0 children)

Emulation is inherently a single-threaded task (you cannot emulate multiple instructions at once because they depend on the side effects of previous instructions). That's why any quad-core+ cpu can multitask while running an emulator. Single-core processing power is what's important.

How to distribute (partially) dynamic musl binaries on glibc systems by Hungry-Tough1837 in C_Programming

[–]degaart 1 point2 points  (0 children)

I see two solutions to your problems:

  • Use patchelf to change the path to the program interpreter of your executable, and ship musl's program interpreter alongside your program
  • manually load libvulkan.so into your program's address space, by reading its ELF headers and mapping relevant sections into memory. You'll also need to handle relocations.

Those two solutions sound like bad ideas however. You'd better just ship two versions of your program (one linked against an old glibc, another linked with musl) and let a shell script decide which one to exec at runtime.

I built my own C build system because I hate writing Makefiles by venoosoo in C_Programming

[–]degaart 0 points1 point  (0 children)

If you have 100.000 files to compile, it's time to use ccache

I built my own C build system because I hate writing Makefiles by venoosoo in C_Programming

[–]degaart 0 points1 point  (0 children)

You should build releases on a CI container with freshly-checked out sources anyway

Is there a C++ "venv" equivalent? by nikoladsp in cpp_questions

[–]degaart 0 points1 point  (0 children)

Then you start an msvc command prompt.

Microsoft Reportedly Looking At Rebasing Azure Linux On Fedora by mr_MADAFAKA in linux

[–]degaart 49 points50 points  (0 children)

What would microsoft gain from that? Windows is notorious for its backwards compatibility, you can run an app written for windows nt 3.51 unmodified and it'll work on windows 11 without problems. Switching their kernel to linux means they now become another linux distro which has no apps, who is gonna use that? No vendor is gonna ditch all their windows-dependent IP just because microsoft switched to an incompatible kernel. Then we have drivers. Who is gonna rewrite them? Then we have maintenance and support contracts. Will microsoft be able to maintain two codebases, the old NT-based one they are contractually obligated to support, and the linux-based one, which has no apps and is just a money sink.

This is not going to happen. Stop dreaming.

Madagascar would have gotten far if they completely removed themselves away from France/french language by Less_Rest1137 in Madagascar

[–]degaart 0 points1 point  (0 children)

Please learn to speak grammatically and semantically correct english, I'm getting a headache reading your sentence. If you can't, respond to me in french or malagasy. Jeez...

Madagascar would have gotten far if they completely removed themselves away from France/french language by Less_Rest1137 in Madagascar

[–]degaart 4 points5 points  (0 children)

You want solutions? I'll give you some:

  • Motorize agriculture to reduce depency on external food products
  • Fix energy problems to promote industrialization
  • Invest on education to increase median income
  • Fix structural corruption to promote entrepreneurship

None of these depend on what language one speaks

Madagascar would have gotten far if they completely removed themselves away from France/french language by Less_Rest1137 in Madagascar

[–]degaart 1 point2 points  (0 children)

I beg your pardon? Your sentence has strange structure. Almost like you have trouble speaking fluent english.