r_cpp | Unsorted

Telegram-канал r_cpp - C++ - Reddit

-

Stay up-to-date with everything C++! Content directly fetched from the subreddit just for you. Join our group for discussions : @programminginc Powered by : @r_channels

Subscribe to a channel

C++ - Reddit

Kokkos vs OpenMP performance on multi-core CPUs?

Does anyone have experience on OpenMP vs Kokkos performance on multicore CPUs? I am seeing papers on its GPU performance, but when I tested Kokkos against a basic OpenMP implementation of 2D Laplace equation with Jacobi, I saw a 3-4x difference (with OpenMP being the faster one). Not sure if I am doing it right since I generated the Kokkos code using an LLM. I wanted to see if its worth it before getting into it.
The OpenMP code itself is slower than a pure MPI implementation, but from what I am reading in textbooks thats well expected. I am also seeing no difference in speed for the equivalent Fortran and C++ codes.

The Kokkos code: (generated via LLM): Takes about 6-7 seconds on my PC with 16 OMP threads

#include <iostream>
#include <cmath>   // For std::abs, std::max (Kokkos::abs used in kernel)
#include <cstdlib> // For std::rand, RAND_MAX
#include <ctime>   // For std::time
#include <utility> // For std::swap

#include <Kokkos_Core.hpp>

#define NX (128 * 8 + 2) // Grid points in X direction (including boundaries)
#define NY (128 * 6 + 2) // Grid points in Y direction (including boundaries)
#define MAX_ITER 10000   // Maximum number of iterations
#define TOL 1.0e-6       // Tolerance for convergence


