Damus
Matt profile picture
Matt
@CodingInLondon

Former finance C++ dev writing about the merge of mining into the energy grid πŸ”‹

Relays (12)
  • wss://nostr-relay.wlvs.space – read & write
  • wss://relay.snort.social – read & write
  • wss://nostr.bitcoiner.social – read & write
  • wss://relay.damus.io – read & write
  • wss://relay.nostr.info – read & write
  • wss://nostr-01.bolt.observer – read & write
  • wss://relayer.fiatjaf.com – read & write
  • wss://nostr1.tunnelsats.com – read & write
  • wss://atlas.nostr.land – read & write
  • wss://eden.nostr.land – read & write
  • wss://nostr-pub.wellorder.net – read & write
  • ws://100.69.75.120:4848 – read & write

Recent Notes

Matt profile picture
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:

Matt profile picture
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.
let’s talk about sats · 6d
🀣
🟠 isolabellart · 1w
Nope
Matt profile picture
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.