Remix.run Logo
▲ javcasas 2 hours ago

You can do JSON instead of YAML.

But no one does that because it is significantly uglier. So I guess we don't deserve sanity because we don't want our programs to be ugly?

▲nvme0n1p1 an hour ago | parent | next [-]

The point is not how pretty the strings are. The point is there should be no strings at all. These are computer programs, so they should use normal objects. The python code `my_pod = nignx_pod()` will never throw a syntax error because the result has too many/too few spaces.

▲wodenokoto an hour ago | parent | next [-]

Of course it will. Just add a few spaces at the front of the line and it’ll throw an error.

▲dilyevsky an hour ago | parent | prev [-]

no one is stopping you from importing k8s types as protobufs and writing a program to talk to k8s api via protobuf encoding. all the types are already protos (except CRDs). it's just not the most user-friendly way so most people don't use it.

▲nvme0n1p1 an hour ago | parent [-]

no, you don't have to resort to imperative protobuf slinging.

https://tanka.dev/

https://www.pulumi.com/

And plenty more exist today. But helm got popular first, so due to the collective action problem it's going to take the industry forever to switch off it.

▲12_throw_away an hour ago | parent | prev [-]

Wait, but how does that help? Are text templates any better suited for creating JSON than they are for creating YAML? Trying to manipulate well-structured data as if it were syntax-free text seems downright deranged to me, regardless of the specifics of the format ...