• Uriel238 [all pronouns]@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    2 months ago

    Being a mathematical nit mostly, and do not want to keep you up at night. When we talk about numbering systems in base X, it doesn’t include the digit for X. Hexadecimal includes 0-9 and A-[F]. Decimal includes 0-9 so not A (the symbol for 10). Octal (base 8) includes 0-7.

    So 83 can’t be an octal number.

    But then in the end I realized you were converting from decimal to octal, in which case, yes, it’s 123. I am a total derp.

    • ziggurat@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      2 months ago

      Wife made a ginger drink, and now I have to sit here and drink that before getting ready to go to bed.

      Being a computer nit mostly. I really appreciate base 8, as it is a really easy way to visualize something that has 3 indipendent true or false states in one visual symbol. Binary 000, through 111, represented using one symbol.

      In Linux, and Unix including MacOS, this is typically (by this I mean if you use something else, then it effectively becomes an extension on top of this) for file permissions. Where you have 3 octal numbers representing permissions for owner, group, and others, which permissions they have. The least significant bit in binary represents if you have the permission to execute the file, so if it is an odd number you can execute. Write permissions and read permissions are represented by 2 and 4 respectively, and you can freely add any combination of these 3 numbers together, and you can still know the 3 boolean values.

      So you want your secret files to have permissions 600 or 700, and even some security oriented programs like “ssh” will not allow you to use secrets if they are readable by other users of the same system. (a vestige from when people shared computers)