Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Alright, I'll throw my hat in.

I wrote a config file format. I took JSON and added comments, strict typing (using one character for any type that needs a marker), the ability to split items with newlines instead of commas, trailing commas, explicit binary data (as base64), and a new type I call "symbols" for things like enums or references. Then I removed the need to surround keys with quotes if they have only a certain set of typical characters.

It looks like [1].

It turns out that JSON was very close. It just needed a few more things.

Edit: one thing about config file formats that I strongly believe is that they must be purely data, no code. If you need code, supplement them with a separate thing, and perhaps use an established language, like Lua.

[1]: https://git.yzena.com/Yzena/Yc/src/branch/master/build.gaml



Lua was originally designed as a config language.


Sure, but I would say that anything that is Turing-complete is not a good config language.

Lua pivoted to plugins instead.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: