Cue: A new language for data validation

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • cue

    The home of the CUE language! Validate and define text-based and dynamic configuration

  • You can generate OpenAPI from CUE, though the path section is not done yet.

    You can also compile CUE to wasm, but CUE is still not concurrency safe yet, so you'd have to lock certain (an evolving set) of the function calls.

    If you shell out, converting csv to json is pretty straight forward.

    Good questions for GitHub Discussions https://github.com/cue-lang/cue/discussions

  • cue

    Discontinued CUE has moved to https://github.com/cue-lang/cue (by cuelang)

  • the most interesting summary explanation of cue lang and its differences is from a bug filing - https://github.com/cuelang/cue/issues/33

    >CUE is a bit different from the languages used in linguistics and more tailored to the general configuration issue as we've seen it at Google. But under the hood it adheres strictly to the concepts and principles of these approaches and we have been careful not to make the same mistakes made in BCL (which then were copied in all its offshoots). It also means that CUE can benefit from 30 years of research on this topic. For instance, under the hood, CUE uses a first-order unification algorithm, allowing us to build template extractors based on anti-unification (see issue #7 and #15), something that is not very meaningful or even possible with languages like BCL and Jsonnet.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • starlark-go

    Starlark in Go: the Starlark configuration language, implemented in Go

  • A commenter in another thread raises a good point: why not Starlark? https://github.com/google/starlark-go

    Starlark is so, so good by comparison to Cue.

  • hof

    Framework that joins data models, schemas, code generation, and a task engine. Language and technology agnostic.

  • I mostly generate yaml and json now that I've been using CUE. The cool thing about CUE is that it's really doing both at the same time. Types and values are just points along a spectrum of specificity, going from types to constraints to concrete values.

    I found CUE because I needed something better than Yaml for generating code, or declarative application code. (https://github.com/hofstadter-io/hof). It was similar to when I found Go and replaced a bunch of C++. I gained way more functionality in my application while shedding more than 50% of my LOC.

  • cuetorials.com

    Learn you some CUE for a great good!

  • We are trying an interesting use-case at Overseed (https://www.overseed.io/). We recently replaced JSON with CUE as our data configuration language. To summarize, our application allows users to describe their fake data's attributes and behavior and then output that data as a file or stream API.

    At the moment, we mainly use CUE for the structure, variables, and validation. It replaced our custom JSON and validation logic and cleaned up a lot of our code! We are still exploring moving more of our specifications to CUE style configuration and validation.

    We are still early-stage users (a few weeks). So far, we love the concise syntax, strong typing, and validation. I plan to spend some time this week checking out the querying, scripting, and external tools.

    I liked this tutorial site for those who are starting out: https://cuetorials.com/

  • cuetils

    CLI and library for diff, patch, and ETL operations on CUE, JSON, and Yaml

  • The link is broken.

    This one?

    https://github.com/hofstadter-io/cuetils

    Do you also make the cuetorials? It was of great help to us a few months ago. Thank you for that.

  • jk

    Configuration as Code with ECMAScript

  • Maybe Javascript? A lot of web tools support Javascript config files. There's this nice-looking effort to provide a hermetic execution environment for them: https://github.com/jkcfg/jk and if you use Typescript you get an extremely good static type system too. Plus the language is already very well known with loads of tool support and documentation.

    Definitely what I would use today.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • isopod

    An expressive DSL and framework for Kubernetes configuration without YAML

  • I like Cue and Jsonnet and Starlark and so on. But all of these have very low mindshare (though Starlark has the most momentum thanks to Bazel), and who knows if they will be dead by next year.

    Being an early adopter is difficult both in terms of the immaturity of the tooling — Cue, for example, only has a Go implementation at the moment — and in terms of the risk of betting on an evolutionary dead end, which can cause a lot of unnecessary churn when you want to standardize on something across an entire organization.

    As a concrete example, I'd love to replace Kubernetes's use of YAML with something like the above. But the tooling is immature, and almost nobody is using any of it. For example, there's Isopod [1], which is a nice-looking tool to use Starlark with Kubernetes. But it might go the same way as Ksonnet.

    [1] https://github.com/cruise-automation/isopod

  • jsonnet-libs

    Grafana Labs' Jsonnet libraries

  • tanka

    Flexible, reusable and concise configuration for Kubernetes

  • dhall-lang

    Maintainable configuration files

  • Does anyone know enough to compare Cue and https://dhall-lang.org/ ? For example: Is using them together even a sensical idea?

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • HCL: Toolkit for Structured Configuration Languages

    8 projects | news.ycombinator.com | 23 Apr 2024
  • Why the fuck are we templating YAML? (2019)

    27 projects | news.ycombinator.com | 23 Jan 2024
  • 10 Ways for Kubernetes Declarative Configuration Management

    23 projects | dev.to | 1 Jan 2024
  • What Is Wrong with TOML?

    15 projects | news.ycombinator.com | 13 Sep 2023
  • Show HN: Keep – GitHub Actions for your monitoring tools

    5 projects | news.ycombinator.com | 4 Sep 2023