4 ms·
I still don't understand why people use toml. It's like someone said, man, yaml is great but it could be better and toml is the result. Only yaml isn't great a
by dhzhzjsbevs 4y ago
I still don't understand why people use toml. It's like someone said, man, yaml is great but it could be better and toml is the result.
Only yaml isn't great and toml is so much worse.
Sorry sounds off topic but the way you say it's "easy to configure" and include toml in the same sentence just gave me flashbacks to traefik.
Complicated toml is unreadable, if yaml isn't enough, you probably need json, not toml.
- EnigmaCurry 4y agoTraefik supports all three of those interchangeably.
- francislavoie 4y agoSo does Caddy (and more!) https://caddyserver.com/docs/config-adapters https://caddyserver.com/docs/config-adapters
- BrandoElFollito 4y agoCaddy is awesome. You are awesome and Matt is awesome. The community is awesome. This is one of the greatest piece of software I ever used.
- andrewmcwatters 4y agoOfficial, meaningful tooling for yaml also doesn't exist. Parsing and emitting yaml does nothing for anyone until you can actually extract structures from the format. The full yaml standard is also full of features no one ever actually uses in practice, but if you don't implement it, you are thusly not compliant with the specification. If you read it, you'd go, "Wow, you can do that?" and "That's bad that you can do that."
- nrdvana 4y agoThere is a parser and producer for yaml in all the major languages. I mean, even perl -MYAML -E 'say YAML::LoadFile("filename.yaml")->{foo}{bar}' what level of tooling do you mean?
- planede 4y agoAnd by YAML, some libraries implement YAML 1.1, some others implement YAML 1.2, and by YAML 1.2 they actually mean YAML 1.2 core schema. And often they implement that poorly. So it doesn't help that: * there is YAML 1.1 and YAML 1.2, and you need to know which one you want to use * there is this thing called "core schema" and it's possible to use other schemas, but nobody seems to care * the spec itself is complex, and hard to implement well
- deleted 4y ago[deleted]
- nijave 4y agohttps://github.com/mikefarah/yq https://github.com/mikefarah/yq
- nrdvana 4y agoToml is not much more than a standardization of how to represent trees with INI. INI has been in use since at least the 90's and it persists because it is easy to read and edit, and supports comments. I actually find traefik quite nice to configure vs. the old conf disaster of apache. I've configured it by hand and also generated config by scripts with ease. If you want to complain about a design on HN the better way is to suggest a design you think is superior.
- dhzhzjsbevs 4y agoI thought I did? https://json5.org/ https://json5.org/ Parsing json as a human is unambiguous and simple. Parsing yaml and toml is full of ambiguity and readability problems depending on where you're reading it. The only people who think json is a bad format are the type of people that think semicolons are the problem. They're just not.
- technovader 4y agoI'll take YAML/TOML over JSON any day. shrug
- atoav 4y agoPeople who chose JSON for configuration are not to be trusted.
- atoav 4y agoAs someone who has negative feelings about YAML: I like TOML. This is however besides the point. I hate any format if it is misused. TOML is great for config files up to a certain complexity. It is not great for configuration files that should be code. If you feel your configuration file could use a configuration file, you might be doing it wrong. TOML to me is an successor to INI, with support for lists and other things that can be useful for typical configurations. I have never had any configuration-syntax related issue with any tool that used TOML for configuration — YAML on the other hand...