What Is Wrong with TOML?

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • json5

    JSON5 — JSON for Humans

  • I can relate. But after using JSON for a while (in files that I edit by hand), I realised that I really wanted comments and trailing commas (which leads to https://nigeltao.github.io/blog/2021/json-with-commas-commen...). Next I'd probably want multiline strings (leading to https://github.com/json5/json5).

    But if you use those extensions, all your tooling breaks.

    I think the real bike-shedding would start when you want to add some syntax for raw string literals (e.g. heredocs); it's one of those features that feels redundant, until the day when you really need it and can't bear the pain of escaping.

  • dhall-lang

    Maintainable configuration files

  • Maybe you'd like jsonnet: https://jsonnet.org/

    I find it particularly useful for configurations that often have repeated boilerplate, like ansible playbooks or deploying a bunch of "similar-but" services to kubernetes (with https://tanka.dev).

    Dhall is also quite interesting, with some tradeoffs: https://dhall-lang.org/

    A few years ago I did a small comparison by re-implementing one of my simpler ansible playbooks: https://github.com/retzkek/ansible-dhall-jsonnet

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • edn

    Extensible Data Notation

  • EDN (Extensible Data Notation) is a subset of Clojure: https://github.com/edn-format/edn

    It is:

    - Streamable

    - Extensible

    - Whitespace-insensitive, but there are formatting conventions for readability

  • cue

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

  • bcl

    Basic Configuration Language

  • Related:

    just few days ago I crafted together some ideas i had couple of years already for a configuration language, syntactically like HCL but without HashiCorps idiosyncrasies.

    Here it goes, BCL (_Basic_ Configuration Language, for a lack of better name yet), Go prototype, I can code Python port and possibly several other as well..

    https://github.com/wkhere/bcl

  • toml

    Tom's Obvious, Minimal Language

  • direnv

    unclutter your .profile

  • The more applications I write, the more I tend to avoid typical config files in favor of using direnv [0] to set environment variables.

    [0] https://direnv.net/

  • 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
  • ansible-dhall-jsonnet

  • Maybe you'd like jsonnet: https://jsonnet.org/

    I find it particularly useful for configurations that often have repeated boilerplate, like ansible playbooks or deploying a bunch of "similar-but" services to kubernetes (with https://tanka.dev).

    Dhall is also quite interesting, with some tradeoffs: https://dhall-lang.org/

    A few years ago I did a small comparison by re-implementing one of my simpler ansible playbooks: https://github.com/retzkek/ansible-dhall-jsonnet

  • tanka

    Flexible, reusable and concise configuration for Kubernetes

  • Maybe you'd like jsonnet: https://jsonnet.org/

    I find it particularly useful for configurations that often have repeated boilerplate, like ansible playbooks or deploying a bunch of "similar-but" services to kubernetes (with https://tanka.dev).

    Dhall is also quite interesting, with some tradeoffs: https://dhall-lang.org/

    A few years ago I did a small comparison by re-implementing one of my simpler ansible playbooks: https://github.com/retzkek/ansible-dhall-jsonnet

  • jsonnet

    Jsonnet - The data templating language

  • Maybe you'd like jsonnet: https://jsonnet.org/

    I find it particularly useful for configurations that often have repeated boilerplate, like ansible playbooks or deploying a bunch of "similar-but" services to kubernetes (with https://tanka.dev).

    Dhall is also quite interesting, with some tradeoffs: https://dhall-lang.org/

    A few years ago I did a small comparison by re-implementing one of my simpler ansible playbooks: https://github.com/retzkek/ansible-dhall-jsonnet

  • tomli

    A lil' TOML parser

  • But the whitespace handling involved is an extra complication, at least the provided example fails to be parsed by `tomli`, which is following the currently release TOML spec: https://github.com/hukkin/tomli/issues/199

  • go-toml

    Go library for the TOML file format

  • I wrote one of the Go implementations [0] when TOML was announced and have maintained it since.

    As a library implementor, I wish arrays would hold only one type at a time, but I get that could be useful for users. But as a user, I wish tables were fully defined once (more can't be added up later in the file), especially when using larger files.

    [0]: https://github.com/pelletier/go-toml

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