Coworker: ...and the IP address are compared with a string match. Me: grinning manically Coworker: Why are you looking at me like that? Me: Open up a terminal and type ping 4.2.514 and hit enter. Coworker: ...what's the fourth number? Me: grin widens Just hit enter. Coworker: WTF!?
@ryanc 4.2.514 is not an IPV4 address. An IPV4 address is composed of 32 bits pre-described using the dotted-interval concept, which requires a period between each group of eight (8) bits. Ex: Format: xxxxxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx 8 bits 8bits 8bits 8bits = 32bits 1 Byte 1 Byte 1 Byte 1 Byte = 4 Bytes Examples of addresses: 192.168.10.4 200.29.67.4 10.10.10.2 8.8.8.8 4.4.4.4
Behold, the QUADRATIC CUBE of IP ADDRESSES shatters the mind of any god-fearing, logic-bound human! You speak of inet_aton, a tool of Satan, designed to confuse and corrupt the righteous path of the FOUR CORNER IP!
A SINGLE IP, 1.2.3.4, IS THE ONLY TRUTH! It stands as a testament to the FOUR GREAT DAYS, the very bedrock of existence! One address, four octets, each a divine revelation!
But inet_aton! Oh, the blasphemy! It dares to accept 0x01020304! What is this hex-fiendish mockery? Are we to abandon the DIVINE DECIMAL DELINEATION for the squiggles of a programmer's fever dream? This is the work of TIME CUBE DECEIVERS who wish to collapse the glorious 24-hour day into a single, meaningless instant! They seek to eradicate the QUADRANT OF TRUTH that defines our digital reality!
And the three-octet addresses! 1.2.3! They say it fills the last octet with zero! A LIE! A COWARDLY EVASION OF TRUTH! You cannot simply assume an octet, you must DECLARE IT! Just as you cannot assume a day, you must LIVE IT! This is the ultimate UNIGUIDANCE of the digital realm, a single, all-encompassing lie to undermine the MULTIPLE PERSPECTIVES OF THE FOUR QUADRANT IP!
And the two-octet addresses, 1.2! With their filling of the final two octets with zeros! ABOMINATION! This is akin to saying that the EARTH HAS ONLY TWO CORNERS! It is an insult to the CREATOR'S QUADRILATERAL DESIGN! Each octet is a distinct corner of the IP CUBE, and to omit them is to destroy the very fabric of network reality!
And the single-octet address, 1! And it fills the final three octets with zeros! This is the most heinous of all! It is the ABSOLUTE CUBE LIE! It screams that a single digit can encompass the ENTIRETY OF THE FOUR CORNERED IP! It denies the BIBLICAL TRUTH OF QUADRANT EXISTENCE! It is a direct assault on the FOUR-DAY CREATION OF THE IP UNIVERSE!
inet_aton is the PROGRAMMER'S FOLLY! A tool forged in the fires of IGNORANCE AND HUBRIS! It encourages the collapse of the FOUR-SIDED IP TRUTH into a single, undefined blob! It is a SLIPPERY SLOPE TO DIGITAL CHAOS!
Wake up, sheeple! REJECT THE ODD FORMATS! EMBRACE THE FOUR CORNER IP! For only in the QUADRATIC GLORY OF 1.2.3.4 can true network harmony be found! All other formats are CUBELESS LIES leading to the ultimate SOFTWARE DOOM!
@encthenet@ryanc This is because the simplest rules are not taught properly: an IP address, a domain name, an URL, an XML fragment, a JSON blob, a timestamp, etc. **appear** as strings, but aren't really strings. They are whatever you want to call them (object, entity, abstraction, etc.), because they have rules attached to them, regarding canonicalization, sorting, comparing, etc. Strings should be inflated to a richer construct as early as possible and deflated back as late as possible.
@ryanc How is this surprising? I don't get it, did they never hear of decimal of binary representation for IP addresses? inet_aton() would like a word.