Re: [PATCH v3 1/6] man2/: use IEC or ISO multiples to clarify long numeric digit strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/20/23 15:29, Stefan Puiu wrote:
Hi Alex,

Hi Stefan,

4 KiB is not that much better than 4096, since 4096 is easy to read.
For higher numbers such as 33554432, it becomes more important to use 32 KiB.
For consistency, using 4 KiB seems reasonable.

How about using KiB / MiB over a certain number of digits? It seems
excessive to use them everywhere.

We might do that. So far, I prefer having the patches change everything, and then we can later discuss about discarding part of them.


Also, for the record, I had no idea what KiB / MiB means and how it's
different from KB/MB until this discussion. I googled it before
writing this reply, and found this among the first hits:
https://ux.stackexchange.com/a/13850.

That answer was written more than a decade ago. These days, binary prefixes are more common. In fact, I'd say most GNU/Linux commands respect them (an important exception being GNU coreutils (for example ls(1)). But many programs use prefixes accurately, such as fdisk(8).

In the Linux man-pages we have units(7), which documents these. Maybe that page should be more known.

BTW, that answer is inaccurate (at least today): drive manufacturers have the distinction pretty clear, and use it precisely (with lawsuits won thanks to this); they use metric prefixes, because they mean it. They can sell you 1 TB instead of 1 TiB, and most people won't even know, but those who know, will know that 1 TB is 1'000'000'000'000 B, which is what you get. They have no incentives to sell 1 TiB drives, because they are visually almost the same, but there's around 9.95% more bytes, so it's more expensive to produce. It's not worth it for them.


I would say making the docs easy to understand for users is more
important than adhering to some specs users might not be familiar
with.

Well, using MiB prompts readers to use their search engine to learn what that is (that's how I learnt it the first time; and that's what one does when reading a book and finding a new word). I think that shouldn't be considered an impediment, but an opportunity to learn something new.

Once you know the difference, you appreciate the preciseness. I hate when I see some software that uses the metric prefixes for meaning binary multipliers. I also hate software that operates on bytes, when you almost always want binary multipliers but only have metric multipliers (hey partman, I mean you!). I reported a bug to the Debian installer recently because it's very painful to partition a drive from it.

Cheers,

Alex

--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux