Matt's avatar
Matt
codinginlondon@iris.to
npub16nd6...ftma
Former finance C++ dev writing about the merge of mining into the energy grid 🔋
Hitting usage limits with Claude is like starting a very long C++ build. It forces you to stop and think about what you've done so far, take a walk outside and fix the next bugs in your head. image
Maybe in a distant future… It’s year 2060 and Bob is making a bitcoin transaction to top up his spending wallet from his savings. The wallet proposes 2 fees: - classic: $0.04 - quantum safe: $86 Bob picks “classic”. The other option is just too expensive. He heard about the quantum threat of course. Everyone was talking about it when he was a kid, especially when those ancient “Satoshi” coins started slowly moving 20 years ago. It made the headlines for a while then died out. At least it motivated savers to migrate to hybrid wallets, which are now the standard. QC hacks became an accepted background risk and today he doesn’t really care. It never happened to him nor anyone he knows. Rich folks who are paranoid about their millions being hacked mid-transaction are welcome to pay the higher fee if it makes them feel better. Just like plane crashes or bank robberies, it's one of these things you know can happen but don’t affect your every-day life.
C++ nugget 💡: 

 std::string_view (C++17) A lightweight, non-owning reference to a string — zero allocation, zero copy. Instead of passing const std::string&, use string_view to accept any string-like data (string, char*, literals) without copying. Bitcoin Core uses it heavily in src/util/string.h: image
The role of the C++ compiler is not to protect your program from undefined behaviour. On the contrary, it assumes there is no undefined behaviour and makes aggressive code optimisations as a result.
C++ is a low time preference language. Unlike Python or Javascript, it does not bring instant gratification, it is hard and you have to be patient. However it is used in high time preference situations, precisely in low-latency environment (gaming / trading / fighter jets), where random delays are unacceptable.
Matt's avatar
CodingInLondon 2 months ago
The memory model of C++ in the context of low latency and concurrency takes some brain-cell effort to grasp…
Matt's avatar
CodingInLondon 2 months ago
The Protocol Masterclass (from Plan B Network program) was a very useful walkthrough of the code base by Jon, a core developer. Notes Some nuggets/quotes I found interesting or funny: > Initially, the code had a huge main.cpp where most of the transaction validation logic lived (>5000 loc), which suggests Satoshi was not a professional C++ developer.
 > Bitcoin core currently has only about 40 active individuals and is struggling to find new developers. “It’s important to understand how few people work on the Bitcoin protocol” “Actively full time maybe 30-40 people in the world.” “In the past year or two there has been no new developer” “Now is a good time to work on bitcoin core.” > Coding style “The code base is being gently refactored over time. You have to curb your urge to clean-up the code, as this can introduce bugs.” > Changes that affect the consensus require the highest level of review. “It has been a while since there has been an accidental fork” > “It’s funny how much importance people give to BIP numbers and what number it is. I would prefer they attach more importance to actually finishing their draft” > “Give what you want. You want review, give review. Reviewing other people’s work is a forever green way of adding value and making friends.” “You have to not care too much about how fast your own stuff gets in”. > “There are so many more people who want to post on X, and so few who actually want to read the code”
Matt's avatar
CodingInLondon 2 months ago
Falling back to Lau Pasat because of the rain #bitcoinwalksg
Matt's avatar
CodingInLondon 2 months ago
Yet another #BitcoinWalkSG on Wed 25th February Join fellow enthusiasts for a casual after-work stroll around Gardens by the Bay. No stage, no slides, no sponsor. Just walking, talking about hard money and eating local food. All knowledge levels welcome, no registration required. - 18.30 Meet inside Dimbulah@MBFC - 19.00 Start walking along the marina all the way to Satay by the Bay food court - 20.00 chope table, order food, talk bitcoin - Walk back to MRT Gardens by the Bay and split-up. - Rainy alternative: Lau Pa Sat Route - Start along the Marina waterfront -> cross the Helix Bridge -> Water Lily Pond -> End at Satay by the Bay food court. - We’ll sit down at the food court for food and drinks. - Exit point: MRT Gardens by the Bay TE22 (brown line) What to expect - Easy, flat walk at conversational pace. - Singapore weather: could be hot and humid or a sudden downpour. - Informal discussions about adoption, mining, quantum or your favourite Lightning wallet. - Hokkien mee, popiah, rojak and satay. - Flexible: Join late, leave early, or stay for extra chats. - Free to attend; bring water, comfy shoes, and your best questions. What this is not - Not a conference - Not a pitch night - Not a crypto or web3 event @bitcoinwalk @tokyobitcoinbase @bitcoinwalkpenang image