Styx document language
5 points by kylewlacy
5 points by kylewlacy
I don't know this guy; what about the author explains the resemblance to KDL?
they're non-binary, but yeah long story short: it's probably about this https://github.com/facet-rs/facet/pull/1730
there’s no real explanation there. what happened?
i'd rather avoid rehashing the details, but there was a conflict between amos and the author of kdl. and one of the outcomes is that amos decided to stop depending on her projects
Styx really clicked for me when I came across it, and I feel fixes the pain points I've had from most of the other config languages (JSON, YAML, TOML, etc). Feels like it hits a sweet spot between like... KDL, HCL, and YAML I guess?
To me the "a ha" moment is that, in Styx, there are only string primitives (or scalars, as they're called). To handle booleans, numbers, datetimes, etc., the spec defines how scalars should be interpreted in the context where the application or schema expects booleans/numbers/datetimes/etc. And if you need to tell apart which type a scalar should be dynamically, you can also use a tag as a type hint, e.g. @int"42".
So, it fully avoids YAML's "Norway problem". I also love how it resolves the ambiguity around numbers in JSON, where implementations don't... always agree how number values should be interpreted. If I'm working with dollar values in JSON, I've gotten into the habit of just serializing to strings to avoid the pitfall of floating-point rounding...
Also love that it has some built-in tooling around schema handling, plus a schema-aware VS Code extension. Styx has been really pleasant to work with so far!