News for hackers. Stuff that matters.
Re:Write code every day by meowface on Friday July 03, 2015 @10:41PM (#9828916)
Off-topic, but why did you decide not to go with YAML? Did you just want a version of YAML that wasn't whitespace-significant? Forge just looks like an nginx-y YAML, with no arrays and `=` instead of `:`.
Re:Write code every day by brettlangdon on Saturday July 04, 2015 @10:32AM (#9830246)
Was mostly just how it turned out. A lot of the decisions were mostly arbitrary, I wanted something that look/felt like an nginx config but was more generic (didn't have application specific directives), it just so happened to end up looking a lot like yaml.

'=' was arbitrary, I think paired with ';' I was going for a programming language type feel, which might not of been the best decision, but it is what I did. I also have plans to add more features, there currently are references (pointers essentially), intend on adding list/sets, operators (merge/concatenation/substraction/union/intersection/etc) and being able to reference environment variables. Not sure what else is to come.

Also, side note, I found writer a parser that deals with brackets '{}' to define blocks was much easier than trying to do it via whitespace. So that decision was mostly a time based decision.

I wrote an article about the project here: https://brett.is/writing/about/forge-configuration-parser/ It doesn't give any good details into why I made the decisions I did, just a quick overview.