Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "octal"
-
Fuck whoever invented octal literals with just a zero prefix. 042 should never not equal 42. How hard is it to have 0x42 for hex, 0b11 for binary and 0c42 for octal21
-
When arcane code randomly uses octal and you thought it was just an alternate way of writing hex because WHY THE FUCK would you use octal..
( There wasn't even a point with the numbers used )3 -
I want to call out the absolute retard at Oracle who decided that file modes should be read from the envvar called UMASK and be in decimal by default.
They probably never cared about file permissions.1 -
Do cartoon characters with four fingers per hand (and assuming only two arms) naturally think in octal? Or is it just a happy coincidence that humans developed base 10 because we (normally) have 10 fingers?1
-
Was supposed to be studying for a test today at 1am (it's in a few hours). Instead starts writing the date in binary, hexadecimal and octal (and then decimal). Go me, watch me fail that test LoL
PS: those dry erase pens were the best thing I could ever buy. I love writing on my windows -
So at one point I worked on an inherited project that had the worst code I've ever seen. I mean bad, so bad there may no quantifiable measure that can accurately convey how bad. We ended up naming the thing 'the hydra', cause it had a million issues and they just kept growing as we fixed things. To my point, in C++ they implemented their own primitive type Boolean32 as a signed int32 pointer. If that wasn't enough they used it as an octal bit mask. They also switch the value using logical and / or between 2 numbers, 037777777777 and 000000000001. So essentially they only switch this value to 1 or -1 and end up comparing it to their own const true or false. In c++ any value not 0 is == true...apparently not in this code.undefined octals why me? why would you do that? terrible code awful code c++ coding no designs bad code
-
Very early on I was putting together my first database-driven web app and decided to use record IDs with leading zeroes - you know, because that would look neater. It was a long, long time before I came to know that a number with a leading zero would be evaluated as octal, which in turn meant that any number with an 8 or a 9 in it was invalid, which then meant it would be a match for any other invalid number and retrieve a seemingly random record.4
-
What's your idea of a perfect number?
Mine is:
default decimal, prefix for binary, octal, hex
Integers in natural notation with strictly positive exponent
All bases allow natural notation, where the exponent is always a decimal number and represents the power of the base (0b101e3 = 0b101000)
Floats in all bases allow a combination of natural notation and dot notation
Underscores allowed anywhere except the beginning and end for easier reading11