int main(int argc, char* argv[]) {
    // Initialize Kokkos. This should be done before any Kokkos operations.
    Kokkos::initialize(argc, argv);
    {

        std::cout << "Using Kokkos with execution space: " << Kokkos::DefaultExecutionSpace::name() << std::endl;
        Kokkos::View<double**> phi_A("phi_A", NX, NY);
        Kokkos::View<double**> phi_B("phi_B", NX, NY);

        // Host-side view for initialization.
        Kokkos::View<double**, Kokkos::HostSpace> phi_init_host("phi_init_host", NX, NY);

        std::srand(static_cast<unsigned int>(std::time(nullptr))); // Seed random number generator
        for (int j = 0; j < NY; ++j) {
            for (int i = 0; i < NX; ++i) {
                phi_init_host(i, j) = static_cast<double>(std::rand()) / RAND_MAX;
            }
        }

        for (int i = 0; i < NX; ++i) { // Iterate over x-direction
            phi_init_host(i, 0) = 0.0;
            phi_init_host(i, NY - 1) = 0.0;
        }
        // For columns (left and right boundaries: x=0 and x=NX-1)
        for (int j = 0; j < NY; ++j) { // Iterate over y-direction
            phi_init_host(0, j) = 0.0;
            phi_init_host(NX - 1, j) = 0.0;
        }

        Kokkos::deep_copy(phi_A, phi_init_host);
        Kokkos::deep_copy(phi_B, phi_init_host); .
        Kokkos::fence("InitialDataCopyToDeviceComplete");

        std::cout << "Start solving with Kokkos (optimized with ping-pong buffering)..." << std::endl;
        Kokkos::Timer timer; // Kokkos timer for measuring wall clock time

        Kokkos::View<double**>* phi_current_ptr = &phi_A;
        Kokkos::View<double**>* phi_next_ptr = &phi_B;

        int iter;
        double maxres = 0.0; // Stores the maximum residual found in an iteration

        for (iter = 1; iter <= MAX_ITER; ++iter) {
            auto& P_old = *phi_current_ptr; // View to read from (previous iteration's values)
            auto& P_new = *phi_next_ptr;   // View to write to (current iteration's values)
            Kokkos::parallel_for("JacobiUpdate",
                Kokkos::MDRangePolicy<Kokkos::Rank<2>>({1, 1}, {NY - 1, NX - 1}),
                // KOKKOS_FUNCTION: Marks lambda for device compilation.
                [=] KOKKOS_FUNCTION (const int j, const int i) { // j: y-index, i: x-index
                    P_new(i, j) = 0.25 * (P_old(i + 1, j) + P_old(i - 1, j) +
                                          P_old(i, j + 1) + P_old(i, j - 1));
                });
            maxres = 0.0; // Reset maxres for the current iteration's reduction (host

Читать полностью…

C++ - Reddit

How thorough are you with code reviews?

At the company I work for the code tends to rely on undefined behavior more often than on the actual C++ standard. There have been several times during reviews where I pointed out issues, only to be told that I might be right, but it’s not worth worrying about. This came to mind while I was looking at the thread\_queue implementation in the Paho MQTT CPP library [https://github.com/eclipse-paho/paho.mqtt.cpp/blame/master/include/mqtt/thread\_queue.h](https://github.com/eclipse-paho/paho.mqtt.cpp/blame/master/include/mqtt/thread_queue.h), where I noticed a few things:

* The constructor checks that the capacity is at least 1, but the setter doesn’t, so you can set it to 0.
* The capacity setter doesn’t notify the notFull condition variable, which could lead to a deadlock (put waits on that).
* The get function isn’t exception safe, if the copy/move constructor throws on return, the element is lost.

Where I work, the general response would be that these things would never actually happen in a real-world scenario, and looking at the repo, it has 1100 stars and apparently no one’s had an issue with it.

Am I being too nitpicky?

https://redd.it/1kx17ko
@r_cpp

Читать полностью…

C++ - Reddit

Laso Scholarship from conan.io will be provided to students of Spanish public universities in any degree of CS, Engineering or similar.
https://conan.io/laso

https://redd.it/1kwoqk2
@r_cpp

Читать полностью…

C++ - Reddit

Give me project idea guy's

It should be moderate level and interesting to do that...

https://redd.it/1kwmu22
@r_cpp

Читать полностью…

C++ - Reddit

SDL2 textures look pixelated on Windows but fine on Linux

Might be the wrong subreddit sorry. After making a simple platformer on Linux to try and learn C++ I wanted to send it to my friend who uses Windows. However after copying over the code and assets and compiling it with MSYS2 UCRT64, everything looks way more pixelated and almost degraded. The png assets are the same and I tried explicitly making every texture use SDL_ScaleModeLinear but nothing changed. Anyone experienced this and have any ideas on how to fix?



https://redd.it/1kwisz6
@r_cpp

Читать полностью…

C++ - Reddit

Committee discussing a filter_view issue

There seems to be a very lively debate happening on the SG9 ML about the nature of filter_view when being used in the context of mutations over the underlying view in the context of pipelines:

Interesting quotes:

**Herb:** Can two independent authors write two adapters/views, each verify theirs is correct in isolation, and then confidently compose them in a pipeline and know the result will still be correct?


**Nicco:** My statement is simply stating what SG9 decided. SG9 decided not to fix the broken filter view. Instead, they want anther filter view as workaround.


**Andreas:** The source of my concern here is that the complexity requirement here is not something that was introduced as part of the range proposal. It is much older, unfortunately.


**Bjarne:** I don't know of any widely accessible documentation of how views equal or exceeds the performance of loops or the use of temporaries


**Herb:** Unless we can explain which ones, in a teachable way a non-expert can follow (I haven’t seen any yet that I feel I understand well enough to follow), that's still saying "it works except when it doesn't," which is another way of saying "adapters/views are not (reliably) composable." Either verifying that each adapter/view is individually correct is sufficient to know that pipeline that composes them is also correct, or it isn’t.

-------------------

When libraries or functionalities are being proposed for the standard, for the big and important ones, other than saying here is an implementation of said library that is currently being used at big tech companies like X, Y and Z coupled with some people sitting around a table deciding on inclusion/exclusion - are there any other kinds of checks and balances, perhaps more formal, being done that would perhaps catch such issues?


Taking the the current filter_view issue as an example, if this had been brought up before the library's (ranges) inclusion, would the library authors have been required to resolve this issue before inclusion or would they have been told that it's ok to include now as it may be fixed down the road some time?

https://redd.it/1kw8ldi
@r_cpp

Читать полностью…

C++ - Reddit

Ultra Engine 0.9.9 Released

Hi, I just wanted to let you know the new version of my C++ game engine has been released: https://www.leadwerks.com/community/blogs/entry/2872-ultra-engine-099-adds-a-built-in-code-editor-mesh-reduction-tools-and-thousands-of-free-game-assets/

Based on community feedback and usability testing, the interface has undergone some revision and the built-in code editor from Leadwerks has been brought back, with a dark theme. Although Visual Studio Code is an awesome IDE, we found that it includes a lot of features people don't really need, which creates a lot of visual clutter, and a streamlined interface is easier to take in.

A built-in downloads manager provides easy access to download thousands of free game assets from our website. Manually downloading and extracting a single zip file is easy, but when you want to quickly try out dozens of items it adds a lot of overhead to the workflow, so I found that the importance of this feature cannot be overstated.

A mesh reduction tool provides a way to quickly create LODs or just turn a high-poly mesh into something usable. This is something I really discovered was needed while developing my own game, and it saves a huge amount of time not having to go between different modeling programs.

Let me know if you have any questions and I will try to answer them all. Thanks!

https://redd.it/1kw14as
@r_cpp

Читать полностью…

C++ - Reddit

[https://youtu.be/hnYuZOm0mLE](https://youtu.be/hnYuZOm0mLE)
* SRC - Sample Rate Converters in Digital Audio Processing - Theory and Practice - Christian Gilli & Michele Mirabella - [https://youtu.be/0ED32\_gSWPI](https://youtu.be/0ED32_gSWPI)

**Using std::cpp**

2025-05-19 - 2025-05-25

* Keynote: The Art of C++ Friendship - Mateusz Pusz - [https://www.youtube.com/watch?v=9J4-8veGDUA](https://www.youtube.com/watch?v=9J4-8veGDUA)
* Asynchronous C++ - Dietmar Kuhl - [https://www.youtube.com/watch?v=DTRTGbJJ0yo](https://www.youtube.com/watch?v=DTRTGbJJ0yo)

2025-05-12 - 2025-05-18

* Reflection in C++?! - MIchael Hava - [https://www.youtube.com/watch?v=LB55FfSH\_-U](https://www.youtube.com/watch?v=LB55FfSH_-U)
* Can you RVO?: Optimize your C++ Code by using Return Value Optimization - Michelle D'Souza - [https://www.youtube.com/watch?v=-qwr1BVcnkY](https://www.youtube.com/watch?v=-qwr1BVcnkY)

2025-05-05 - 2025-05-11

* C++20 Modules Support in SonarQube: How We Accidentally Became a Build System - Alejandro Álvarez - [https://www.youtube.com/watch?v=MhfUDnLge-s&amp;pp=ygUNU29uYXJRdWJlIGMrKw%3D%3D](https://www.youtube.com/watch?v=MhfUDnLge-s&amp;pp=ygUNU29uYXJRdWJlIGMrKw%3D%3D)

2025-04-28 - 2025-05-04

* Keynote: The Real Problem of C++ - Klaus Iglberger - [https://www.youtube.com/watch?v=vN0U4P4qmRY](https://www.youtube.com/watch?v=vN0U4P4qmRY)

**Pure Virtual C++**

* Getting Started with C++ in Visual Studio - [https://www.youtube.com/watch?v=W9VxRRtC\_-U](https://www.youtube.com/watch?v=W9VxRRtC_-U)
* Getting Started with Debugging C++ in Visual Studio - [https://www.youtube.com/watch?v=cdUd4e7i5-I](https://www.youtube.com/watch?v=cdUd4e7i5-I)

You can also watch a stream of the Pure Virtual C++ event here [https://www.youtube.com/watch?v=H8nGW3GY868](https://www.youtube.com/watch?v=H8nGW3GY868)

**C++ Under The Sea**

2025-05-12 - 2025-05-18

* BRYCE ADELSTEIN LELBACH - The C++ Execution Model - [https://www.youtube.com/watch?v=XBiYz7LJ3iQ](https://www.youtube.com/watch?v=XBiYz7LJ3iQ)

2025-04-28 - 2025-05-04

* CONOR HOEKSTRA - Arrays, Fusion, CPU vs GPU - [https://www.youtube.com/watch?v=q5FmkSEDA2M](https://www.youtube.com/watch?v=q5FmkSEDA2M)

https://redd.it/1kvx5ds
@r_cpp

Читать полностью…

C++ - Reddit

looking for coding courses and abit advise on what should I start with

I have finished my 12th and now I am looking for a college in the mean time i also wanna start learning about coding please help me with it

https://redd.it/1kvtavu
@r_cpp

Читать полностью…

C++ - Reddit

What DB to use?

So we need a light weight db which can be used by two processes parallely.
We started with sqlite3 but it can support only one process max.

Currently how we are doing is we have created a third service called db-service which will be holding the DB, and it will be taking db read/write requests from other two processes using IPC.

I want to get rid of that third DB service. We need a lightweight DB.

https://redd.it/1kvoupa
@r_cpp

Читать полностью…

C++ - Reddit

Is Drogon framework a good choice for production level API and web backend?

Link: https://github.com/drogonframework/drogon

Similar questions have been asked on this sub before, but since the project has now become so popular(\~12.5k stars), I want to know if it's robust enough to build for production level API and web backend. I am learning but still nascent. I would appreciate if folks could point out its pros and cons from a production prespective.

Thanks.

https://redd.it/1kvhnh2
@r_cpp

Читать полностью…

C++ - Reddit

converting any 8 digit binary number to ascii with few instructions ( max 4mul , min of none )


https://github.com/Mjz86/String/blob/main/uint_conv.md




https://redd.it/1kv18ki
@r_cpp

Читать полностью…

C++ - Reddit

Concepts vs type traits
https://akrzemi1.wordpress.com/2025/05/24/concepts-vs-type-traits/

https://redd.it/1kupbhu
@r_cpp

Читать полностью…

C++ - Reddit

Unified Syntax for Overload Set Construction and Partial Function Application?

Hi all, I was hoping to get some feedback on an idea I've been thinking about. Despite several proposals\[[1](https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p1170r0.html)\]\[[2](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3312r0.pdf)\]\[[3](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0356r3.html)\], C++ still has no language level support for [overload set](https://en.cppreference.com/w/cpp/language/overload_resolution) construction or [partial function application](https://en.wikipedia.org/wiki/Partial_application). As a result, C++ devs resort to [macros](https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p1170r0.html#motivation) to create overload sets and [library functions](https://en.cppreference.com/w/cpp/utility/functional/bind_front) for partial application. These solutions are sub-optimal for many reasons that I won't reiterate here.

I had an idea for a unified syntax for overload set construction and partial function application that I don't think has been previously proposed and that I also don't think creates ambiguities with any existing syntax.

|Syntax|Semantics|
|:-|:-|
|`f(...)`|Constructs an overload set for the name `f`; equivlent to the the `OVERLOADS_OF` macro presented [here](https://www.open-std.org/JTC1/SC22/WG21/docs/papers/2018/p1170r0.html#motivation).|
|`f(a, b, c, ...)`|Constructs a partial application of the name `f`. Essentially a replacement for `std::bind_front(f, a, b, c)`.|
|`f(..., a, b, c)`|Constructs a partial application of the name `f`. Essentially a replacement for `std::bind_backf(f, a, b, c)`.|
|`f(a, b, c, ..., d, e, f)`|Constructs a partial application of the name `f`. Essentially a replacement for composing `std::bind_front(std::bind_back(f, d, e, f), a, b, c)`.|

For safety, arguments partial applications are implicitly captured by value, but can be explictly captured by reference using `std::ref` for non-const lvalues, `std::cref` for const lvalues, (the to-be proposed) `std::rref` for rvalues, or (the to-be proposed) `std::fref` for a forwarding reference (e.g. `std:fref<decltype(a)>(a)`). Under hood, the generated overload would unbox `std::reference_wrapper` values automatically.

Here's an example of usage.

std::ranges::transform(std::vector { 1, 2, 3 }, std::output_iterator<double>(std::cout), std::sin(...));

Some notes.

* I chose to use `...` as the placeholder for unbound arguments because I think it makes the most intuitive sense, but we could use a different placeholder. For example, I think `*` also makes a lot of sense (e.g. `f(a, b, c, *, d, e, f)`).
* The proposed syntax doesn't support partial applications that bind non-leading or non-trailing function arguments. IMHO that's not an issue because that's not a common use case.
* The automatic unboxing makes it difficult to forward an `std::reference_wrapper` through the generated overload, but we could have a library solution for that. Something like `std::box(std::ref(a))`, where unboxing `std::box(...)` would result in an `std::reference_wrapper<std::remove_reference_t<decltype(a)>>` value. In any case, this situation is pretty rare.

Would be really curious to hear what others think about this idea, esp. any obvious issues that I'm missing. Thank you!

https://redd.it/1kucfgd
@r_cpp

Читать полностью…

C++ - Reddit

Objective-C or C++?

Both are just very painful for App Development (especially a GUI).

I'd personally use something more high level like Kotlin or Swift (depending on the platform), just for simplicity sake.

But if you were to build an entire app just with Objective-C or C++, which would be faster, easier to maintain, better support (long term)?
C++ has better syntax (and is a much easier language to work with), but objective-c is what most components in MacOS are built on.

https://redd.it/1kuel44
@r_cpp

Читать полностью…

C++ - Reddit

Kokkos vs OpenMP performance on multi-core CPUs?

Does anyone have experience on OpenMP vs Kokkos performance on multicore CPUs? I am seeing papers on its GPU performance, but when I tested Kokkos against a basic OpenMP implementation of 2D Laplace equation with Jacobi, I saw a 3-4x difference (with OpenMP being the faster one). Not sure if I am doing it right since I generated the Kokkos code using an LLM. I wanted to see if its worth it before getting into it.
The OpenMP code itself is slower than a pure MPI implementation, but from what I am reading in textbooks thats well expected. I am also seeing no difference in speed for the equivalent Fortran and C++ codes.

The Kokkos code: (generated via LLM): Takes about 6-7 seconds on my PC with 16 OMP threads

#include <iostream>
#include <cmath>   // For std::abs, std::max (Kokkos::abs used in kernel)
#include <cstdlib> // For std::rand, RANDMAX
#include <ctime>   // For std::time
#include <utility> // For std::swap

#include <KokkosCore.hpp>

#define NX (128 8 + 2) // Grid points in X direction (including boundaries)
#define NY (128 6 + 2) // Grid points in Y direction (including boundaries)
#define MAXITER 10000   // Maximum number of iterations
#define TOL 1.0e-6       // Tolerance for convergence


int main(int argc, char* argv[]) {
    // Initialize Kokkos. This should be done before any Kokkos operations.
    Kokkos::initialize(argc, argv);
    {

        std::cout << "Using Kokkos with execution space: " << Kokkos::DefaultExecutionSpace::name() << std::endl;
        Kokkos::View<double**> phi
A("phiA", NX, NY);
        Kokkos::View<double**> phi
B("phiB", NX, NY);

        // Host-side view for initialization.
        Kokkos::View<double**, Kokkos::HostSpace> phi
inithost("phiinithost", NX, NY);

        std::srand(static
cast<unsigned int>(std::time(nullptr))); // Seed random number generator
        for (int j = 0; j < NY; ++j) {
            for (int i = 0; i < NX; ++i) {
                phiinithost(i, j) = staticcast<double>(std::rand()) / RANDMAX;
            }
        }

        for (int i = 0; i < NX; ++i) { // Iterate over x-direction
            phiinithost(i, 0) = 0.0;
            phiinithost(i, NY - 1) = 0.0;
        }
        // For columns (left and right boundaries: x=0 and x=NX-1)
        for (int j = 0; j < NY; ++j) { // Iterate over y-direction
            phiinithost(0, j) = 0.0;
            phiinithost(NX - 1, j) = 0.0;
        }

        Kokkos::deepcopy(phiA, phiinithost);
        Kokkos::deepcopy(phiB, phiinithost); .
        Kokkos::fence("InitialDataCopyToDeviceComplete");

        std::cout << "Start solving with Kokkos (optimized with ping-pong buffering)..." << std::endl;
        Kokkos::Timer timer; // Kokkos timer for measuring wall clock time

        Kokkos::View<double> phi_current_ptr = &phi_A;
        Kokkos::View<double>
phinextptr = &phiB;

        int iter;
        double maxres = 0.0; // Stores the maximum residual found in an iteration

        for (iter = 1; iter <= MAX
ITER; ++iter) {
            auto& Pold = *phicurrentptr; // View to read from (previous iteration's values)
            auto& P
new = phi_next_ptr;   // View to write to (current iteration's values)
            Kokkos::parallel_for("JacobiUpdate",
                Kokkos::MDRangePolicy<Kokkos::Rank<2>>({1, 1}, {NY - 1, NX - 1}),
                // KOKKOS_FUNCTION: Marks lambda for device compilation.
                [=] KOKKOS_FUNCTION (const int j, const int i) { // j: y-index, i: x-index
                    P_new(i, j) = 0.25
(Pold(i + 1, j) + Pold(i - 1, j) +
                                          Pold(i, j + 1) + Pold(i, j - 1));
                });
            maxres = 0.0; // Reset maxres for the current iteration's reduction (host

Читать полностью…

C++ - Reddit

Address Sanitizer Updates for Visual Studio 2022 17.14
https://devblogs.microsoft.com/cppblog/address-sanitizer-updates-for-visual-studio-2022-17-14/

https://redd.it/1kwxsxe
@r_cpp

Читать полностью…

C++ - Reddit

What Is the Value of std::indirect<T>?
https://jiixyj.github.io/blog/c++/2025/05/27/value-of-std-indirect

https://redd.it/1kwpg3f
@r_cpp

Читать полностью…

C++ - Reddit

Sort me out!

I m confused where to follow or whom to follow . So I need help where I can learn C++

https://redd.it/1kwia01
@r_cpp

Читать полностью…

C++ - Reddit

How to plan a largish c++ project ?

I am starting the largest c++ project I have ever done, it is a client which talks to a server, It is difficult to plan because I don't have experience with this type of project before and I am sure I will run into unexpected problems.

I am expecting to make a manager function which managers the connection of multiple sockets, and another 3 major functions to handle send/recv to that socket. Probably all running in their own threads so recv can be blocking while the rest of the application is free to do other stuff.


Any advice to planning this type of architecture out? I only have a basic flow on paper

https://redd.it/1kwaaqz
@r_cpp

Читать полностью…

C++ - Reddit

I developed a todo GUI using only C and the Win32 API. I'm open to suggestions and contributions.

https://github.com/Efeckc17/simple-todo-c

https://redd.it/1kw6f6c
@r_cpp

Читать полностью…

C++ - Reddit

Built my first Qt desktop app: Break Time (a break reminder you can't Alt+F4 😄)

Hey folks!

Wanted to share my first real desktop app made with **Qt (C++)** — it's called **Break Time**, and its job is to make sure you don't forget to take breaks while working at your computer.

"The UI is currently in Russian, but the code is open for localization contributions!"

📌 What is Break Time?

It's a tiny desktop app where you can set your work and break intervals.

It shows timers, plays sound notifications and — my favorite feature — it won’t let you close the break window until your break is over. No Alt+F4 escape 😄.

📸 Screenshots

Main window: https://ibb.co/Vp9FmTb6

Break window: https://ibb.co/VW4X7PzX

\# 📌 Why I made this?

Like many, I often get too focused while working and forget to take breaks. Once, while studying, I spent 18 hours straight in front of my screen.

Existing apps felt too bloated or awkward to use, so I decided to build my own — simple, lightweight, and it just works.

\# 📌 Tech stack

* **Qt 6.7 (C++)**

* **QSoundEffect** for notifications

* **Qt Creator** for building & debugging

\# 📌 Features

* Set number of breaks

* Work timer

* Break timer

* Sound notifications (5 sec before break starts and ends)

* **Hard mode** — you can't close the break window manually

\# 📌 What went well

✅ Learned the Qt basics

✅ Made a functional minimal app

✅ Published my first project on **GitHub**

✅ Wrote a README, changelog and update plans

\# 📌 What I want to improve

❌ No "postpone break" or "cancel break" yet

❌ No session logs

❌ No hotkeys or autostart

Planning to add these in future updates.

\# 📌 Lessons learned

✔️ How to organize a small Qt project

✔️ Work with timers and multiple windows

✔️ Use QSoundEffect

✔️ Publish a project on GitHub

✔️ Write basic project docs

\# 📌 Plans ahead

* Add break postponing

* Log work sessions

* Hotkeys support

* Autostart option

\# 📌 Repo link

👉 [Break Time on GitHub\](https://github.com/F3lixxx/BreakTime_V2)

\# 📌 Final thoughts

Really happy I pushed this project to a working state. If you're looking for your first desktop app idea — go for something simple but useful.

Would love to hear your feedback or ideas for improvements!

**Contact:**

Telegram: [@y3nox\]()

Email: [y3nohx@gmail.com\]()

P.S. By the way, I'm currently looking for a junior C++ / Qt developer position or internship. If you know of any opportunities — would love to connect!

https://redd.it/1kvyhnw
@r_cpp

Читать полностью…

C++ - Reddit

New C++ Conference Videos Released This Month - May 2025 (Updated To Include Videos Released 2025-05-19 - 2025-05-25)

**CppCon**

2025-05-12 - 2025-05-18

* Lightning Talk: From Macro to Micro in C++ - Conor Spilsbury - [https://youtu.be/rb0EOwdTL1c](https://youtu.be/rb0EOwdTL1c)
* Lightning Talk: Amortized O(1) Complexity in C++ - Andreas Weis - [https://youtu.be/Qkz6UrWAgrU](https://youtu.be/Qkz6UrWAgrU)
* Lightning Talk: CppDefCon3 - WarGames - Kevin Carpenter - [https://youtu.be/gBCIA0Dfn7o](https://youtu.be/gBCIA0Dfn7o)

2025-05-05 - 2025-05-11

* Lightning Talk: Coding Like Your Life Depends on It: Strategies for Developing Safety-Critical Software in C++ - Emily Durie-Johnson - [https://youtu.be/VJ6HrRtrbr8](https://youtu.be/VJ6HrRtrbr8)
* Lightning Talk: Brainplus Expression Template Parser Combinator C++ Library: A User Experience - Braden Ganetsky - [https://youtu.be/msx6Ff5tdVk](https://youtu.be/msx6Ff5tdVk)
* Lightning Talk: When Computers Can't Math - Floating Point Rounding Error Explained - Elizabeth Harasymiw - [https://youtu.be/ZJKO0eoGAvM](https://youtu.be/ZJKO0eoGAvM)
* Lightning Talk: Just the Cliff Notes: A C++ Mentorship Adventure - Alexandria Hernandez Mann - [https://youtu.be/WafK6SyNx7w](https://youtu.be/WafK6SyNx7w)
* Lightning Talk: Rust Programming in 5 Minutes - Tyler Weaver - [https://youtu.be/j6UwvOD0n-A](https://youtu.be/j6UwvOD0n-A)

2025-04-28 - 2025-05-04

* Lightning Talk: Saturday Is Coming Faster - Convert year\_month\_day to Weekday Faster - Cassio Neri
* Part 1 - [https://youtu.be/64mTEXnSnZs](https://youtu.be/64mTEXnSnZs)
* Part 2 - [https://youtu.be/bnVkWEjRNeI](https://youtu.be/bnVkWEjRNeI)
* Lightning Talk: Customizing Compilation Error Messages Using C++ Concepts - Patrick Roberts - [https://youtu.be/VluTsanWuq0](https://youtu.be/VluTsanWuq0)
* Lightning Talk: How Far Should You Indent Your Code? The Number Of The Counting - Dave Steffen - [https://youtu.be/gybQtWGvupM](https://youtu.be/gybQtWGvupM)
* Chplx - Bridging Chapel and C++ for Enhanced Asynchronous Many-Task Programming - Shreyas Atre - [https://youtu.be/aOKqyt00xd8](https://youtu.be/aOKqyt00xd8)

**ADC**

2025-05-19 - 2025-05-25

* Elliptic BLEP - High-Quality Zero-Latency Anti-Aliasing - Geraint Luff - [https://youtu.be/z7k1XTrCN4s](https://youtu.be/z7k1XTrCN4s)
* Information Echoes: Introduction to Data Sonification - Rasagy Sharma - [https://youtu.be/o2fvmYZfS6U](https://youtu.be/o2fvmYZfS6U)
* Crunching the Same Numbers on Different Architectures - Analysis of the Different Architectures Used in Embedded Audio Signal Processing - Marco Del Fiasco - [https://youtu.be/Y1n6bgkjSk0](https://youtu.be/Y1n6bgkjSk0)

2025-05-12 - 2025-05-18

* Emulating the TX81Z - Techniques for Reverse Engineering Hardware Synths - Cesare Ferrari - [https://youtu.be/Ut18CPrRZeg](https://youtu.be/Ut18CPrRZeg)
* How AI Audio Apps Help Break the Communication Barrier for India's Deaf Community - Gopikrishnan S & Bharat Shetty - [https://youtu.be/aDVWOve4y9I](https://youtu.be/aDVWOve4y9I)
* Snapshot Testing for Audio DSP - A Picture’s Worth a 1000 Tests - Josip Cavar - [https://youtu.be/Y1n6bgkjSk0](https://youtu.be/Y1n6bgkjSk0)

2025-05-05 - 2025-05-11

* Introducing ni-midi2 - A Modern C++ Library Implementing MIDI2 UMP 1.1 and MIDI CI 1.2 - Franz Detro - [https://youtu.be/SUKTdUF4Gp4](https://youtu.be/SUKTdUF4Gp4)
* Advancing Music Source Separation for Indian Classical and Semi-Classical Cinema Compositions - Dr. Balamurugan Varadarajan, Pawan G & Dhayanithi Arumugam - [https://youtu.be/Y9d6CZoErNw](https://youtu.be/Y9d6CZoErNw)
* Docker for the Audio Developer - Olivier Petit - [https://youtu.be/sScbd0zBCaQ](https://youtu.be/sScbd0zBCaQ)

2025-04-28 - 2025-05-04

* Workshop: GPU-Powered Neural Audio - High-Performance Inference for Real-Time Sound Processing - Alexander Talashov & Alexander Prokopchuk - ADC 2024 - [https://youtu.be/EEKaKVqJiQ8](https://youtu.be/EEKaKVqJiQ8)
* scipy.cpp - Using AI to Port Python's scipy.signal Filter-Related Functions to C++ for Use in Real Time - Julius Smith -

Читать полностью…

C++ - Reddit

Unreal Engine C++

I am learning Unreal Engine 5 and I have a good understanding of it, but I struggle with C++ coding. It would be great if you could provide some suggestions on how to learn C++ for UE5 quickly. Additionally, please recommend both paid and free courses.

https://redd.it/1kvpk32
@r_cpp

Читать полностью…

C++ - Reddit

am i too dumb for this ?

Hey everyone,
I’m someone who recently started my coding journey and chose C++ as my first language. I’ve always enjoyed problem-solving, and I felt like C++ would be a solid foundation to build from. I've been learning through *learncpp.com*, and things were going well at first — I was consistent and understood the concepts as I went along.

But then I had to take a break for 2–3 weeks because of exams, and now I’m finding it hard to remember what I learned. I don’t mean I never understood it — I did, at the time — but now a few chapters later, it’s all a blur. Is this just part of the learning curve? Or am I doing something wrong?

To be clear, it’s not that I can’t understand the material — it’s just that I forget it pretty quickly if I don’t keep using it. I’m really interested in becoming a solid engineer and want to get better at approaching problems with the best possible solution, not just hacking something together through trial and error. I know that trial and error has its place too, but I want to improve my ability to plan and think things through before I start writing code.

If anyone has gone through the same thing or has advice on how to better retain concepts and build solid habits, I’d appreciate your input. Thanks!

https://redd.it/1kvmg00
@r_cpp

Читать полностью…

C++ - Reddit

Hey guys need some suggestions, about learning C++ , i already know java,python and just completed mern dev(building projects and getting better at auth).

So, my first language was Java. I learned it in class 9 and 10 (sophomore year) as part of my school's computer science syllabus. Back then, the school had already introduced us to DSA (linked lists, stacks, queues, hashmaps). Then I had to switch schools for high school (11th and 12th), where the syllabus required Python instead.

Now I’ve passed out, completed MERN stack dev learning, built a few projects (currently working on a big one), and I’m mainly focusing on backend development.

I’m not in university yet, but I know there are international competitions like ICPC, Meta Hacker Cup, GSoC, Codeforces, etc. I want to participate in them once I get into college. I found out that most ICPC finalists or winners use C++, so I’ve started learning it. The basic programming concepts like loops and control flow are fine — not hard at all.

The real issue is the method names. I’ve gotten good at JavaScript, and it’s like all those method names are burned into my brain. Now I’m worried that when I try to do DSA in C++, I’ll mess things up fast because I’ll mix up method names, syntax, and all that.

How do I overcome this?

https://redd.it/1kv0ww9
@r_cpp

Читать полностью…

C++ - Reddit

converting any 8 digit binary number to ascii with very few instructions ( min 1mul , max 4mul )

https://github.com/Mjz86/String/blob/main/uint_conv.md

https://redd.it/1kux8g8
@r_cpp

Читать полностью…

C++ - Reddit

C++ inconsistent performance - how to investigate

Hi guys,

I have a piece of software that receives data over the network and then process it (some math calculations)

When I measure the runtime from receiving the data to finishing the calculation it is about 6 micro seconds median, but the standard deviation is pretty big, it can go up to 30 micro seconds in worst case, and number like 10 microseconds are frequent.

\- I don't allocate any memory in the process (only in the initialization)

\- The software runs every time on the same flow (there are few branches here and there but not something substantial)

My biggest clue is that it seems that when the frequency of the data over the network reduces, the runtime increases (which made me think about cache misses\\branch prediction failure)

I've analyzing cache misses and couldn't find an issues, and branch miss prediction doesn't seem the issue also.

Unfortunately I can't share the code.



BTW, tested on more than one server, all of them :

\- The program runs on linux

\- The software is pinned to specific core, and nothing else should run on this core.

\- The clock speed of the CPU is constant


Any ideas what or how to investigate it any further ?

https://redd.it/1kukzw1
@r_cpp

Читать полностью…

C++ - Reddit

cppcheck problem

Now that PcLint is no longer available as a single-user license, I'm researching other alternatives that I could use for static analysis (C/C++); one of those is cppcheck...

However, in one of my early test runs, I get this error/warning:

Checking der_libs\\common_win.cpp ...

der_libs\\common_win.cpp:280:4: error: There is an unknown macro here somewhere. Configuration is required. If _T is a macro then please configure it. [unknownMacro\]

_T("Text Files (*.TXT)\\0*.txt\\0") \\

\^

I don't think the actual issue is with TCHAR, because other files in the project use that, and don't give this message... however, I don't know what the actual issue is??

I would note that this text compiles without warnings (g++ -Wall ...), and also passes lint with no warnings...



https://redd.it/1kugmwr
@r_cpp

Читать полностью…

C++ - Reddit

Cross compilation isn't worth the pain

I'm convinced c++, ecosystem doesn't want me to cross compile, that I should natively compile on WSL and windows and call it a day.

I have used VStudio, Clion, CMake and XMake. IDE's don't work well even in native compilation, CMake and XMake work without any trouble in native compilation, and they are portable, I can simply run wsl, and run the same commands and my build will be ported to Linux.

But cross compilation doesn't work, I mean you can cross compile a hello world with clang but beyond that it doesn't work. Libraries just refuse to be installed, because they are not designed with cross compilation in mind. Those few who do only support cross compilation to windows from a Linux host, nothing else.

When I started learning this monstrosity, I never would have imagined build systems could have sucked this bad, I thought: Hey syntax might have baggage, but it's fair you can use all manner of libraries. Yeah you can use them reliably if you natively compile everything from source, don't start me talking about package managers, they are unreliable and should be avoided.

Or you can use some of the libraries, if you happen to be using one of the laptops that supports Linux out of the box, you now, the vast majority doesn't.

I'm just frustrated, I feel cheated and very very angry.

https://redd.it/1kudlqk
@r_cpp

Читать полностью…
Subscribe to a channel