I’ve heard this before as a joke: why do programmers confuse Christmas with Halloween? Because DEC 25 is OCT 31.
Because base-8 numbers show up in programming, from time to time.
Gottfried Wilhelm Leibniz made the connection between trigrams, hexagrams and binary numbers in 1703.[1]
By Native Americans
The Yuki language in California has an octal system because the speakers count using the spaces between their fingers rather than the fingers themselves.[2]
The Pamean languages in Mexico also have an octal system, because some of their speakers “count the knuckles of the closed fist for each hand (excluding the thumb), so that two hands equals eight.”[3]
Humans have come up with lots of different ways to keep count and do mathematics!
@BigBuggyBastage
I use Linux on a daily basis for all of my computational needs because I really don’t like Windows. Despite that, I have never heard of any of this and everything you are saying here makes zero sense to my novice brain.
@Eragor14
Well, as a practical example, we use it for filesystem permissions in POSIX-compliant OSes, e.g. Linux and Unix (the BSDs and MacOS) distributions.
Octal notation
Permissions are often shown in octal notation, for example via the command stat -c %a. The notation consists of at least three digits. The last three digits represent the permission by class: , group, and others. If a fourth digit is present, the leftmost represents the three special attributes: setuid, setgid, and sticky.
Each operation grant is assigned a bit position that for an octal digit is:
Read: left, binary 100, octal 4
Write: middle, binary 010, octal 2
Execute: right, binary 001, octal 1
A class permission value is the sum or alternatively the logic OR of the grants.
tl;dr version is, these octal digit groups set the read, write, and execute permissions on files and directories.
Math aside, Christmas did kind of used to be more like modern Halloween with all the ghost stories and even going from house to house banging on pots until you got a treat.
That is stupid. But then again, I know nothing about programming. So I guess I will just ignore everything else.
Because base-8 numbers show up in programming, from time to time.
Thanks, that helps with absolutely nothing, Upside-down Spike!
I use Linux on a daily basis for all of my computational needs because I really don’t like Windows. Despite that, I have never heard of any of this and everything you are saying here makes zero sense to my novice brain.
Well, as a practical example, we use it for filesystem permissions in POSIX-compliant OSes, e.g. Linux and Unix (the BSDs and MacOS) distributions.
Okay. Question: Who in the world uses a Base-8 counting system, anyway?
New Year’s eve
25 DEC = 31 OCT
25 in decimal = 31 in octal
2x21 = 42
1x21 = 21
0x21 = 33