2,676 karma · joined Nov 28, 2019 (7y ago) · 1,131 submissions
comment 2y ago · link · parent
What the article is about, though, is changing the source code so that it is intrinsically faster to compile. At some point you say "this program isn't complicated, why does it take so long to compile?" Then you start looking at unnecessary includes, transitive includes, forward declarations, excessive inlining, etc.
comment 2y ago · link · parent
This article, while not the nerdy deep dive I'd like, does touch on what happens when you try to do that. You realize that the C++ standard library is really complicated, that your existing code is really fucked up, and that libclang is too limited a tool. You end up writing a XSLT engine in hacked up python, but by a different name.
[LibTooling][1] is probably The Right Thing ("in C++", as the article says), but I never spent the time to get it working.
Somebody write a DSL for C++ inspection and transformations that uses LibTooling as a backend. I bet there are many, but none close at hand.
edit: [this][2] is close...
[1]: https://clang.llvm.org/docs/LibTooling.html
[2]: https://clang.llvm.org/docs/LibASTMatchersTutorial.html#inte...
comment 2y ago · link · parent
It recently got a lot faster, which is nice, but I'd happily pay $30/month instead for a small fraction of the bandwidth. But I can't.
I wouldn't qualify for the hypothetical state enforced $15 option anyway.
comment 2y ago · link · parent
My only experience with ISO standards is the C++ standard, and the community works around the price by making draft copies available for free.
This is a guess on my part, but maybe the majority use case for ISO standards is companies buying copies for their employees or maybe even lawyers. They _have_ to have a copy if they're going to have products that conform to the industry standards, so ISO can charge whatever they want and it's just a minor expense for the business. Compare this with the "hackers in mom's garage" image of software and you see the difference.
comment 2y ago · link · parent
The best I'll see is somebody who cooked up a naive microbenchmark to show that style 1 takes fewer wall nanoseconds than style 2 on his laptop.
People I've worked with don't use profilers, claiming that they can't trust it. Really they just can't be bothered to run it and interpret the output.
The truth is, most of us don't write C++ because of performance; we write C++ because that's the language the code is written in.
The performance gained by different C++ techniques seldom matters, and when it does you have to measure. Profiler reports almost always surprise me the first few times -- your mental model of what's going on and what matters is probably wrong.
comment 2y ago · link · parent
[1]: https://en.wikipedia.org/wiki/Higgs_mechanism#Abelian_Higgs_...
comment 2y ago · link · parent
Some Javascript or maybe Canvas heavy pages run much more slowly on Firefox and are almost unusable on Firefox for Android. I find that this is rare, though.
I'll keep using Firefox + uBlock + Personal Blocklist + Dark Reader + Disable Javascript + Disable CSS + Tampermonkey + Old Reddit Redirect + CORS Everywhere + Consent-O-Matic + Hide YouTube Shorts + Load Reddit Images Directly + ...
comment 2y ago · link · parent
Some specialists can't live without MS Excel and all of its extensions (banking), but that's not the common case. Common case is word processing, slide presentations, and task management (in spreadsheets).
comment 2y ago · link · parent
[1]: https://www.youtube.com/playlist?list=PLrxfgDEc2NxZJcWcrxH3j...
comment 2y ago · link · parent
comment 2y ago · link · parent
Hm I could have just backed up the database...
Anyway, I've bought some books with my account, so I don't mind the login.
comment 2y ago · link · parent
I have some smart relays that somebody graciously reverse engineered in Python. I still need the spyware app to "bless" a relay, but then it works over TCP (JSON) afterward. Could also skip the app but it's much more complicated.
I got an e-reader that you can drop epub files into (Kobo).
Basically, "control" is almost more important to me than quality, where electronics are concerned. And I'm not a hardliner.
It will only get worse.
comment 2y ago · link · parent
Maybe this is what Perl is for, but I never learned it.
comment 2y ago · link · parent
comment 2y ago · link · parent
All tree-sitter gives you is a _different_ grammar, so that a structural diff can operate on different trees given the same text as diff.
A parse tree still doesn't know anything about the meaning of a program, which is what you need to know in order to determine that those assignments to x and y are unordered.