Sign in

Stefan Reinalter

@molecularmusing.bsky.social
524 followers 205 following 439 posts

Founder of Molecular Matters • C++ & low-level programming • Created Live++ (@liveplusplus.bsky.social) liveplusplus.tech

PostsRepliesMedia
Stefan Reinalter @molecularmusing.bsky.social · 6h
What a perfect drawing. (PHOTO BY BRUCE MACKINNON /THE CHRONICLE HERALD)
070
Stefan Reinalter @molecularmusing.bsky.social · 10/09/2026
It seems that Visual Assist X has never met our lord and saviour, COM:
A screenshot of Visual Assist X showing that reinterpret_cast should not be used, but when dealing with COM interfaces, it's the only cast that can actually be used in C++.
250
Stefan Reinalter @molecularmusing.bsky.social · 29/08/2026
This is what I'm talking about: Shows the PVS of a cell on hover in the map editor.
061
Stefan Reinalter @molecularmusing.bsky.social · 24/08/2026
GTFO! Update your gosh darn crap UI instead of adding another layer of crap to your platform! I want to tear this all to pieces.
040
Stefan Reinalter @molecularmusing.bsky.social · 18/08/2026
There's a pattern that keeps coming up and I don't know if it has a name, but I wanted to share: Nothing fancy really, just a way of shoving arbitrary funcs (including capturing lambdas) into ordinary func pointers without needing any inheritance or allocation. E.g. ThreadPool:
1121
Stefan Reinalter @molecularmusing.bsky.social · 15/08/2026
Finally, I go into the .hlsl file and add a new member to the constant buffer: Hit save, hot-reload the shader. Change the shader to use that member, done.
120
Stefan Reinalter @molecularmusing.bsky.social · 15/08/2026
Half a second later, the edit field appears live in the editor. I fill in the value that I had in the shader. Go over to the backend, add a new parameter to the function updating the material constants: Hit save, hot-reload. The compiler tells me all call sites which I fix.
110
Stefan Reinalter @molecularmusing.bsky.social · 15/08/2026
This is a change in a header file, but Live++ nicely supports that. It recompiles all affected files, I hit save in the editor, the data on disk is now in the new format. I then add a line to the property editor and save the .cpp, get's reloaded automatically:
110
Stefan Reinalter @molecularmusing.bsky.social · 15/08/2026
I wanted to expose the height scale used by the Parallax Occlusion Mapping shader in the editor for materials today. First change: add a member to the material struct. Add the member, serialize it.
120
Stefan Reinalter @molecularmusing.bsky.social · 29/07/2026
I found one more thing and got it down to ~20ms. This is slightly more than one frame when running at 60FPS. Here's a video showing it in action. I intentionally click on "Start Without Debugging" so you can see the time it takes for the window to appear.
1171
Stefan Reinalter @molecularmusing.bsky.social · 22/07/2026
I *do* have a bunch of globals and statics, but none of them needs dynamic initialization/construction, because they are trivial types. In fact, my whole world state is trivial and lives in the .bss:
030
Stefan Reinalter @molecularmusing.bsky.social · 21/07/2026
About a month ago I mentioned the "time to first present" in my engine being 50ms from process start, and that there aren't any dynamic initializers that run before main(). The question came up how to inspect the initializers, so here's me following up with code: #cpp
Code showing how to inspect how many dynamic initializers run before main() is called. Makes use of __xc_a and __xc_z and #pragma init_seg(compiler).
1180
Stefan Reinalter @molecularmusing.bsky.social · 09/07/2026
Knowing that this might be the last DOOM done by id Software, running on idTech, just hits different. Seeing the original DOOM run smoothly on a 386 was what made me want to work in the games industry. A *highly* profitable company killed that and decades of knowledge and tech.
1130
Stefan Reinalter @molecularmusing.bsky.social · 29/04/2026
Yes, it takes a constexpr string to check at compile-time if the event that the code wants to emit is known by the source class. Nice benefit: all events are automatically logged once they are triggered, and the real implementation only deals with hashes, no strings anywhere. Looks like this:
131
Stefan Reinalter @molecularmusing.bsky.social · 28/04/2026
Spent another hour on the I/O system I did recently. With C++ hot-reload, it's *amazing* how fast I can add new events and actions, and tie them up in the editor. I can go in, add a new event to a static array, trigger that in code, and almost instantly use it in the editor.
3170
Stefan Reinalter @molecularmusing.bsky.social · 23/04/2026
Ah it's getting messy. (I'm the first to admit that having __attribute__((init_priority(101))) anywhere is not a good sign)
010
Stefan Reinalter @molecularmusing.bsky.social · 17/04/2026
It's happening: Live++ on Linux, very very early Alpha. All credit for this goes to @maus-games.at from @mipumi.com who's working on this.
1251
Stefan Reinalter @molecularmusing.bsky.social · 17/04/2026
Implemented my I/O system today. Works on all classes that expose Events & Actions, completely generic: no base class, void*, or virtual functions; uses ptr-to-member-funcs & templates. Triggers use an index-based intrusive linked list, everything can be trivially serialized!
040
Stefan Reinalter @molecularmusing.bsky.social · 23/03/2026
I wonder where the build overhead is coming from when compiling in the VS IDE (2026 in this case). Recompiling through Live++ is consistently faster, 6 times as fast in this case. Even compiling & linking & patching is much faster than just compiling a file through VS.
280
Stefan Reinalter @molecularmusing.bsky.social · 09/03/2026
Thinking of you:
110
Stefan Reinalter @molecularmusing.bsky.social · 11/02/2026
Automatically showing latest build ID from e.g. Perforce: 1) Simple .bat file that writes a .txt, build step in Visual Studio 2) A few string views that point into the .txt 3) Render to screen 4) Profit! Sometimes it's the little things. #cpp
070
Stefan Reinalter @molecularmusing.bsky.social · 09/02/2026
Currently preparing a slide deck, looking through some older stuff. Came across these two pictures from GDC 2019. I'll be blunt: the fact that Epic Games announced licensing Live++ in their "State of Unreal" and showed it at their booth still completely blows my mind.
090
Stefan Reinalter @molecularmusing.bsky.social · 24/12/2025
Preparing the traditional veggie broth for the Christmas soup. Happy holidays everyone, see you in 2026!
0100
Stefan Reinalter @molecularmusing.bsky.social · 03/12/2025
Surprise! Live++ hot-reload running on SteamDeck Proton. This is a debug build with the SteamDeck connected over Wifi. Final performance will be <1s reloads.
2605
Stefan Reinalter @molecularmusing.bsky.social · 02/12/2025
Oh no no no... Investigating a customer's bug report. The PDB just came in, and after a day of looking at RVAs, symbol names, .objs, relocations, I finally saw this (note the addresses). And how's your day going?
220
Stefan Reinalter @molecularmusing.bsky.social · 12/11/2025
Office desk upgrade.
260
Stefan Reinalter @molecularmusing.bsky.social · 10/11/2025
Why is *every* company on this damn planet shoving down AI our throats? I cannot tell you how mad stuff like this makes me.
150
Stefan Reinalter @molecularmusing.bsky.social · 09/11/2025
Terry Pratchett's writing of the Nac Mac Feegle accent always makes me smile. It's so perfect, I can hear a Scottish voice talk in my mind :)
010
Stefan Reinalter @molecularmusing.bsky.social · 29/10/2025
Always interesting how -- even after so many years -- there are still new things to be discovered that need to be taken into account to accommodate different companies' workflows.
030
Stefan Reinalter @molecularmusing.bsky.social · 27/10/2025
I recently gave a talk + live demos about Live++ and its use cases. One of them included fixing bugs on the fly, and feedback I got mentioned that people didn't think about hot-reloading code while the exception handler was open. Naturally, there's now a hint at the bottom, since this is powerful!
160
Stefan Reinalter @molecularmusing.bsky.social · 18/09/2025
Questions surrounding this have come up now and again, so the docs now hopefully clarify the reasons behind some of Live++'s behaviour:
010
Stefan Reinalter @molecularmusing.bsky.social · 02/08/2025
Mario Chocolate
010
Stefan Reinalter @molecularmusing.bsky.social · 01/07/2025
Definitely one of the hackiest pieces of code I've written in the last decade or so, it's nasty.
150
Stefan Reinalter @molecularmusing.bsky.social · 30/06/2025
Rip and tear, until it is done.
030
Stefan Reinalter @molecularmusing.bsky.social · 24/06/2025
After debugging for a week, I guess I'm a member of the "have to work around a platform SDK bug" now. Do I get a medal or something?
050
Stefan Reinalter @molecularmusing.bsky.social · 09/06/2025
Probably one of my favourite tricks for finding memory stomps: 1) On alloc: put allocation at very end of separate page, followed by a NoAccess page. 2) On free: mark allocated pages as NoAccess. Guaranteed to find even one-byte stomps and use-after-free. #cpp
0304
Stefan Reinalter @molecularmusing.bsky.social · 05/06/2025
Pre-order has arrived!
220
Stefan Reinalter @molecularmusing.bsky.social · 30/05/2025
That was a fun one to figure out and fix. "Push" and "pop" are no bueno in this case.
010
Stefan Reinalter @molecularmusing.bsky.social · 20/05/2025
Live++ can talk to the Switch devkit! The "easy" part is done, now begins the hard part.
0170
Stefan Reinalter @molecularmusing.bsky.social · 19/05/2025
Did we just hit a bug where the game doesn't remove the collision so you cannot actually walk to Room 46? If so, I'm pissed. Royally.
130
Stefan Reinalter @molecularmusing.bsky.social · 05/05/2025
Wrong, but right at the top with the biggest font, emanating confidence.
250
Stefan Reinalter @molecularmusing.bsky.social · 18/04/2025
"There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors." Managed to get caching stuff wrong, only took... almost 4 years for a customer to finally stumble upon it and make everything crash and burn, confusing me for days.
040
Stefan Reinalter @molecularmusing.bsky.social · 10/04/2025
Want to see some cursed C++ code that makes the MSVC toolchain generate a mangled name which cannot be demangled by any tool? Anonymous namespaces, another cursed feature in the context of Live++.
160
Stefan Reinalter @molecularmusing.bsky.social · 04/04/2025
So I gave BC a spin the last days. Yeah, I'm convinced. Explorer integration is very handy indeed, the ability to copy stuff in the diff from left <-> right and alter the files is great. And it does diffs for XLSX and other formats. Thanks for making the argument guys :).
220
Stefan Reinalter @molecularmusing.bsky.social · 26/03/2025
For people interested in this: I force-included a "preamble.h" using /FI (there's a similar option for Clang) which looks like the following: (Godbolt doesn't show all hangul fillers correctly, but it compiles for MSVC, Clang, and GCC)
101
Stefan Reinalter @molecularmusing.bsky.social · 26/03/2025
Never noticed that VS has a "Restart" now, with a surprisingly familiar icon ;). "Restart" is a simple "close, build, start" though. Someone at MSFT is clearly paying attention to what I'm doing with Live++, same with their recently announced Dynamic Debugging, which has a heavy upfront tax. #cpp
230
Stefan Reinalter @molecularmusing.bsky.social · 25/03/2025
Can't decide between snake_case, camelCase and PascalCase? Kebab-case not available in your language? Fan of PascalCase, but GPURTKernel looks stupid? C++43 has got you covered with Whitespace Case: opt-in via a #define! (This is my last one, I'll show myself out...) #cpp
370
Stefan Reinalter @molecularmusing.bsky.social · 24/03/2025
Updated to a future C++43 compiler: this has 'auto auto' types, and even has opt-in 'auto auto' for user-defined types! No more auto vs. no auto. Works with MSVC, Clang, compiles and runs! First one to figure out how this works gets a free 1-year individual license for Live++.
290
Stefan Reinalter @molecularmusing.bsky.social · 24/03/2025
Tired of having to add types to your code in C++? Can't decide on auto vs. no auto? I have another simple rule in my codebase: #define used types once at the top, let the compiler figure out the rest and stop caring about details. With video proof this time! #cpp
460
Stefan Reinalter @molecularmusing.bsky.social · 18/03/2025
"Just patch functions" they said. "Just fix the relocations" they said. Trust me when I say that no C++ hot-reload solution handles this correctly, neither commercially available nor open source. It's hard to handle correctly, but I have an idea on how to pull it off.
3150