• 3 Posts
  • 1.77K Comments
Joined 2 years ago
cake
Cake day: September 24th, 2023

help-circle




  • modern C++ facilities do make a difference to prevalence of bugs.

    This is true, but just saying “write modern C++!” doesn’t actually work in practice. First, there are a ton of footguns that even best-practice C++ doesn’t avoid. Using std::shared_ptr? Great, you’re probably going to avoid memory leaks. Null pointer dereference? Not so much. What’s the modern C++ way to avoid integer overflow?

    Second, it’s pretty much impossible to completely avoid raw pointers etc. even if you’re trying, and good luck getting your colleagues to actually try. I can’t even get mine to write proper commit messages. You need a machine forcing them to do it properly. Something they can’t opt out of (or at least where opting out isn’t the easy lazy option).

    So yeah it’s better to use modern C++ and it is an improvement, but not enough the change the conclusion that you should just use Rust instead.












  • Not the great rebuttal you think it is… AI isn’t really about writing code that I couldn’t write. Unless you’re a beginner it is absolutely not at that level yet. It’s about saving time.

    Which it definitely can do. Especially for one-off tasks. For vibe coding projects my experience has been mixed. AI seems pretty good for getting things going, especially in areas you aren’t familiar with (e.g. I wrote a simple Chrome extension with it; never written a Chrome extension before). But after a certain point they seem to get stuck in a muddle and you basically have to stop using AI, fix all the code it wrote badly and continue yourself.

    But overall it can still be significantly faster than being prideful and doing it all by hand.



  • I found this one recently which is really good:

    https://github.com/sourcegit-scm/sourcegit

    Much better than most of the standalone Git GUIs, even the commercial ones.

    However I don’t actually use it, because I use VSCode and there’s a great extensions called Git Graph that integrates nicely into it. It is abandoned unfortunately but it still works fine so I still use it.

    Here’s my rating of all the Git GUIs I’ve tried (that I remember):

    • SourceTree: works ok but just so incredibly slow.
    • GitKraken, SmartGit, Tower, Sublime Merge: Commercial and I don’t like the UX of any of these.
    • Git Extensions: This one is actually really good. Terrible name though. Also kind of Windows-only.
    • GitX: This is also really good but unfortunately it’s one of those pieces of software that has forked into dozens of half maintained versions that you’ll need to spend hours in phpBB forums figuring out which one to use (like TomatoUSB). Also Mac only.

    I never tried Magit because TUIs are dumb.

    Also don’t listen to anyone that says “just use the CLI”. It’s okay once you’ve learnt how git works, but even then you’re still going to want a way to view the commit graph. Learning Git without a GUI is needlessly masochistic. Once you have learnt it you can start mixing it up with the CLI.


  • He also thought that Rust integrates poorly into project with a deep C++ OOP hierarchy. That is probably still true as well.

    Is there any language that can do that? As far as I know there isn’t. You can use SWIG or whatever but it’s just as awful as any Rust/C++ interop. There’s Carbon, but that’s a work in progress.

    IMO if you need integration with a deep C++ OOP hierarchy your options are a) give up and just use C++, or b) pain, no matter what language you target.


  • The connection column indicates the connection used. USB FS stands for the usb full speed protocol, which allows up to 1000Hz polling, a feature commonly advertised by high-end keyboards. USB is the usb low speed protocol, which is the protocol most keyboards use.

    USB Low Speed allows 1kHz polling too. I don’t think you gain anything at all from High Speed. Keyboards probably only use it incidentally because the chip they are using happens to support it anyway.