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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: The CFG Configuration Format

1 点作者 vsajip超过 3 年前

1 comment

vsajip超过 3 年前
The CFG configuration format is a text format for configuration files which is similar to, and a superset of, the JSON format. It&#x27;s not new - it dates from well before its first announcement in 2008 - and has the following aims:<p>* Allow a hierarchical configuration scheme with support for key-value mappings and lists.<p>* Support cross-references between one part of the configuration and another.<p>* Provide a string interpolation facility to easily build up configuration values from other configuration values.<p>* Provide the ability to compose configurations (using include and merge facilities).<p>* Provide the ability to access real application objects safely, where supported by the platform.<p>* Be completely declarative.<p>It&#x27;s similar to newer formats such as JSON5, HJSON, HOCON and similar but offers a number of features [0] which they don&#x27;t, as indicated by the above list. It&#x27;s not intended to occupy the niche where you find things like Cue, Jsonnet, Dhall and similar.<p>It was just never especially publicised when first implemented for use in Python projects, but it now also has implementations for the JVM, .NET, Go, Rust, D, JavaScript [1], Ruby and Elixir (all BSD-3-Clause licensed) and it would be great to get feedback on the project from the HN community.<p>[0]: <a href="https:&#x2F;&#x2F;docs.red-dove.com&#x2F;cfg&#x2F;intro.html" rel="nofollow">https:&#x2F;&#x2F;docs.red-dove.com&#x2F;cfg&#x2F;intro.html</a> - description of features and comparison with other similar systems<p>[1]: <a href="https:&#x2F;&#x2F;docs.red-dove.com&#x2F;cfg&#x2F;playground.html" rel="nofollow">https:&#x2F;&#x2F;docs.red-dove.com&#x2F;cfg&#x2F;playground.html</a> - uses the JS implementation to create an interactive playground