News for hackers. Stuff that matters.
Re:Show HN: Deploy to K8s without YAML using ShuttleOps by realshadow on Tuesday October 06, 2020 @12:54PM (#24699912)
What makes developers to lean towards YAML when JSON and JSON5 are more developer friendly?

I personally hate YAML config files.

Re:Show HN: Deploy to K8s without YAML using ShuttleOps by dpc_pw on Tuesday October 06, 2020 @03:01PM (#24701166)
There's fundamentally no difference between them.

They are both crappy tools for humans to write anything in and are better as a tools for machines to exchange data, which is accidentally human-readable in case debugging is neccessary.

Re:Show HN: Deploy to K8s without YAML using ShuttleOps by verdverm on Tuesday October 06, 2020 @02:19PM (#24700754)
Comments is one, and while JSON5 seems to support them, it does not look widely adopted or maintained. I do not like YamHell either, but prefer to JSON for readability

I'm using Cuelang these days, Dhall is another option

Re:Show HN: Deploy to K8s without YAML using ShuttleOps by barrkel on Tuesday October 06, 2020 @10:52PM (#24704876)

  foo: |
    bar
    baz
This quote style in YAML is its best feature, IMO.

It's not massively useful for k8s outside of config maps, but for other uses of YAML, it's great for embedding snippets of other languages that would otherwise need quoting.

Re:Show HN: Deploy to K8s without YAML using ShuttleOps by realshadow on Wednesday October 07, 2020 @08:29AM (#24707502)
Keeping up with indenion is a pain the ass when your config file is large
Re:Show HN: Deploy to K8s without YAML using ShuttleOps by barrkel on Thursday October 08, 2020 @06:31AM (#24717793)
Folding and highlighting in the editor make it much easier.

I use yafolding minor mode in Emacs, it folds based on indentation level, and it handles indentation-oriented syntaxes like Python and YAML as well as block-oriented syntaxes like C, Java, JS and Ruby.

yaml-mode in Emacs highlights :| text in the quoted string highlight colour, so it's easy to see you're still in the block, or whether you've unindented your way out to the YAML again.

I generally try and split out my yaml such that the quoted blocks don't need to be enormous, though. So, single SQL statements, rather than a whole SQL script, to take one motivating example.

I also use highlight-indentation-current-column mode, for an extra visual aid.

Re:Show HN: Deploy to K8s without YAML using ShuttleOps by brown9-2 on Tuesday October 06, 2020 @02:18PM (#24700747)
How do you place comments in a a JSON file?
Re:Show HN: Deploy to K8s without YAML using ShuttleOps by realshadow on Tuesday October 06, 2020 @02:52PM (#24701086)
JSON5 does support comments