Live data from Hacker News

YAML? That's Norway Problem

lab174.com

41–46 of 46 posts

Re: YAML? That's Norway Problem

#41
post #11

Earlier quoted context omitted.

It wouldn't need to be if closing tags were allowed to be unnamed. For most cases, we can tell the closing tags easily enough for simpler files: MAML minimal readable 1 Anton Medvedev JSON 2001 MAML 2025 This is a multiline raw strings. Keeps formatting as-is.

This is still noisy, wasting 3 symbols to end where an invisible line end would suffice

Fine. Then auto-closing tags? If you have a schema doc, you could do that. If you are writing free-form, then I'd definitely be complicated...?

I still see that better than YAML's indentation problem. Relying solely on indentation is a nightmare.

Re: YAML? That's Norway Problem

#42
post #36

I wish there were a "strict" yaml. Another subset a la json, where you don't have nonsense like no === false, but "no" does not, but you also get the block style which to me is easier to read and write. I don't mind requiring quotes for strings. Modern IDEs make it easy enough and it removes ambiguity.

Like this https://hitchdev.com/strictyaml/?

Re: YAML? That's Norway Problem

#43
post #7

Earlier quoted context omitted.

Cause it's very verbose. A lot more syntax to break. I personally think the best is one of the humanized json ones like https://maml.dev/

It wouldn't need to be if closing tags were allowed to be unnamed. For most cases, we can tell the closing tags easily enough for simpler files: MAML minimal readable 1 Anton Medvedev JSON 2001 MAML 2025 This is a multiline raw strings. Keeps formatting as-is.

Watch out, next thing you know you'll have reinvented S-expressions.

Which is really all we ever needed.

Re: YAML? That's Norway Problem

#44
post #35

Earlier quoted context omitted.

JSON isn’t ideal either, however missing curly braces are much easier to fix than figuring out where you misaligned entries without going through entire config file.

I’d just like to know what kind of workflow you have that causes indentation to randomly change in your files.

Do you not use an editor that permits you perform at least one operation that would alter the indentation level of multiple lines all at once? Separate from that, have you never fat-fingered the tab, space, backspace or delete keys? Never deleted one too many whitespace tokens when cleaning up an inadvertent or misdirected paste? (If you've never done that, then kudos to you... but in two to six decades, it's certain to happen to you annoyingly often.)

Re: YAML? That's Norway Problem

#45
post #35

Earlier quoted context omitted.

I’d just like to know what kind of workflow you have that causes indentation to randomly change in your files.

Do you not use an editor that permits you perform at least one operation that would alter the indentation level of multiple lines all at once? Separate from that, have you never fat-fingered the tab, space, backspace or delete keys? Never deleted one too many whitespace tokens when cleaning up an inadvertent or misdirected paste? (If you've never done that, then kudos to you... but in two to six decades, it's certain…

> Do you not use an editor that permits you perform at least one operation that would alter the indentation level of multiple lines all at once?

Yes, but I don’t just randomly perform the operation when I don’t want to change the indentation.

> Separate from that, have you never fat-fingered the tab, space, backspace or delete keys?

When I’m in insert mode, I look at what I’m writing, so I immediately undo any such accidental edit. Outside insert mode, it’s hard to accidentally change indentation.

> Never deleted one too many whitespace tokens when cleaning up an inadvertent or misdirected paste?

I use indentation-preserving paste, so… no?

Re: YAML? That's Norway Problem

#46
post #45

Earlier quoted context omitted.

Do you not use an editor that permits you perform at least one operation that would alter the indentation level of multiple lines all at once? Separate from that, have you never fat-fingered the tab, space, backspace or delete keys? Never deleted one too many whitespace tokens when cleaning up an inadvertent or misdirected paste? (If you've never done that, then kudos to you... but in two to six decades, it's certain…

> Do you not use an editor that permits you perform at least one operation that would alter the indentation level of multiple lines all at once? Yes, but I don’t just randomly perform the operation when I don’t want to change the indentation. > Separate from that, have you never fat-fingered the tab, space, backspace or delete keys? When I’m in insert mode, I look at what I’m writing, so I immediately undo any such a…

Ah. You're The One. Got it.

Well, I'll likely be long dead once time's erosion of your body's self-repair machinery has destroyed your ability to be The One. Given that, please do accept this package containing my condolences for your loss. Time's insults are profoundly cruel and unjust.

Post reply on HN