5 ms·
I know that everyone hates YAML, but in my experience it's not that bad. I'm not using it to its full power, I guess, more like safe subset, and it works fine f
by vbezhenar 3y ago
I know that everyone hates YAML, but in my experience it's not that bad. I'm not using it to its full power, I guess, more like safe subset, and it works fine for me.
XML has its place, but I wouldn't want to replace my yamls with XML.
- _ZeD_ 3y agoThem why not json?
- vbezhenar 3y agoYAML is way less verbose than JSON. Something as simple as multiline script is terribly suited for JSON.
- baq 3y agoThe problem is when you want to put a script into yaml you should stop and think what it is you’re actually doing.
- EamonnMR 3y agoIf you want something editable by hand, yaml is much nicer than Json because you get comments and you don't need to worry about missing a bracket.
- mistertoolbox 3y agoI have no big love for json or yaml, but i'd gladly take worrying about missing brackets over worrying about the handful of whitespace-related gotchas in yaml.
- munksbeer 3y ago[dead]
- emodendroket 3y agoYAML gets cleaner diffs when you edit it.
- TeMPOraL 3y agoThat's more of a problem with diff tools, though, which like almost all tooling and even programming languages, make the mistake of treating code as plain text.
- emodendroket 3y agoOK, well, if you want to invent a new VC tool that can parse arbitrary languages into a syntax tree and make a useful diff and then convince everyone to use it instead of git then maybe I’ll stop using YAML.
- MenhirMike 3y agoSemantic Diff tools already exist. Haven't looked at ones that specifically support YAML, but e.g., graphtage claims to do so.
- danmur 3y ago* JSON doesn't have comments. I could stop right there because that's a total deal-breaker for me for anything that's supposed to be read or written by humans. * JSON doesn't handle multiline strings. * JSON is not especially readable (no structure enforced, braces and double quote mandatory). * JSON can't load YAML but YAML can load JSON. (lots more)
- deafpolygon 3y agoGiven this, I'd much rather XML any day. You can comment using <!-- Comment --> blocks.
- danmur 3y agoI have zero problems with XML. Hard sell though. It's annoying though because it's so mature compared to everything similar (even YAML, which I obviously quite like); like if you make an XSD for your config files everyone gets free editing features (not just validation, completion as well, even completion of attributes)
- vaylian 3y agoNo trailing commas makes editing JSON a pain
- thaumasiotes 3y agoThe lack of trailing commas isn't the problem. The problem is the intermediary commas. Those are used in JavaScript to give you the option to provide an expression in place of a single term. But that's not even allowed in JSON, so the commas aren't serving any purpose at all.
- mplewis 3y agoJSON doesn't support comments.
- emodendroket 3y agoI don't hate YAML. Who hates YAML?
- baq 3y agoI didn’t, then I’ve started writing GitHub actions and now I do.
- pydry 3y agoGithub actions is fine provided you keep the YAML as short as possible and try to call out to a normal script to do everything - i.e. use it as config. The problem comes when you try to use it as a programming language in and of itself (which MS encourages because it's a route to vendor lock in). It's a shitty, shitty programming language with shitty debugging tools.
- baq 3y agoTo your first point: yes. To your second point: yes, yes, and very much yes. Creating complex release workflows within GHA is hell given the debugging situation and that's what we're using because 'it's there, use it, everyone's using it'. Send help
- orphea 3y agoI do. YAML can return to the rotting hole it's from.
- funcDropShadow 3y agoMe and anyone who read https://noyaml.com/ https://noyaml.com/ .
- emodendroket 3y agoSo a handful of well-known pitfalls and complaints about how it’s easy to represent the same information differently. Yeah, switching to XML definitely solves that problem.