Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. If your idea of a good configuration file format is JSON, you are not a daemon I will ever run voluntarily.

If your idea of a good configuration file format is JSON, you are not a daemon I will ever run voluntarily.

Scheduled Pinned Locked Moved Uncategorized
15 Posts 10 Posters 40 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • cks@mastodon.socialC cks@mastodon.social

    If your idea of a good configuration file format is JSON, you are not a daemon I will ever run voluntarily.

    This is not very much of a subtoot of ISC Kea. If we ever have to replace the traditional ISC DHCP server with anything, it will not be with Kea.

    balki@social.balki.meB This user is from outside of this forum
    balki@social.balki.meB This user is from outside of this forum
    balki@social.balki.me
    wrote on last edited by
    #4

    @cks I usually convert to yaml, edit and then convert to json back in my editor. If the goal is to keep dependency free, json is usually the only option as it is available in stdlib in most languages.

    1 Reply Last reply
    0
    • dmaonr@mastodon.onlineD dmaonr@mastodon.online

      @cks I was about to "upgrade" isc dhcpd wtih kea until I saw that. New deployments will probably be dnsmasq instead. Which has its own problems. I have a hard time trusting a dev team that thinks json is a suitable format for a human edited config file. What other anti-pattern have they used?

      realmurphy@social.linux.pizzaR This user is from outside of this forum
      realmurphy@social.linux.pizzaR This user is from outside of this forum
      realmurphy@social.linux.pizza
      wrote on last edited by
      #5

      @dmaonR @cks

      Interestingly, they opted to make many of the v2 plug-ins open source with v3. I wonder why 😉

      The closed "enterprise-only" plug-in ecosystem was one of the reasons next to the idiosyncrasy of using JSON for human readable config files, why we opted against kea, just fearing we may need a plug-in down the line and would need to lock into a support contract.

      dnsmasq does have its fair number of quirks, but so far, definitely usable.

      1 Reply Last reply
      0
      • cks@mastodon.socialC cks@mastodon.social

        If your idea of a good configuration file format is JSON, you are not a daemon I will ever run voluntarily.

        This is not very much of a subtoot of ISC Kea. If we ever have to replace the traditional ISC DHCP server with anything, it will not be with Kea.

        cks@mastodon.socialC This user is from outside of this forum
        cks@mastodon.socialC This user is from outside of this forum
        cks@mastodon.social
        wrote last edited by
        #6

        If your program's configuration file format is JSON, you're openly advertising that you care far more about programming convenience in reading and loading your configuration file than you do about the people operating your software. "You can generate our JSON with software from something else", yeah, no. You've told me what your priorities are and I'm going to believe you. I would rather run software that actually cares about the people running it.

        untitaker@gts.woodland.cafeU davecb@hachyderm.ioD gumnos@mastodon.bsd.cafeG 3 Replies Last reply
        0
        • cks@mastodon.socialC cks@mastodon.social

          If your program's configuration file format is JSON, you're openly advertising that you care far more about programming convenience in reading and loading your configuration file than you do about the people operating your software. "You can generate our JSON with software from something else", yeah, no. You've told me what your priorities are and I'm going to believe you. I would rather run software that actually cares about the people running it.

          untitaker@gts.woodland.cafeU This user is from outside of this forum
          untitaker@gts.woodland.cafeU This user is from outside of this forum
          untitaker@gts.woodland.cafe
          wrote last edited by
          #7

          @cks json5 is fine in your book, right?

          cks@mastodon.socialC 1 Reply Last reply
          0
          • untitaker@gts.woodland.cafeU untitaker@gts.woodland.cafe

            @cks json5 is fine in your book, right?

            cks@mastodon.socialC This user is from outside of this forum
            cks@mastodon.socialC This user is from outside of this forum
            cks@mastodon.social
            wrote last edited by
            #8

            @untitaker JSON5 is moderately less hostile than JSON but for most programs it's still advertising that you care a lot more about programming convenience than having a good experience of writing configuration files.

            (For both simple and complex configuration files there are much better syntaxes that are easier for people to deal with.)

            jef@mastodon.socialJ 1 Reply Last reply
            0
            • cks@mastodon.socialC cks@mastodon.social

              @untitaker JSON5 is moderately less hostile than JSON but for most programs it's still advertising that you care a lot more about programming convenience than having a good experience of writing configuration files.

              (For both simple and complex configuration files there are much better syntaxes that are easier for people to deal with.)

              jef@mastodon.socialJ This user is from outside of this forum
              jef@mastodon.socialJ This user is from outside of this forum
              jef@mastodon.social
              wrote last edited by
              #9

              @cks @untitaker My most recent project uses tab-separated values that a script turns into XML. I assume you hate everything about this.

              cks@mastodon.socialC 1 Reply Last reply
              0
              • cks@mastodon.socialC cks@mastodon.social

                If your program's configuration file format is JSON, you're openly advertising that you care far more about programming convenience in reading and loading your configuration file than you do about the people operating your software. "You can generate our JSON with software from something else", yeah, no. You've told me what your priorities are and I'm going to believe you. I would rather run software that actually cares about the people running it.

                davecb@hachyderm.ioD This user is from outside of this forum
                davecb@hachyderm.ioD This user is from outside of this forum
                davecb@hachyderm.io
                wrote last edited by
                #10

                @cks I'm inclined to think the same about yaml.

                It gets used for configuration in the sense that any extension language can be used as a configuration language.
                The syntax is so <expletive deleted/> that it reminds me of the time some idiot added if-then-else to xml itself.

                <p:if xmlns:p="http://www.w3.org/ns/xproc" test="/person/age &gt;= 18">
                <p:then>
                <status>adult</status>
                </p:then>
                <p:else>
                <status>minor</status>
                </p:else>
                </p:if>

                cks@mastodon.socialC 1 Reply Last reply
                0
                • jef@mastodon.socialJ jef@mastodon.social

                  @cks @untitaker My most recent project uses tab-separated values that a script turns into XML. I assume you hate everything about this.

                  cks@mastodon.socialC This user is from outside of this forum
                  cks@mastodon.socialC This user is from outside of this forum
                  cks@mastodon.social
                  wrote last edited by
                  #11

                  @jef @untitaker I think tab separated values (with comments, I hope) are a perfectly good format; I have a lot of configuration file formats in my own tools that are basically lines of 'a b'. What you turn them into internally is not my (sysadmin) problem.

                  1 Reply Last reply
                  0
                  • davecb@hachyderm.ioD davecb@hachyderm.io

                    @cks I'm inclined to think the same about yaml.

                    It gets used for configuration in the sense that any extension language can be used as a configuration language.
                    The syntax is so <expletive deleted/> that it reminds me of the time some idiot added if-then-else to xml itself.

                    <p:if xmlns:p="http://www.w3.org/ns/xproc" test="/person/age &gt;= 18">
                    <p:then>
                    <status>adult</status>
                    </p:then>
                    <p:else>
                    <status>minor</status>
                    </p:else>
                    </p:if>

                    cks@mastodon.socialC This user is from outside of this forum
                    cks@mastodon.socialC This user is from outside of this forum
                    cks@mastodon.social
                    wrote last edited by
                    #12

                    @davecb I don't like YAML all that much but at least it has comments and forces people to write multi-line things and so on. It's more or less a tolerable universal solvent at this point, although it's not actively good the way a configuration file format could be.

                    (If you don't need nesting there are simpler general formats like TOML.)

                    davecb@hachyderm.ioD 1 Reply Last reply
                    0
                    • cks@mastodon.socialC cks@mastodon.social

                      If your program's configuration file format is JSON, you're openly advertising that you care far more about programming convenience in reading and loading your configuration file than you do about the people operating your software. "You can generate our JSON with software from something else", yeah, no. You've told me what your priorities are and I'm going to believe you. I would rather run software that actually cares about the people running it.

                      gumnos@mastodon.bsd.cafeG This user is from outside of this forum
                      gumnos@mastodon.bsd.cafeG This user is from outside of this forum
                      gumnos@mastodon.bsd.cafe
                      wrote last edited by
                      #13

                      @cks

                      It's one of the things I love about UCL-style syntax…pretty much every time I've encountered it, the syntax feels like it was targeted more at users rather than devs.

                      Link Preview Image
                      GitHub - vstakhov/libucl: Universal configuration library parser

                      Universal configuration library parser. Contribute to vstakhov/libucl development by creating an account on GitHub.

                      favicon

                      GitHub (github.com)

                      1 Reply Last reply
                      0
                      • cks@mastodon.socialC cks@mastodon.social

                        @davecb I don't like YAML all that much but at least it has comments and forces people to write multi-line things and so on. It's more or less a tolerable universal solvent at this point, although it's not actively good the way a configuration file format could be.

                        (If you don't need nesting there are simpler general formats like TOML.)

                        davecb@hachyderm.ioD This user is from outside of this forum
                        davecb@hachyderm.ioD This user is from outside of this forum
                        davecb@hachyderm.io
                        wrote last edited by
                        #14

                        @cks I vaguely remember doing nesting in toml.

                        [servers]
                        [servers.alpha] ip = "10.0.0.1" dc = "eqdc10"
                        [servers.beta] ip = "10.0.0.2" dc = "eqdc20"

                        Are we talking about the same thing?

                        1 Reply Last reply
                        0
                        • cks@mastodon.socialC cks@mastodon.social

                          If your idea of a good configuration file format is JSON, you are not a daemon I will ever run voluntarily.

                          This is not very much of a subtoot of ISC Kea. If we ever have to replace the traditional ISC DHCP server with anything, it will not be with Kea.

                          waffles@masto.yttrx.comW This user is from outside of this forum
                          waffles@masto.yttrx.comW This user is from outside of this forum
                          waffles@masto.yttrx.com
                          wrote last edited by
                          #15

                          @cks I used to use a sandwich combination of = separated kv pairs in a global config, followed by libpopt ( https://manpages.debian.org/testing/libpopt-dev/popt.3.en.html ) to handle runtime overrides with an additional override of a per user override kv config file.

                          It was very user friendly but a huge PITA from a developer perspective.

                          Now all software I wrote (for work) uses straight up JSON for inputs. But that json is generated from thrift schemas which are managed by a python DSL, so it all kinda works.

                          1 Reply Last reply
                          2
                          0
                          • R relay@relay.infosec.exchange shared this topic
                            R relay@relay.mycrowd.ca shared this topic
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups