[PATCH] use KB instead of kB for traffic counters
Alexander Belchenko
bialix at ukr.net
Wed Mar 18 15:57:42 GMT 2009
John Arbash Meinel пишет:
> 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.
+1.
> 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*)
I like your proposal about simple "K" and ^v after K/s separated by space.
>
> 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...
Do you mean osutils.get_terminal_encding()?
More information about the bazaar
mailing list