• livingcoder@programming.dev
    link
    fedilink
    arrow-up
    31
    arrow-down
    1
    ·
    5 months ago

    When I learned Python I thought that not having a statically typed language was the way to go, but then it just became an issue when I was trying to ensure that everything was at least something like what I was expecting. Going back to statically typed languages even harder with Rust has been a dream. I love it.

  • CanadaPlus@lemmy.sdf.org
    link
    fedilink
    arrow-up
    17
    ·
    edit-2
    5 months ago

    Eh, strict typing makes debugging way, way easier. Saint Grace brought us compilers for a reason. If all you have is assembly, you should start writing one.

  • xthexder@l.sw0.com
    link
    fedilink
    arrow-up
    15
    ·
    5 months ago

    For NASA, data types don’t matter when you’re programming Voyager 1 and 45 years later it gets hit by an energy burst causing 3% of the RAM to become unusable, and it’s transmitting gibberish. It’s awesome they were able to recover it.

  • garlicandonions@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    5 months ago

    It’s documentation. I’m a strickler to type in python so later when I look at my code and go what does this do it’s easier.

  • bodaciousFern@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    3
    ·
    5 months ago

    I was actually tempted to try learning nasm for funsies a year or two ago until I discovered it doesn’t support ARM processors 🥲

    • Ethan@programming.dev
      link
      fedilink
      English
      arrow-up
      13
      arrow-down
      1
      ·
      5 months ago

      Assembly languages are always architecture specific. Thats kind of their defining feature. Assembly is readable machine code.

      • h4x0r@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        6
        ·
        5 months ago

        nasm is an assembler though, not a ‘languages’, that only supports x86/x64. gas for example supports a wide range of architectures so you can write risc-v, arm, x64, etc.

        • MasterNerd@lemm.eeOP
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          5 months ago

          The reason I used the nasm logo is because Assembly itself doesn’t have a logo since it’s not really one language. This is the one I’m with the most familiar with so that’s the one I used. This meme would apply to any Assembly language.

        • Ethan@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          5 months ago

          nasm is an assembler though, not a ‘languages’

          That’s like saying “clang is a compiler though, not a language”. It’s correct but completely beside the point. Unless you’re writing a compiler, “cross platform assembler” is kind of an insane thing to ask for. If want to learn low level programming, pick a platform. If you are trying to write a cross-platform program in assembly, WHY!? Unless you’re writing a compiler. But even then, in this day and age using a cross-platform assembler is still kind of an insane way to approach that problem; take a lesson from decades of progress and do what LLVM did: use an intermediate representation.

        • Trailblazing Braille Taser@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          2
          arrow-down
          3
          ·
          5 months ago

          Are you arguing that assembly languages are not architecture-specific? I don’t think that’s the typical definition.

          Nasm is an assembler, but it also represents a specific assembly language targeting x86 architectures.

          Gas is an assembler of a higher order. It can emit code for many architectures, and thus it accepts many different architecture-specific assembly languages.

  • zenforyen@feddit.org
    link
    fedilink
    arrow-up
    1
    ·
    5 months ago

    Python with type hints and mypy and ruff = <3

    Large Python codebase without types = nightmare

    • smiletolerantly@awful.systems
      link
      fedilink
      arrow-up
      1
      ·
      5 months ago

      I’m too lazy to insert the “look what they need to mimic a fraction of our power” meme here, so… Please imagine it instead.

      I’m switching jobs in a couple of months, and I am SO glad to be leaving a (very well maintained!!) python codebase with type hints and mypy for a rust codebase.

      It is just not the same.

  • HStone32@lemmy.world
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    4 months ago

    Data types do matter, and someone’s got to declare them at some point, or else your compiler won’t know how to intepret them. It’s just a question of who should be doing the declaring: you, or a parser algorithm? Personally, I don’t like things being done for me.