Earlier quoted context omitted.
We do indeed. XML is awful, YAML is a clusterfuck, JSON is often insufficient, and so is INI. TOML looks promising, but might not make it out of its niche. If Cue is basically a better YAML with built-in schemas, that sounds pretty good.
> XML is awful I never really understood this. This seems to be an oft repeated truism from mid 2000s with little backing it up. The only awesome thing that JSON did, was lose type information as well. In fact, the only thing that I can see that JSON brought to the table was easier editing by those who didn't have IDEs, at the expense of losing type information.
Cue – A language for defining, generating, and validating data
141–150 of 167 posts
Re: Cue – A language for defining, generating, and validating data
#142my time at Google has made me hate GCL so much.
I am pretty sure you placed the hate on the wrong target, you probable are hating borgcfg, instead of the GCL/BCL language. Disclaimer: was borgcfg owner 2016-2019.
Unfortunately there was no formal spec of the GCL language, so the new impl was based IIRC on reverse engineering the spec from the first implementation of the interpreter. It turned out our configs hit several cases where the original behaviour was either unsound (and thus the new impl sacrificed backwards compat) or we hit a bug in the new impl.
The main problem with the language (as opposed as issues with the implementations) was that finding the root of those behaviour differences was very hard. It was very hard to follow where the variables came from. The GCL scoping rules (and lazy evaluation) were indeed very unfriendly for debugging.
This was an extreme case of a pain that was felt on a daily basis by a lot of people I've been talking to.
Re: Cue – A language for defining, generating, and validating data
#143Re: Cue – A language for defining, generating, and validating data
#144Okay, so I've spent some time trying to understand this, and I think it's actually really cool, but I found the "About" and "Concepts" documents tumid and murky. Here is my understanding of the basic concepts: - It allows a schema-like set of constraints to be declared for JSON (and therefore for YAML & TOML) in a syntax that is an extension of JSON. - Cue deals with types (sets of values) where JSON deals with singl…
> What's with the lengthy discussion of lattices, and related terminology? It's how the author thinks about the values. All the operations move a value up (|) or down (&) the lattice and those operations are associative, commutative, etc. Moving down past the concrete values gets you bottom, the error value, so 1 & 2 is _|_. It fits into things like default values where (using # for * because HN formatting doesn't do…
Re: Cue – A language for defining, generating, and validating data
#145Earlier quoted context omitted.
Recompile when config changes.
If you're going to do that, you don't need configuration at all. Just hardcode everything.
Re: Cue – A language for defining, generating, and validating data
#146Earlier quoted context omitted.
Well at least you could find an example. I couldn't find anything after like a minute of searching. Unless we're counting the gif that slowly shows you an example project letter by letter.
Someone please link to the code.
* https://github.com/cuelang/cue/blob/master/doc/tutorial/basi...
* https://github.com/cuelang/cue/blob/master/doc/tutorial/kube...
Re: Cue – A language for defining, generating, and validating data
#147Earlier quoted context omitted.
Stop commenting on every HN post, thanks
Fact: I've commented on fewer than 1% of HN posts today alone. Fact: my post is very relevant to the OP and I'm offering to help them. Fact: I've been a member of this site for over 12 years, and never comment on a post unless I think it adds value to the discussion or would be helper to the parent.
Re: Cue – A language for defining, generating, and validating data
#148Okay, so I've spent some time trying to understand this, and I think it's actually really cool, but I found the "About" and "Concepts" documents tumid and murky. Here is my understanding of the basic concepts: - It allows a schema-like set of constraints to be declared for JSON (and therefore for YAML & TOML) in a syntax that is an extension of JSON. - Cue deals with types (sets of values) where JSON deals with singl…
Re: Cue – A language for defining, generating, and validating data
#149Here is an interesting example showing what it looks like: https://github.com/cuelang/cue/blob/e5d8d09b3ba2e4f48c84a3b5... I used the following command on the cloned repository to find it[1]: find . -iname '*.cue' | xargs ls -l | tr -s ' ' | cut -d ' ' -f5,9 | sort -n [1] Note that 'find' has a '-printf' option which could have been used to simplify this one-liner.
In this file, there is no constraint describing non-negative number or non-empty string, or ill-formed URL, or invalid number ports.
EDIT : found it in the doc : https://cuelang.org/docs/usecases/validation/
Re: Cue – A language for defining, generating, and validating data
#150Earlier quoted context omitted.
New standards: https://xkcd.com/927/
The problem is not that there are too many configuration languages. The problem is that none of them are any good. The way to solve that is to keep trying new ones until we find one that is good.