Re:Why the fuck are we templating YAML? (2019)
by Y_Y on Tuesday January 23, 2024 @07:00AM
(#39102272)
And yet it doesn't recognize that the UK is false[0].
Re:Why the fuck are we templating YAML? (2019)
by foldr on Tuesday January 23, 2024 @06:54AM
(#39102223)
Or more precisely, its country code 'NO' is false. I don't think there are any YAML parsers that parse the literal string 'Norway' as false.
Re:Why the fuck are we templating YAML? (2019)
by sgarland on Tuesday January 23, 2024 @07:04AM
(#39102305)
Be the change you wish to see in the world.
Re:Why the fuck are we templating YAML? (2019)
by andybak on Tuesday January 23, 2024 @08:43AM
(#39103186)
I would support a move for YAML to standardize on both "NO" and "Norway" evaluating to false. It seems an obvious win for consistency.
Re:Why the fuck are we templating YAML? (2019)
by foldr on Tuesday January 23, 2024 @09:38AM
(#39103848)
Surely it should accept either "Norway", "Norge" or "Noreg" depending on the locale setting.
Re:Why the fuck are we templating YAML? (2019)
by andybak on Tuesday January 23, 2024 @12:57PM
(#39106966)
Hmmmmmm. In that case the "nodding head" emoji should evaluate to false when the locale is set to Bulgarian...
Re:Why the fuck are we templating YAML? (2019)
by julian_t on Tuesday January 23, 2024 @06:58AM
(#39102249)
Maybe one written by a Geordie?
Re:Why the fuck are we templating YAML? (2019)
by Exuma on Tuesday January 23, 2024 @06:59AM
(#39102268)
It’s very obvious that’s what he means.
Re:Why the fuck are we templating YAML? (2019)
by afavour on Tuesday January 23, 2024 @07:53AM
(#39102706)
It wasn’t obvious to me. I read it as the literal string “Norway” being parsed as false, which didn’t sound believable but I didn’t make the connection to NO at all.
Re:Why the fuck are we templating YAML? (2019)
by gremlinunderway on Tuesday January 23, 2024 @07:22AM
(#39102417)
shrug it wasnt obvious to me. I'm glad someone explained.
Re:Why the fuck are we templating YAML? (2019)
by sakjur on Tuesday January 23, 2024 @09:05AM
(#39103410)
The YAML 1.2 spec removed “no” as a synonym for false. That arguably just made that entire problem worse, and even though it’s been almost 15 years YAML 1.1 is still the commonly used variant.
Re:Why the fuck are we templating YAML? (2019)
by basil-rash on Tuesday January 23, 2024 @11:01AM
(#39105138)
Ah, that explains why I couldn’t find any online YAML->JSON converters that would demonstrate this flaw when it came up a few weeks ago.
So now we have the same language that parses the same document subtly differently depending on what version you use. Hooray?
Norway is also "False".