Hacker News new | ask | show | jobs
by jbergstroem 4090 days ago
I just want to add another library in here which – at least in my world – is replacing json as the number one configuration and serialisation format. It's called libucl and it's main consumer is probably the new package tool in FreeBSD: `pkg`

Its syntax is nginx-like but can also parse strict json. It's pretty fast too.

More info here: https://github.com/vstakhov/libucl

4 comments

The automatic array creation feature [1] seems misguided. It means that as a programmer consuming a configuration file, i can't know whether a given field will be a scalar or an array. I recently worked on a JavaScript API that had that behaviour, and it was a pain.

Apart from that, though, this looks like a really good format.

[1] https://github.com/vstakhov/libucl#automatic-arrays-creation

Out of curiousity, what do you mean by "my world"? Is this a particular domain you're working in, or just your personal usage?
He is obviously an alien and he is trying to introduce the tools he use in his home world.

OnTopic: I think is an unusual way of saying "the environment I use"

Was just referring to the set of tools and libraries I surround myself with.
At one point I looked into using it, but there werent any python bindings at the time, and I didnt have the time (for the project) to write any. Are there any good language libs for it these days?
Conveniently enough the first python extension landed in head 10 days ago: https://github.com/vstakhov/libucl/pull/68
oh nice! thanks for the link. :D
Any particular reason to use this over YAML for configuration?
Macros seem to be the key distinguishing feature. It's a good idea, sort of borrowing from template engines.
Sure, but why not use a well known and solid templating engine if you're going to do templating?

Ansible combines YAML with jinja2 to do this type of stuff, for instance.

I'm not totally certain, but I think that might end up being simpler, more expressive and more powerful than this.