Why?

Today I learned: printf(1) is locale-dependent.

$ printf %f 0.1
-bash: printf: 0.1: invalid number

$ printf %f 0,1
0,1

$ LANG=C;printf %f 0.1
0.1

Why, oh fucking why?


See Also

Previously: Modern Programming

Next up: There's one thing wrong with Python

The machine thinks that the Web-Log entries Tacit Programming in Racket, Part 2, Well, that didn't work out so well, and Given When Then might be related to the topic so eloquently discussed above. The machine is sometimes right.