For the record, INI files or TOML is better

@xsteadfastx it's alright for a few specific use-cases, but it's also a footgun so it should be used with care. It's also way too complicated and I would never want to write an implementation

@sir just offtopic but its like my personal hero just answered me ;-)

@sir TOML might be the best thing to happen to config files since sliced bread.

JSON is fine as a human-readable interchange format, but really annoying to write by hand.

@mort @sir Wait.. you used to write your config on sliced bread??

@rune @mort @sir
yeah, that was popular before punchcards became a thing.

But even earlier than sliced bread, we used to write configs on clay tablets.
Now some people write configs on glass tables, so you could say we've come a full circle.

@wolf480pl @rune @mort @sir

> But even earlier…, we used to write config [files] on clay tablets.
Now some people write config [files] on glass tables, so you could say we've come a full circle.

This is exactly the sort of content I come to Mastodon for, nicely done. :D

@sir Didn't you some time ago say something against programming languages without a specification? I mean clearly it's not exactly the same, but INI files are parsed differently between parsers while TOML files aren't. I wouldn't use INI for new projects anymore.

@geosum there's very little need for the format of your config file to be portable between applications. What are you going to do, hand your .vimrc to Firefox?

@sir @geosum you could be interested in scripting some config changes of Firefox config or another app from a Python script for example.

@sir What I actually meant was that you can get familiar with toml once for all applications that use it. For INI, you could configure two applications where one of them supports something the other doesnt for the configs syntax-wise which would be confusing.

@sir when wrestling with a TOML config that gets into the deeply-nested dicts, I wish they'd just use json or yaml instead.

@sir I ended up doing a config file format based on Python's indentation philosophy. It doesn't take much to parse:
and config files can be moderately complex/nested while staying human editable, for instance:

@vandys this seems pretty decent but you should put it on 443 and add https

@sir In general, there's support in that middleware for SSL:
TIS doesn't use it because we can't afford to have certs expire during a disaster (or assume that we can reach a CA if they do)

@vandys you can make certs update themselves, this is no excuse

@sir If you have Internet. That thing is for DISASTER operations. You don't know when it'll happen, or how long it'll last. Totally different design space from securing the net for commerce.

@vandys you can do weekly renewals to get 80-90 days of working cert, or you can still buy certs for terms like 1 year+, or you can offer both with and without https. And if you don't have internet you're not going to reach this web host anyway. Give me a break

@sir You don't appear to know much about deploying disaster networks. Let's leave it at that.

@vandys I know plenty, but you seem to prefer thinking of me as having the average intelligence of /dev/null rather than step one toe outside of your ivory tower of ignorance. I hope you get MitM'd, twit

@sir hard agree on TOML being better, in almost (read: every) situation it's more clear and understandable to people and easier to parse.

@sir I just know I don't like complex formats or difficult parsing. Also, a config file format really needs comments, which JSON technically doesn't support AFAIK.

So yes, JSON is bad, but TOML is also already a little too much for me...

If you ask me, INI is great for that job. Sometimes I think that Lua is great, too. But then: loops in config are kinda overkill and can result in denial of service.

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!