The latest C standard, C23, adds some really nice modern C++ features like auto-typing, thousands separator on large integer definitions, depracation pre-processor markings etc. #programming#c#cpplemire.me/blog/2024/01/21/c23-…
If you're developing in C or C++ and want to load assets or plugins relative to the current executable or module running, I made https://github.com/gpakosz/whereami a while ago
But it no longer feels so. Maybe it was a case of "you have to move fast to fix things" and as incumbents raise their game the window of opportunity closes. The vast investment in established stacks incentivises patching the most egregious weaknesses.
One exception seems #golang, which found a network niche
By removing direct dvdread support, mpv broke DVD ripping for me since it now jumps to the dvd menu after the title I want to rip, producing a garbage output file. I tried alternatives like dvdbackup and handbrake, but both are not usable. The latter crashed at some point.
Seems I do have to write my own code again just to be able to batch rip DVDs on the command line. If that happens, it will be released here:
Thank you to all of those that contributed to libdvdread. It does all the magic during ripping and without it, my small C++ program could not be written in just a few hours.
New years resolution: stop using loops. In particular no more for(int i; i<size; i++){} that is just bad style. Use more algorithms, list-comprehensions or yield from. Much more expressive.
Throwback Thursday - Last month we had great discussions at the #ESEKongress in Sindelfingen. Our partner Cloudflight gave a great presentation on #Slint at the conference - "Slint in practice".
I'm always looking for new ways to explore large legacy code bases. I'm still wondering why there are no/few dedicated tools for this.
I've now tried the way of pre-processing C/C++ Source files with unifdef to remove the confusing mess that is build-options via preprocessor defines and then use doxygen to generate a browsable version of the code with call-graphs.
In #kernel news, a 2018 thread on #LKML has recently had some activity, notably from H. Peter Anvin. It’s about using #cpp in the kernel. While it might arguably go nowhere, HPA’s lengthy commentary is worth reading.
It's one thing to start using CMake in a project, it's another to actually create a distributable package for major operating systems. Something I learned on my journey mastering CPack with CMake.
I'll try to cover much: from application bundle structure, how installation works with CMake, adding a shared library, static assets like fonts and images, application icons, the installer itself, and more.
It is interesting that both C++ coroutines and async Rust are stackless coroutines, but unlike Rust, C++ coroutine states must be dynamically allocated.
In addition, C++ coroutines is a more general-purpose feature that can model things such as generators, which I definitely wish it could reside on stack.
I am not knowledgable enough about what kind of tradeoff lead to those design decisions though.