flightlessmango / MangoHud

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. Discord: https://discordapp.com/invite/Gj5YmBb
MIT License
6.35k stars 281 forks source link

RAM standards - 1 kB = 1024 B #493

Closed coffeecrisp closed 2 years ago

coffeecrisp commented 3 years ago

Can you insert an option for switching off the kibobobytes and gigobots? Instead of kiB, I want it to show kB Instead of MiB, I want it to show MB Instead of GiB, I want it to show GB. This is because in computer science, 1 kB = 1024 B 1 MB = 1024 kB and so on.

jackun commented 3 years ago

Uh? Vice versa, 1KiB is 1024B. Kilo is SI unitprefix so 1KB = 1000B

coffeecrisp commented 3 years ago

That's nice. It's more than nice. Display it as 1kiB on your system. The Byte is not a SI unit. Can we have an option in the configuration file so that I can display it as kB? When I mean kB, mean the computer science standard of 1 kB = 1024 B = 2^10 B

gort818 commented 3 years ago

What do you think 1 KiB is? 1 KiB = 1024B = 2^10 B.

That is what you are asking for...or do you just want the actual text changed from KiB to KB?

Can you link me to the corresponding computer science standard?

coffeecrisp commented 3 years ago

Yes, I would like the text to display kB, MB, GB, TB. The file in which that happens is hud_elements.cpp I don't know any links. You would have to pick up some univesity textbooks. When you took your courses at university, what did they say? Also, check out the cache related information on Intel's website for every CPU. Also check out AMD's website for cache related information. Kingston which is a RAM manufacturer, also displays their RAM sizes as GB. They display their storage information in the metric format. You can also look at the JEDEC documents for their DDR3 and DDR4 standards. The document only uses the computer science standard. As for wikpedia, The kilobyte has traditionally been used to refer to 1024 bytes (210 B).[5][6][7] The usage of the metric prefix kilo for binary multiples arose as a convenience, because 1024 is approximately 1000.[8] The binary interpretation of metric prefixes is still prominently used by the Microsoft Windows operating system.[9] Metric prefixes are also used for random-access memory capacity, such as main memory and CPU cache size, due to the prevalent binary addressing of memory.

coffeecrisp commented 3 years ago

I recently checked out Firefox and VirtualBox. When you download a file with Firefox, it tells you the file size during the download. They also define 1 kB = 1024 B For VirtualBox, they express the RAM that you assign to your VM as 1 kB = 1024 B. I don't know about the HDD. So, these are 2 major software using the traditional definition for kilo, mega, giga, tera.

Faalagorn commented 3 years ago

So it's all about skipping i in the middle of units?

coffeecrisp commented 3 years ago

That's right Faalagorn. It's as simple as that. All the code needs is a if else statement and something in the config file to set to TRUE or FALSE. I did it in my own app. It satisfies everyone to the maximum joyfulness state.

raspin0 commented 3 years ago

That's right Faalagorn. It's as simple as that. All the code needs is a if else statement and something in the config file to set to TRUE or FALSE. I did it in my own app. It satisfies everyone to the maximum joyfulness state.

Imo. making an exclusive tweak for such thing would harm simplicity of this project. Is it really such an issue? A user who's not a computer person will just treat MiB as a MegaByte, while MangoHud will remain full correctness.

coffeecrisp commented 3 years ago

Vesterlay, you call that complex? It doesn't make anything complicated. I have already done it on my own projects. When I have the time, I will take this MangoHud project and make a custom version and upload it to sourceforge.

raspin0 commented 3 years ago

I don't think complex is a good word to describe it, but I don't feel like implementing whole new tweak is a good idea just to change such a minor detail. Making a compromise between the two looks like a more appealing option for me.

WhosyVox commented 3 years ago

I think this is very much a case of "If you want this change, fork it." KiB is not wrong so this wouldn't be a bug fix, and it hardly seems worth the added code complexity to make it an official feature.

So fork it, do a global find/replace of KiB/MiB/GiB to KB/MB/GB and use that.