News for hackers. Stuff that matters.
Re:TOML: Tom's Obvious Minimal Language by wewxjfq on Sunday May 21, 2023 @08:47AM (#36020355)
The problem with comments in configuration files is that they don't survive a `load -> native object -> save` round-trip.
Re:TOML: Tom's Obvious Minimal Language by peteradio on Sunday May 21, 2023 @09:34AM (#36020696)
Comments lie, I think it would make sense to destroy them in load to native.
Re:TOML: Tom's Obvious Minimal Language by jen20 on Sunday May 21, 2023 @08:52AM (#36020389)
That sounds more like a problem with deserializing configuration instead of parsing.
Re:TOML: Tom's Obvious Minimal Language by riffraff on Sunday May 21, 2023 @11:36AM (#36022014)
Should a configuration language be a serialization language?

I'm unconvinced.

Re:TOML: Tom's Obvious Minimal Language by rwmj on Sunday May 21, 2023 @11:45AM (#36022098)
Augeas solves this for many config file formats: http://augeas.net/
Re:TOML: Tom's Obvious Minimal Language by ithkuil on Sunday May 21, 2023 @12:29PM (#36022512)
I played around with "format preserving" edits of a few text formats, including nested formats (a JSON inside a TOML inside a YAML etc)

https://github.com/mkmik/knot8

Re:TOML: Tom's Obvious Minimal Language by ilyt on Sunday May 21, 2023 @12:55PM (#36022742)
They could if you parsed it into syntax tree wit some methods to access keys instead of parsing into native struct. I think I saw YAML parser doing it...