Are there any examples of what's possible with extensions?
Show HN: I made Confetti: a configuration language file format
41–50 of 64 posts
Re: Show HN: I made Confetti: a configuration language file format
#42Suggestion, might be good to include Lua in the comparison table - since it’s also used for config as well.
Re: Show HN: I made Confetti: a configuration language file format
#43> Confetti does not compete with JSON or XML, it competes with INI. It clearly competes with JSON. I think I would still much rather use JSON5 over this. It's quite similar in terms of structure and terseness, but I don't have to learn anything. // This is a comment. { probe_device: ["eth0", "eth1"], users: [ { user: "*", login: "anonymous", password: "${ENV:ANONPASS}", machine: "167.89.14.1", proxy: { try_ports: [58…
Re: Show HN: I made Confetti: a configuration language file format
#44Re: Show HN: I made Confetti: a configuration language file format
#45Re: Show HN: I made Confetti: a configuration language file format
#46One thing I didn't understand is this example on the homepage:
> password "${ENV:ANONPASS}"
The spec doesn't seem to mention any ${}. Is this for the program to manage rather than the parser of the config going out to fetch an env var? If so, I find this a bit out of scope to show; at least, it confused me about whether that's built-in/supported syntax or if it's just a literal with syntax intended for a different program
Depending on how set in stone this is, another complaint I might have is that you still have the trailing comma issue from JSON, except it's not a comma but a backslash (reverse solidus, as the spec calls it—my mobile keyboard didn't even know that word). Maybe starting a list of arguments with [ could allow one to use any number of lines for the values, until a ] is encountered?
Re: Show HN: I made Confetti: a configuration language file format
#47I don't trust a config file that doesn't enforce quotes around strings. it's a footgun especially when it collides with ill-defined boolean
I think you missed the "typeless" idea. That basically means every value is a string and so it's up for the application to parse and validate.
Re: Show HN: I made Confetti: a configuration language file format
#48Re: Show HN: I made Confetti: a configuration language file format
#49Earlier quoted context omitted.
You're going to read the configuration in a target programming language So if the config format has its own type system you then have to convert between config types and language types If the config type doesn't map exactly onto the target lang type you either ignore it and accept some values won't round-trip cleanly or without error, or you fall back to using strings (e.g. various possible integer type sizes, signed…
I see your argument tho maybe im just not getting the real use case. Because when saying defaulting back to string and thatfor ignoring typing, wouldnt that just be the same as beeing typeless? Therefor doesn't every format support string therefor supporting typeless? Also, in how many cases do you need to parse the same configuration in multiple different languages? Im not saying its not useful - i just try to get t…
Re: Show HN: I made Confetti: a configuration language file format
#50In the spec https://confetti.hgs3.me/specification/ >: > Confetti source text consists of zero or more Unicode scalar values. For compatibility with source code editing tools that add end-of-file markers, if the last character of the source text is a Control-Z character (U+001A), implementations may delete this character. I’ve heard of this once, when researching ASCII control codes and related ancient history, but n…