• 1 Post
  • 295 Comments
Joined 2 years ago
cake
Cake day: June 18th, 2023

help-circle







  • Similarly, what would you gain by saying uint32_t const* x = my_var.get<uint32_t>();

    To be frank: You gain the information that MyConcreteType::get<uint32_t> returns a uint32_t, which I otherwise couldn’t infer from the docs. Of course, I could assume it, based on the template parameter, but I don’t want to go around assuming a bunch of stuff in order to read docs.

    Take an example like auto x = my_var.to_reduced_form(), it’s very clear that x is the “reduced form” of my_var, which could be meaningful in itself, but what type is it? I need to know that if I want to do anything with x. Can I do x += 1? If I do, will that modify my_var? Let’s say I want to make a vector of whatever to_reduced_form returns… and so on.

    All these questions are very easily answered by MyConcreteType x = my_var.to_reduced_form(). Now I immediately know that everything I can do with my_var, I can also do with x. This makes me happy, because I need to do less digging, and the code becomes clearer to read.


  • Thanks, that was a good read :)

    However, my impression is that he’s largely using the existence of templates and polymorphism as arguments that “we don’t really care about type”. I disagree: A template is essentially a generic type description that says something about what types are acceptable. When working with something polymorphic, I’ll prefer ParentClass&, to indicate what kind of interface I’m working with.

    Sure, it can be very useful to hide exact type information in order to generalise the code, but I think that’s a weak argument for hiding all type information by default, which is what auto does.


  • I really like C++ (I know, shoot me), and I think auto should be avoided at (almost) all costs.

    One of the things I love about a language like C++ is that I can take one glance at the code and immediately know what types I’m working with. auto takes that away while adding almost no benefit outside of a little convenience while writing.

    If I’m working with some very big template type that I don’t want to write out, 99/100 times I’ll just have a using somewhere to make it more concise. Hell, I’ll have using vectord = std::vector<double> if I’m using a lot of them, because I think it makes the code more readable. Just don’t throw auto at me.

    Of course, the worst thing ever (which I’ve seen far too often) is the use of auto in examples in documentation. Fucking hell! I’m reading the docs because I don’t know the library well! When you first bother to write examples, at least let me know the return type without needing to dig through your source code!


  • Isn’t one of the reasons it’s argued that it could be a cosmic ray that in millions of automated run-throughs, they haven’t been able to reproduce it? That is: Something extremely unlikely, and quite possibly non-deterministic (i.e not a software bug) clearly happened.

    Also, I believe they pinpointed that there was exactly one bit-flip. I’m not disagreeing that a bit flip caused by a cosmic ray is astronomically unlikely, but it’s not unprecedented either. It does happen, though rarely, and I have yet to see a more convincing explanation for what we saw in that speed run.




  • Honestly, after re-reading my own comment, I’m considering just putting some stupid-simple wrapper around mv that moves files to a dedicated trash bin. I’ll just delete the trash bin every now and then…

    -Proceeds to collect 300 GB of build files and scrapped virtual environments over the coming month-


  • thebestaquaman@lemmy.worldtolinuxmemes@lemmy.worldlinux rm
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    27 days ago

    I usually don’t think about it at all, but every now and then I’m struck by how terrifyingly destructive rm -r can be.

    I’ll use it to delete some build files or whatever, then I’ll suddenly have a streak of paranoia and need to triple check that I’m actually deleting the right thing. It would be nice to have a “safe” option that made recovery trivial, then I could just toggle “safe” to be on by default.


  • Wat? Did you reply to the wrong comment or something?

    Defending a mediocre male (…)

    I’m rationalising a persons reaction to a situation by trying to understand how they think.

    Not even an inkling of concern (…)

    I don’t see how rationalising one persons train of thought says anything about my personal opinions or concerns about anything?

    Now we know (…) which hills you’re willing to die on.

    This is really what confused me the most. What about my comment made you think there was even any hill in the vicinity to die on?


  • He only walked back after making hard defence of his comments at first.

    That should be reassuring more than anything, in the sense that he came around after being genuinely convinced that he was wrong. There’s nothing wrong with defending your position until you’re genuinely convinced that you’re wrong. I have a much bigger problem with people instantly folding when confronted, but not truly accepting that they were wrong in the first place.


  • Lack of understanding social interactions, and lack of ability to understand how others feel in a given situation are marks of autism though.

    My impression is that what people are accusing of being “pedo comments” are more a result of him not really understanding power dynamics between people, and not understanding the lack of judgment that kids and young teens have, to the point of not really understanding that a kid is literally incapable of sexual consent.

    I also heard he walked back a lot of comments after having talked to a psychologist that laid down some hard facts for him regarding the matter of sexuality and the psyche of kids.


  • I don’t know how I’d categorise him, but my major impression is basically what you conclude as well.

    It seems to me he has little to no social skills, and may be lacking in empathy, to the point “cynic” may be a good description? The way I see him, my impression is that he looks at the world around him and draws what he believes to be logical conclusions from the hard facts he observes, and is willing to change his perspective if hard facts contradict him. The lack of human understanding has put him in some bad spots, but I have a hard time seeing him as a “bad person” in general.