• KaninchenSpeed@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    26
    ·
    1 day ago

    its not only this ip. In ipv4 the whole 127.0.0.0/8 subnet is the current computer / localhost, so every 127.x.x.x points to localhost (i know its a bit silly, but so is a lot of legacy ip). 127.0.0.1 is just the first address in this subnet that can be used for devices. I would assume 127 was chosen because its the largest 7 bit number so its 01111111 in 8 bit which is easy to detect in hardware.

    In ipv6 its much more sensible, only ::1 is localhost.

    Sorry for wasting your time (but please use ipv6 anyways >:3)

    • MonkderVierte@lemmy.zip
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      8 hours ago

      i know its a bit silly, but so is a lot of legacy ip

      The /usr thing? The Unix guys disk was full. The dotfiles thing? A bug in the Unix file system ls. And so on and so on. 1/3 of IT is just things someone decided on a whim. Another 1/3 is for obsolete reasons.

      • bus_factor@lemmy.world
        link
        fedilink
        አማርኛ
        arrow-up
        3
        ·
        edit-2
        16 hours ago

        The .files thing wasn’t a bug in the file system, file systems don’t care about the file names. The code was in ls. They were trying to ignore ‘.’ and ‘…’ when listing directories, and did so by checking if the first character was a dot. Fairly quickly someone decided to leverage that to hide files.

    • supersquirrel@lemmy.ca
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      1 day ago

      I super appreciate the explanation and I figured that it makes sense when you look at the context… but still did this really have to be the home ip? I can never remember the sequence of numbers, I know it is only a handful of them but it is just so damn unintuitive that I almost always have to look it up because my memory recall is trash… and I don’t think I should have to it should be so obvious that anybody can remember it.

      Even if this “had” to be the home ip grammar… couldn’t they have at least created a commonly accepted shortcut/alternate name you could type in that normal people could remember?

      • John@leminal.space
        link
        fedilink
        arrow-up
        15
        ·
        1 day ago

        Easy, just remember 01111111 and convert back when you need it 🙃

        For real tho just use ipv6 ::1 or localhost if you can’t remember

        • supersquirrel@lemmy.ca
          link
          fedilink
          arrow-up
          1
          arrow-down
          3
          ·
          1 day ago

          An easy to remember pattern of any kind would have been better, a repeating sequence like 1010101 or 1234567 or something else that doesn’t feel completely and utterly arbitrary (almost to the point of condescension to normal non-techy users in my opinion).

          • SparroHawc@piefed.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            1 day ago

            127 is the highest number you can fit in 7 bits of binary. It’s a lot easier to remember if you know your powers of 2.

            One bit can hold the numbers 0 and 1.
            Two bits can hold 0 through 3.
            Three bits can hold 0 through 7. Et cetera. These numbers were far more important to remember when everyone who did programming had to do low-level programming to get any sort of performance out of their code.

              • SparroHawc@piefed.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                16 hours ago

                But… but then you’re mixing signed and unsigned numbers in the same address! Panic! Human sacrifice! Dogs and cats living together! MASS HYSTERIA!!