-
> Naive question: is it viable if we started using [a Turing-complete programming language]
This is actually a good question. The people who are not asking and going right ahead with that plan are doing a dangerous thing. <https://www.cs.dartmouth.edu/~sergey/langsec/occupy/> It's not viable because a subset of people would like to have the following properties upheld:
• Parsing configuration should be decidable and finish in finite time.
• Parsing configuration should not be a security exploit.
• I should not have to implement the Emacs runtime just to parse its configuration file.
> something that's both more flexible but still strict and unambiguous. I wonder if it's possible?
This really depends on what you mean by these words; I'm interested to hear your idea in detail. Meanwhile, have a look at Dhall <https://dhall-lang.org/> and the other languages mentioned in <https://news.ycombinator.com/item?id=29221643> and compare.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
In that case, you might want to have a look at JSON5: https://json5.org/
It is pretty niche, but attempts to improve upon JSON in a multitude of ways, one of which is the support for comments: https://spec.json5.org/#comments
-
I'm glad to see people experimenting with alternative document/object representations, but this one might be a hard sell: based on the README[1], it only has Python, Zig and Janet implementations so far. One of the nice things about YAML (and JSON, TOML, etc.) is that they have decently mature C, C++, or Rust libraries that other languages bind to.
[1]: https://github.com/KenKundert/nestedtext
-
A radically different alternative with a lot going for it is Starlark: https://github.com/bazelbuild/starlark
It’s a deterministic subset of Python. This means that if you have complex or repetitive configurations, you can use loops and functions to structure them. But it’s impossible to write an infinite loop or recursion.
-
-
I'm working on my own (you can start the attack hahaha). I feel there's not many simple, generic languages that allow to write simple DSLs with embedded documentation. The self documenting part is still missing but you can take a look and say what you think. It's kind of like yaml format (a bit TOML) with schema and possibility to merge multiple files with smaller chanks of the data. With export to json and yaml. https://github.com/dadlang/dadl
-
Running prettier (https://prettier.io) on each save will fix trailing commas for you. If you accidentally have one, it will just sneakily remove it and turn your document into one that is valid.
-
I give you Robot, originally created at Nokia.
https://robotframework.org
Back in 2006, the testing was written in HTML tables, no idea how it manage to still be around.
-
How about just nudge json a couple more notches towards js? https://github.com/leontrolski/dnjs
-
-
skycfg
Skycfg is an extension library for the Starlark language that adds support for constructing Protocol Buffer messages.
-
There's libraries that let you define a schema programmatically, and then infer the types.
https://github.com/sinclairzx81/typebox
-
-
> For more complex cases I find myself wishing I could just turn Typescript into some kind of schema validation for JSON.
Not sure if this is what you're looking for, and whether it's powerful and expressive enough for your use case, but you can use typescript-json-schema¹ for this, and validate with eg ajv.
¹https://github.com/YousefED/typescript-json-schema
-
Btw. Jsonnet doesn't seem too bad either: https://www.youtube.com/watch?v=LiQnSZ4SOnw and here some examples: https://jsonnet.org/ but in my book, EDN still wins.
-
PayloadsAllTheThings
A list of useful payloads and bypass for Web Application Security and Pentest/CTF
Not exactly an incompatibility, but my mind jumped to issues like this: https://github.com/swisskyrepo/PayloadsAllTheThings/blob/mas...
[email protected]
-
You might like RON[1]. It's far from perfect (and far from complete), but seems nice so far.
[1] https://github.com/ron-rs/ron
-
-
If you're happy to go lispy, there's Babashka [1], a Clojure without the JVM. It has built-in support for 'tasks' designed to make writing build scripts easy.
[1] https://babashka.org/
-
I like it so much I got motivated enough to start making a sublime text highlighter for it. I got a bit lost though, having never made one before.
And then I tried to use a tool called SBNF to write the grammar for the language at a high level and have it spit out Sublime Text syntax highlighting code. Didn't quite work yet unfortunately.
https://github.com/bschwind/sublime-json5
https://github.com/BenjaminSchaaf/sbnf
-
I like it so much I got motivated enough to start making a sublime text highlighter for it. I got a bit lost though, having never made one before.
And then I tried to use a tool called SBNF to write the grammar for the language at a high level and have it spit out Sublime Text syntax highlighting code. Didn't quite work yet unfortunately.
https://github.com/bschwind/sublime-json5
https://github.com/BenjaminSchaaf/sbnf
-
-
JHipster
JHipster, much like Spring initializr, is a generator to create a boilerplate backend application, but also with an integrated front end implementation in React, Vue or Angular. In their own words, it "Is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures."
-
Ironically, having used cdk8s[1] for dealing with kubernetes infrastructure, that's the one thing where I've actually preferred yaml. That said, k8s resource definitions are pure config so there's no need to try and hack extra bits on top of a serialized data structure.
[1]https://cdk8s.io/
-
> There's no canonical YAML implementation
The formal grammar counts as canonical and several implementations are derived from it: https://github.com/yaml/yaml-reference-parser
-
-
> Is there a yaml cli equiv to jq for json?
You could have found this by searching the Web for "jq for yaml". <https://kislyuk.github.io/yq/>
> yaml schema
You could have found this by searching the Web for "yaml schema". <https://rx.codesimply.com/> <https://web.archive.org/web/2021/http://www.kuwata-lab.com/k...>
In practice, schemas designed for operating on the JSON infoset (not the serialisation) will also work.