This makes me want to learn Lua just so that I can see what kind of things I can do with it. There's a DSL in Kotlin for HTML as well that looks syntactically similar. I have not dived enough into DSL land yet, but this looks kind of fun.
Implementing your own DSL is fairly trivial too: http://docs.groovy-lang.org/docs/latest/html/documentation/c...