• 0 Posts
  • 69 Comments
Joined 1 year ago
cake
Cake day: July 9th, 2023

help-circle
  • It makes total sense that new C++ will contain a higher percentage of bugs than old C++, but after being an almost full time Rust dev for the last two years, you will not convince me that new Rust code has more bugs than old C++ code.

    So far I have yet to come across a bug in any of my Rust code that made it into production. All issue reports from users are still related to the C++ code base that we haven’t managed to fully divorce from.

    The only advantage to C++ interop is that managers want to see new code get deployed immediately and continuously. They don’t want to wait until the corporation’s billions (literally) of lines of code are all rewritten in a new language before they start to see the benefits of that transition.







  • Best practice when using .unwrap() in production code is to put a line of documentation immediately above the use of .unwrap() that describes the safety invariants which allow the unwrap to be safe.

    Since code churn could eventually cause those safety invariants to be violated, I think it’s not a bad thing for a blunt audit of .unwrap() to bring your attention to those cases and prompt to reevaluate if the invariants are still satisfied.




  • It’s a massive win, and I would question the credibility of any systems programmer that doesn’t recognize that as soon as they understand the wrapper arrangement. I would have to assume that such people are going around making egregious errors in how they’re using mutexes in their C-like code, and are the reason Rust is such an important language to roll out everywhere.

    The only time I’ve ever needed a Mutex<()> so far with Rust is when I had to interop with a C library which itself was not thread safe (unprotected use of global variables), so I needed to lock the placeholder mutex each time I called one of the C functions.


  • Which is exactly the position that the Rust for Linux devs have understood and accepted for themselves, and yet they still get yelled at (literally, in public, on recordings) by C Linux devs for existing.

    Oh and they get snidely told that introducing the Rust language must be a mistake because suggestions to introduce other languages to the kernel turned out to be mistakes and obviously Rust is the same as all those other languages according to C developers who, by their own admission, have never used or learned anything about Rust beyond a superficial glance at some of its syntax (again this was recorded from a public event).






  • And what if someone is convinced that acts of cruelty towards some humans is the most effective way to reduce cruelty towards a large number of animals? They might think that you’re not vegan because you’re allowing more cruelty towards animals to exist than they are. I have encountered self-identifying vegans who genuinely think this way.


  • This has to be the stupidest take on the term “plant based” I’ve ever heard. I swear, “plant based” is just the “No true Scotsman” of vegans… anything that a non-meat-consumer does that a vegan doesn’t like makes them plant based instead of vegan. It’s so asinine and intellectually dishonest.

    Vegan people can be assholes too. Assholes will inevitably exist in any demographic that gets sufficiently large. I have known people who identify as vegans who insist that it’s preferable for humans to die than for non-human animals to die.


  • Also since when is open exchange of ideas and concerns equated with control?

    Am I trying to control you if I suggest that you not leave your tap running in California because fresh water is a precious resource in drought-plagued land?

    Am I trying to control you if I suggest that you reduce your plastic consumption because we have a major microplastic crisis so severe that human babies are being born with plastic already in their body?

    Am I trying to control you if I point out that the modern meat industry is ecologically unsustainable, so you’re going to have to switch to being vegetarian sooner or later since the meat production will literally collapse itself, so you may as well start now before it’s a global crisis?

    If I suggest that you not hit yourself in the head with a hammer, is that me trying to control you, or is that just an act of very basic concern for your well being? And if hitting yourself in the head with a hammer becomes trendy, am I trying to control everyone if I suggest that we shouldn’t be doing that because brain injuries will make us dumber as a society?