lua-patterns
cson
Our great sponsors
lua-patterns | cson | |
---|---|---|
1 | 1 | |
27 | 1,334 | |
- | 0.1% | |
0.0 | 5.7 | |
over 1 year ago | 4 months ago | |
Rust | CoffeeScript | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
lua-patterns
-
The Norway Problem
If you want automatic built-in string validation, one option that seems particularly interesting is to use a variant of Lua patterns, which are weaker and easier to understand than regular expressions, but still provide a significant degree of "sanity" for something like an email. The original version works on bytes and not runes, but you could simply write a parser that works on runes instead, and the pattern-matching code is just 400 old and battle-tested lines of C89.
Lua patterns have also shown up in other places, such as BSD's httpd, and an implementation for Rust:
https://www.gsp.com/cgi-bin/man.cgi?section=7&topic=PATTERNS
https://github.com/stevedonovan/lua-patterns
http://lua-users.org/wiki/PatternsTutorial
cson
-
The Norway Problem
I prefer JSON over YAML because I spend more time confused and burned by the problems caused by it.
I understand that people don't like directly use JSON because it's not very friendly: no comments, no multi-line string, etc.
A great alternative IMHO is cson[0]. It's like JSON to JavaScript but for CoffeeScript (though nobody talks about it nowadays). It has indentation-based syntax, comments, and multiline string which usually don't need to escape. The advantage is it's close enough to JSON which is the canonical format that everybody can agree on nowadays. For YAML and TOML there are too many visual part-aways from JSON.
Or just create a JSON variant that enables comments and the backtick multiline string from JavaScript.
[0] https://github.com/bevry/cson
What are some alternatives?
jsonnet - Jsonnet - The data templating language
dhall-lang - Maintainable configuration files
strictyaml - Type-safe YAML parser and validator.
edn - Extensible Data Notation
ron - Rusty Object Notation
yamllint - A linter for YAML files.
cue - CUE has moved to https://github.com/cue-lang/cue
groq-test-suite - GROQ test suite
bip39 - BIP-39 tools using Node and implemented in Coffeescript