Some nice additions for annotating C++ code to make it import better into Swift:
Some nice additions for annotating C++ code to make it import better into Swift:
Things I wish they fixed in C/C++:
When you init an instance variable from a parameter, you often copy-paste the name of the instance variable into the parameter. This allows you to accidentally forget editing code and generate perfectly compiling but wrong code like:
class Foo {
public:
int _bar;
Foo(int bar) : _bar(_bar) {}
};
accidentally initializing a variable with itself instead of the parameter. (Thank goodness we have an "unused parameter” warning)
When CMake likes building the project too much.
#NotMine #cmake #cxx #develoment
cyberdoskel (@doskel.net)
When CMake likes building the project too much.
#NotMine #cmake #cxx #develoment
cyberdoskel (@doskel.net)
RE: masto.doskel.net/users/doskel/…
Anyone a master of #cxx/ #RustLang I'm having troubles linking the OpenImageIO_Utils library for some Rust bindings that I'm writing, and could use some help. Some more info here: https://github.com/dtolnay/cxx/issues/1472
Бьёрн Страуструп призвал стандартизировать профили C++ для безопасной работы с памятью
https://www.opennet.ru/opennews/art.shtml?num=62821
#c++ #cpp #cxx #stroustrup #страуструп
---
Звучит очень круто
@SandraNabbefeld
"Schamgefühl" ... nicht im Wortschatz der #Cxx
Been slowly working on a #libcosmic app. It's a presentation app for my ministry and church. I originally wrote it in #C++ and #QML, but have since rewritten part of the backend to #rust with the help of #CXX-QT. This still gave me a really tricky system and I decided to investigate rust ui libraries. Seeing #system76 develop #cosmic in rust with #iced, I decided to try it, and it's working quite nice thus far. Some rough edges, but I can't wait to see it come to fruition.
Some people, when confronted with a problem in C++, think:
"I know, I'll write a custom allocator!"
Now they've run out of memory to have more problems. So I guess that's doublegoodplusone?
Make the best of Rust and C++ and learn how to use them together effectively to make Qt applications safer and easier to maintain.
In this course, we'll cover:
/Use of Cargo (Rusts build system) with #CMake
/Accessing Rust code from C++ with #CXX (and vice-versa)
/Defining your #QObject types in Rust with CXX-Qt
As the saying goes in the fandom, C++ #cpp #cxx gives you enough rope to hang yourself with. IMO the smart thing to do is to use all that rope to build a rope weapon (flails ftw!) or a rope bridge. Not to, ya know, hang yourself.
The alternative saying is that C++ gives you the power to shoot your whole leg off. Well, why would you even *do* that? Use that power to shoot and blast whole zombies (or Rust telemarketers) off instead.
My boys! We love testing, don't we? More #cpp / #cxx questions for you to sharpen your wits and train your legalese on. Because when it comes to regulations, it's important to not leave anything to chance, even more now that the military says they want to loooooove C++ (in a "why can't you be like Rust?" way).
So:
How to make sure the caller of your function does not ignore the result?
To my #cxx #cpp and #robotframework bubble: Is there any USEFUL documentation about how to debug C/C++ tests written in Robot? Like, how do I attach my gdb to inspect issues?
To my #cpp #cxx #cmake bubble: I have a project with an ExternalProject_Add, where I download binaries and headers using jfrog to my CMAKE_BINARY_DIR. Trying to add the includes via target_include_directories throws an error, as the jf download didn’t run just yet and the directory is missing. How can I work around this…?
C++‘s std::async is nice. But by golly are the compiler errors unreadable if you forget to wrap call by reference arguments in std::ref! Why is it that C++ compilers are always so obtuse?
int f( int &i ) {…}
void foo() { int i; auto fut=std::async(f,i); }
-> no type named 'type' in std::__invoke_result
Fix: std::ref(i)
#cxx
Gee, #plugin #development with #JUCE is so much fun! Actually really liking the #cxx code now, too. And I have so many ideas! This working but trivial multiband compressor will evolve into the distorting "BFG Compressor" of our dreams 🥰