Live data from Hacker News

Show HN: I made Confetti: a configuration language file format

confetti.hgs3.me

41–50 of 64 posts

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…

Market quote, commas, and colons aren't that terse, and it seems too simple to have to learn much of anything

Re: Show HN: I made Confetti: a configuration language file format

#46
I like it! The spec could be more accessibly written, but it's somewhat understandable in casual reading. Perhaps it would benefit from a diagram like json's famous one

One 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

#47
post #18

I 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.

so you mean a config file that can have a different meaning depending on who's parsing? sounds nice and not dangerous at all

Re: Show HN: I made Confetti: a configuration language file format

#49

Earlier 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…

I think parsing the config in multiple target langs is definitely a counter-example where having a type system in the config lang can be useful as a lowest common denominator that you then conform all the parsers too

Re: Show HN: I made Confetti: a configuration language file format

#50

In 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…

A plain ASCII document is a valid UTF-8 document, but I agree that special support for ^Z is pointless for a file format invented 20+ years after the demise of MS-DOS. Handling ^Z would probably be MS-DOS’ job anyway.
Post reply on HN