• 1 Post
  • 37 Comments
Joined 1 year ago
cake
Cake day: July 18th, 2023

help-circle
  • It’s been almost a decade since I used C++ and had to verify, but after some quick searching around it looks like it hasn’t changed a ton since I last looked at it.

    You can use smart pointers, and certainly you should, but it’s a whole extra thing tacked on to the language and the compiler doesn’t consider it an issue if you don’t use them. Using new in C++ isn’t like using unsafe in rust; in rust your code is almost certainly safe unless marked otherwise, whereas in C++ it may or may not be managed properly unless you explicitly mark a pointer as smart.

    For your own code in new codebases this is probably fine. You can just always make your pointers smart. When you’re relying on code from other people, some of which has been around for many years and has been written by people you’ve never heard of, it becomes harder to be sure everything is being done properly at every point, and that’s where many of these issues come into play.


  • brenticus@lemmy.worldtoLinux@lemmy.mlLadybird announcement
    link
    fedilink
    arrow-up
    39
    arrow-down
    1
    ·
    2 months ago

    C and C++ require more manual management of memory, and their compilers are unable to let you know about a lot of cases where you’re managing memory improperly. This often causes bugs, memory leaks, and security issues.

    Safer languages manage the memory for you, or at least are able to track memory usage to ensure you don’t run into problems. Rust is the poster boy for this lately; if you’re writing code that has potential issues with memory management, the compiler will consider that an error unless you specifically mark that section of code as unsafe.



  • Honestly? Bash. I tried a bunch a few years back and eventually settled back on bash.

    Fish was really nice in a lot of ways, but the incompatibilities with normal POSIX workflows threw me off regularly. The tradeoff ended up with me moving off of it.

    I liked the extensibility of zsh, except that I found it would get slow with only a few bits from ohmyzsh installed. My terminal did cool things but too slowly for me to find it acceptable.

    Dash was the opposite, too feature light for me to be able to use efficiently. It didn’t even have tab completion. I suffered that week.

    Bash sits in a middle ground of usability, performance, and extensibility that just works for me. It has enough features to work well out of the box, I can add enough in my bashrc to ease some workflows for myself, and it’s basically instantaneous when I open a terminal or run simple commands.













  • Got a fancy new Timemore Sculptor 078s grinder this week. Noticeable upgrade from my Baratza Encore, but I’m still working on sorting out grind settings and general methodology. Static is definitely more noticeable now, hot loading is a new concept for me, still sorting out what the RPM settings are doing, etc.

    Was at a farmer’s market where Catfish Coffee was selling bags so I’ve been drinking their Sunny Side Up roast this week. It’s a “normal” tasting light roast, I’ve never gotten any super exciting flavour profiles out of it, so it’s actually kind of nice as a way to play with the new grinder. I can play around quite a bit and still get a pretty solid cup of coffee, but I know it well enough that I can sort of tell whether I’m doing better or worse.




  • If I would stop spending so much time modifying (read: breaking) it it probably would be more productive. I love the ergonomics of my setup.

    But also wouldn’t it be cool to add just one more fancy widget to my already janky-as-fuck eww bar? No? Well I’ll do it anyways.


  • The reason you don’t see a lot of love for Manjaro is because your experience isn’t quite typical. Manjaro is notorious for taking Arch and making it less stable. It’s mostly Arch with some defaults and software to make it easier to set up, but the few cases where it drifts from Arch tend to cause more issues than if you just used Arch directly.