Magic Enum C++
rr
Our great sponsors
Magic Enum C++ | rr | |
---|---|---|
44 | 98 | |
4,324 | 8,569 | |
- | 1.1% | |
8.4 | 9.6 | |
25 days ago | about 4 hours ago | |
C++ | C++ | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Magic Enum C++
-
What C++ library do you wish existed but hasn’t been created yet?
I'm not sure this is quite what you're asking for, but this library has been super helpful to me in the past : https://github.com/Neargye/magic_enum
-
Fully Permissive License C++ Logger For Embedded System
Also, a shoutout to Magic Enum: https://github.com/Neargye/magic_enum
-
enum_name (yet another enum to/from string conversion utility >=C++11)
What does this have to offer over magic_enum?
-
quill v2.7.0 released - Asynchronous Low Latency C++ Logging Library
But it's a hack, and I prefer not to use hacks in production, because of their significant limitations:
-
Enums with methods
Why reinvent the wheel? magic_enum
-
Macro to write enum and converter from and to string
I strongly recommend that you instead use magic_enum::enum_cast
Magic Enum provides that.
-
New to Programming and Would Like a Code Review or Tips on Readability
While I can understand the sentiment behind that it makes for a poor solution because people seeing the enum will assume it's a valid entry. A better solution is to use something like magic enum for that case.
-
What are some cool modern libraries you enjoy using?
magic_enum by far. It has an extreme amount of black magic, and compiler specific stuff all abstracted away behind its extremely neat user interface.
-
what annoys you most while using c++?
magic_enum
rr
-
So you think you want to write a deterministic hypervisor?
https://rr-project.org/ had the same problem. They use the retired conditional branch counter instead of instruction counter, and then instruction steeping until at the correct address.
-
Is Something Bugging You?
That'll work great for your Distributed QSort Incorporated startup, where the only product is a sorting algorithm.
Formal software verification is very useful. But what can be usefully formalized is rather limited, and what can be formalized correctly in practice is even more limited. That means you need to restrict your scope to something sane and useful. As a result, in the real world running thousands of tests is practically useful. (Well, it depends on what those tests are; it's easy to write 1000s of tests that either test the same thing, or only test the things that will pass and not the things that would fail.) They are especially useful if running in a mode where the unexpected happens often, as it sounds like this system can do. (It's reminiscent of rr's chaos mode -- https://rr-project.org/ linking to https://robert.ocallahan.org/2016/02/introducing-rr-chaos-mo... )
-
When "letting it crash" is not enough
The approach of check-pointing computation such that it is resumable and restartable sounds similar to a time-traveling debugger, like rr or WinDbg:
https://learn.microsoft.com/windows-hardware/drivers/debugge...
-
When I got started I debugged using printf() today I debug with print()
https://rr-project.org
This is indeed a problem people have with debuggers, so some very smart people found a way to fix it.
...and you're not on Linux, because on Linux we have rr! https://rr-project.org/
(I still use print statements 99.99% of the time though)
- OpenBSD KDE Plasma Desktop
-
Firefox 118
> I've heard Linux support was down to like one guy [...]
Linux support is down to you. It's down to all of us. Install rr (https://rr-project.org/) and capture a crash with it.
Then you can replay the crash, find out that it's actually crashing in your closed-source graphics driver, which will motivate you to switch to an open source driver and fix your issue.
Also, while you're at it, update your linux kernel and wayland. They've both had bugs that could manifest as random firefox crashes in the last several months.
- A Modern C Development Environment
-
Raku: A Language for Gremlins
I imagine you are referring to https://rr-project.org/ ?
Had never heard of it, looks pretty amazing, I might actually enjoy debugging now!
What are some alternatives?
Nameof C++ - Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum
Protobuf - Protocol Buffers - Google's data interchange format
cereal - A C++11 library for serialization
FlatBuffers - FlatBuffers: Memory Efficient Serialization Library
Boost.Serialization - Boost.org serialization module
pfr - std::tuple like methods for user defined types without any macro or boilerplate code
rttr - C++ Reflection Library
wise_enum - A reflective enum implementation for C++
protozero - Minimalist protocol buffer decoder and encoder in C++
Bitsery - Your binary serialization library
CodeLLDB - A native debugger extension for VSCode based on LLDB
cppbor - An implementation of cbor using C++ 17 variants