@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.
Interesting return of experience on the migration of Fish shell from C++ to Rust
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
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
Has anyone understood and is using <memory_resource> in C++17..?
#cxx #programming
Today I wondered why C++ has no type-safe enums for bit flags (like Apple's NS_OPTIONS extension to C).
Before I realized that I’m an idiot, the correct solution is of course a struct using the bit field syntax.
Update: Deleted mention of conversion using unions to not mislead people.
Since I left the university and started working as a team lead some time after 2016 I've been alternately either too busy or too burned out and depressed to do much ISO C++ work (on reflection or otherwise), but it's always nice when people mention my few contributions:
Question to my #cplusplus bubble: are there any caveats regarding thread_local variables in shared libraries? Do they work in the same way as thread_local variables in statically linked code?
#cxx #multithreading
Couple of years ago at a SG7 meeting I raised some concerns about the ambiguity of the `^potentially-very-complex-expression` reflection syntax. The response was something along the lines of: nah, we think it's OK as it is.
Now there is a mail thread with multiple people who don't think it's OK either :P
C++ isn't a serious language.
today's bullshit:
template<typename T, typename U, U T::* Member>
struct get_offset {
static constexpr size_t offset = offsetof(T, Member);
};
struct Example {
int x;
};
const size_t N = get_offset<Example, int, &Example::x>::offset;
This doesn't compile with clang. because...
1/2
@jns is looking for an #ASCII_art logo for his #3d #eternalGameEngine #gameDev #CXX #softwareFreedom
which just had a big patch.
http://linkerror.com/eternal
#gopher
gopher://gopher.linkerror.com/0/phlog/2024/20240217
TIL that C++ stdlib has a greatest common divisor function. Handy.
There is also a blog post by Lars Bergstrom: https://security.googleblog.com/2024/02/improving-interoperability-between-rust-and-c.html There Lars mentions some of the cool #Rust crates that we've contributed to: #cxx, #autocxx, #bindgen, #cbindgen, #diplomat, and #crubit. Some of these projects are from #Google, others are open source projects that we use and contribute to.