I think finding a bug where printf("%*.s") was used instead of printf(".*s") was the point at which I realized that some C issues cannot be mitigated with better tooling...
I had way too much fun optimizating CLN due to a Boltz report recently. Like most engineers, I love optimizing, but bitter experience means I only allow myself to do so when I have an actual problem to solve. My favourites: 1. Adding 1M entries to a sqlite3 table with two indexes: 81 seconds. Adding entries *then* creating indices: 17 seconds. 2. Optimization of O(n²) cleanup code by realizing it could be deleted entirely. I admit I continued to optimize long after their performance problem was fixed, but you gotta have *some* fun!
I hate price talk, but if you're going to do it, please understand that "market cap" is a very rough *ceiling* on current value. It's neither the amount of money which has gone in, nor the amount of money which can come out. So the order of magnitude is useful to compare against other assets. But abusing it in terms of profits and losses is a category error, and I assume done mainly because it's so easy to measure. Grump over.
In two days' time Julian and I will be doing an open Jitsi meeting to discuss the work on Script Restoration. Come and ask questions! 1pm Berlin time:
Doing another open call on Script Restoration BIPs in about 11.5 hours, 1pm Berlin. Bring your questions!
I needed some code in a third place, so I decided to extract the ~100 lines it into a single function in common code (and make it more efficient, because I had seen it in profiles under stress testing). I often write code by starting it and seeing where it leads: this is helped by modern revision control and fast compile times (I point this out because we take these for granted). First extraction went fine. Then I tried to use the same code in the second place. By the time I'd had to add four callback hooks (three of which were unneeded in the first case) I stopped. The code was different enough that the "framework with callbacks" made the code far *less* clear. Threw it away, in favor of a handful of helper routines. More code for the first case, but much more natural for the second. This took a day, on and off. But the off was important: the breaks gave me time to ask "now it's almost finished, do I like it?" and avoid being too goal driven. .