Yo whatup

  • 0 Posts
  • 62 Comments
Joined 11 months ago
cake
Cake day: September 28th, 2023

help-circle





  • Yup, libraries should usually let the consumer chose what to do with an error, not crash the program without a choice in the matter. The only real exception is performance critical low level code such as the core of a graphics or audio driver. Though in those cases crashing also often isn’t an option, you just power through and hope things aren’t too screwed up.



  • It’s complicated. Paul isn’t really a good guy, but he’s not really a bad guy either. He’s just a dude. He’s a dude who has limited vision into the future from which he cannot escape. He’s not using his future vision to pick the bad choices he’s trying to pick the best ones he can and the hand he’s dealt kinda just sucks.




  • Smart pointers model ownership. Instead of (maybe) a comment telling you if you have to free/delete a returned pointer this information is encoded into the type itself. But that’s not all, this special type even handles the whole deleting part once it goes away.

    Since they model ownership you should only use them when ownership should be expressed. Namely something that returns a pointer to a newly allocated thing should be a std::unique_ptr because the Callie has ownership of that memory. If they want to share it (multiple ownership of the object) there’s a cheap conversion to std::shared_ptr.

    How about a function that takes in an object cause it wants to look at it? Well that doesn’t have anything to do with ownership so make it a raw pointer, or better yet a reference to avoid nullability.

    What about when you’ve got a member function that wants to return a pointer to some memory the object owns? You guessed it baby raw pointer (or again reference if it’ll never be null).




  • Traister101@lemmy.todaytoMemes@lemmy.mlYes, but
    link
    fedilink
    arrow-up
    1
    ·
    5 months ago

    ReVanced is a modded YouTube (and others) app. IE normal YouTube but you fuck with it locally to skirt what got the original Vanced guys. Adblock, OLED black theme same old thing Vanced provided. I’ve used NewPipe very little but I’d summerise a comparison as ReVanced has better user experience (thanks to Google making the app) and you can sign in/get notifications ect




  • Traister101@lemmy.todaytoBoost For Lemmy@lemmy.worldProfile karma
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    3
    ·
    6 months ago

    Yeah no… After enough scrolling through your history I see you being a bit of a nutter. That’s not people trying to “silence you” it’s you being crazy and people giving you werid looks. You are at best a troll at worst huffing trumps farts to a worrying extent.

    Can’t say anything about the comments removed by moderators but seeing what isn’t removed makes me suspect they were probably quite vile to get removed while those others stayed.


  • Traister101@lemmy.todaytoProgrammer Humor@programming.devwait what
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    6 months ago

    Looking at code on somebody else’s screen is entirely missing the point of using tabs over spaces. The entire point is that mine looks like how I want and theirs looks like how they want even though the file is identical. We can each have wildly different tab width and it’ll look wildly different to each of us when we program. That’s again the point.

    Code formatters are great! I love them. Using tabs over spaces is objectively a better formatting option. One of my favorite features in code formatters is that they’ll swap out spaces to tabs for you insane people who insist on mashing the space bar to indent.


  • Traister101@lemmy.todaytoProgrammer Humor@programming.devwait what
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    6 months ago

    What’s yaml have to do with anything? It’s like python with syntactic whitespace which is unrelated to this discussion. The Tab vs Space debate is entirely around non syntactic whitespace which doesn’t effect how the code is parsed. And yes Python technically does both tabs and spaces but it’s all sorts of fucky.

    Terminal editors while still used a ton aren’t really what I was referring to. Newer terminal editors such as Helix have tab width configured per language most of which default to a width of 4 spaces but toml/yaml both default to 2 spaces. I was mainly referring to GUI editors as frankly that’s just what most people use nowadays. JetBrains IDEs, Visual Studio, Eclipse, VS Code, Notepad++ were primarily what I was thinking of as I’ve used all of them and they all default to a tab width of 4 hence why I said nearly universal. Also I said nearly terminal editors being the only editors I’ve used that don’t default to a width of 4 seems like a fair usage of the term.


  • Traister101@lemmy.todaytoProgrammer Humor@programming.devwait what
    link
    fedilink
    arrow-up
    7
    arrow-down
    2
    ·
    6 months ago

    Then don’t? The whole reason nearly all the spaces guys do 4 spaces is cause that’s the nearly universal tab width. You won’t like this but the same exact argument can be made for spaces yet I’d bet you haven’t even once configured the width of those.

    I don’t actually change tab width, it’s the default 4 spaces equivalent for me but just because I don’t take advantage of the ability doesn’t mean I should prevent others from doing so.