#cxx — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #cxx, aggregated by home.social.
-
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.
🔗 https://oxidizeconf.com/sessions/rust_and_c_plus_plus_can_be_friends
#Oxidize2026 #RustLang #CPlusPlus #Interop #CXX #SystemsProgramming
-
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.
🔗 https://oxidizeconf.com/sessions/rust_and_c_plus_plus_can_be_friends
#Oxidize2026 #RustLang #CPlusPlus #Interop #CXX #SystemsProgramming
-
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.
🔗 https://oxidizeconf.com/sessions/rust_and_c_plus_plus_can_be_friends
#Oxidize2026 #RustLang #CPlusPlus #Interop #CXX #SystemsProgramming
-
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.
🔗 https://oxidizeconf.com/sessions/rust_and_c_plus_plus_can_be_friends
#Oxidize2026 #RustLang #CPlusPlus #Interop #CXX #SystemsProgramming
-
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.
🔗 https://oxidizeconf.com/sessions/rust_and_c_plus_plus_can_be_friends
#Oxidize2026 #RustLang #CPlusPlus #Interop #CXX #SystemsProgramming
-
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: https://www.kdab.com/weighing-up-zngur-and-cxx-for-rustc-interop/
-
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. -
This morning, I saw an exceptional ... Kopfball.
Admittedly, it is only stdexcept.
#cxx #programming -
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?
-
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 https://sea-eye.org/haushalt/?utm_source=mailchimp&utm_medium=newsletter&utm_campaign=NL_mittelkuerzung
-
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 -
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).
-
🎉 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.
-
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?
-
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 #страуструп
---
Звучит очень круто -
Бьёрн Страуструп призвал стандартизировать профили C++ для безопасной работы с памятью
https://www.opennet.ru/opennews/art.shtml?num=62821
#c++ #cpp #cxx #stroustrup #страуструп
---
Звучит очень круто -
Бьёрн Страуструп призвал стандартизировать профили C++ для безопасной работы с памятью
https://www.opennet.ru/opennews/art.shtml?num=62821
#c++ #cpp #cxx #stroustrup #страуструп
---
Звучит очень круто -
Бьёрн Страуструп призвал стандартизировать профили C++ для безопасной работы с памятью
https://www.opennet.ru/opennews/art.shtml?num=62821
#c++ #cpp #cxx #stroustrup #страуструп
---
Звучит очень круто -
-
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 -
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 -
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 -
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 -
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.
-
It's been a while since last public update.
Launched a pre-release today, which mostly prepares the ground work for a more independent library (without dependency on eg.: iterator, exceptions where not needed) and some support for C++26 features.
-
CW: Оголошення обмежень після класу/структури в C++
У
C++20зʼявились концепти й обмеження для функцій, класів/структур та інших шаблонів. Для функцій та методів вимоги можна вказувати після оголошення шаблону або після функції.template<typename T> requires ... T f() {} template<typename T> T f() requires ... {}Якщо не шаблонний метод у шаблоні класу потребує додаткових вимог їх можна вказати після оголошення методу.
template<typename T> class S { T f() requires integer<T> {} };У такому випадку клас може згенеруватись з будь-яким типом, але це метод буде присутній тільки якщо шаблонний тип відповідає вимогам.
Але іноді може знадобитись використати поточний клас у вимогах. Наприклад при
CRTP.template<typename D> class Base requires std::derived_from<D, Base> {...};На жаль зараз такого немає.
#cpp #cxx #cpp20 #concepts #constrains #requires #class #template #struct #CRTP #proposal #програмування #шаблони #вимоги #обмеження #пропозиція
-
CW: Оператор > або && у C++
Унарний оператор>/&&замістьmove()№10Оскільки історично так склалось що по стандарту в
C++обʼєкти копіюються, а не переміщуються, тому іноді потрібно додатково вказувати виклик функціїmoveпри переміщенні обʼєкта для оптимізації. Але виглядає це не дуже тому було б дуже класно якби у нас був унарний оператор>який би виконував те саме що раніше згадана функція.int x = 123; int y = >x; # або при виклику функції f(>y);Для зручності він повинен мати пріоритет найвищий, на мою думку. І не повинен мати, ні лівої, ні правої асоціативності, щоб не можна було робити кілька викликів одночасно.
Жаль що у
C++не можна створювати свої оператори як уHaskell.Також можливо що більш логічно буде використати не оператор
>, а&&. Цей варіант виглядає зрозумілішим у цьому випадку оскільки при прийманніrvalueзначення позначається це саме так.std::string x = "..."; f(&&x);Мінус цього варіанту в, тому що його легше переплутати з оператором отримання адресу (
&).Реалізація такого оператора може виглядати так:
#include <type_traits> template <typename T> std::remove_reference_t<T>&& operator>(T&& x) { return static_cast<std::remove_reference_t<T>&&>(x); }Реалізація оператора
&&не відрізнялася нічим крім назви.#cpp #cxx #operators #proposal #move #rvalue #values #оператори #переміщення #програмування
-
Ну чому
noexceptне входить до підпису функції?. Було б дуже зручно робити отак:#include <iostream> void f() { std::cout << "Except\n"; } void f() noexcept { std::cout << "No Except\n"; } void g() noexcept { f(); } int main() { f(); g(); }Але на жаль зараз отримую тільки це:
noexcept_reload.cpp:7:6: помилка: перевизначення «void f()» 7 | void f() noexcept { | ^ noexcept_reload.cpp:3:6: примітка: «void f()» раніше визначено тут 3 | void f() { |блін.
#cpp #cxx #noexcept #exceptions #reload #functions #функції #виключення #програмування #перевантаження
-
CW: ,
Правильна відповідь
3. Цей оператор повертає останній операнд оскільки він має ліву асоціативність, а через найнижчий пріоритет (17) його операнди потрібно обгортати в дужки для підвищення пріоритету.За допомогою цього ми можемо іноді ламати строгу типізацію. Наприклад його іноді застосовують у
decltypeдля перевірки шаблонного типу до стандартуC++ 20оскільки у цьому стандарті зʼявився кращий, спеціально для цього призначений механізм під назвою Constrains.auto f(auto x) -> decltype(x+1, x) {...}Це дуже простенький варіант і він може не відображати цю можливість у повній потужності й незрозумілості водночас.
Також я знайшов такий варіант застосування.
struct A {...}; struct B : A { B(int x) : A( x%2==0 ? x/2 : (throw Exception(...), 0) ) {...} };У цьому прикладі нам потрібно зробити додаткову перевірку перед викликом конструктора базового класу, але зробити це у тілі конструктора нащадка можна тільки після виконання базового класу, тому ми робимо це у тернарному операторі й використовуємо оператор коми оскільки обидва вирази тернарного оператора повинні повертати результат одного типу.
У
Cце оператор також присутній і працює так само.#include <stdio.h> int main() { printf("%d\n", (5,4,3,2,1,0)); return 0; }Виконання цього коду виведе на екран
0. -
CW: ,
Правильна відповідь
3. Цей оператор повертає останній операнд оскільки він має ліву асоціативність, а через найнижчий пріоритет (17) його операнди потрібно обгортати в дужки для підвищення пріоритету.За допомогою цього ми можемо іноді ламати строгу типізацію. Наприклад його іноді застосовують у
decltypeдля перевірки шаблонного типу до стандартуC++ 20оскільки у цьому стандарті зʼявився кращий, спеціально для цього призначений механізм під назвою Constrains.auto f(auto x) -> decltype(x+1, x) {...}Це дуже простенький варіант і він може не відображати цю можливість у повній потужності й незрозумілості водночас.
Також я знайшов такий варіант застосування.
struct A {...}; struct B : A { B(int x) : A( x%2==0 ? x/2 : (throw Exception(...), 0) ) {...} };У цьому прикладі нам потрібно зробити додаткову перевірку перед викликом конструктора базового класу, але зробити це у тілі конструктора нащадка можна тільки після виконання базового класу, тому ми робимо це у тернарному операторі й використовуємо оператор коми оскільки обидва вирази тернарного оператора повинні повертати результат одного типу.
У
Cце оператор також присутній і працює так само.#include <stdio.h> int main() { printf("%d\n", (5,4,3,2,1,0)); return 0; }Виконання цього коду виведе на екран
0. -
Why LLVM is so slow. And why Koka is faster than C++. My post.
-
Why LLVM is so slow. And why Koka is faster than C++. My post.
-
Why LLVM is so slow. And why Koka is faster than C++. My post.
-
Why LLVM is so slow. And why Koka is faster than C++. My post.
-
Why LLVM is so slow. And why Koka is faster than C++. My post.
-
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 -
@jackdaniel
Is #ECL aware of or capable with C++'s stl std::function rather than just C function pointers?
@jns
#Cxx #CommonLisp #programming #mastoquestions