• Turun
      link
      fedilink
      21 year ago

      Compilation: top row, runtime: button row.

          • asudox
            link
            fedilink
            2
            edit-2
            1 year ago

            Runtime errors are rare? Interesting. I guess it depends on how much error handling the dev additionally wants to do.

          • Turun
            link
            fedilink
            51 year ago

            I have a graphical application that crashes regularly when I switch between displays with Ctrl+alt+number. Something in the winit stack does not like it.

    • caseyweederman
      link
      fedilink
      81 year ago

      Rust: this garbage code is beneath me, come back when you have your shit together.

    • Malle_Yeno
      link
      fedilink
      431 year ago

      The rust compiler holds your hand, wraps you in blankets, makes you hot chocolate, kisses you on the forehead before it gently and politely points out what you did wrong and how you can solve it step-by-step. It would never think of something as heinous as swearing at you, shame on you for insulting my wife’s honour like this.

      • @[email protected]
        link
        fedilink
        21 year ago

        I don’t know from where this legend comes from but lifetimes/concurrency/macros errors are brain-hurting.

        Most of the time I find myself dropping project because I wrote my program in a correct way but Rust just does not like how it is designed lol. I can’t get shit done with this language

      • @[email protected]
        link
        fedilink
        291 year ago

        Rust compiler is passive agressive, like:

        “There’s an error at line 286 because you still don’t know how to use the borrow checker after all this time ♥️”

        • @[email protected]
          link
          fedilink
          41 year ago

          its a compiler. That is at best projection, especially considering how the compiler’s error feedback is designed to be firm yet gentle.

      • @[email protected]
        link
        fedilink
        41 year ago

        The rust compiler produces a flawless understanding of your code, and then quits out because understanding that code is a Nightly-only feature and you’re using the stable build.

  • @[email protected]
    link
    fedilink
    821 year ago

    My favorite compile error happened while I was taking a Haskell class.

    ghc: panic! (the ‘impossible’ happened)

    The issue is plainly stated, and it provides clear next steps to the developer.

  • Subverb
    link
    fedilink
    251 year ago

    Nevermind that the C++ program is two orders of magnitude faster when completed.

    I would love to learn and use Rust but I’m a embedded systems guy. Everything of consequence is C and C++.

    • @[email protected]
      link
      fedilink
      English
      131 year ago

      This right here - C++ iirc is used mostly for microprocessor code in an industry setting, where EXTENSIVE testing is done so that bloated code doesn’t need to constantly check for programmer errors every single time, i.e. where execution speed is prioritized over programmer development time. And whenever that is not the case, well, as OP pointed out, other higher-level languages also exist (implication: to choose from).

      • @[email protected]
        link
        fedilink
        61 year ago

        I also currently use it for a new project since all needed 3rd party libraries are from a very specific domain and the project has a deadline, so writing and testing wrappers for Rust that would provide me with any meaningful advantages down the road are too costly to budget for before the deadline.

        That could become part of a future refactoring, though.

      • @[email protected]
        link
        fedilink
        351 year ago

        C++ iirc is used mostly for microprocessor code

        lol no, it’s used almost everywhere where performance is important and people want(ed) OOP, from tiny projects to web browsers (Chrome, Firefox) to game engines (Unreal, CryEngine). Many of these are hugely complex and do encounter segfaults on a somewhat frequent basis.

        Saying C++ is mostly used for embedded applications is like saying C# is mostly used for scripting games, i.e. it doesn’t nearly cover all the use cases.

        higher-level languages also exist

        This depends on your definition of “higher-level”, but many people would argue that C++ is on a similar level to Java or C# in terms of abstraction. The latter two do, however, have a garbage collector, which vastly simplifies memory management for the programmer(generally anyway).

  • @[email protected]
    link
    fedilink
    371 year ago

    This C++ message has an urgency vibes to it:

    “Segmentation fault!! Drop the Nuclear Reactor quick!!”

  • @[email protected]
    link
    fedilink
    English
    171 year ago

    I know this is supposed to be humorous, but there’s a reason why these languages can, and are doing what they’re doing.

    Core dumps are also worth learning about, they’re really helpful if you understand them.

    • @[email protected]
      link
      fedilink
      English
      38
      edit-2
      1 year ago

      Yes. It’s a surprisingly bad debugger the more you think about it. I use it largely in assembly and it loves to spit out random errors about memory it tried to access based on the current register state. The shortcuts are kind of dumb.

      It certainly works but I wouldn’t call it a pleasure to use.

      Ex: try disp x/1i $eip often just doesn’t work.

      • TunaCowboy
        link
        fedilink
        61 year ago

        I use gdb with great success for x64, rv64, and c:

        info registers rip or just setup tui:

        # ~/.config/gdb/gdbinit:
        tui new-layout default regs 1 {-horizontal src 1 asm 1} 2 status 0 cmd 1
        tui layout default
        tui enable
        
      • @[email protected]
        link
        fedilink
        21 year ago

        I honestly vastly prefer using IDA and Windows specific tools (x64dbg) over gdb. IDA can interface with gdb so it can act as a frontend which can be handy for visualization.

  • @[email protected]
    link
    fedilink
    English
    5
    edit-2
    1 year ago

    C#: Time for a treasure hunt! Find the Null Reference Exception. Here’s a map. X marks the spot.

    • Kogasa
      link
      fedilink
      61 year ago

      C# tells you the call site/method name and line number right at the top. It’s only really annoying when you have aggregate exceptions, which sometimes occur because someone async’d wrong

      • @[email protected]
        link
        fedilink
        English
        21 year ago

        Actually getting there is the other part. It’s not like java where you can go down the chain if the problem isn’t where it says it is.