Neo Mujico
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
devilish666@lemmy.world to Programmer Humor@lemmy.ml · 1 year ago

C++ Moment

lemmy.world

message-square
37
fedilink
2

C++ Moment

lemmy.world

devilish666@lemmy.world to Programmer Humor@lemmy.ml · 1 year ago
message-square
37
fedilink
alert-triangle
You must log in or register to comment.
  • lowleveldata@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    let’s not act like Java’s error log is useful

    • Fades@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      skill issue

      • marcos@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        The same applies to using the core dump.

        In fact, the Python one is the lest useful of the trio.

    • kaffiene@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      It’s extraordinarily useful

  • Subverb@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 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++.

    • Knock_Knock_Lemmy_In@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Rust seems pretty performant

      https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/rust-gpp.html

      • Subverb@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        I meant faster than Python, not faster than Rust. Rust is fast.

    • T156@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      If the embedded system is old or poorly-maintained enough, there might be more Rust than you’d think.

    • cucumber_sandwich@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      There’s embedded rust for a few platforms. Using it on ESPs is fun

  • FlatFootFox@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 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.

    • Ignotum@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      I had a similar error, though not from the compiler
      Error message just read this should never happen

  • Flxibit@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

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

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

  • تحريرها كلها ممكن@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    1 year ago

    At least you are getting a dump, count your blessings. Could be worse!

    Just hook your app to a debugger and load the dump.

  • Amaltheamannen@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    More like 100 lines of template errors

    • DampCanary@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      If only I could show segfaul stack tracetrough looped macros.

      It breaks VSCode (it would be hilarious if I wasn’t the author of said macros).

  • ooterness@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    No bounds checking, only fast.

  • 𝘋𝘪𝘳𝘬@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Python: So you used spaces and tabs for indentation? NOW DIE!

    • brettvitaz@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      Are you ok?

    • WhiteHawk@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Mixing spaces and tabs should be a warcrime.

      • pingveno@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        And in Python, it’s merely a SyntaxCrime.

  • repungnant_canary@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Joke on you until the python program segfaults

  • AMDIsOurLord@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    The developer must either provide the logging and attach a debugger or go get fucked when a runtime error happens

    • kureta@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      are you c++?

    • Faresh@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      1 year ago

      That’s not true though. You can get the backtrace and other useful information from the coredump mentioned by the error message by loading it with gdb. Not as good as attaching it to a living process, since you can’t see step-by-step what happens leading up to the error, but still quite useful.

      • AMDIsOurLord@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Well yes, that’s a pretty good way of debugging a third party app but if you are developing something you can have more ease with gdb attached

  • asudox@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Where’s rust?

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Rust required you to fix all the errors before running the code.

      • asudox@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Runtime errors are still a thing.

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          Compared to that trio, they are a rarity that make people excited just to spot one.

          • asudox@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            edit-2
            1 year ago

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

  • Buttons@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Why doesn’t JavaScript have tracebacks?

    • bartvbl@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      How useful would they be when they rely to such a large extent on various callback functions?

  • Strykker@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Except the C++ “Core dumped” line is telling you it just wrote a file out with the full state of the program at the time of the crash, you can load it up and see where it crashed and then go and look at what every local variable was at the time of the crash.

    Pretty sure you can even step backwards in time with a good debugger to find out exactly how you got to the state you’re currently in.

  • Omega_Haxors@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    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@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      1 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

      • Omega_Haxors@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 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.

  • ElCanut@jlai.lu
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    1 year ago

    Rust developer: I’d like to compile some code

    Rust compiler: the fuck you are

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 9 users / day
  • 17 users / week
  • 89 users / month
  • 377 users / 6 months
  • 0 local subscribers
  • 36.9K subscribers
  • 1K Posts
  • 3.58K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • BE: 0.19.8
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org