TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The CUE Data Constraint Language

91 点作者 devj将近 6 年前

21 条评论

star-trek-fleet将近 6 年前
Huge congrats to mpvl@ for the final release of CUE on github.<p>mpvl@ is the main author of borgcfg and one of the two designers of BCL (borg config language). I was maintaining borgcfg 2017-2019, and naturally had occasions to chat with him. I was fortunate to learn the existence of CUE a while ago, and was convinced that its theoretical foundation is solid. That foundation is simply not there in most config languages. CUE (along with Kustomize) appears to me to be the 2 major new ideas of addressing the flaws in BCL, and other template&#x2F;inheritance-based config languages.<p>I am very eager to see how the community and industry react to CUE.
评论 #20364069 未加载
dmitshur将近 6 年前
It’s interesting for me to see a project made mostly by 1 person that happens to be employed by Google described as “by Google”. [1] Not that there’s no truth to it, just that the reality is much more nuanced than a simple phrase can capture.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;cuelang&#x2F;cue&#x2F;graphs&#x2F;contributors" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cuelang&#x2F;cue&#x2F;graphs&#x2F;contributors</a>
评论 #20363714 未加载
leshow将近 6 年前
I like dhall better than this, <a href="https:&#x2F;&#x2F;dhall-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dhall-lang.org&#x2F;</a>
评论 #20365482 未加载
评论 #20363676 未加载
评论 #20363505 未加载
thdxr将近 6 年前
We&#x27;ve been using Google&#x27;s jsonnet with k8s and it&#x27;s been a life saver. Think it works pretty well so wondering what gapes they&#x27;re trying to address with Cue
评论 #20363584 未加载
oweiler将近 6 年前
The JSON sugar way too much for me. See folding as an example<p><a href="https:&#x2F;&#x2F;github.com&#x2F;cuelang&#x2F;cue&#x2F;blob&#x2F;master&#x2F;doc&#x2F;tutorial&#x2F;basics&#x2F;fold.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cuelang&#x2F;cue&#x2F;blob&#x2F;master&#x2F;doc&#x2F;tutorial&#x2F;basi...</a>
评论 #20363525 未加载
评论 #20363719 未加载
评论 #20364636 未加载
jefftk将近 6 年前
I found paging through the tutorial a helpful way to understand what it does: <a href="https:&#x2F;&#x2F;cue.googlesource.com&#x2F;cue&#x2F;+&#x2F;HEAD&#x2F;doc&#x2F;tutorial&#x2F;basics&#x2F;json.md" rel="nofollow">https:&#x2F;&#x2F;cue.googlesource.com&#x2F;cue&#x2F;+&#x2F;HEAD&#x2F;doc&#x2F;tutorial&#x2F;basics&#x2F;...</a>
parhamn将近 6 年前
There are quite a few of these things (Dahl, Jsonnet, etc). and I&#x27;ve always thought it would be impossible to get a large enough team to learn them.<p>At a pervious organization I worked I wrote a Kubernetes manager (docker build + kube config generation + blue&#x2F;green deploy) that was essentially TOML + Jinja (we we&#x27;re a python shop). A django + pg + redis app would look like [1].<p>[1] <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;pnegahdar&#x2F;1e90f42c1686009e1ff9392b797a6ed5" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;pnegahdar&#x2F;1e90f42c1686009e1ff9392b79...</a><p>There were definitely some limitations to doing this (some good, like reduced kubernetes surface) but in the end I think we got a large percent of the team writing kubernetes configs through cargo-culting while having generally sane defaults, environment isolation, etc.<p>I wonder how organizations get people to use these things in a broad way? I&#x27;d still be hesitant to write what was described above in something like jsonnet even though it would be much more semantically correct -- I can&#x27;t imagine getting anyone outside of the ops team to use it!<p>Generally though, TOML works really well with templating languages (jinja, golang templates, etc) if you include some helper funcs. You can even pass the toml to itself on rendering til you hit a fixed point for references and such.
wodenokoto将近 6 年前
Which of all the links will show a simple example of why one wants to store configurations in a constraint language?
评论 #20363353 未加载
评论 #20363502 未加载
sansnomme将近 6 年前
At this rate we might as well just use Prolog for configuration.
评论 #20363515 未加载
mickeypi将近 6 年前
Unfortunately it inherits JSON’s lack of support for dates.
评论 #20364334 未加载
评论 #20364063 未加载
评论 #20364257 未加载
AlphaSite将近 6 年前
This seems like one of those languages which is designed to be easy to write and easy to parse, but reader ambiguity appears to have been left on the wayside.
评论 #20364372 未加载
ytklx将近 6 年前
Shameless plug: A JSON-like configuration language with considerably less features, no magic and no ambiguity: <a href="https:&#x2F;&#x2F;github.com&#x2F;yuce&#x2F;jacl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;yuce&#x2F;jacl</a>
redder2将近 6 年前
I like YAML and TOML for fro configs. Never liked JSON at all. There are some nice sugars when in comes to quotes, commas that annoy me in JSON but it seems way to complicated and filled with tons of features to learn when here are established config languages that work and have a huge future set you just do not need to use at all like YAML.<p>Also its looks ugly having even have roon in curlies. Have not look at everything, I am sure Google has its use for this but I think its to much for just configs. And if someone can point why they not just use YAML I would be interested.
评论 #20365939 未加载
syn0byte将近 6 年前
We need to stop using the phrase &quot;don&#x27;t reinvent the wheel&quot; and start using the phrase &quot;don&#x27;t reinvent the hammer&quot; CS&#x2F;IT seems to have some weird solipsistic fetish for tooling in some dogmatic quest for abstraction.<p>I&#x27;m sure there is great for someone somewhere doing something but I just see another turtle in the stack...
评论 #20363478 未加载
评论 #20363546 未加载
nikolay将近 6 年前
Another configuration language, which, I think, is pretty clean and down to Earth: <a href="https:&#x2F;&#x2F;github.com&#x2F;zaphar&#x2F;ucg" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;zaphar&#x2F;ucg</a>
nikolay将近 6 年前
Ewww. Raw strings are yucky! &quot;_|_&quot; is just as terrible.
unixhero将近 6 年前
Does this have any relation with .cue sheets used to describe data structures within .bin&#x2F;.iso file dumps of data CDs, audio CDs, VCDs, SVCD, DVDs and Blu-ray&#x27;s???
评论 #20374553 未加载
gaze将近 6 年前
What is it and what does it do? Examples for how you&#x27;d apply this in production? Anything?
billfruit将近 6 年前
I wish if something similar was available for binary data, im not aware of any.
avmich将近 6 年前
How does it compare with ProtoBuffer?
评论 #20363819 未加载
iddan将近 6 年前
I needed this for so long. Looks