Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Alt-Tab5534ythe only thing I like about yaml is that I can sometimes use it in my markdown to syntax highlight things that otherwise would not work
-
@Alt-Tab you mean Like the Header of a markdown file? I've seen some systems do that for metadata
-
@AlmondSauce well json really isn't meant for config files, it's a serialisation format
The fact that it's used for config files created the need for comments
To be fair JSON with comments do make nice config files, but I'd keep that in a separate standard personally.
Also toml is a nice and simple format -
Alt-Tab5534y@LotsOfCaffeine no, just in a code block sometimes specifying the language as yaml can highlight things a bit better better because it accepts anything as yaml :D
``` yaml
some shit
```
=> green some shit
100% worth it -
@LotsOfCaffeine The issue was that people used a serialisation format for config & comments imho. JSON just isn't well suited to that.
Toml is pretty nice. Though I must admit I don't have a particular hatred for yaml either. -
@AlmondSauce I'll prefer JSON with comments over yaml at any time.
If you got some time read through the things on https://noyaml.com I had quite some fun -
Rock274yInitially when I started writing yml files I used to think json is a much simpler way understand sub key and values. But the problem starts when you have to write a complete infra in json and you have to include lists, json object every here and there. That time it will be very difficult to deal with it. In yml it is very simpler to understand and looks neat. You can integrate some plugin to format yml or lots of online formatters are available. This way its easy to understand indentation.
-
@LotsOfCaffeine Yeah, it has a bunch of gotchas that make little sense. I'm not defending any of that - I just don't hate it either.
-
I use Yaml a lot tbf...
Works really nice for config files that need to be edited by people with less technical know-how or when JSON would become too complex to do so (since JSON is not meant for this).
Haven't found any well-supported alternative though (ini sucks) -
I learned how to configure my ubuntu 20.04 server's network connection to static. I saw the yaml file (with zero comments in it) and said WTF is this SHIT!
To be fair, it has been a while since I configured networking on a linux box. But last time I did it the file was chock full of comments on how to configure the file. All I can think is server boxes from ubuntu are expected to be managed by some enterprise system en masse.
I was really perturbed that I had to search for how to configure the networking. It used to be really straight forward.
Edit:
Also, don't a lot of the classic config files use tabs instead of spaces? The yaml file I modified was using spaces. Is that a yaml thing? -
@Demolishun the yaml spec forces spaces, as two spaces are one indentation unit – which dictates where in the tree the entry sits
Kinda like python -
@LotsOfCaffeine I tried TOML before but did not like it at all.
It's better than INI but faaaar behind YAML imo. -
@LotsOfCaffeine I don't like tabs, but I have always liked how config files defaulted to tabs. Yeah, I don't think I like yaml.
-
hjk10157314yNo particular hatred towards yaml. The intents can be annoying when templating helm stuff. I hate that there are two extensions for it.
Fucking always have to check whether .yml or .yaml is used.
Related Rants
-
repromancer7Took me a week to realize that "!rant" just means "not rant". I thought it was some sort of post front-matter...
-
japzio10For real! Forgive me if this was already posted.
-
bioDan5SICK AND TIRED OF READABILITY VS. EFFICIENCY!!!!!!! I HAD TO SEPARATE A 4 LOC JSON STRING, WHICH HAD AN ARRAY...
Please tell me I'm not the only one who thinks that yaml is a horrible format
rant
indentation based syntax
yaml