• 0 Posts
  • 454 Comments
Joined 1 year ago
cake
Cake day: September 2nd, 2023

help-circle

  • I don’t even know why people ITT are blaming the IDE and completely ignoring this.

    When you learn git, you do so on a dummy project, that has 5 files which are 10 characters long each.

    An IDE is not made so you can’t break things, it is tool, and it should let you do things. It’s like complaining that Linux will let you delete your desktop environment. Some people actually want to delete your desktop environment. You can’t remove that option just because someone can accidentally do it by ignoring all the warnings.


  • And unfortunately, this means that WG21, the C++ committee, has to take action because people are demanding it

    Why does this mean that they have to take action? Why do they need to make C++ memory safe?

    C++ was not designed to be memory safe. If you try to make C++ memory safe, you’ll have to break retro compatibility. If you’re going to break retro compatibility, can you say it’s still C++? Or another language called C++2? At that point, why not just use another language that was designed from the start to be memory safe?

    The action that should be taken is to completely avoid starting any new project in C++, and let the language die. A programming language is nothing more than a tool, once the tool no longer works, you search for another that does.

    C++ should go the way of fortran and cobol. The only development of C++ should be done is to maintain existing huge codebases that would be too expensive to rewrite.









  • I think you completely missed the point.

    The problem is not that the sign exists, the problem is that people don’t see nothing wrong with it.

    If you were a Jew, how would you feel if you saw Nazi flags on a men’s rights protest? Would you feel safe knowing that men a Nazi is safe around men? (Which probably means many of those men are nazis/nazi sympathizers themselves.).

    That’s how men feel when they see sexist messages in feminist protests go uncontested.



  • calcopiritus@lemmy.worldtoMicroblog Memes@lemmy.worldThe gender wars continue 🥹
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    5
    ·
    edit-2
    14 days ago

    You can’t be that blind. At pretty much every women’s rights protest there is at least someone with a sign up that reads something like “All men are rapists”. Sure, the protest might not be about that. Sure, not everyone agrees with that kind of statements. But there’s not much opposition either, so that kind of sexist message appears all the time in the news. Furthermore, those spewing sexist bullshit call themselves “feminists”, so young men think that feminism is like that, and now they hate feminism too.

    EDIT: just as an example, right after writing this comment I saw this other one: https://lemmy.world/comment/13322514 it’s impossible to time it better.



  • Editor/IDE, whatever. People claim both about jetbrains.

    If you want a purely editor-thing:

    Whatever vscode does with Ctrl+D (I don’t know the name). Ctrl+D is probably the hotkey I use most in vscode (probably more than Ctrl+S), yet CLion doesn’t have that. I’ve searched multiple times the whole settings for it.

    Those two examples are just the ones that most recently occurred to me, it has a lot more issues. For example the lack of a staging area. You can’t “git stage” in CLion.

    And I don’t think that the git integration is free from criticism. Git integration is one of the most important features of IDEs. It’s absolutely valid to criticize it.

    The autoformatter also doesn’t work correctly when developing in remote. Which means that unless I want my PRs to have thousands of lines of whitespace changes, I can’t use the auto formatter.

    Now I don’t know if this is a CMake issue or CLion. But at one point It was "#include"ing a struct from a header file I had deleted 1 hour previous to the build failing. The only way to fix that was to create the file again and delete it again.

    These complaints might seem small. But put together they are hours of wasted time that you don’t expect from the “best” of something.


  • Don’t need to go all the way there. I always heard that jetbrains make the best editors. Yet when my job forced everyone to use CLion I saw that it was just a lie. The editors aren’t good, they are just expensive.

    There are 2 easy examples:

    1. Remote developing sucks. Loading a remote cmake project takes ages. Yet if you remove the temp directory it’s almost instantaneous. Except when you do it too often and clion refuses to sync the files, then you’re fucked because there isn’t a “sync” button, it only happens automatically.

    2. The commit log is awful. It doesn’t by default show you the commit/branch you’ve checked out, it shows the chronologically most recent commit. There’s no “go to checked out commit” button either, you have to write the hash in the search field. Which btw the search is trash. If you write 6 of the characters of the hash it shows “there are no results”, yet when you write the 7th, suddenly your commit appears.




  • The thing about UB is that many optimizations are possible precisely because the spec specified it as UB. And the spec did so in order to make these optimizations possible.

    Codebases are not 6 lines long, they are hundreds of thousands. Without optimizations like those, many CPU cycles would be lost to unnecessary code being executed.

    If you write C/C++, it is because you either hate yourself or the application’s performance is important, and these optimizations are needed.

    The reason rust is so impressive nowadays is that you can write high performing code without risking accidentally doing UB. And if you are going to write code that might result in UB, you have to explicitly state so with unsafe. But for C/C++, there’s no saving. If you want your compiler to optimize code in those languages, you are going to have loaded guns pointing at your feet all the time.


  • I recently came across a rust book on how pointers aren’t just ints, because of UB.

    fn main() {
        a = &1
        b = &2
        a++
        if a == b {
            *a = 3
            print(b)
        }
    }
    

    This may either: not print anything, print 3 or print 2.

    Depending on the compiler, since b isn’t changed at all, it might optimize the print for print(2) instead of print(b). Even though everyone can agree that it should either not print anything or 3, but never 2.