this post was submitted on 26 Dec 2024
102 points (98.1% liked)
chat
8246 readers
293 users here now
Chat is a text only community for casual conversation, please keep shitposting to the absolute minimum. This is intended to be a separate space from c/chapotraphouse or the daily megathread. Chat does this by being a long-form community where topics will remain from day to day unlike the megathread, and it is distinct from c/chapotraphouse in that we ask you to engage in this community in a genuine way. Please keep shitposting, bits, and irony to a minimum.
As with all communities posts need to abide by the code of conduct, additionally moderators will remove any posts or comments deemed to be inappropriate.
Thank you and happy chatting!
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
How is it easier? Computers don't care if it's U+002E or U+002C, it's literally a one character difference in code no matter how you parse it
The only one that can cause problems for parsing is the space, and even then you should be able to parse it in a context where it matters
yeah "easier" was not the right word. I meant comma has been historically used as a seperator for lists of values(which I think makes a lot of sense).
It's not really just one character tho since with comma as a decimal point separator, something like "100,200" can be interpreted either as a number or a list of two number. For example with Excel, geniuses at microsoft decided to replace comma with a semicolon for some localizations which makes the program really annoying to use across multiple languages
Edit: sorry I'm very sleep deprived so I'm not sure if any of it makes sense. To clarify: I'm assuming that comma as list separator makes sense because there is essentially no debate over "comma" vs "some other list separator", however there is such a debate for decimal separator. Having the same symbol mean two different things makes text harder to parse
Fair enough, although I wouldn't use excel as an example, it's most likely going to interpret it as a date no matter what you type
Honestly the optimal solution would be just letting the user type in a number, visually adding the spaces and taking either comma or period as the decimal marker
This brought back my biggest grievance with parsing numbers, chat apps interpreting any 5+ character long numbers as phone numbers
No, I don't want to call 10.000
I mentioned excel because it's been my arch enemy for the past 3 years to the point where I had to spend a substantial amount of time writing my own library for reading excel files The thing I'm specifically talking about is how formulas may look different across localizations. For example the sum function looks as follows in english:
=SUM(1,2,3)
while in russian it looks like this:
=СУММ(1;2;3)
and excel will not allow you to type the english version
funnily enough, phone number parsing is one of my previous arch enemies. Having to turn whaterver bullshit user has typed into a phone number probably reduced my life expectancy by several months
I feel you, I nowadays prefer doing the calculations in python and export the results in .csv for the freaks who prefer excel
This reminds me of my futile attempts of parsing URLs with regex in my teenage years when I was trying to make a guestbook for my website with PHP (the solution is
.*\..*
)