Post Ait6VUWArsGUAtPo5Q by goldstein@im-in.space
(DIR) More posts by goldstein@im-in.space
(DIR) Post #Airfaxa5LcTrq7fT8q by drq@mastodon.ml
2024-06-12T21:23:48Z
2 likes, 3 repeats
Stop putting fucking YAML everywhere, it sucks.
(DIR) Post #AirglkpjBRXTRWhBaK by feld@bikeshed.party
2024-06-12T22:13:09.454199Z
0 likes, 0 repeats
@drq JSON, TOML, what is the solution here?
(DIR) Post #AirhJisMy305Da825Y by drq@mastodon.ml
2024-06-12T22:16:24Z
0 likes, 0 repeats
@feld JSON is moderately fine, but personally, as far as configuration goes, the best one I've seen is probably the one that Nginx uses. It's clear what goes inside what.INI style (I guess, it's called TOML nowadays) is also cool, if you're making something uncomplicated.
(DIR) Post #AirhJjnnWWwC5gztbM by feld@bikeshed.party
2024-06-12T22:19:38.103885Z
0 likes, 0 repeats
@drq good news! All JSON is valid YAML because JSON is just a subset of YAML since YAML 1.2 published back in 2009make sure to slap any projects that still use YAML 1.1 from 2005
(DIR) Post #AirhSts1SZoRvHLI2q by taxuswc@mk.phreedom.club
2024-06-12T22:15:44.984Z
0 likes, 0 repeats
@feld@bikeshed.party @drq@mastodon.ml sexps
(DIR) Post #AirhSv4oyTe1fGL1dI by taxuswc@mk.phreedom.club
2024-06-12T22:20:19.922Z
0 likes, 0 repeats
@feld@bikeshed.party @drq@mastodon.ml and maybe lua
(DIR) Post #AirhSwBaqmej6YVwpM by feld@bikeshed.party
2024-06-12T22:21:25.150365Z
0 likes, 0 repeats
@taxuswc @drq Lua would be alright, sexps is less desirable to me than Lua but better than lots of stuff
(DIR) Post #Ait6VUWArsGUAtPo5Q by goldstein@im-in.space
2024-06-13T14:21:26Z
0 likes, 0 repeats
@feld @drq cc @mpldr nope, still not a subset, YAML 1.2 uses different unicode escapes: 𨭎 is "\ud862\udf4e" in JSON, but "\U00028B4E" in YAML. Also YAML requires keys to be shorter than 1024 “unicode characters”, while JSON doesn’t impose this restriction (although it allows implementations to impose restrictions on key length, so it’s a weaker argument).there’s also a problem of “there’re basically no conforming YAML implementations” (see https://matrix.yaml.info/), so e.g. Python’s ruamel-yaml breaks down on '{"a"\n :"b"}', which is totally valid JSON (PyYAML doesn’t support YAML 1.2 and has similar bugs).
(DIR) Post #Ait6VVfmZdXpkyuzhY by feld@bikeshed.party
2024-06-13T14:36:24.994232Z
0 likes, 0 repeats
@goldstein @drq @mpldr JSON5 supports the 32bit unicode escape sequences, but I can't find anything about key length.I guess it's time to push for YAML 1.3 which supports your new JSON6 if these are things you care about supporting :laugh: