How would you prefer for large numbers to be formatted in a terminal?
-
Show this thread
-
Benefit of _ is that it's more i18n friendly. Some countries use commas for decimals. It's also more visually distinguishable in a terminal since commas looks odd at fixed-width. I'm leaning more obviously towards _ but curious if there's any alternatives or counter examples.
12 replies 0 retweets 35 likesShow this thread -
I should have lead the poll with this tweet. I feel like some people would change their responses. The poll probably isn't very constructive since a majority of my followers would be English speakers who use commas.
7 replies 0 retweets 25 likesShow this thread -
Also curious about the accessibility of terminals. For people that are blind, how is 123_456_789 and 123,456,789 handled? Some have suggested space separators but that feels far worse since they were be treated as separate words. Anybody know?
7 replies 0 retweets 7 likesShow this thread -
@marcysutton@ryanflorence Do either of you know of any guides on terminal accessibility?3 replies 0 retweets 1 likeShow this thread -
Replying to @sebmck @marcysutton
Not familiar with any, but I mean ... either localize (`$ locale` will tell you) or pick the format of most your users, but making up something new seems like the wrong way to go.
2 replies 1 retweet 6 likes -
Replying to @ryanflorence @marcysutton
Sebastian Retweeted Sebastian
If I'm going to use the format of most of my users (AKA the entire world) then I'm not going to use commas.https://twitter.com/sebmck/status/1109180775583240192 …
Sebastian added,
SebastianVerified account @sebmckHere is a map of countries and what decimal separator they use. The countries in light green (Russia), all use a comma. eg. "$1,25". How can anyone say that choosing commas is the right approach when they're used completely different in most of the world? pic.twitter.com/GVrnCUhT0sShow this thread2 replies 0 retweets 1 like -
Replying to @sebmck @marcysutton
haha, dude, I'm not trying to be hostile. I'm just saying screen readers aren't gonna know what the heck to do with _, but it's likely they'll deal with , pretty well. The real answer though, if you really want to solve this, is to not pick a format and localize instead.
1 reply 0 retweets 9 likes -
Replying to @ryanflorence @marcysutton
Sorry, my wording wasn't meant to be harsh. Thanks for your thoughts on this. Detecting locale and doing my own thing doesn't seem ideal. I don't want to maintain a database, and there's issues even with even how Node handles locale detection.https://github.com/Microsoft/TypeScript/issues/27428 …
4 replies 0 retweets 0 likes -
Replying to @sebmck @marcysutton
I have an idea ... don't use numbers at allhttps://www.npmjs.com/package/number-to-words …
1 reply 0 retweets 4 likes
Unfortunately wouldn't work for my use-cases, eg. "Compiling one thousand four hundred and six / five thousand two hundred and three". Defeats the purpose of numeric separators in the first place which is to allow easier scanning and reading of large numbers.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 