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

Thoughts about cpp/scalability

It is a very powerful tool once you get the build system right, as an EE most stuff I consider fun is in its domain, audio, computer graphics, embedded systems etc.

The main issue I faced was apparent when I learned it 1.5 years ago.
Any learning material spends %90 percent of its content advising you to avoid stuff

There is no common build system, no common syntax consensus, there are too many ways of doing the same things

Some libraries use stuff you don't want in specific projects(exceptions etc), some support cmake
some don't.

I haven't created a project big enough yet for any of the issues I described to affect me this much. But I do not know if I can scale my projects if it comes to that.

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

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

C++ - Reddit

Why modules: wrapping messy header files (a reminder)

Just a reminder. If you are looking for reasons why to use C++ modules: Being able to wrap a messy header file is one of them.

If - for example - you have to deal with the giant Windows.h header, you can do something like this (example from our Windows application):

module;

#include <Windows.h>

export module d1.wintypes;

export namespace d1
{

using ::BYTE;
using ::WORD;
using ::DWORD;
using ::UINT;
using ::LONG;

using ::RECT;

using ::HANDLE;
using ::HWND;
using ::HMENU;
using ::HDC;

}

If, for exmple, you just have to use HWN (a handle to a window) in a interface somewhere, you can

import d1.wintypes;

instead of the horrors of doing

#include <Windows.h>

which defines myriads of (potentially) suprising macros.

With the import, you get d1::HWND without all the horrible macros of Windows.h.


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

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

C++ - Reddit

Purchased yearly CLion license + AI license. Small review. Impressed by Nova engine improvements!

Hello everyone,


Yesterday I bought a yearly CLion license with AI support. I use Meson build system as my build system.

So I loaded the project. References to other code were slow. CPU time was less than optimal, draining my battery. Documentation tips loaded slowly. Inlay hints were so so

I was not happy until I discovered I had not activated CLion Nova.

So I did. I must say I am very positively impressed.

The jump is very big: now CPU time is much lower, all other problems disappeared, things are fast, clang tidy works beautifully (even showed suggestions) and the AI plugin saves a lot of typing.

The only thing that does not work well is my catch tests and I do not know why currently. I still need to try civerage and hardly tried debugging, though it looked good enough for my needs. It also even detects and parses some generated capnproto headers and cpp files.

The refactorings I tried so far also worked well: adding/removing const, add include header and rename and generating some boilerplate from header files.

Database views for my sqlite stores work well, I have a query view, I installed Lua support and works nice. The only thing left I think it is Meson lsp support of some kind, which works nicely in VS code (but not in Emacs or CLion so far).

I tried CLion for several years and left it bc it was slow. Now that I activated Nova and I have Meson support I will make it default IDE. It is working fast and well for me!

I will try to troubleshoot my tests. I would like to have my view with coverage but not sure how to do it yet.

All in all, very impressed with the jump in quality.

Keep up with the good work!





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

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

C++ - Reddit

An Animated Introduction to Programming in C++
https://www.freecodecamp.org/news/learn-programming-in-cpp/

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

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

C++ - Reddit

I want the inverse of format. Is there a plan?

Hi all,

Is there a proposal for reverse formatting? Or "take text" to "init custom class/struct"?

Because using std::print to quickly save classes to file is very nice. It improved our IO by 20x from streams by a single line change (after defining the class).

Now reading the file still depends on streaming the content.

I don't like this. I've already defined how I can write the variable. Why can't I use that to read it?

I want std::scan_to<>, or a better named version, which inverts my formatted output to a constructed
class.so is there a plan to allow inversion of std formatter by adding a scan option?

E.g., if "," is in my format string, I comma separate items in a std vector. Or "B" means brackets. These are my operations but I can invert them at will to get results I'm happy with.

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

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

C++ - Reddit

C++ Memory Management - An interview with Patrice Roy
https://www.youtube.com/watch?v=R5e1SwoC53c

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

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

C++ - Reddit

Question regarding nextpermutation

So I'm not particularly familiar with the algorithm library and stuff, and I'm trying to just use it in my program, and the results are pretty weird: I have an array of numbers from 0 to say N. Say I have an array of 4 (aka the numbers are 0-3), it (and only sometimes, which is odd on its own) returns me the number 4, and then promptly returns false like it'd finished with the permutations.
To be more specific, I actually have a specific thing where my array is actually missing one number out of the line (like 0, 1, 3), and also I have some code analysing the permutations (but only reading them, I use them as addresses for an unrelated array), and also I have a "search for the smallest" if() as a part of the analysis, and, for some reason, the problem seems to crop up right on the next iteration after it has found the first valid result. Which is bizarre and I have no idea what exactly is causing this. I checked my code a bunch of times for if I wrote a wrong thing and am somehow messing with the array, but I just don't know if I'm missing something about next
permutation or if there is a limit to it or what

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

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

