u/LB--
- 2points
LB--
LB--
Depends on your target platforms. If you're only interested in open platforms, give it a try. If you ever want to target game consoles someday though, you're going to have a really uphill battle since you'll need to create your own bindings to their SDKs and try to somehow worm your Rust code into their toolchains that don't have Rust support, or else try to generate compatible machine code without console-specific optimizations. I guess you could also wait a decade for them to add official Rust support. At least Nintendo seems to be upstreaming their Switch toolchain changes to public LLVM, which could make targeting Switch 1 & 2 easier, and XBOX already supports ClangCL, so there's just Sony to figure out.
LB--
At the start of Chapter 2, Ralsei describes the location of the unused classroom as being to the east.
LB--
Green is numbering in visual order, top to bottom. Blue is numbering in chronological order, bottom to top. Everyone is correct today, it must be a miracle!
LB--
If performance is the utmost concern, you don't need to branch on magic pointer values. Just always use a normal function pointer and have your allocator place everything in read-write-execute memory regions, so you can generate thunks right next to their data. Less secure but that doesn't seem to be a priority here.
LB--
My C++ professor in the mid 2010s was still teaching pre-standard C++. I asked if he heard of the newer standards like C++11 and C++14 and he didn't know what I was talking about. It was really demoralizing. Sometimes I end up chatting with people who are also taking C++ courses in college in current year, and from what they share with me it seems like the situation isn't much improved. It used to be that people would at least learn programming properly once they got jobs out of college and were forced to work with whatever their industry was updated to, but recent technological developments have me concerned about the lower rungs of that ladder...
LB--
Not to mention the flawed implementations in most standard library implementations. I remember trying to use it before learning about the implementation quality problem, since in theory it seems like a very useful container. Alas... std::hive can't get here soon enough.
LB--
Surprising to see span with so little usage, I guess because it didn't make it into C++17? We use gsl::span for that reason, but depending on survey wording I would have answered yes to using std::span anyway.
LB--
Great news! I see now that that MSBuild has learned to pass /std:c++23 instead of /std:c++23preview, that's been generating warnings about the deprecation for a few VS releases now and finally things are quiet again.
LB--
The bitmask enum example is already possible in C++17 and probably earlier standards too, using ADL+SFINAE. Is the compilation speed noticeably faster with the version presented in this article?
LB--
Someone posted a workaround here: https://learn.microsoft.com/en-us/answers/questions/6036648/xbox-wont-sign-me-in-after-a-windows-update-0x87dd
The workaround involves changing the Microsoft Account Sign-in Assistant service from Manual to Automatic and restarting it. The issue seems specific to Windows 11 though, so I can't check as I'm still on Windows 10.
LB--
So the Roaring Knight appeared because Kris and Susie weren't making progress on their group project...
LB--
You probably know this by now, but I'll repeat it for anyone who comes by here: DON'T DO MANUAL CLEAN INSTALLS OF WINDOWS ON ARM64 DEVICES. Use the Cloud Reset feature that is built into Windows, which will correctly preserve drivers. You should also make sure you have downloaded and backed up the recovery media from your device manufacturer. If you are considering buying any sort of Windows laptop/portable, you should always check the manufacturer support website for drivers and recovery ISOs before buying. Don't give money to these idiot companies that don't provide recovery ISOs for their weird custom Windows installations.
LB--
We're using coroutines in production across multiple codebases, including an old codebase stuck on an old compiler version that predates C++20. Coroutines simplify things so much compared to the old rats nest we had with future/promise and callbacks, especially since the compiler manages the coroutine frame layout and thus allows us to have the entire lifetime's worth of memory allocated up front where allocation failure is easier to handle. A ton of error situations vanished or became easier to handle when switching to coroutines.
LB--
Using proper lifetime wrapper types really takes a lot of cognitive load off though. Sure the old code works and doesn't need to be changed right now, but every time I read it to understand or make changes, I waste mental effort tracking what the compiler would normally track for me.
LB--
All IPv4 addresses whose first part is 127 are loopback addresses. So, 127.0.0.1 and 127.37.0.1 are both loopbacks, and they can actually bind to different servers on the same port. IPv6 only has a single loopback address, so you can only have one IPv6 server per port on the same local machine. Or well, maybe if you have multiple network cards you can do some funny business, but I haven't researched that deeply.
LB--
For some reason a lot of old memes have been getting regenerated through AI. I definitely remember the original version of this from years ago before AI was a thing.
LB--
This is cursed and I am terrified of what happens if two run in parallel
LB--
I mostly agree with you but I don't think it's "the same reason" - std::addressof is for bypassing the overloaded unary ampersand operator, whereas a std::multiplies is just a single name for "do ADL binary operator* for me".
LB--
You were just a few minutes late compared to https://redd.it/1x0j559
LB--
I don't agree. There are numerous examples of scripting languages implemented in C++ constexpr land. A static analysis tool doesn't need to understand the embedded language to understand what all the capabilities of program are, because the C++ is the only thing connecting the script to the outside world. Everything it can do is defined in a language the static analysis tool understands. It might be too computationally expensive to determine with 100% confidence what exactly happens for any given input, but you can be pretty confident you know what the possibilities are in general. I'd argue your evalpython example, if not trivially inlined by the compiler, is a _good false positive because it's reporting a genuine issue that might be unearthed by a tweak to the script. I would not want to use a static analysis tool that avoided reporting smelly code like that. "I opened the black box you don't understand and decided this code that looks scary to you is actually unreachable" is nice when the optimizer does it and unsettling when the static analysis tool does it. The static analysis tool could do it though, without needing to understand the scripting language. It would just be very expensive in terms of memory and time, and unwanted in terms of appeal to real people.
LB--
Nope. The halting problem requires a function to change its behavior based on the output of whatever is analyzing it. That's not possible in the real world. It's a paradox that only exists in the realm of abstract math. That's why static analysis tools exist and work well. Everything is constrained by memory and time, rather than concerns of halting problem shenanigans.
LB--
Anyone who likes exceptions but has reservations about the sad path performance, check out the work and conference talks by Khalil Estell, he's been working on optimizing exceptions and making them usable in embedded environments, as well as improving tooling around them.
And ABI compat isn't even part of the standard, it's for standard library implementations to deal with. They're the ones who decided to do the ABI breaks, not the committee.