No surprise here that the macro + char* approach wins hands down. I'm not really an active C++ user but I did use a VERY similar trick in my custom C code generator DSL (writing in Ruby) just this week. Easy and no "magic" involved.
We're on AWS Managed Prometheus + Grafana in production and it certainly scales just fine, although I'm sure under the hood it's an entirely different beast than FOSS Prometheus, likely only AWS engineers truly know..
To be quite honest I learned exactly this way myself, however nowhere near recently by any stretch of imagination; I learned through Usenet, bulletin board systems, IRC, and a heavy dose of (bordering on obsession) reading any and all technical manuals I could get my hands on from the local used book store.
I still vividly remember reading a z80 instruction set manual on a rainy day during summer vacation by a lake as a kid (maybe 14?)--writing my own assembly by hand in the margins for fun. TBH I probably still have that exact manual in storage somewhere. Had a green stripe down the front edge/binding iirc.
Back then I easily met folks like myself out there on the net, including many kids younger and smarter than me. It was awesome.
I do hope that some form of that 'net lives on in spirit somehow, given that the Internet I knew has largely fallen to corporate interests.
Now that I have my own kids, it's been painful to watch them have such an utterly different experience than I did.
Their Internet is based entirely on consumption and dark patterns designed to capture their attention, while providing nothing (to them) in return besides a dopamine addiction and body dismorphia.
I'm sorry this has been your experience. There are folks out there open to learning from us seniors.
I've been a mentor off and on for the last few decades, and I've been really lucky to have some strong mentees. Some I've followed for a better part of a decade and are crushing it out there. All I can really say is that they're out there, sorry I don't have any more helpful to say around how to find them etc. I'll mull on that for a bit..
I do "rewrites" for my day job all day every day; with as of late the goal being rewriting critical services to get past scaling plateaus.
Rewrites require an existential-level threat to pursue and should never be taken lightly. They must solve a real verifiable need, backed by real world data. Rewrites for rewrites sake or some lofty or nebulous goal of "better" or "more maintainable" code are doomed to fail and a waste resources.
I've seen the worst of it, from your average monoliths with no separation of concerns to 1000s of lines of self-modifying assembly in dead architectures with no code comments containing critical business logic, etc.
The main rule is to not to bite off more than you can chew, which if I'm being honest you really only learn from fucking up or watching others fuck it up.
I just translated the entire book into English via multimodal LLM, which with my (rusty) Japanese language knowledge looks largely correct (including diagrams and manga text.)
I'm not sure of the legal ramifications of this but if anyone shows me their original PDF receipt from the Japanese publisher's website I'd be willing to share it under the conditions you don't publish or share it anywhere publicly...
I love this 4bit "isa" with 12 simple instructions. It makes me want to dig out my old 74x chips from storage and make one. That said, thank God for FireFox Reader mode, on mobile at least the add popups make this excellent blog post unreadable..
Ok now I cheated and had Claude translate the entire book into English. It even translated the manga images with hand written hiragana/katana in speech bubbles (using comic sans) plus all the diagrams!
I decided to not take on too much in one go, so having the English text takes a lot of variables out of the equation for me since my Japanese is very rusty after not using it for 20 years..
reply