5 ms·
Hi author here. We've created a new file format designed specifically for configuration: SAN (pronounce /seɪn/ like sane). You can find a Go parser here: http
by z0mbie42 8y ago
Hi author here.
We've created a new file format designed specifically for configuration: SAN (pronounce /seɪn/ like sane).
You can find a Go parser here: https://github.com/phasersec/san-go https://github.com/phasersec/san-go
Vim syntax here: https://github.com/z0mbie42/vim-san https://github.com/z0mbie42/vim-san
SAN was created because of a need to have a Simple And Neat configuration format (with comments, unlike JSON, easy to parse unlike YAML....).
The main killer features compared to YAML/TOML are the following:
* Comments as first class citizens which means programs can manipulate and modify files with comments without destroying them.
* Safe
* Human and parser friendly
* Easy to use, even without syntax coloration
It's an open format and any feedback is welcome.
- phaer 8y agoCould you elaborate on the differences to HCL? It looks almost the same on first glance. Maybe minus functions and and nested blocks in HCL.
- z0mbie42 8y agoHi, HCL was one of the source of inspiration. We wanted to push it 1 step further by providing a clear and open specification which allows to create parsers for languages other than go. So the main differences are the ecosystem: a CLI to auto format - think go fmt) and validate SAN files, parsers for languages others than Go
- phaer 8y agoAre you aware of the HCL2 specification at https://github.com/hashicorp/hcl2/blob/master/hcl/hclsyntax/spec.md https://github.com/hashicorp/hcl2/blob/master/hcl/hclsyntax/...? It also provides a validator, even for custom schema definitions.
- z0mbie42 8y agoYes, The problem is that we want a pure data configuration format. We think that very few application require a full turing complete language for their configuration. Bazel have too it's own (turing complete ?) Programming configuration language
- laurentlb 8y agoBazel's language (https://github.com/bazelbuild/starlark https://github.com/bazelbuild/starlark), also used in Buck and other tools, is technically not Turing-complete. In Bazel's BUILD files, there are additional restrictions (e.g. no function definition), making them relatively declarative and tool-friendly.
- kjeetgill 8y agoI literally just started prototyping this exact idea last week: a python interpreter without any imports/stdlib as a configuration language. I'm a little bummed I was beat to it. I was going back and forth on allowing defining functions. Definitely no classes.
- crdoconnor 8y ago>The main killer features compared to YAML/TOML are the following: >Comments as first class citizens which means programs can manipulate and modify files with comments without destroying them. >Safe >Human and parser friendly >Easy to use Those were also my goals with StrictYAML: http://hitchdev.com/strictyaml http://hitchdev.com/strictyaml
- eptcyka 8y agoCould you be more explicit as why you think TOML is not good enough? I used to think YAML was the greatest thing until I saw the spec and what was actually allowed. And then I sort of moved onto TOML, and now I'm curios, maybe TOML too has showstopping issues :)