YAML really is the gift that keeps on giving.
tmendez.dev/posts/rng-git-hash…
Our RNG Git Hash Bug
Background I work on the live services game Dragon Prince: Xadia. We have iOS/Android clients, hosted gameservers, and a platform.Tim Mendez Blog
YAML really is the gift that keeps on giving.
tmendez.dev/posts/rng-git-hash…
Background I work on the live services game Dragon Prince: Xadia. We have iOS/Android clients, hosted gameservers, and a platform.Tim Mendez Blog
klausi
in reply to mhoye • • •Chris [list of emoji]
in reply to mhoye • • •This seems less like YAML and more just a bad implementation.
(Admittedly, the underlying problem with stuff like YAML and XML is that it's simple enough that people will try to roll their own instead of using a well-tested generator library.)
Peter Amstutz
in reply to mhoye • • •I doubt anyone is willing to do the work but there would be a lot of value in formalizing the safe subset of yaml (block syntax, json interoperability, multiline strings, comments) and gets rid of the weird bits (cross references, tags, "no", etc)
On the other hand "everything is a string unless it looks like a number, boolean or null" manages to be both great for usability and a great footgun and I don't know how to square that circle.
mhoye
in reply to Peter Amstutz • • •Dreaming of dad jazz.
in reply to mhoye • • •@tetron as I mentioned elsewhere YAML is like a mid century industrial machine. It does its job but it will take your arm off if you're not careful.
Someone decided that we needed a schemaless generic configuration format and we got exactly that.
The implementer in this case didn't check the incoming data.. They fixed the cause of the problem (the unquoted hash) but afaict they don't implement a data check to insure it doesn't happen again even if the workflow changes.
Josh Grant
in reply to mhoye • • •arclight
in reply to mhoye • • •This is absolutely reasonable behavior - if you want a literal value to be interpreted as a string, enclose it in quotes.
The weakness I see here is inconsistent automatic type identification built into the file format standard. The defense is precision of expression - explicitly state information you know. If you know a value is a string, put it in quotes.
One of my biggest frustrations in computing is not being able to explicitly specify what I know to avoid the language, compiler, etc. guessing wrong. If you know something's a string, an integer, a float, a boolean - specify that explicitly and don't make the computer do extra work and give it an opportunity to disappoint you by guessing wrong.
I know, this violates the rule of modern computing which is that any hack that lets you crap out more code faster is an unalloyed good. How much time was saved leaving off quotes compared to the cost of rediscovering scientific notation?
mhoye
in reply to arclight • • •silverwizard likes this.
silverwizard
in reply to mhoye • •@mhoye @arclight I have a term I use, "Errors When You're Looking" or "Crash when the admin is looking"
Don't help me, because I wan't crashes to *happen*, rather than broken systems be shipped!