Okay, lets consider an iocaine config with Nam-Shub of Enki config embedded in it.
http-server "main" {
bind "/run/iocaine.socket" unix-socket-access=group
handler "/path/to/nam-shub" {
inherits "default"
logging { enable #true; }
checks {
enable demo commercial-scrapers
disable cgi-bin-trap
demo { host "iocaine-demo.example.com"; }
}
sources {
wordlists "/some/path"
training-corpus "path1" "path2" "..."
}
}
}
I think this looks fine. Technically, the lists could be represented as:
training-corpus {
- "path1"
- "path2"
"..."
}
But I like the brace-less representation more, so I'm not going to treat "-" as a special marker. It will be treated as a regular key, repeating it will override the previous value, like it does with any other name.
The other question is if I should allow named properties in the handler config block, like foo bar=baz, az a short for foo { bar baz; }. I... don't want to.
Likewise, while technically valid, and can be mapped to JSON, I don't want to allow node-name 1 2 { foo bar; } either. In those spaces, nodes can have either positional arguments or children, not both, and named props are disabled.
Yes, this limits the shape of the handler configuration somewhat, but makes it less ambigous, imo. The handlers are not KDL aware, and I'm not going to make them KDL aware either.