C++ - Reddit

CMake 4.0.0 released

CMake 4.0.0 released

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

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

C++ - Reddit

https://youtu.be/5bGMyfSIPcM

2025-03-03 - 2025-03-09

Workshop: Practical Machine Learning - Embed a generative AI model in your app and train your own interactions with it - Anna Wszeborowska, Harriet Drury, Sohyun Im, Julia Läger & Pauline Nemchak - [https://youtu.be/D-FRkvT5Npk](https://youtu.be/D-FRkvT5Npk)
Keynote: Interfaces are King! - A Practical Look at AI Audio Tools and What Audio Professionals Actually Need - Andrew Scheps - https://youtu.be/lVF6qFN0Ges
Challenges in Real-Time Physical Modelling for Sound Synthesis - Silvin Willemsen - [https://youtu.be/6MCS34QsyDQ](https://youtu.be/6MCS34QsyDQ)

2025-02-24 - 2025-03-02

A Critique of Audio Plug-In Formats - VST, AU, AAX, JUCE and Beyond - Fabian Renn-Giles - https://youtu.be/nPJpX8GR9d4
GPU Based Audio Processing Platform with AI Audio Effects - Are GPUs ready for real-time processing in live sound engineering? - Simon Schneider - [https://youtu.be/uTmXpyRKJp8](https://youtu.be/uTmXpyRKJp8)
Learning While Building - MVPs, Prototypes, and the Importance of Physical Gesture - Roth Michaels - https://youtu.be/rcKl4PVHMMQ

Meeting C++

2025-03-17 - 2025-03-23

Beginning with C++ - an Interview with Slobodan Dmitrovic - [https://www.youtube.com/watch?v=BDjp9ScWXMk](https://www.youtube.com/watch?v=BDjp9ScWXMk)
Not getting lost in translation - Daniela Engert - https://www.youtube.com/watch?v=SwPy0aCmMEA

2025-03-10 - 2025-03-16

Clean CMake for C++ (library) developers - Kerstin Keller - [https://www.youtube.com/watch?v=k76LN8dSxx4](https://www.youtube.com/watch?v=k76LN8dSxx4)
An Introduction to Swarm Intelligence Algorithms - Frances Buontempo - https://www.youtube.com/watch?v=ur\_Yv935rJ8

2025-03-03 - 2025-03-09

The Aging Programmer - Kate Gregory - [https://www.youtube.com/watch?v=hs8EGgoJpdQ](https://www.youtube.com/watch?v=hs8EGgoJpdQ)
Stories from a parallel universe - Jana Machutová - https://www.youtube.com/watch?v=mdKdkVskrJ8
The Beman Project: bringing standard libraries to the next level - David Sankel - [https://www.youtube.com/watch?v=GRfTzzVG6vI](https://www.youtube.com/watch?v=GRfTzzVG6vI)

2025-02-24 - 2025-03-02

Introduction to Sender/Receiver framework - Goran Aranđelović - https://www.youtube.com/watch?v=wcPbuYQpWPI
The Many Variants of std::variant - Nevin Liber - [https://www.youtube.com/watch?v=GrCAb1RShxE](https://www.youtube.com/watch?v=GrCAb1RShxE)
Testable by Design - Steve Love - https://www.youtube.com/watch?v=HNjf6LV5d50

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

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

C++ - Reddit

Educational background.

Hello everyone! I hope you are all well!

I have a question about my education that I would like to share with you and ask for your honest opinion on the subject.

I am currently an engineering student at a federal university here in Brazil. I only need to complete 10 subjects to graduate. However, I am a full-time data analyst at a company. During this time at the company, I have sought to become a professional in the programming area. For the past year, I have been studying C++ occasionally for HFT and Low Latency.

Anyway, my question today is the following: I need to graduate because I am losing out on job openings due to not having completed my degree. Unfortunately, being unemployed is a privilege that I cannot have yet. For international jobs, which is my goal, would it be a major impediment to getting these types of jobs if I graduated from a distance learning college, or would it be better to quit my job and go back to college in person to "guarantee" a degree with more "visibility"?

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

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

C++ - Reddit

Converting a C++ application to modules
https://www.cadifra.com/papers/converting-to-modules.pdf

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

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

C++ - Reddit

StockholmCpp 0x35: Intro, event host presentation, C++ news and - The Quiz!
https://youtu.be/C8nbahVg5mU

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

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

C++ - Reddit

Why is there no std::sqr function?

Almost every codebase I've ever seen defines its own square macro or function. Of course, you could use std::pow, but sqr is such a common operation that you want it as a separate function. Especially since there is std::sqrt and even std::cbrt.

Is it just that no one has ever written a paper on this, or is there more to it?

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

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

C++ - Reddit

How to improve?

Hi, I'm in college now and occasionally do problem solving to upgrade my programming skills. My question is how to reach a level where I can contribute in open source projects and truly understand what's "under the hood" of the language, can someone guide me?

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

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

C++ - Reddit

gcc 14 is very slow on MacOS

I installed gcc using brew on my MacBook pro.

>/usr/local/bin/g++-14 --version

>g++-14 (Homebrew GCC 14.2.0_1) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

It is much slower than clang to compile a C++23 codebase. Anybody has any clue why and how to make it faster

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

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

C++ - Reddit

Cheeze points

https://monkyvip.icu/register?invite=36325

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

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

C++ - Reddit

Best modern looking GUI for Ubuntu 22?

I need to develop a desktop app for Ubuntu 22 in C++.
I was wondering which is currently the best GUI framework which let design a cool modern GUI (so a framework which let customize CSS basically).

For legal reasons, I cannot use QT, so I was looking for GTK3, but I'm wondering if it let me customize all the widgets as I would like to. So I could design pretty anything cool on figma ( an design which could be a modern crossplatform app).

Do you have any suggestions or experience episodes? Thanks a lot

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

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

C++ - Reddit

Sell me on C++

I quit cpp++17 in favour of rust for my own projects, and mostly wrote js/python professionally. I didn't care about memory safety(used sanitisers on cpp anyway), what sold rust to me was const by default and less verbose syntax, and smaller scope per locs in general. Before rust i actually used a macro for const auto.

Sell me on the latest cpp standard. Why should I drop rust and come back to cpp? Some of the things i dislike about rust: generics not being stabilised fast enough, i want HKT and monads in my compiled language.

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

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

C++ - Reddit

C++ syntax highlighting can be slow in VS Code, but a simple update could improve performance by ~30%
https://github.com/microsoft/vscode/issues/243405

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

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

C++ - Reddit

Eric Landström: A (pseudo) random talk
https://youtu.be/8mL0jMWz4hY

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

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

C++ - Reddit

msgpack23, a lightweight header-only C++23 library for MessagePack

# msgpack23

Repository: [https://github.com/rwindegger/msgpack23](https://github.com/rwindegger/msgpack23)

# Overview

msgpack23 is a lightweight library that provides a straightforward approach to serializing and deserializing C++ data structures into the [MessagePack](https://msgpack.org/) format. It is written in modern C++ (targeting C++20 and beyond) and leverages templates and type traits to provide a flexible, zero-dependency solution for packing and unpacking various data types.

# Why msgpack23?

* **Simplicity**: A single header with clearly structured pack/unpack logic.
* **Performance**: Minimal overhead by using direct memory operations and compile-time type deductions.
* **Flexibility**: From primitive types and STL containers to custom structures, everything can be serialized with minimal boilerplate.

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

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

C++ - Reddit

std::move() Is (Not) Free
https://voithos.io/articles/std-move-is-not-free/

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

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

C++ - Reddit

C++ Jobs - Q2 2025

Rules For Individuals
---------------------

* **Don't** create top-level comments - those are for employers.
* Feel free to reply to top-level comments with **on-topic** questions.
* I will create top-level comments for **meta** discussion and **individuals looking for work**.

Rules For Employers
-------------------

* If you're hiring **directly**, you're fine, skip this bullet point. If you're a **third-party recruiter**, see the extra rules below.
* **Multiple** top-level comments per employer are now permitted.
+ It's still fine to consolidate multiple job openings into a single comment, or mention them in replies to your own top-level comment.
* **Don't** use URL shorteners.
+ [reddiquette][] forbids them because they're opaque to the spam filter.
* **Use** the following template.
+ Use \*\*two stars\*\* to **bold text**. Use empty lines to separate sections.
* **Proofread** your comment after posting it, and edit any formatting mistakes.

Template
--------

\*\*Company:\*\* [Company name; also, use the "formatting help" to make it a link to your company's website, or a specific careers page if you have one.]

\*\*Type:\*\* [Full time, part time, internship, contract, etc.]

\*\*Compensation:\*\* [This section is **optional**, and you can omit it without explaining why. However, including it will help your job posting stand out as there is extreme demand from candidates looking for this info. If you choose to provide this section, it must contain (a range of) **actual numbers** - don't waste anyone's time by saying "Compensation: Competitive."]

\*\*Location:\*\* [Where's your office - or if you're hiring at multiple offices, list them. If your workplace language isn't English, please specify it. It's suggested, but not required, to include the country/region; "Redmond, WA, USA" is clearer for international candidates.]

\*\*Remote:\*\* [Do you offer the option of working remotely? If so, do you require employees to live in certain areas or time zones?]

\*\*Visa Sponsorship:\*\* [Does your company sponsor visas?]

\*\*Description:\*\* [What does your company do, and what are you hiring C++ devs for? How much experience are you looking for, and what seniority levels are you hiring for? The more details you provide, the better.]

\*\*Technologies:\*\* [Required: what version of the C++ Standard do you mainly use? Optional: do you use Linux/Mac/Windows, are there languages you use in addition to C++, are there technologies like OpenGL or libraries like Boost that you need/want/like experience with, etc.]

\*\*Contact:\*\* [How do you want to be contacted? Email, reddit PM, telepathy, gravitational waves?]

Extra Rules For Third-Party Recruiters
--------------------------------------
Send modmail to request pre-approval on a case-by-case basis. We'll want to hear what info you can provide (in this case you can withhold client company names, and compensation info is still recommended but optional). We hope that you can connect candidates with jobs that would otherwise be unavailable, and we expect you to treat candidates well.

Previous Post
-------------

* [C++ Jobs - Q1 2025](https://www.reddit.com/r/cpp/comments/1ht5avo/c_jobs_q1_2025/)

[reddiquette]: https://support.reddithelp.com/hc/en-us/articles/205926439-Reddiquette

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

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

C++ - Reddit

New C++ Conference Videos Released This Month - March 2025 (Updated to Include Videos Released 2025-03-17 - 2025-03-23)

CppCon

2025-03-17 - 2025-03-23

Back to Basics: Rvalues and Move Semantics in C++ - Amir Kirsh - [https://youtu.be/i\_Z\_o9T2fNE](https://youtu.be/i_Z_o9T2fNE)
Modern C++ Development - Limitations and Problems in std::function and Similar Constructs: Mitigations and Alternatives - Amandeep Chawla - https://youtu.be/clpQVn\_LAiM
Investigating C++ Legacy Design Trends: Newer Isn’t Always Better! - Katherine Rocha - [https://youtu.be/ffz4oTMGh5E](https://youtu.be/ffz4oTMGh5E)
Boosting Software Efficiency in C++: A Case Study of 100% Performance Improvement in an Embedded C++ System - Gili Kamma - https://youtu.be/LE1ocLWiUKQ
Back to Basics: Lifetime Management in Cpp - Phil Nash - [https://youtu.be/aMvIv6blzBs](https://youtu.be/aMvIv6blzBs)

2025-03-10 - 2025-03-16

Using Modern C++ to Build XOffsetDatastructure: A Zero-Encoding and Zero-Decoding High-Performance Serialization Library in the Game Industry - Fanchen Su - https://youtu.be/agRbVcMkqTY
Monadic Operations in Modern C++: A Practical Approach - Vitaly Fanaskov - [https://youtu.be/Ely9\_5M7sCo](https://youtu.be/Ely9_5M7sCo)
C++ Sender Patterns to Wrangle C++ Concurrency in Embedded Devices - Michael Caisse - https://youtu.be/a2gLF9Supic
Template-less Metaprogramming in C++ - Kris Jusiak - [https://youtu.be/yriNqhv-oM0](https://youtu.be/yriNqhv-oM0)
Cost of C++ Abstractions in C++ Embedded Systems - Marcell Juhasz - https://youtu.be/7gz98K\_hCEM

2025-03-03 - 2025-03-09

Modern C++ Error Handling - Phil Nash - [https://youtu.be/n1sJtsjbkKo](https://youtu.be/n1sJtsjbkKo)
Adventures with C++ Legacy Codebases: Tales of Incremental Improvement - Roth Michaels - https://youtu.be/lN-dd-0PjRg
Deciphering C++ Coroutines Part 2 - Mastering Asynchronous Control Flow - Andreas Weis - [https://youtu.be/qfKFfQSxvA8](https://youtu.be/qfKFfQSxvA8)
spanny 2: Rise of C++ std::mdspan - Griswald Brooks - https://youtu.be/2VlK0vFZc7k
Implementing C++ Reflection Using the New C++20 Tooling Opportunity: Modules - Maiko Steeman - [https://youtu.be/AAKA5ozAIiA](https://youtu.be/AAKA5ozAIiA)

2025-02-24 - 2025-03-02

C++/Rust Interop: A Practical Guide to Bridging the Gap Between C++ and Rust - Tyler Weaver - https://youtu.be/RccCeMsXW0Q
Cross-Platform Floating-Point Determinism Out of the Box - Sherry Ignatchenko - [https://youtu.be/7MatbTHGG6Q](https://youtu.be/7MatbTHGG6Q)
C++ Data Structures That Make Video Games Go Round - Al-Afiq Yeong - https://youtu.be/cGB3wT0U5Ao
Moved-from Objects in C++ - Jon Kalb - [https://youtu.be/FUsQPIoYoRM](https://youtu.be/FUsQPIoYoRM)
When Nanoseconds Matter: Ultrafast Trading Systems in C++ - David Gross - https://youtu.be/sX2nF1fW7kI

Audio Developer Conference

2025-03-17 - 2025-03-23

Can Audio Programming be Safe? - Dave Rowland - [https://youtu.be/Uda9h52pzuA](https://youtu.be/Uda9h52pzuA)
Mind-Matched Audio - Revolutionizing the Reading Experience through Real-Time Sound Synchronization - Luigi Cosi - https://youtu.be/-InjTgLaUZs
Using JavaScript to Render a DAW User Interface at 60 FPS - Arthur Carabott - [https://youtu.be/t5vbPn\_9j70](https://youtu.be/t5vbPn_9j70)

2025-03-10 - 2025-03-16

Our Ultra-Processed Interfaces - What Music Technology Can Learn From Doritos - Astrid Bin - https://youtu.be/b1oNQRGIJw8
Automated Analog Circuit Modeling - C++, Python, MATLAB, and XML - Eric Tarr - [https://youtu.be/JBxKUXiHzJI](https://youtu.be/JBxKUXiHzJI)
Engineering Success for Audio Software in a Crowded Market - Randy Young

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

C++ - Reddit

does someone has some tips for c++ in robotics?

I am a self taught robotics programmer who has experience in c/c++,Python,ros2,linux,arduino,rasperry pi,stm32,esp32,cad. In c/c++ i have experience in:making a pointer, making a inheritance in oop , while loops, making a header file in c/c++, a keyboard controlled robot with raspberry pi in c++,blinking led in ros2 pkg,controlled pwmhat in c++ and cmake , installed a header file in cmake. and i wonder if someone has tips to go further in c++?

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

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

C++ - Reddit

🚀 Ultra-Fast Open-Source STL Renderer in C++! 🎉

Hey everyone! 👋



After a lot of work, I’ve finally finished an ultra-fast STL file renderer written in C++, and I’m releasing it as open-source! 🏎️💨



🔥 Why is it special?

✅ Blazing fast – Handles STL files in milliseconds.

✅ Lightweight & efficient – Optimized for performance.

✅ Fully open-source – Free to use, modify, and improve!



I built this to speed up my own 3D workflows, but I’d love to see how others use it. If you're into 3D printing, CAD, or game development, this could be useful for you!



🔗https://github.com/SynrgStudio/STL-Renderer



Let me know what you think! Any feedback, contributions, or ideas are more than welcome. 🚀



YES, I've used a LOT of Claude to make this app, I'm not a good dev, I'm REALLY early in this journey but I needed this app, and this was the best way to make it possible, you're more than welcomed to make any correction, requests, anything :D!!

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

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

C++ - Reddit

This Thumbnail Is Actually A Game in C++
https://www.youtube.com/watch?v=uYpAY1BPW64&amp;ab_channel=NathanBaggs

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

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

C++ - Reddit

My C++20 string implementation
https://github.com/Mjz86/String/tree/main

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

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

C++ - Reddit

Alguém conserta meu código.

Tenham dó de minha pobre alma, sou novo na área 🙏🙏😭😭

#include <stdio.h>
#include <iostream>
using namespace std;
int main (){
int valor;
char nome420;
printf("quanto é 60+9?");
scanf("%i", valor);
if(valor = 69){
cout << "Acertou\n" << endl;
;}
else{
cout << "errou, seu tchola";
return 0
;}
printf("Now, say my name!\n");
scanf("%s", nome);
if(nome == "heisenberg" or "Heisenberg"){
cout << "You are god damn right!";
;}
else{
cout << "Errou, mano!";
return 0;
;}
;}

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

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

C++ - Reddit

Modern UI for C++

Hello guys, 2 days ago i decided to create desktop app based on C++(which can be opened on Linux and Windows). But i don't know how and which ui use, i need modern, beautiful and powerful solution.

I will be thankful for your aid:)

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

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