Post 9tdVTw9uhPv0sFkdLE by sir@cmpwn.com
(DIR) More posts by sir@cmpwn.com
(DIR) Post #9tdKB7RxOdWmtX10SG by sir@cmpwn.com
2020-04-02T12:37:17Z
2 likes, 5 repeats
JSON is a bad config file format
(DIR) Post #9tdKjBxX8ZhQj422tM by bfiedler@mastodon.3fx.ch
2020-04-02T12:42:43Z
0 likes, 1 repeats
@sir Depends. Human-written configuration: Definitely. But machine-generated configs? It's not worse than the other formats.
(DIR) Post #9tdKxN2uiJI1AIJFoW by musicmatze@mastodon.technology
2020-04-02T12:45:36Z
0 likes, 0 repeats
@sir the worst!
(DIR) Post #9tdL1y238swN2965XE by xerz@fedi.xerz.one
2020-04-02T12:47:23.392405Z
0 likes, 0 repeats
@sir certainly better than YAML
(DIR) Post #9tdLXrnDsINCwxNB2W by rune@mastodon.nzoss.nz
2020-04-02T12:51:05Z
0 likes, 1 repeats
@sir Yes, but I don't know that YAML is much better.I've met a few too many people who seemingly cannot tell 3 spaces apart from 4 spaces.There's always a tough choice between super simple config style and support for lists and dicts.The latter isn't always required, but it's always annoying when you suddenly do need it.
(DIR) Post #9tdLfqRilYIJ5c7UkS by sir@cmpwn.com
2020-04-02T12:52:17Z
0 likes, 0 repeats
@xerz no
(DIR) Post #9tdLl9uTpLmiu56bke by sir@cmpwn.com
2020-04-02T12:52:38Z
0 likes, 1 repeats
For the record, INI files or TOML is better
(DIR) Post #9tdLpqIy95gdY0nGBU by net@letsalllovela.in
2020-04-02T12:52:26.834335Z
0 likes, 0 repeats
@sir thoughts on toml as a configuration file format? Seems like one of the better ones out there atm.
(DIR) Post #9tdLpr3lL77Jt8gd7Y by sir@cmpwn.com
2020-04-02T12:52:49Z
0 likes, 0 repeats
@net it's fine but if you can get away with INI you should use that instead
(DIR) Post #9tdLwJnJPxE2kF4eeW by prashere@connect.fshm.in
2020-04-02T12:53:12.879993Z
0 likes, 0 repeats
@sir Why so? Any examples?
(DIR) Post #9tdLwKZWWhn39ld9nc by sir@cmpwn.com
2020-04-02T12:54:08Z
0 likes, 0 repeats
@prashere it's easier for machines to write than humans. Too many rules for humans to be aware of and deal with, like trailing commas, quoting everything, escaping stuff, no support for multi-line strings...
(DIR) Post #9tdMGyMgHs4SMbSyUS by xsteadfastx@chaos.social
2020-04-02T13:00:04Z
0 likes, 0 repeats
@sir and what about yaml?
(DIR) Post #9tdMZBY40f0YSqTVTc by mort@fosstodon.org
2020-04-02T13:00:28Z
1 likes, 0 repeats
@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.
(DIR) Post #9tdMgdTQaBoP6FrKOO by sir@cmpwn.com
2020-04-02T13:01:41Z
0 likes, 0 repeats
@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
(DIR) Post #9tdMvDdcv96xJfaEnQ by xsteadfastx@chaos.social
2020-04-02T13:06:29Z
0 likes, 0 repeats
@sir just offtopic but its like my personal hero just answered me ;-)
(DIR) Post #9tdN0v5Unu9NWKKykC by sir@cmpwn.com
2020-04-02T13:07:18Z
0 likes, 0 repeats
@xsteadfastx 🙂
(DIR) Post #9tdNCu32Ukf9lru0ZM by rune@mastodon.nzoss.nz
2020-04-02T13:10:46Z
0 likes, 1 repeats
@mort @sir Wait.. you used to write your config on sliced bread??
(DIR) Post #9tdNXr8cVdyCpLVJ7A by wolf480pl@mstdn.io
2020-04-02T13:15:36Z
0 likes, 0 repeats
@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.
(DIR) Post #9tdNlW7VRzLrhAUsTI by mansr@society.oftrolls.com
2020-04-02T13:18:03Z
0 likes, 0 repeats
@sir Thank you, Captain Obvious.
(DIR) Post #9tdO4TkoTHxRrKvMMy by nycex@chaos.social
2020-04-02T13:20:22Z
0 likes, 0 repeats
@sir @net What's the advantage of INI over toml? It isn't really specified, while toml is, is it?
(DIR) Post #9tdOBEdB65oSyzZg8m by sir@cmpwn.com
2020-04-02T13:20:36Z
0 likes, 0 repeats
@nycex @net it's much simpler
(DIR) Post #9tdOFfH1ywUulwKNIe by r@freesoftwareextremist.com
2020-04-02T13:23:30.158054Z
0 likes, 0 repeats
@sir @prashere And no comments
(DIR) Post #9tdQarssUXbPs9Gi5A by geosum@chaos.social
2020-04-02T13:48:39Z
0 likes, 0 repeats
@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.
(DIR) Post #9tdQhpIIWH1prnTb2e by sir@cmpwn.com
2020-04-02T13:49:42Z
0 likes, 1 repeats
@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?
(DIR) Post #9tdSuKPgqQVZlT1V1U by Paul@ruby.social
2020-04-02T14:14:14Z
0 likes, 0 repeats
@sir when wrestling with a TOML config that gets into the deeply-nested dicts, I wish they'd just use json or yaml instead.
(DIR) Post #9tdTqms1CUUAom9IJc by tuxcrafting@letsalllovela.in
2020-04-02T14:26:16.460153Z
0 likes, 0 repeats
@sir @xerz what? yaml is a pile of terribleness
(DIR) Post #9tdTxLII7ujvJpZ0dM by sir@cmpwn.com
2020-04-02T14:26:40Z
1 likes, 0 repeats
@tuxcrafting @xerz yes, but I would sooner use it than JSON in some use-cases.
(DIR) Post #9tdU3LGN9eEyxbWjI0 by sir@cmpwn.com
2020-04-02T14:26:59Z
0 likes, 0 repeats
@tuxcrafting @xerz just because cars are bad doesn't mean I'd make a cross-country trip on a boat
(DIR) Post #9tdU5uRXKKe6eGyOGW by codesections@fosstodon.org
2020-04-02T14:28:59Z
0 likes, 0 repeats
@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
(DIR) Post #9tdUB5Ayqj8RNshCWe by vandys@mst.vsta.org
2020-04-02T14:27:42Z
0 likes, 0 repeats
@sir I ended up doing a config file format based on Python's indentation philosophy. It doesn't take much to parse: http://sources.vsta.org:7100/chore/artifact/f725316bf5f9f870and config files can be moderately complex/nested while staying human editable, for instance: http://sources.vsta.org:7100/tis/artifact/869b5d690aa250fc
(DIR) Post #9tdUI7WKX1HCgM2PKq by sir@cmpwn.com
2020-04-02T14:28:21Z
0 likes, 0 repeats
@vandys this seems pretty decent but you should put it on 443 and add https
(DIR) Post #9tdUcs2NID1mk8v9pA by vandys@mst.vsta.org
2020-04-02T14:33:41Z
0 likes, 0 repeats
@sir In general, there's support in that middleware for SSL: http://sources.vsta.org:7100/tis/artifact/869b5d690aa250fcTIS 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)
(DIR) Post #9tdUkksLnsZ4qezYae by sir@cmpwn.com
2020-04-02T14:34:05Z
0 likes, 0 repeats
@vandys you can make certs update themselves, this is no excuse
(DIR) Post #9tdUrgP8pEhN0adIlE by codesections@fosstodon.org
2020-04-02T14:37:33Z
0 likes, 0 repeats
@bfiedler @sir >> JSON is a bad config file format> Depends. Human-written configuration: Definitely. But machine-generated configs? It's not worse than the other formats.Well, I'd argue that a file is intended to be read/written *only* by a computer isn't really a config file – it's a bit of serialized data (which is only incidentally config data). And storing serialized data *is* one of the few good use-cases for JSON.But I acknowledge that might be splinting semantic hairs
(DIR) Post #9tdUsSaTgOHsReJ25w by vandys@mst.vsta.org
2020-04-02T14:36:46Z
0 likes, 0 repeats
@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.
(DIR) Post #9tdVFnDT9QfH5Jfacq by sir@cmpwn.com
2020-04-02T14:41:11Z
0 likes, 0 repeats
@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
(DIR) Post #9tdVNG8W1coCo1ufgW by vandys@mst.vsta.org
2020-04-02T14:42:12Z
0 likes, 0 repeats
@sir You don't appear to know much about deploying disaster networks. Let's leave it at that.
(DIR) Post #9tdVTw9uhPv0sFkdLE by sir@cmpwn.com
2020-04-02T14:43:14Z
0 likes, 0 repeats
@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
(DIR) Post #9tdWNRid3tGmgNSRgO by moonman@shitposter.club
2020-04-02T14:54:35.738290Z
0 likes, 0 repeats
@sir toml has comments, so it wins
(DIR) Post #9tdWPOQkG7rP3x1N6e by sir@cmpwn.com
2020-04-02T14:54:48Z
1 likes, 0 repeats
@moonman ini also has comments
(DIR) Post #9tdWxxdxqMle7WggjY by agateau@mastodon.xyz
2020-04-02T15:00:03Z
0 likes, 0 repeats
@sir @geosum you could be interested in scripting some config changes of Firefox config or another app from a Python script for example.
(DIR) Post #9tdYgDojAhqqygOJ9c by roka@pl.smuglo.li
2020-04-02T15:20:23.665640Z
0 likes, 0 repeats
@moonman @sir it has arrays, therefore it loses
(DIR) Post #9tdl12anIbFJhDZFLM by phel@toot.cafe
2020-04-02T17:36:56Z
0 likes, 0 repeats
@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.
(DIR) Post #9tdyskIKqPb1zKs8kC by progo@noagendasocial.com
2020-04-02T20:12:40Z
0 likes, 0 repeats
@sir have you heard of XML? It's the perfect format for any serial data! :^)
(DIR) Post #9teMtLauYyLCZSNfg8 by zethra@fosstodon.org
2020-04-03T00:41:51Z
0 likes, 0 repeats
@sir I'd prefer toml to ini
(DIR) Post #9tydvAD3L976QeuRns by geosum@chaos.social
2020-04-12T19:26:57Z
0 likes, 0 repeats
@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.