Live data from Hacker News

YAML: Probably not so great after all

arp242.net

361–370 of 457 posts

Re: YAML: Probably not so great after all

#361

Earlier quoted context omitted.

I've used it quite a bit. I even like the namespacing bits. I find that XML composes elegantly in a way that the JSON and friends don't. My one request would be to bring back to SGML-like closing tag abbreviation: That is, instead of qux we should be able to write qux I think this one change would make XML more "palatable" for the JSON/YAML/TOML crowd.

Or even better: > (Although standard SGML inexplicably specifies a null-end-tag character of '/' rather than '>', so this won't work in stock parsers.)

This looks absolutely hideous. I don't see why this would make me want to switch from YAML or JSON.

Re: YAML: Probably not so great after all

#363
I still keep using XML as my favourite format.

Get to use parsers out of the box, validation tooling, support comments, IDE code completion and they are super easy to transform.

In a couple of years some trendy SV unicorn will make XML the best format of the world, as these cycles happen to be.

Re: YAML: Probably not so great after all

#364
post #78

Earlier quoted context omitted.

Is there an agreement on whether it’s or pete yet?

Yes there is. Markup languages are for representing rich text. Anything that gets rendered to the user is content and anything that's metadata (data about how to render) but not rendered as such goes into attributes. If there is no concept of "rendering to the user" in your app/data, then markup isn't the right choice for representing your data . You're blaming markup languages for not being designed to represent arb…

That is a reasonable approach - thanks.

Re: YAML: Probably not so great after all

#365

I never understood how YAML is more human-readable than JSON. I find JSON much easier to read. What annoys me the most about YAML is that it's easy to misinterpret the indentation. You need a special IDE to know whether a property belongs to a specific object or to its parent.

What? No you don't. You don't need a special IDE any more than you need a special IDE to know if a Python statement is in an "if" block or a parent "if" block.

Re: YAML: Probably not so great after all

#366
post #363

I still keep using XML as my favourite format. Get to use parsers out of the box, validation tooling, support comments, IDE code completion and they are super easy to transform. In a couple of years some trendy SV unicorn will make XML the best format of the world, as these cycles happen to be.

The irony is that the best format that takes over the world will be an XML representation of JSON, enabling comments and trailing commas.

Re: YAML: Probably not so great after all

#367
post #295
post #292

Earlier quoted context omitted.

It’s also a lot less obvious. What’s so difficult about wrapping a string in double quotes?

It gets annoying when you have to do what seems unnecessary.

It's not really unnecessary when someone can write an entire article on how unfathomable the output is without them.

Re: YAML: Probably not so great after all

#368
post #315

Earlier quoted context omitted.

An encoder is anything that serializes some data. Think `JSON.stringify()`.

YMMV, I believe most folks would call that "serialization," reserving "encoding" for turning a notionally written-down-ish representation into bytes; e.g. string -> utf8 bytes, or float -> IEEE-754 bytes.

Right, for some reason in Go (which Helm is written in), the standard library calls them encoders/decoders with marshal/unmarshal as the operations. Serialize is definitely the more common term generally.

Re: YAML: Probably not so great after all

#369
post #312
post #280

Earlier quoted context omitted.

Not sure if I’m familiar with the term “design defense”. Can you explain? Stumbled into the idea. Basically just brute forced it. Tried thousands of things, built a huge database of languages, and tried to keep it simple.

I take the idea of “design defense” from Pyramid (Python Web Framework) [0], and have incorporated it into documentation on my projects. Basically, it’s a narrative discussion of how this solution came to be, the trade offs involved, and perhaps its relationships with prior art. [0] https://docs.pylonsproject.org/projects/pyramid/en/1.10-bran...

Do you know if this is called something else? (perhaps in other disciplines)

Googling "Design defen{c,s}e" just got me a whole lot of military contractors.

Re: YAML: Probably not so great after all

#370

Earlier quoted context omitted.

Helm 3 is moving to Lua, that may be better or worse.

Sounds like another short sighted decision. Why don't they support an intermediatory representation that many languages can support. Even yaml would be fine if other languages can generate it. If they had to absolutely use something why not something more main stream and popular like Python. Helm asks too much for the functionality it provides.

-1 for Turing complete config languages.
Post reply on HN