The massive HTML file I schemed up some time ago got me to thinking. A dangerous pastime, I know.
I know we talk alot about Kilobytes, Megabytes, and so on. They're actually kind of ambiguous, a kilobyte can be 1000 bytes or 1024 bytes. And wait until you see the difference between two possible megabytes.
There are also several unambiguous terms: kibibyte (KiB), mebibyte (MiB), Gibibyte (GiB), and so on. The "bi", BTW, stands for binary.
I swear I'm somewhere going with this.
Anyways, I designed a script that would spit out a page that was 19 Pebibytes (PiB), 255 TebiBytes (TiB), 1022 Gibibytes (GiB), 144 MiBytes (MiB), and 969 Bytes in size. I am not making this up.
It got me to thinking: How could we come up with a good way to condense the file size? We have no Base 1024 notation. Then I realize that we do have Base 32, and two Base 32 digits give us 1024 possibilities.
Which means if we use this as our digit set: "0123456789ABCDEFGHJKLMNPQRSTUVWX", then the file size of the above page could be written as "0K 7X XV 4G 00 39 Bytes"
It also means I gotta get out of this house because my mind is beginning to go sproing.
scragar
11-17-2008, 04:32 PM
Then I realize that we do have Base 32, and two Base 32 digits give us 1024 possibilities.
Which means if we use this as our digit set: "0123456789ABCDEFGHJKLMNPQRSTUVWX", then the file size of the above page could be written as "0K 7X XV 4G 00 39 Bytes"
It also means I gotta get out of this house because my mind is beginning to go sproing.
I raised this concept a while back during college, I never had the heart to do anything with the idea though, I mean no-one is likely to use such a strange counting system, I now propose Base 64 counting:
0-9, A-Z, a-z = 66, so the character sets are there, just drop either Is, Ls or Os to try and minimize confusion.
And yeah, you need to get out more.
tracknut
11-17-2008, 04:46 PM
They do have this thing called "binary", which is what folks usually use to get the smallest file size ;)
Dave
NogDog
11-18-2008, 06:32 AM
I raised this concept a while back during college, I never had the heart to do anything with the idea though, I mean no-one is likely to use such a strange counting system, I now propose Base 64 counting:
0-9, A-Z, a-z = 66, so the character sets are there, just drop either Is, Ls or Os to try and minimize confusion.
And yeah, you need to get out more.
There's a wee bit of a counting problem there: 26 + 26 + 10 = 62, so you need to add 2 characters.
Anyway, for compressing/compacting the size of text files, anyone ever heard of ZIP or RAR? ;)
xvszero
11-18-2008, 01:55 PM
Lol wut.
Mr Initial Man
11-18-2008, 02:42 PM
Well, what I meant was a more succint way of describing file size.
For example, if there was something that was 74 megameters, 32 kilometers, 100 meters in length, it would be written 74 032 100 m. (or 74,032,100 if you like commas).
A kibibyte doesn't work well with Base 10, since it's 1024 bytes.
I suppose we could use Base 4, but that would require 5 digits per power of 1024.
Powers of 8 don't fit well. 8^0 = 1, 8^1 = 8, 8^2 = 64, 8^3=512, 8^4 = 4096, which skips right over 1024.
Powers of 16 work just as poorly; they are: 1, 16, 256, 4096.
Powers of 32 are perfect: 1, 32, 1024. Only two digits are required per power of 1024.
Therefore, instead of describing the full size of a file as 19 Pebibytes (PiB), 255 TebiBytes (TiB), 1022 Gibibytes (GiB), 144 MiBytes (MiB), and 969 Bytes, we can describe it as "0K 7X XV 4G 00 39 Bytes"--or, in Base Ten Notation: 21,673,571,210,232,777 bytes. I think in Base Computer notation it's either "ih ate you" or "ohy eahr ight" :D
Oh, and powers of 64 won't work, since they go 1, 64, 4096.
NogDog
11-18-2008, 04:55 PM
How about:
0x4.CF*F^D bytes
:)
Mr Initial Man
11-18-2008, 06:58 PM
Say what?
NogDog
11-18-2008, 08:10 PM
My attempt at hexadecimal scientific notation: hexadecimal 4.CF times hex. F (dec. 16) raised to the power of hex. D (dec. 13).
In decimal it's often represented as something like 1.23E13 in place of 1.23 * 10 ^ 13, but I figured that "E" would get confusing in hexadecimal.
PS: Oops! I just realized I was using "F" for hex 16, when it should be "10". So it should have been 4.CF*10^D, or if we want to use the "0x" convention to indicate hexadecimal numbers: 0x4.CF*0x10^0xD
rhsunderground
11-19-2008, 07:41 PM
i propose a solution:
x = bacon | x = anything
Mr Initial Man
11-19-2008, 08:19 PM
My attempt at hexadecimal scientific notation: hexadecimal 4.CF times hex. F (dec. 16) raised to the power of hex. D (dec. 13).
In decimal it's often represented as something like 1.23E13 in place of 1.23 * 10 ^ 13, but I figured that "E" would get confusing in hexadecimal.
PS: Oops! I just realized I was using "F" for hex 16, when it should be "10". So it should have been 4.CF*10^D, or if we want to use the "0x" convention to indicate hexadecimal numbers: 0x4.CF*0x10^0xD
Oh, okay. :) Makes sense now.
i propose a solution:
x = bacon | x = anything
Mmmm... Bacon. Now I'm hungry.
Sunny G
11-20-2008, 09:02 PM
I hate bacon.
Mr Initial Man, you need to get out more. Go to a single's bar and tell the ladies about describing file size.
They'll go wild for it. ;)
Jick
11-20-2008, 11:13 PM
I hate bacon.
Mr Initial Man, you need to get out more. Go to a single's bar and tell the ladies about describing file size.
They'll go wild for it. ;)How many times must you be told to make a new post in another forum so your post count is no longer 666!? Gah! :p
Sunny G
11-20-2008, 11:25 PM
Jick, words fail me when I say I am endlessly euphoric about my post count being 666.
I'll never post outside the coffee lounge again.
NogDog
11-21-2008, 11:45 AM
Speaking of post counts:
I'm number 2! (http://www.webdeveloper.com/forum/memberlist.php?order=DESC&sort=posts&pp=30)
Looks like Fang should be safe for awhile, though.
Declan1991
11-21-2008, 12:26 PM
Looks like Fang should be safe for awhile, though.
Looks like it.
rhsunderground
11-21-2008, 05:57 PM
i hate bacon.
heathen!
NogDog
11-21-2008, 07:00 PM
To quote Anthony Bourdain (at least the gist of it): "There's almost no food in the world that can't be improved by adding some bacon."
\\.\
11-22-2008, 07:15 AM
To quote Anthony Bourdain (at least the gist of it): "There's almost no food in the world that can't be improved by adding some bacon."
Yup and Burger King know it.... (which is why Maccy D's is now following suit.)
On the subject of Bacon, anyone know what 1 Terrabyte would look like in the Bacon code?
Sunny G
11-22-2008, 12:27 PM
Heathen? When all of you are on your deathbeds dying of the grease in your arteries, I will be there grinning.
webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved.