[PATCH] use KB instead of kB for traffic counters

John Arbash Meinel john at arbash-meinel.com
Wed Mar 18 15:28:49 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> Gioele Barabucci пишет:
>> Alexander Belchenko wrote:
>>> KiB is not better: it's not widely used and eats one more character (i).
>> While KiB is not as used as KB, but it's more and more used. Many
>> linux utilities use KiB right now.
>>
>> Also, one more character in the traffic counter is not that important.
> 
> There will be 2 extra characters because bzr shows amount of data as
> "XkB" and
> speed as "YkB/s". Some people are using 80 characters wide terminals...
> 

Why not get rid of the B and just cheat with "K" and "K/s". Of course
"K" means Kelvin (always) in SI units, which is why "k" is the proper
prefix for "1000".

I suppose it is possible to have "K" mean either "Kb" or "KB", but I
don't think many people would think that we were talking about bits per
second.

Using K means we aren't conforming to any particular standard, and we
are giving the appropriate info in as few bytes as possible. With the
^/v change, we could have the line look like:

[###################-] bzr+ssh   6181K     0K/s^| Running...
[###################-] bzr+ssh   6181K     0K/sv| Running...

Or maybe better as:
[###################-] bzr+ssh   6181K     0K/s ^ | Running...
[###################-] bzr+ssh   6181K     0K/s v | Running...

I liked getting rid of the extra spaces, but unfortunately "sv" looks
like you are trying to indicate something with the letter "v" rather
than as a directional.

As Aaron mentioned there is ↑ and ↓ (u'\u2191' and u'\u2193'
respectively), which would be great, but they aren't available in the
common "iso-8859-1" (nor "cp437") (of course they *are* available in
"utf-8" :)

What if we moved it to:

[###################-] bzr+ssh   6181K     0^K/s| Running...
[###################-] bzr+ssh   6181K     0 K/s| Running...
[###################-] bzr+ssh   6181K     0vK/s| Running...

or maybe:
[###################-] bzr+ssh   6181K     0^ K/s| Running...
[###################-] bzr+ssh   6181K     0  K/s| Running...
[###################-] bzr+ssh   6181K     0v K/s| Running...

Thoughts? (yes, this is bikeshedding, but we need to decide on *something*)

John
=:->

[###################-] bzr+ssh   6181K     0↑K/s| Running...
[###################-] bzr+ssh   6181K     0 K/s| Running...
[###################-] bzr+ssh   6181K     0↓K/s| Running...

Maybe we could have a check if the terminal encoding would support up
and down arrows...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknBEzEACgkQJdeBCYSNAANpDQCg0ljeqm3A0PWvFLW7/R+YmS9s
AwEAnA9eKGc4n4EolIUzC2GrgC/CLAIg
=pL0/
-----END PGP SIGNATURE-----



More information about the bazaar mailing list