
Hi, are there any followers here related to #CERN interested in #CPlusPlus ? My scheduled trainings in October still lack participants and thus might be cancelled.
So sign up or spread the word!
@CERN ?
Hi, are there any followers here related to #CERN interested in #CPlusPlus ? My scheduled trainings in October still lack participants and thus might be cancelled.
So sign up or spread the word!
@CERN ?
Hi, are there any followers here related to #CERN interested in #CPlusPlus ? My scheduled trainings in October still lack participants and thus might be cancelled.
So sign up or spread the word!
@CERN ?
C++ library update in -current https://www.undeadly.org/cgi?action=article;sid=20250822171538 #openbsd #cplusplus #c++ #programming #development #library #clang #freesoftware #libresoftware
C++ library update in -current https://www.undeadly.org/cgi?action=article;sid=20250822171538 #openbsd #cplusplus #c++ #programming #development #library #clang #freesoftware #libresoftware
So I need to represent, in C++, a structure like "a Value can be a bool, a string, a list of Values, or a map from string to Value"
This should be easy, something like:
class Value;
using String = std::string;
using List = std::vector;
using Map = std::unordered_map;
class Value {
// something tagged-union-like
};
However unordered_map can't have incomplete types as a parameter, even though it's totally possible T_T unordered_map is just pointers #cpp #programming
Side note: I would LOVE to be able to use C++'s native tagged unions: std::variant. But defining something recursive with std::variant is impossible because you can't forward declare an alias. I want to do:
declare_alias Value;
using String = std::string;
using List = std::vector;
using Value = std::variant;
But there is no way to do that. You can only forward declare classes, structs and functions. So I'm stuck wrapping the variant in a class. #cplusplus#cpp
I'm stuck trying to decide whether to implement my own hash table, or use an additional and unnecessary level of pointers with unordered_map
C++17 gave us std::vector, std::list and std::forward_list of incomplete types (HOW DID IT TAKE THAT LONG), but from what I can tell, not even C++26 will have std::unordered_map of incomplete types :(
Of course in #Rust, vectors and hash maps and everything else just works with recursive types no problem
C++ has the most bloated yet anemic standard library, the whole library is an over-engineered mess but lacks even the most basic functionality that's useful in the real world such as "format this timestamp as a ISO 8601 time" or "parse this ISO 8601 time to a timestamp", it's infuriating #cpp #cplusplus #programming
Why did IEEE specify sqrt(-0) to be -0?! That's … surprising when applied to the interpretation of -0 in the context of complex numbers:
sqrt(complex{-0,+0}) is complex{+0,+0}.
And also pow(-0, 0.5) is +0.
If anything sqrt(-0) should be NaN, but why -0?
I added hot reloading of C++ gameplay code to my game :D
This is possible because "engine" code and "gameplay" code is split into different shared libraries. So when you hit F5, it compiles a new shared library for the gameplay code and loads the new one (as well as reloading all the assets etc).
I was able to use precompiled headers to significantly speed up recompilation! A full rebuild of all the gameplay code used to take 4.5 seconds, on my laptop. Now that I made it pre-compile the engine headers, it does it in 1.6 seconds.
I've tried precompiled headers before and struggled to get real speed-up, but I guess this is literally the perfect case for it; every gameplay source code is gonna include the exact same engine library header 😊 #cplusplus#cpp
C++ has the most bloated yet anemic standard library, the whole library is an over-engineered mess but lacks even the most basic functionality that's useful in the real world such as "format this timestamp as a ISO 8601 time" or "parse this ISO 8601 time to a timestamp", it's infuriating #cpp #cplusplus #programming
Why did IEEE specify sqrt(-0) to be -0?! That's … surprising when applied to the interpretation of -0 in the context of complex numbers:
sqrt(complex{-0,+0}) is complex{+0,+0}.
And also pow(-0, 0.5) is +0.
If anything sqrt(-0) should be NaN, but why -0?
I was able to use precompiled headers to significantly speed up recompilation! A full rebuild of all the gameplay code used to take 4.5 seconds, on my laptop. Now that I made it pre-compile the engine headers, it does it in 1.6 seconds.
I've tried precompiled headers before and struggled to get real speed-up, but I guess this is literally the perfect case for it; every gameplay source code is gonna include the exact same engine library header 😊 #cplusplus#cpp
I added hot reloading of C++ gameplay code to my game :D
This is possible because "engine" code and "gameplay" code is split into different shared libraries. So when you hit F5, it compiles a new shared library for the gameplay code and loads the new one (as well as reloading all the assets etc).
A space for Bonfire maintainers and contributors to communicate