home.social

#cxx — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #cxx, aggregated by home.social.

fetched live
  1. #include <stdio.h>
    
    int typedef[[]]$;
    
    int main($[[]]$) {
      [[]]$:&&$&&$&&puts("hello world");
    }
    

    Okay…
    And it works.

    #dev #cxx

  2. #include <stdio.h>
    
    int typedef[[]]$;
    
    int main($[[]]$) {
      [[]]$:&&$&&$&&puts("hello world");
    }
    

    Okay…
    And it works.

    #dev #cxx

  3. Most C++ codebases aren't getting rewritten in Rust - but that doesn't mean the two can't work together.

    At Oxidize 2026, @nicofee and Nicolas Qiu Guichard (@kdab) run a practical workshop on Rust/C++ interop using CXX: calling Rust from C++ and vice versa, integrating a Rust library into a CMake project, and pulling a C++ library into a Cargo build.

    🔗 oxidizeconf.com/sessions/rust_

    #Oxidize2026 #RustLang #CPlusPlus #Interop #CXX #SystemsProgramming

  4. Most C++ codebases aren't getting rewritten in Rust - but that doesn't mean the two can't work together.

    At Oxidize 2026, @nicofee and Nicolas Qiu Guichard (@kdab) run a practical workshop on Rust/C++ interop using CXX: calling Rust from C++ and vice versa, integrating a Rust library into a CMake project, and pulling a C++ library into a Cargo build.

    🔗 oxidizeconf.com/sessions/rust_

    #Oxidize2026 #RustLang #CPlusPlus #Interop #CXX #SystemsProgramming

  5. Choosing between Zngur and CXX for Rust/C++ interoperability?

    This detailed comparison explores their design philosophies, container support, trait objects, async capabilities, build systems, and real-world tradeoffs. 

    Full write-up: kdab.com/weighing-up-zngur-and

    #RustLang #Zngur #CXX #Cpp #Interoperability

  6. Choosing between Zngur and CXX for Rust/C++ interoperability?

    This detailed comparison explores their design philosophies, container support, trait objects, async capabilities, build systems, and real-world tradeoffs. 

    Full write-up: kdab.com/weighing-up-zngur-and

  7. I was fixing some #Krunner plugin to result better matches.
    Being through my use of #Emacs also #Lisp guy made me want to go trough a list like in lisp,
    with a while-let unfortunately #CXX doesn't have such a feature.
    The first other result I got was about #rust. It does awfully look like lisp from that point of view.
    Just the syntax is pretty weird seeing it from that angle.

  8. I was fixing some #Krunner plugin to result better matches.
    Being through my use of #Emacs also #Lisp guy made me want to go trough a list like in lisp,
    with a while-let unfortunately #CXX doesn't have such a feature.
    The first other result I got was about #rust. It does awfully look like lisp from that point of view.
    Just the syntax is pretty weird seeing it from that angle.

  9. This morning, I saw an exceptional ... Kopfball.
    Admittedly, it is only stdexcept.
    #cxx #programming

  10. This morning, I saw an exceptional ... Kopfball.
    Admittedly, it is only stdexcept.
    #cxx #programming

  11. Great article...

    std::move doesn't move anything: A deep dive into Value Categories
    0xghost.dev/blog/std-move-deep

  12. Great article... #cxx #rust

    std::move doesn't move anything: A deep dive into Value Categories
    0xghost.dev/blog/std-move-deep

  13. Anyone have a recommendation for a small (ideally single-file?) C++ Markdown parser library?

    I have some Markdown files that I would love to export to various other formats, and don't want to reinvent the wheel if I don't have to. I don't need any support for HTML in Markdown.

    Basically I'd love to feed Markdown into a function and be called back for each element (header, paragraph, link etc.), kinda like SAX does for XML?

    #Cxx #cplusplus #cpp #markdown #xml

  14. Anyone have a recommendation for a small (ideally single-file?) C++ Markdown parser library?

    I have some Markdown files that I would love to export to various other formats, and don't want to reinvent the wheel if I don't have to. I don't need any support for HTML in Markdown.

    Basically I'd love to feed Markdown into a function and be called back for each element (header, paragraph, link etc.), kinda like SAX does for XML?

    #Cxx #cplusplus #cpp #markdown #xml

  15. Vor 10 Jahren erschütterte ein Foto die Welt: Alan Kurdi, der 2-jährige ertrunken im Mittelmeer ebenso Bruder Ghalib u. Mutter Rehanna. Große Trauer u. Empörung.
    Und die Politik bekannte: Wir müssen helfen!

    Gestern entscheidet die #BuReg, die Förderung für die zivile #Seenotrettung, 2 Mio. €, komplett zu streichen. Signal: Die Rettung von Leben ist Deutschland keinen Cent mehr wert.

    Da muss die #Nächstenliebe der #Cxx-Parteien sein. 😡

    #seaeye #MerzNichtMeinKanzler sea-eye.org/haushalt/?utm_sour

  16. Currently reading up on new C++20 concepts and I do see the advantages of the spaceship operator <=>. Saves quite a bit of operator coding.
    But what about coroutines? What are real use cases? Are there some example projects out there, where the code is more readable and maintainable?
    #cxx

  17. Currently reading up on new C++20 concepts and I do see the advantages of the spaceship operator <=>. Saves quite a bit of operator coding.
    But what about coroutines? What are real use cases? Are there some example projects out there, where the code is more readable and maintainable?
    #cxx

  18. I want to be your next #FediHire ! I've been a programmer since 1985 (as a child), I've been an IT professional since 1995 (pulling wires and swapping cards and configuring MS Windows). I graduated from University of Arkansas Fayetteville with a BS in CS in December of 2003. A full resume is available.

    I currently require a 100% remote position. I cannot relocate from Cove, #Arkansas. I would prefer W-2 employment with a base salary of at least 130k USD/yr, plus some sort of retirement offering (401k or similar) and healthcare benefits (HDCP + HSA or similar).

    I prefer something where I can be a high-performing individual contributor: reading, writing and improving source text the majority of my day, with some time spent knowledge-sharing with other developers -- learning and teaching. I'd like to work with #Haskell, #Purescript, or #Idris as the primary source language. I've previously delivered value in Haskell, #Javascript, #SQL, #Python, #Scala, #Java, #C, and #Cxx among others. I can be productive in almost any language (no PHP, please; I promised myself never again).

  19. I want to be your next #FediHire ! I've been a programmer since 1985 (as a child), I've been an IT professional since 1995 (pulling wires and swapping cards and configuring MS Windows). I graduated from University of Arkansas Fayetteville with a BS in CS in December of 2003. A full resume is available.

    I currently require a 100% remote position. I cannot relocate from Cove, #Arkansas. I would prefer W-2 employment with a base salary of at least 130k USD/yr, plus some sort of retirement offering (401k or similar) and healthcare benefits (HDCP + HSA or similar).

    I prefer something where I can be a high-performing individual contributor: reading, writing and improving source text the majority of my day, with some time spent knowledge-sharing with other developers -- learning and teaching. I'd like to work with #Haskell, #Purescript, or #Idris as the primary source language. I've previously delivered value in Haskell, #Javascript, #SQL, #Python, #Scala, #Java, #C, and #Cxx among others. I can be productive in almost any language (no PHP, please; I promised myself never again).

  20. 🎉 Yay! We finally have reflection in C++26!

    For me, as one of the contributors, this begun around 2009 when I started playing with macro-based hand-written reflection support.

    sourceforge.net/projects/mirro

    #cplusplus #cpp #cxx

  21. 🎉 Yay! We finally have reflection in C++26!

    For me, as one of the contributors, this begun around 2009 when I started playing with macro-based hand-written reflection support.

    sourceforge.net/projects/mirro

    #cplusplus #cpp #cxx

  22. Say, is there a trick in C++ to make to_string() work for any type?

    If I have

    using namespace std;

    and then just write

    to_string(foo)

    it will prefer my local namespace's to_string(MyClass) and error when given an int, instead of picking std::to_string(int) for those.

    Do I really have to add all variants of

    inline string to_string(int n) { return std::to_string(n); }

    to my namespace to be able to just say to_string(foo) for any type and make it work?

    #CPlusPlus #CPP #CXX #programming

  23. Say, is there a trick in C++ to make to_string() work for any type?

    If I have

    using namespace std;

    and then just write

    to_string(foo)

    it will prefer my local namespace's to_string(MyClass) and error when given an int, instead of picking std::to_string(int) for those.

    Do I really have to add all variants of

    inline string to_string(int n) { return std::to_string(n); }

    to my namespace to be able to just say to_string(foo) for any type and make it work?

    #CPlusPlus #CPP #CXX #programming

  24. 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)

    #CXX #CPlusPlus

  25. 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)

    #CXX #CPlusPlus

  26. 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: github.com/dtolnay/cxx/issues/

  27. 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: github.com/dtolnay/cxx/issues/

  28. To my #c #cxx #cpp bubble:
    Without trying it out -- what is the value of this expression?
    uint8_t i = -1 % 128;

  29. To my #c #cxx #cpp bubble:
    Without trying it out -- what is the value of this expression?
    uint8_t i = -1 % 128;

  30. To my #c and #cxx #cpp bubble: Why does a uint8_t get promoted to uint when doing -1 on it? Example:

    #include <stdio.h>
    #include <stdint.h>

    int main(void)
    {
    uint8_t c1 = 0;
    printf("%u\n", c-1);
    return 0;
    }

    This will print (uint8_t)(c1-1) if you don't cast: (uint8_t)(c1-1)

  31. To my #c and #cxx #cpp bubble: Why does a uint8_t get promoted to uint when doing -1 on it? Example:

    #include <stdio.h>
    #include <stdint.h>

    int main(void)
    {
    uint8_t c1 = 0;
    printf("%u\n", c-1);
    return 0;
    }

    This will print (uint8_t)(c1-1) if you don't cast: (uint8_t)(c1-1)

  32. @SandraNabbefeld
    "Schamgefühl" ... nicht im Wortschatz der #Cxx

  33. @SandraNabbefeld
    "Schamgefühl" ... nicht im Wortschatz der #Cxx

  34. 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.

  35. 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.

  36. 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?

    #cxx #cpp #programming

  37. 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

    training.kdab.com/ktd25/ #QtDev #RustLang #Cpp

  38. 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
    /Accessing Rust code from C++ with (and vice-versa)
    /Defining your types in Rust with CXX-Qt

    training.kdab.com/ktd25/

  39. 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?

  40. 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?

  41. 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…?

  42. 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

  43. Has anyone understood and is using <memory_resource> in C++17..?
    #cxx #programming