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
"White House urges developers to dump C and C++" Thoughts?
news link below:
https://www.infoworld.com/article/3713203/white-house-urges-developers-to-dump-c-and-c.html
​
p.s. : i saw the post in another cpp sub and found it necessary to share with you
https://redd.it/1b2rcio
@r_cpp
telegram
quien me agrega algun grupo de telegram +18?
https://redd.it/1b2oroj
@r_cpp
Do RAM disks improve build time, and if yes, how exactly?
I have recently learnt about RAM disks and the first thing I thought about was if it's possible to use them to optimise compiler performance. The way how I see it is that files could be loaded in the in-memory filesystem and be compiling there, and in the end the result artefact would be written back into the persistent storage.
Ii took some thought and found out there are two compilation strategies that meaningfully make sense to use with ramdisks. The first one is the common case where we compile every source file into an object file and then link together. I noticed that in this workflow, when we only rebuild those files we have changed, we essentially load unchanged objects, regenerate old ones, link them and then write the new objects too. In the end, the total drive throughput is constant and the effect is the same as if we would load everything from drive and do the whole compilation just in memory.
The second strategy was to reduce IO by only loading the source files and compiling them into the final build artefact that we link together. Even taking into account the whole build process happens in memory, we still load a lot of unnecessary files and do useless work, and I thought that effectiveness of ramdisks really depend on the size of your code you need to rebuild and that if it would be faster to recompile some files than loading them from storage, then ramdisks would give the upper hand.
I decided to measure it by making a ramdisk and timing how long it would take to copy and compile a single 50-line file into an object file and how long it would take to print the same pre-compiled object from storage by printing the whole file to terminal using the cat command. To my surprise, it's significantly faster to load the file from storage than it is to compile it, by the factor of 4. Intuitively, I thought that the IO overhead would overweigh the time it takes to compile, especially since I tested it on HHD, but then I tried to print both source and object files. Despite the source being 4 times smaller, it took the same time to print them, which could be the reason why my benchmark is inaccurate: loading both files took the same time and I was essentially measuring the difference in compiling.
I thought it was filesystem cache, that's why I dropped cache and repeated the experiment, but then printing the object file took the same time, but compiling took even longer. I decided to research it further, and the Gentoo wiki, the flagship of compiling software, has a ramdisk-dedicated page that, however, suggests against using it arguing there are no noticable differences in compiling times, especially if you use the -pipe option . It then lists some common applications like Chromium, LibreOffice and LLVM and how much RAM you need so that ramdisk was beneficial, and their sizes are astonishing: 4-10 GB. At this point the only real use for RAM disks I could think about is to cache header files and make it faster to include them, but other than that, filesystem seems to handle compilation and memory management really well.
On the footnote, RAM disks also have disadvantages, aside from the neeed to maintain them and document how to use them, they also keep consuming memory after their files were closed, which means that if in normal setup compiler would close a file once it's no longer needed, the kernel would reclaim its memory, which could be used by the next file, then in ramdisks file is still in memory even once it was closed and resides until you delete it, which needlessly saying consumes system resources without any use. Truthfully speaking, the only plausible way how ramdisks could be useful to me is if they could keep containing object files after they have been generated if we use separate compilation so that the linker didn't need to read them but could access immediately. That sounds like a convincing
Intel Blogpost: Why do we need a Undefined Behavior Annex for the C++ standard?
https://community.intel.com/t5/Blogs/Tech-Innovation/Tools/Why-do-we-need-a-Undefined-Behavior-Annex-for-the-C-standard/post/1574397
https://redd.it/1b2flr2
@r_cpp
Building c++ project with... c++?
Yeah, so as a POC I created a tool that works on top of cmake and allows defining project structure with c++ instead of pesky cmake:
#include "CppMake/Project.hpp"
#include "CppMake/Application.hpp"
using namespace std;
int main() {
Project project("test");
project.create<Application>("test").addSources({
"main.cpp"
});
}
Best languages for C++ scripting discussion, with some insights, looking for further recommendations.
Hello everyone,
I developed a small cards game which uses a scripting layer. The scripting layer was changed several times due to usability problems of some kind.
I would like to write this post to give some information and to find some more if possible, coming from my experience.
What I was looking for was a language that, basically, has:
- easy to bind interface to C++ (whether natively or through bindings pybind style) --- It is not a hard requirement anymore that it is super easy to bind if I can do callbacks and I can represent C++ types well (with normal inheritance, not virtual, basically) on the scripting side.
- familiar with C++ syntax, especially, inheritance should work well and it is a very big advantage that it has classes, since that is what I use.
- easy to use C++ types such as shared/unique_ptr, optional and variant is a big advantage
- should be able to register some state from C++ side, making it available to the scripting side out-of-the-box
After some experience, I added:
- must support cooperative coroutines/fibers/threads (this is not even negotiable, after some experience coding scripts for the game)
My first list was something like this:
- Chaiscript (does not support fibers) -- very good at putting callback code from ChaiScript
- Python (too heavy) -- maybe micropython?
- Squirrel (did not try seriously actually, but I recall at some point I did something, not sure why I abandoned it, looking at it)
- Angelscript (no fibers)
- Lua -- but it is weird AF compared to C++, though could be considered also via sol2 bindings.
I am currently using Wren via WrenBind17, which is quite nice, but it has a very, very big downside: it does not support reentrancy, then, I cannot author callback code. This is a very severe drawback (though I completed the full coding almost) since my task system and `.then` chaining implemented in C++ cannot be passed callbacks from C++. Here the bug: https://github.com/wren-lang/wren/issues/487.
1. do you have a clear recommendation that supports fibers and callbacks and, if possible, but under consideration bc of the features? micropython maybe?
I am shortlisting to:
- Squirrel via sqrat or squall
- Lua via Sol2
- checking into micropython, if that is even feasible
But maybe someone found something better than I have so far. I might write an updated article about scripting with C++ as the native language at some point. I wrote down one before, with additional information on this ongoing research.
P.S.: For context, I leave an article I wrote before about scripting. Sorry for the self-promotion, not intentional, but I think it can give context for my research done at the time: https://itnext.io/c-scripting-alternatives-easy-to-bind-scripting-binding-chaiscript-and-wren-into-a-small-game-174c86b0ecd7
Disclaimer: I do not make any money with my articles, just write them for fun :)
https://redd.it/1b232h1
@r_cpp
How often do people use C++ types across DLL/SO boundaries?
It seems to me that this is a bad idea.
I got bitten by it a lot on MSVC in the 00's, so I started using (and continue to only use) the de facto C ABI instead.
Did I make a bad move? Or was I just 'unlucky' that the moment I adopted this practice, ABI has been nailed down for the past 13 years?
Discuss ...
​
https://redd.it/1b1tcjx
@r_cpp
C++20 idioms for parameter packs
https://www.scs.stanford.edu/~dm/blog/param-pack.html
https://redd.it/1b1gn3n
@r_cpp
Serialization/serialization library for baremetal applications
As per title, do libraries of this kind exist?
I've tried protobuf but does not support baremetal environments and I've not found libraries that explicitly support that.
https://redd.it/1b1ccuh
@r_cpp
C++ System Developer
I've learn c++ system development dealing with win32 api x11 etc.
But I'm wondering whether i can get a job or not. Very sad about it
https://redd.it/1b14iot
@r_cpp
What is the state of modules in 2024?
https://redd.it/1b0zem7
@r_cpp
C++ Videos Released This Month - February 2024 (Updated to Include Videos Released 02/19/2024 - 02/25/2024)
This month the following C++ videos have been published to YouTube. A new post will be made each week as more videos are released
CppCon
02/19/2024 - 02/25/2024
The Absurdity of Error Handling: Finding a Purpose for Errors in Safety-Critical SYCL - Erik Tomusk - [https://youtu.be/ZUAPHTbxnAc](https://youtu.be/ZUAPHTbxnAc)
Advancing cppfront with Modern C++: Refining the Implementation of is, as, and UFCS - Filip Sajdak - https://youtu.be/nN3CPzioX\_A
Can C++ Data-oriented-design be Improved? - Ollivier Roberge - [https://youtu.be/s3LvIWhBOtQ](https://youtu.be/s3LvIWhBOtQ)
Single Producer Single Consumer Lock-free FIFO From the Ground Up - Charles Frasch - https://youtu.be/K3P\_Lmq6pw0
Advanced SIMD Algorithms in Pictures - Denis Yaroshevskiy - [https://youtu.be/YolkGP-rb3U](https://youtu.be/YolkGP-rb3U)
02/12/2024 - 02/18/2024
Monads in Modern C++ - Georgi Koyrushki & Alistair Fisher - https://youtu.be/kZ8rbhGgtv4
Coroutine Patterns: Problems and Solutions Using Coroutines in a Modern Codebase - Francesco Zoffoli - [https://youtu.be/Iqrd9vsLrak](https://youtu.be/Iqrd9vsLrak)
Powered by AI: A Cambrian Explosion for C++ Software Development Tools - Emery Berger - https://youtu.be/w7tYe-xTrPw
Back to Basics: Testing in C++ - Phil Nash - [https://youtu.be/7\_H4qzhWbnQ](https://youtu.be/7_H4qzhWbnQ)
Back to Basics: C++ Concurrency - David Olsen - https://youtu.be/8rEGu20Uw4g
02/05/2024 - 02/11/2024
Robotics at Compile Time: Optimizing Robotics Algorithms With C++'s Compile-Time Features - [https://youtu.be/Y6AUsB3RUhA](https://youtu.be/Y6AUsB3RUhA)
Symbolic Calculus for High-performance Computing From Scratch Using C++23 - Vincent Reverdy - https://youtu.be/lPfA4SFojao
C++ Object Lifetime: From Start to Finish - Thamara Andrade - [https://youtu.be/XN\_\_qATWExc](https://youtu.be/XN__qATWExc)
Undefined Behavior in C++: What Every Programmer Should Know and Fear - Fedor Pikus - https://youtu.be/k9N8OrhrSZw
Robots Are After Your Job: Exploring Generative AI for C++ - Andrei Alexandrescu - [https://youtu.be/J48YTbdJNNc](https://youtu.be/J48YTbdJNNc)
01/29/2024 - 02/04/2024
Object Introspection: A C++ Memory Profiler - Jonathan Haslam & Aditya Sarwade - https://youtu.be/6IlTs8YRne0
Plug-in Based Software Architecture for Robotics - Abishalini Sivaraman & Anthony Baker - [https://youtu.be/Os6PoxvJfIQ](https://youtu.be/Os6PoxvJfIQ)
Is C++23 std::mdspan a Zero-overhead Abstraction? - Oleksandr Bacherikov - https://youtu.be/9fRnSQkpNGg
Embracing CTAD - Nina Ranns - [https://youtu.be/pcroTezEbX8](https://youtu.be/pcroTezEbX8)
How to Build Your First C++ Automated Refactoring Tool - Kristen Shaker - https://youtu.be/torqlZnu9Ag
All of these talks can also be accessed at https://cppcon.programmingarchive.com where you can also find information on how to get early access to the rest of the CppCon 2023 videos and lightning talks.
Meeting C++
02/19/2024 - 02/25/2024
How to deal with static analysis findings: MISRA - Xavier Bonaventura - [https://www.youtube.com/watch?v=ApUc7VEfKkw](https://www.youtube.com/watch?v=ApUc7VEfKkw)
Applied Modern C++: The problem of messages versioning in API - Olivia Quinet - https://www.youtube.com/watch?v=qH5o3Z8gR7w
grpc C++ ... a way to go generic - Irakleia Karyoti - [https://www.youtube.com/watch?v=3oRDfHbBPKQ](https://www.youtube.com/watch?v=3oRDfHbBPKQ)
What is a random number and why should I care - Frances Buontempo - https://www.youtube.com/watch?v=tGKMuaMNxMw
02/12/2024 -
Thoughts on Alex Gaynor's Security Issues with C++
[https://alexgaynor.net/2019/aug/12/introduction-to-memory-unsafety-for-vps-of-engineering/](https://alexgaynor.net/2019/aug/12/introduction-to-memory-unsafety-for-vps-of-engineering/)
I was looking through the [White House Press Release](https://www.whitehouse.gov/oncd/briefing-room/2024/02/26/press-release-technical-report/) on how Future Software Should be Memory safe. Which I totally agree with. In this report they listed that C and C++ are the #1 reasons for Security Vulnerabilities. The solution? Rewrite your code in a memory safe language or adopt a new memory safe language for new projects. The report then cited the article on top and it was just a massive hate post for C and C++.
Their two arguments on why to avoid C++ I felt were really short sighted but it was something I understood. However, they are both easily counter argued:
>If I have a to do list with ten items, and I ask for the eleventh item, what should happen? Clearly I should receive an error of some sort.
Which I am assuming this individual is not using modern C++. I am going to assume they are referring to this:
const std::array<int, 3> myArray = { 0, 1, 2};
std::cout << myArray[4] << std::endl;
Which will happily compile and will produce a garbage number. Of course it would not result in any errors. However, if we use modern cpp:
const std::array<int, 3> myArray = { 0, 1, 2};
std::cout << myArray.at(4) << std::endl;
The following error is produced:
terminate called after throwing an instance of 'std::out_of_range'
what(): array::at: _n (which is 4) >= _Nm (which is 3)
Aborted (core dumped)
>Imagine I delete a to do list, and then later I request the first item of that list. Clearly I should receive an error, you can’t get items from a deleted to do list.
My assumption with this is raw pointers. Which I agree, raw pointers should be a code smell but there are definitely use cases for them when dealing with memory. However, this is what smart pointers are for. I will agree, that a segmentation fault (core dumped) isn't really much of an error. But at least the program crashes like the author suggests that it should do:
auto myList = std::unique_ptr<std::vector<int>>(std::vector<int>{0,1,2});
myList.release();
std::cout << myList->at(0) << std::endl;
You get:
Segmentation fault (core dumped)
Just thought I would share this article with you guys. It just seems to me the solution to the problem of C and C++ always points to: "Just nuke your work and start from scratch! And if you can't, just adopt a new language with projects going forward!" Instead of focusing on updating legacy code to using modern C++.
https://redd.it/1b0qjqd
@r_cpp
Websocket optimize issue
Please help me with the optimization of the code, that would make me so happy. I am pretty new to c++ and this is the best I can do, I am stucked 😦 . I tried so many other things but I cannot figure it out what can be done. So project is simple. Client is connected to wss and subscribe to a "topic". This "topic" is sending messages continuously (fast). My goal is to be the fastest to catch message (ping to server 1ms) and check the condition, if true parse a value (id) and send back message ASAP. I have set parameters to reduce latency, implemented the fastest JSON library and make it async. What can be done to do this circle I described above faster. Please dm me
https://redd.it/1b0o84e
@r_cpp
Guys I wanna practice my c++,
I have been learning c++ from learncpp.com and I feel like wanting to implement what I have learnt so far.
What real world projects can be done using cpp?
Any projects that I can do that I can put on my resume?
What fields can 8 get into apart from embedded or graphics learning cpp?
I need your advice as I have hit a roadblock 🫠
https://redd.it/1b0i2av
@r_cpp
Leetcode Question, Why is this giving a runtime error?
I'm trying to solve [https://leetcode.com/problems/flatten-binary-tree-to-linked-list/](https://leetcode.com/problems/flatten-binary-tree-to-linked-list/) in one line of C++ (just a lambda). I have pasted my solution below, but it gives a RTE when the input is just a nullpointer. Can anybody help me debug this? I added the outer ternary in order to try and stop the lambda from being evaluated, but I guess it doesn't work. The problematic TC is when root == nullptr. Edit: formatting
class Solution {
public:
void flatten(TreeNode* root) {
return root ? [&] (auto f, TreeNode* x, TreeNode* y) { return f(f, x, y); }(
[&] (auto self, TreeNode* node, TreeNode* parent) {
if (!node || !(node->right || node->left)) {
return node ? node : parent;
}
auto left = self(self, node->left, node);
auto right = self(self, node->right, node);
left->right = node->right;
node->right = node->left ? node->left : node->right;
node->left = nullptr;
return right ? left->right : left;
}, root, root), void() : void();
}
};
https://redd.it/1b2plah
@r_cpp
point to me, albeit not clear.
Is that so, and are there any other uses for RAM disks to accelerate build time, and does preserving object files between code generation and linking a worthwhile reason to use them? I am particularly asking this question because in separate compilation, object files are generated and linked in two separate processes, which means that the linker process would potentially need to read the objects again.
https://redd.it/1b2ir41
@r_cpp
List of constinit compatible standard types
Has anyone ever compiled a list of types from the standard library which can be used with C++20's constinit
? So far, nothing useful has turned up in my research. Seems to me like such a list could be useful as I've realized it's not just a matter of figuring out whether a type has constexpr constructors.
As an example, std::string
's small buffer optimization makes it possible to construct some strings in a constinit
context, while others require dynamic allocation and will fail to compile (godbolt: https://gcc.godbolt.org/z/59h1Esbqs). Because the size of the buffer isn't necessarily the same with all platforms/stdlibs, it means code leveraging std::string
in a constinit
context might be brittle.
So far, here are some types that seem 100% safe to use in C++20:
array
atomic
bitset
chrono (duration, day, month, year, hhmmss, etc.)
complex
hash
initializer_list
onceflag
* optional
* pair
* referencewrapper
source_location
span
string_view
tuple
type_info
variant
And some more with C++23 (untested):
expected
extents
mdspan
unexpected
Edit: I originally confused the requirements for constinit
with the requirements for constexpr operator""
and the post has been edited to remove that mistake to avoid distracting away from the main point.
https://redd.it/1b2fpsi
@r_cpp
[C++20] Opt-in mixins with reflecttion (gcc, clang, msvc)
[C++20] A small example showing potential of simple reflection capabilities via reflect - https://github.com/boost-ext/reflect.
Similar to boost.pfr - BOOST_PFR_FUNCTIONS_FOR - https://www.boost.org/doc/libs/master/doc/html/BOOST_PFR_FUNCTIONS_FOR.html and boost.fusion - https://live.boost.org/doc/libs/1_58_0/libs/fusion/doc/html/fusion/adapted/define_struct.html
Note: It's not ideal as it has its hard edges but it illustrates the potential. Also it can be done many different ways with different trade-offs.
Example (works on gcc, clang, msvc with -Wextra -Wall -Werror -pedantic -pedantic-errors or /W4/ WX)
#include <utility> // std::exchange
#include <ostream>
#include <reflect>
// part of the library --->
template<class T>
auto operator<<(std::ostream& os, const T& t) -> std::ostream&
requires requires { { t.operator<<(os) } -> std::same_as<decltype(os)>; } {
os << reflect::type_name(t) << '{';
auto sep = "";
reflect::for_each([&](const auto& member) {
os << std::exchange(sep, ",") << member.name << ':' << member.value;
}, t);
return os << '}';
}
template<class T>
requires requires(T t) { { t.hash() } -> std::same_as<std::size_t>; }
struct std::hash<T> {
constexpr auto operator()(const T& t) const {
constexpr auto hash_combine = [](std::size_t& seed, const auto& t) {
std::hash<std::remove_cvref_t<decltype(t)>> hash{};
seed ^= hash(t) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
};
std::size_t seed{};
reflect::for_each([&](const auto& member) { hash_combine(seed, member.value); }, t);
return seed;
}
};
// <---
struct foo {
int a;
int b;
auto operator<<(std::ostream& os) const -> std::ostream&; // opt-in for << generted by reflect
auto operator<=>(const foo&) const = default; // opt-in for <=> generated by the compiler
auto hash() const -> std::size_t; // opt-in for std::hash generted by reflect
};
struct bar {
int a;
friend auto operator<<(std::ostream& os, const bar&) -> std::ostream& {
return (os << "custom_bar_printer"); // custom operator<<
}
auto operator<=>(const bar&) const = default; // opt-in for <=> generated by the compiler
};
#include <iostream>
int main() {
// foo and bar are printable (bar has custom printer whereas foo has a generated one)
std::cout << foo{.a=1, .b=2} << '\n'; // prints foo{a=1,b=2}
std::cout << bar{.a=42} << '\n'; // prints custom_bar_printer{}
// foo is hashable (enabled by `auto hash() -> const std::size_t`)
std::cout << std::hash<foo>{}(foo{.a=1, .b=2}) << '\n'; // prints 175247769363
// hash for bar is not enabled, bar is missing `auto hash() const std::size_t`
static_assert(not [](auto t) { return requires { std::hash<decltype(t)>{}(t); }; }(bar{.a=42}));
// foo and bar are comparable (enabled by the compiler via `<=>`)
static_assert(foo{.a=1,.b=2} == foo{.a=1,.b=2});
static_assert(bar{.a=4} != bar{.a=2});
}
Full example -> https://godbolt.org/z/or4r36En8
Updates -> https://twitter.com/krisjusiak/status/1762886437236568464
https://redd.it/1b2bg4f
@r_cpp
White House goes off the rail
White House urges developers to dump C and C++
https://www.infoworld.com/article/3713203/white-house-urges-developers-to-dump-c-and-c.html
https://redd.it/1b25cvl
@r_cpp
litgen: a new automatic C++ to python bindings generator
I'd like to introduce litgen, an automatic python bindings generator, which can be used to bind C++ libraries into documented and discoverable python modules using pybind11.
If your C++ header is well documented, the published python bindings will mirror it: as an example, compare the python imgui bindings stubs to the imgui.h header file.
Although being relatively new (2022), litgen was battle tested on 20 different libraries for a total of more than 100,000 lines of code, and it is the main driving force behind the python bindings for Dear ImGui Bundle (which includes 20 different libraries).
It is published under the GNU GPL license.
https://redd.it/1b20p2j
@r_cpp
std::source_location::current() as a default function argument: site of caller or declaration?
I think there's a defect in XCode's (15.2) implementation of `source_location::current()`. I have a cross-platform application, where the logging code is in a file we'll call "Misc.h", and has a signature like
```
void Log(gsl::czstring info,
const std::source_location& location = std::source_location::current()) noexcept;
```
When called on the app compiled by Visual Studio with no argument in the second position, the source location used is the site of the caller. When called on the app compiled by XCode the source location used is the line of the declaration in Misc.h.
[According to CPP reference](https://en.cppreference.com/w/cpp/utility/source_location/current) "`current()` Constructs a new source_location object corresponding to the location of the call site." Does the use of a default argument change that?
https://redd.it/1b1pjii
@r_cpp
single-header: command line utility to convert C++ include-based project into portable-ish single header files (with cmake support)
Heya
I wanted to share this tool I've made in rust to convert a C++ input file into portable header files.
It runs the C++ preprocessor (with macro expansion disabled) on it and undoes all system level include expansion by reading the linemarkers (gcc preprocessor output) and keeping expanded non-system headers.
If your project uses cmake, you can give it the '--cmake build-folder/' option, it will extract the preprocessor options for the desired file from the compile_commands.json.
I personally use it to copy paste projects I work on in godbolt to test accros a variety of compilers.
You can install it with `cargo install single-header`
github link: https://github.com/DaemonSnake/single-header
creates.io link: https://crates.io/crates/single-header
Thanks for your attention \^\^
https://redd.it/1b1d3sz
@r_cpp
Cougar allocators now has a custom aligned allocator
Cougar allocators now have 5 different STL conformant allocators:
There are two allocators based on static memory, one utilizing a first-fit strategy and one utilizing a best-fit strategy. This is handy for embedded systems
There are two allocators based on stack memory with both first-fit and best-fit strategies. This is handy to make your container run faster, if you know its size limit.
Both above allocators also could make memory for containers like link-lists contiguous. That improves your cache locality.
And now, there is a new allocator that allocates memory on custom byte boundary. This comes handy if you want to take advantage of SIMD instructions or prevent false cache line sharing
https://redd.it/1b1arnc
@r_cpp
Generate Cleaned up code
When I’m working with reference implementations, there’s typically an overwhelming number of compiler macros and precompiler conditionals. Cleaning and consolidating takes hours. Blindly using an llm generates unreliable code. Is there a tool that can create a slimmed down code base base on the currently configured compiler constants. Seems like a tool that would be pretty useful.
https://redd.it/1b109vh
@r_cpp
02/18/2024
Type Erasure - The Implementation Details - Klaus Iglberger - [https://www.youtube.com/watch?v=7MNyAHp0h7A](https://www.youtube.com/watch?v=7MNyAHp0h7A)
Time Travel Debugging - Greg Law - https://www.youtube.com/watch?v=qyGdk6QMpMY
02/05/2024 - 02/11/2024
TDD for Microcontrollers - Daniel Penning - [https://www.youtube.com/watch?v=EvvJE0AYeZw](https://www.youtube.com/watch?v=EvvJE0AYeZw)
A Smooth Introduction to SYCL for C++20 afficionados - Joel Falcou - https://www.youtube.com/watch?v=-Lr0Xj\_lR4Y
Playing Video Games One Frame at a Time - Ólafur Waage - [https://www.youtube.com/watch?v=nYoIiUc3u3o](https://www.youtube.com/watch?v=nYoIiUc3u3o)
Using the filter view in practice - Nicolai Josuttis - https://www.youtube.com/watch?v=49ZYW4gHBIQ
01/29/2024 - 02/04/2024
Advanced SIMD Algorithms in Pictures - Denis Yaroshevskiy - [https://www.youtube.com/watch?v=vGcH40rkLdA](https://www.youtube.com/watch?v=vGcH40rkLdA)
Tooling Intuition - Kevin Carpenter - https://www.youtube.com/watch?v=mmdoDfw9tIk
Design Patterns: The most common misconceptions - Klaus Iglberger - [https://www.youtube.com/watch?v=w-fkFyrbWbs](https://www.youtube.com/watch?v=w-fkFyrbWbs)
Memory Model: Get your shared data under control - Jana Machutová - https://www.youtube.com/watch?v=L5RCGDAan2Y
https://redd.it/1b0n9yc
@r_cpp
Introduction To Low Latency Programming: Minimize Branching And Jumping
https://tech.davidgorski.ca/introduction-to-low-latency-programming-minimize-branching-and-jumping/
https://redd.it/1b0scf5
@r_cpp
White House: Future Software Should Be Memory Safe
https://www.whitehouse.gov/oncd/briefing-room/2024/02/26/press-release-technical-report/
https://redd.it/1b0pnn0
@r_cpp
Difference between std::uniqueptr<T,Deleter>::get() and std::weakptr
Hello CPP Experts,
I am trying to understand why we need a concept of std::shared_ptr & std::weak_ptr, when we already have the concept of std::unique_ptr and we can purposefully get a weak-like reference to that object using std::unique_ptr<T,Deleter>::get().
Is there any difference, or usecase when we need on over the other? What are they?
https://redd.it/1b0mcel
@r_cpp
Vehicle Physics Simulation in my C++ game engine
C++ OpenGL Vehicle physics demo
Hello everyone, hope you are doing well. I just wanted to share some progress on my game engine. I tried to pull vehicle physics. I am happy with the result. Hope you like it as well.
Thanks.
https://redd.it/1b0f5qx
@r_cpp