Posted by kaycebasques 5 days ago
It’s made the page before and proposes that these forms are cyclic.
> How to avoid this madness? Introduce another low-level configuration file. Back to level one...
Survey of Config Languages https://github.com/oils-for-unix/oils/wiki/Survey-of-Config-...
Languages for String Data
Languages for Typed Data
Programmable String-ish Languages
Programmable Typed Data
Internal DSLs in General Purpose Languages
Their taxonomy is: String in a File
A List
Nested Data Structures
Total Programming Languages
Full Programming Language
So the last category (#5) is the same, the first one is different (they start with plain files), and the middle is a bit different.FWIW I don’t think “Total” is useful – for example, take Starlark … The more salient things about Starlark are that it is restricted to evaluate very fast in parallel, and it has no I/O to the external world. IMO it has nothing to do with Turing completeness.
Related threads on the “total” issue:
https://lobste.rs/s/dyqczr/find_mkdir_is_turing_complete
https://lobste.rs/s/gcfdnn/why_dhall_advertises_absence_turi...
SELECT 'Constant'
I've recently been writing quite a lot of unit tests for SQL, and the biggest pain point is setting up the state of your data, because SQL is just not an ergonomic language in which to do that. Mostly I've just ended up writing YAML describing the rows I want in a database (and I use proto fields in DBs so some nesting there), and using a utility that converts that can load that YAML as a table.
Or wire up your own utility function with bundle-require [2], another favorite of mine, for loading TS or JS config files.
[1]: https://github.com/antfu-collective/unconfig [2]: https://github.com/egoist/bundle-require
I agree with this (even though, In practice I usually just use JSON or YAML) - it avoids some of the pitfalls of both JSON and YAML - has comments, lacks ambiguity. The main annoyances are textContent (is whitespace important?), attributes vs children, verbosity of closing tags, etc.
* https://bind9.readthedocs.io/en/latest/reference.html#option...
* https://www.zytrax.com/books/dns/ch7/statements.html
Not as 'freestyle' as INI (Level 2), but a little less structured than most of the Level 3 stuff.
In practice configuration systems that reach level 4 or 5 start to look complex and the whole thing ends up with a new rewrite into a level 2 or 3. After a while it expands, because it needs comments, include files, templating, for loops, etc., until it becomes a total mess and gets thrown out and we cycle back to level 3.
For example, can "total programming languages" include: "for i in range(10000000000000): do_something()"?
If so, your config file can still hang - even though it provably terminates.
There's two parts that I was talking about. Things that are not quite that and the fact that configuration can have that capability in a fairly useless context.
When I'm dealing with personal things or stuff that few people use I will often make the configuration just something I eval/source.
So it in theory has the same functionality as the underlying programming language, but in practice you're just supposed to use it like an INI.
Here's a fairly large personal project where I use that
https://github.com/kristopolous/music-explorer
It actually allowed me to change the behavior on whether I'm running my program from my office or home. So invoking the full fidelity of the underlying language actually has its benefits at times.
It didn't originally use the obscure formal idea of a "total" language
Github has two (yes, just 2) repositories referring to them: (that's nearly 0.000 000 5% of Github I hear you say)
https://github.com/search?q=%22total%20language%22&type=repo...
But maybe that's unfair. Let's try a software engineering encyclopedia!
Ok, "Encyclopedia of Software Engineering (2011)" doesn't have it: https://archive.org/details/encyclopediaofso0001unse_m2w7/pa...
Alright what about programming language text book?
Well, "Programming language design concepts" (2004) also doesn't mention it https://archive.org/details/programminglangu0000watt/mode/2u...
What about Donald Knuth? Surely! Nope, not on the versions of his text on archive.org at least.
https://archive.org/details/artofcomputerpro0002knut_u2o0/mo... also https://archive.org/details/artofcomputerpro0000unse_e7w6/mo...
Oh let's go to arxiv. I'm sure of the ~400 CS papers that go up daily there'd be hundreds of ... oh wait, we got 5 spreading over 17 years: https://arxiv.org/search/?query=%22total+language%22&searcht... about 1 every 3 years. Alright.
And thus with 5 different sampling methods all supporting the same conclusion I will support the claim that it is obscure.
I know how on the internet, vibes tends to win over cited defensible evidence but I did it anyway. Maybe we can be all be adults some day.
foo.password = xxx
bar.password = yyy
wifi.ssid = foo