• I Cast Fist@programming.dev
    link
    fedilink
    arrow-up
    13
    ·
    8 hours ago

    What surprised me the most was the speed of the compilation, must be a very small program. I tried to compile Godot from source once. Force-stopped it after 3 hours

    • Sylvartas@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      7
      ·
      6 hours ago

      How many cores do you have and what compiler was it ? Also RAM can help with huge codebases iirc. When I was working with UE5 I had the best Ryzen available with 128 Go of RAM, could compile the engine (which is much bigger than Godot) from source in less than 2 hours iirc (yes that is a full clean+rebuild, not just compiling recent changes)

    • Psythik@lemmy.world
      link
      fedilink
      arrow-up
      3
      arrow-down
      12
      ·
      7 hours ago

      Why are you trying to compile an actress? What is a human’s “source”? Their DNA? I’m surprised that the compiler even tried.

  • count_dongulus@lemmy.world
    link
    fedilink
    arrow-up
    35
    ·
    10 hours ago

    This is why I will never touch Javascript again. Long ago when I worked on web stuff, half my workflow was spent in the debugger tracing garbage to find where a typo was. The industry moved to Typescript, and now assuming the strictness checks are enabled, if some Typescript transpiles successfully, I can be 95% sure whatever fuckup I observe at runtime is a logic problem.

    Weakly typed languages were an awful idea. But in general, if the compiler isn’t able to detect most runtime issues (like with C++ here), it’s not going to be the most productive language to use for building solutions compared to smarter alternatives.

      • count_dongulus@lemmy.world
        link
        fedilink
        arrow-up
        8
        arrow-down
        1
        ·
        7 hours ago

        Try porting a very small bit of behavior into a new tiny library or module that is Typescript based and independently published. Enable the strictness checks in tsconfig - really, really resist the urge to use any, and enforce that any is disallowed in tsconfig. Familiarize yourself with its utility types that really trip new authors up. “Record” comes to mind here, and others that involve generics if you haven’t before worked with generics. Some of the type error messaging can be pretty obtuse - don’t be afraid to paste them into an LLM (or use Copilot enhanced Intellisense) to explain what it actually means. IMO the type violation messaging is a weak dev experience point for new authors, so don’t sweat it if you occasionally “struggle to make the squiggles go away”.

    • can
      link
      fedilink
      arrow-up
      21
      arrow-down
      1
      ·
      10 hours ago

      Very. It’s like they’re both saying it in unison.

    • Jyek
      link
      fedilink
      arrow-up
      9
      ·
      10 hours ago

      It makes sense to me. You start in the top left like how you read and then you get a direction for the order of the conversation. I read it naturally at intended the first time through.

      • can
        link
        fedilink
        arrow-up
        13
        ·
        8 hours ago

        It reads fine. It’s the connection between the bubbles that’s incorrect.

  • brucethemoose@lemmy.world
    link
    fedilink
    arrow-up
    84
    ·
    edit-2
    11 hours ago

    Meanwhile, Rust punches you in the face for the mere suggestion. Again. And again.

    Python happily nods, runs it one page at a time, very slowly, randomly handing things off to a C person standing to the side, then returns a long poem. You wanted a number.

    Assembly does no checking, and reality around you tears from an access violation.

    EDIT: Oh, and the CUDA/PyTorch person is holding a vacuum sucking money from your wallet, with a long hose running to Jensen Huang’s kitchen.

  • abcd@feddit.org
    link
    fedilink
    English
    arrow-up
    20
    ·
    11 hours ago

    Is C++ the first enemy that managed to win against one punch man?

  • henfredemars@infosec.pub
    link
    fedilink
    English
    arrow-up
    45
    ·
    13 hours ago

    Ah, C++. An endless supply of footguns where the difference between a junior and a senior dev is knowing what parts of the language to never use.

    • xmunk
      link
      fedilink
      arrow-up
      15
      ·
      11 hours ago

      Real C++ programmers pass by const ref and tell pointers to fuck off.

      • henfredemars@infosec.pub
        link
        fedilink
        English
        arrow-up
        10
        ·
        edit-2
        5 hours ago

        You can also make everything a smart pointer and be done with it.

        I can count on more than one hand the number of large scale projects where converting everything to smart pointers fixed major memory issues. Even if smart pointers can’t handle circular references, the number of projects that just don’t manage their memory correctly at all and were fixed by introducing these tools is way too high.

        • xmunk
          link
          fedilink
          arrow-up
          3
          ·
          5 hours ago

          This is a bit embarrassing but the last time I actively worked in C++ it was with Qt and pre C++11.

          • henfredemars@infosec.pub
            link
            fedilink
            English
            arrow-up
            1
            ·
            5 hours ago

            Almost the same as me. All kinds of programming jobs. I usually end up working in Python or C, for embedded systems work.

            Of course, if you’re talking hobby, it could be anything.

        • CanadaPlus@lemmy.sdf.org
          link
          fedilink
          arrow-up
          2
          ·
          7 hours ago

          Which kind of smart pointer, with which kind of footgun? I mean, it’s better than not even trying I guess, but if it was actually a full solution you’d just have Rust.

          • henfredemars@infosec.pub
            link
            fedilink
            English
            arrow-up
            6
            ·
            5 hours ago

            You’re right. It’s a stop gap, but when you’re talking about a code base that has been maintained for 20 years plus you can’t really sell re-implementation.

            Most recently it was with an older version of C++ using shared pointers.

  • Thorry84@feddit.nl
    link
    fedilink
    arrow-up
    30
    ·
    13 hours ago

    Typescript on the other hand: Exwuse me sir, you seem to have a little oopsie right here. Oh right! Let me just fix that right up.

    HERE ARE TWO THOUSAND ERRORS! YOUR PUNY LITTLE BUFFER CAN’T EVEN SCROLL BACK TO READ THEM ALL! AND YOU CALL YOURSELF A PROGRAMMER?

  • heavy
    link
    fedilink
    English
    arrow-up
    12
    ·
    13 hours ago

    I mean, the comic is fine I guess, but if it implies the Cpp lady is hitting you, it’s not. That would be the kernel, the lady did what you told her to do.