3 ms·
Cue is intriguing. The flexible typing mechanism is very powerful. Alas, the documentation is lacking. There is quite a bit of musing around the type/value latt
by pacala 7y ago
Cue is intriguing. The flexible typing mechanism is very powerful. Alas, the documentation is lacking. There is quite a bit of musing around the type/value lattice semantic and how the core operation is "<set of nodes>: <constraints>". Then the first realistic example [0] introduces a whole bunch of new features that are neither explained, nor motivated.
* Templates: deployment <Name>: ....
* List comprehensions: [ "-\(k)=\(v)" for k, v in arg ].
* Conditionals: targetPort: Port if port != Port
* Special templates: expose port <N>: .... What does 'expose' mean? Doesn't look like folded struct.
* Some form of comprehension/conditional composition: for k, spec in deployment if len(spec.expose.port) > 0. Can we nest two comprehensions? Can we zip? Can we reduce?
* Side note: What are the debug capabilities? One major usability issue with GCL circa 2010 was that debugging required sifting through MB [or was it GB?] of intermediate struct expansions.
* Side note: I wish they used Python f-string syntax: "-{k}={v}" instead of "-\(k)=\(v)".
[0] https://github.com/cuelang/cue/blob/e5d8d09b3ba2e4f48c84a3b5da2acbf0716379bf/doc/tutorial/kubernetes/manual/services/cloud.cue https://github.com/cuelang/cue/blob/e5d8d09b3ba2e4f48c84a3b5...