• KairuByte@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        32
        arrow-down
        7
        ·
        1 year ago

        Open source inherently means you can compile the code locally, for free. You can’t necessarily redistribute it, depending on the license, but I’m not aware of a “you can compile this source for testing and code changes only but if you use it as your actual copy you are infringing” license.

        I am very much open to correction here.

        • ono@lemmy.ca
          link
          fedilink
          English
          arrow-up
          34
          ·
          edit-2
          1 year ago

          Open source inherently means you can compile the code locally,

          Open Source means more than that. It is defined here:

          https://opensource.org/osd/

          If you use the phrase “open source” for things that don’t meet those criteria, then without some clarifying context, you are misleading people.

          for free.

          Free Software is not the same as “software for free”. It, too, has a specific meaning, defined here:

          https://www.gnu.org/philosophy/free-sw.html

          When the person to whom you replied wrote “free software”, they were not using it in some casual sense to mean free-of-charge.

  • ono@lemmy.ca
    link
    fedilink
    English
    arrow-up
    64
    arrow-down
    3
    ·
    1 year ago

    Cute. It would be funnier if it was correct.

  • Thorry84@feddit.nl
    link
    fedilink
    arrow-up
    56
    ·
    1 year ago

    For people interested in the difference between decompiled machine code and source code I would recommend looking at the Mario 64 Decomp project. They are attempting to turn a Mario 64 rom into source code and then back into that same rom. It’s really hard and they’ve been working on it for a long time. It’s come a long way but still isn’t done.

    https://github.com/n64decomp/sm64

      • Thorry84@feddit.nl
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        There is still some stuff that needs documenting, but the original goal of recompiling the created source code into the ROMs has been achieved. People are still actively working on it, so in that sense it’s maybe never done.

    • voxel@sopuli.xyz
      link
      fedilink
      arrow-up
      1
      arrow-down
      2
      ·
      edit-2
      1 year ago

      well assembly is technically “source code” and can be 1:1 translated to and from binary, excluding “syntactic sugar” stuff like macros and labels added on top.

      • Malfeasant@lemm.ee
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        1 year ago

        But those things you’re excluding are the most important parts of the source code…

        • 257m@lemmy.ml
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          1 year ago

          By excluded he means macro assemblers which in my mind do qualify as an actual langauge as they have more complicated syntax than instruction arg1, arg2 …

      • 257m@lemmy.ml
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        1 year ago

        The code is produced by the compiler but they are not the original source. To qualify as source code it needs to be in the original language it was written in and a one for one copy. Calling compiler produced assembly source code is wrong as it isn’t what the author wrote and their could be many versions of it depending on architecture.

        • over_clox@lemmy.world
          link
          fedilink
          arrow-up
          4
          arrow-down
          6
          ·
          1 year ago

          And? Decompilers aren’t for noobs. So what if it gives you variable and function names like A000, A001, etc?

          It can still lead a seasoned programmer where to go in the raw machine code to mod some things.

        • over_clox@lemmy.world
          link
          fedilink
          arrow-up
          1
          arrow-down
          2
          ·
          1 year ago

          No, it’s actually better when you can read the machine code.

          Most folks don’t care to recompile the whole thing when all they wanna do is bypass the activation and tracker shit.

          • SpaceNoodle@lemmy.world
            link
            fedilink
            arrow-up
            3
            ·
            1 year ago

            Having access to the source code actually makes reading machine code easier, so you’re also wrong on this entirely different thing you’re going on about.

            • over_clox@lemmy.world
              link
              fedilink
              arrow-up
              1
              arrow-down
              2
              ·
              1 year ago

              I never said disassembly or decompiling was easier in any way. I’ll agree with you on that, it’s way more difficult.

              Back to the point of the meme though, if you can read assembly, you can read it all.

                • over_clox@lemmy.world
                  link
                  fedilink
                  arrow-up
                  1
                  arrow-down
                  1
                  ·
                  1 year ago

                  I’ve written drivers in 65 bytes of code. I don’t tend to use high level languages that hide what’s going on behind the scenes.

            • over_clox@lemmy.world
              link
              fedilink
              arrow-up
              1
              arrow-down
              2
              ·
              1 year ago

              You’ve clearly never used a disassembler such as HIEW have you? You get the entire breakdown of the assembly code.

                • over_clox@lemmy.world
                  link
                  fedilink
                  arrow-up
                  1
                  arrow-down
                  1
                  ·
                  1 year ago

                  I didn’t say it was. I just said loosely what the OG meme said, if you know how to read assembly, you know how to read (and write) what some of the code does.

  • just_ducky_in_NH@lemmy.world
    link
    fedilink
    arrow-up
    22
    arrow-down
    1
    ·
    1 year ago

    Okay, boomer here, be gentle.

    So back in the ‘70s I dabbled in programming (now called “coding”, I hear). I only did higher-level languages like Fortran, Cobol, IBM Basic, but a friend had a job (at age 13!) programming in assembler. Is assembler now called assembly, or are they different?

    • fidodo@lemm.ee
      link
      fedilink
      arrow-up
      27
      ·
      1 year ago

      It’s still called programming, coding is the same thing. Assembler more commonly refers to the utility program that converts the assembly code to machine code while assembly refers to the code itself, but the term assembler code is also valid. It’s uncommon to simply call the code assembler because it would be easily confused with the utility program.

    • Thwompthwomp@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      1 year ago

      I thought that the assembler is a specific program that translates mnemonics into the corresponding machine code. Perhaps in early computing this was done by hand so a person was the assembler (and worked in assembler), but now that is handled by software (and supports various macros). So programming in assembly would generate a stream of text that must be assembled by an assembler. (Although I have heard people refer to programming in assembler as well, just not often.)

      • lhamil64@programming.dev
        link
        fedilink
        arrow-up
        9
        ·
        1 year ago

        I hear people say “program in assembler” but IMO that’s wrong. I’d say you write the code in “assembly language” (or better yet, the actual architecture you’re using like “x86 assembly”) but you “assemble” it with an “assembler”. Kind of like how you could write a program in the “C language” and “compile” it with a “compiler”

    • Overzeetop@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      I was too young/poor to afford an assembler for my 6502 so I wore out the assembly long hand on a legal pad and then manually converted each operation to machine code.

      Needless to say my programs done this way were exceptionally simple, but it’s interesting to understand the underlying code.

  • NounsAndWords@lemmy.world
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    1 year ago

    It just occurred to me that AI in the nearish future will probably/almost certainly be able to do this.

    • Psythik@lemm.ee
      link
      fedilink
      arrow-up
      29
      ·
      1 year ago

      I can’t wait for AI to make a PC port of every console game ever so that we can finally stop using emulators.

    • perviouslyiner@lemm.ee
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      1 year ago

      It was a staple of Asimov’s books that while trying to predict decisions of the robot brain, nobody in that world ever understood how they fundamentally worked.

      He said that while the first few generations were programmed by humans, everything since that was programmed by the previous generation of programs.

      This leads us to Asimov’s world in which nobody is even remotely capable of creating programs that violate the assumptions built into the first iteration of these systems - are we at that point now?

  • kamen@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    ·
    1 year ago

    Joke aside, that’s kind of like claiming that any web frontend is open source because you can access the built, minified and often obfuscated source of it.

    • Jocker Black@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      So true! I have been “hacking” some chrome extensions recently, do you know of a tool for reverse engineering JS?

  • oldfart@lemm.ee
    link
    fedilink
    arrow-up
    12
    arrow-down
    1
    ·
    1 year ago

    IDA Pro (a disassembler) is closed source but came with a license that allowed disassembly and binary modification. Unfortunately, that’s no longer the case.

  • over_clox@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    If you wanna skip a few inconvenient instructions in X86 assembly, throw a few No Operation instructions in the right places.

    NOP = 0x90

    • SzethFriendOfNimi@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      2
      ·
      edit-2
      1 year ago

      And so you add a hashing check. But then that can be removed.

      So you need one in the OS but that can be removed.

      So you need one in hardware.

      In other words no matter how clever you are there’s always a way to monkey with something unless you have absolute control from silicon on up.

      Here’s a really interesting video the Xbox team did on the challenges of trying to make sure that the content running wasn’t pirated.

      https://youtu.be/U7VwtOrwceo

      While DRM is the bane of everybody there are cases where trust and integrity is important and it’s an intriguing look into how hard it is to manage.

      • grue@lemmy.ml
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        1 year ago

        While DRM is the bane of everybody there are cases where trust and integrity is important and it’s an intriguing look into how hard it is to manage.

        Nah, when the user wants to ensure trust and integrity in his own system, it works just fine. The problem comes when the user who needs to be able to access the data is simultaneously the adversary who needs to be stopped from accessing the data.

        In other words, it’s one of those situations where the fact that it’s hard to manage is a gigantic clue that it’s wrongheaded to try to do so in the first place.

        • SzethFriendOfNimi@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          I agree. I mean when doing secure channel communications or weapons systems or health biometrics.

          There are cases where you need to be sure of the integrity of the data and environment

  • Cyborganism@lemmy.ca
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    1 year ago

    You can have the code of any software with a decompiler. Especially with Java and C# for example.