lua-patterns
ron
Our great sponsors
lua-patterns | ron | |
---|---|---|
1 | 24 | |
27 | 3,128 | |
- | 2.8% | |
0.0 | 7.6 | |
over 1 year ago | 19 days ago | |
Rust | Rust | |
MIT License | Apache License 2.0 |
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
ron
-
XML is better than YAML
Whenever this kind of arguments come up, I am sad that RON (https://github.com/ron-rs/ron) is not better known. To me it feels like a cleaner and better JSON.
In any case, my little experience with it had made me hate YAML. Generally speaking, I have come to dislike any language with significant whitespace other than Haskell.
-
What config format do you prefer?
Part of the reason why I migrated away from RON in system76-scheduler is because I needed to rely on the 253-untagged-enums branch from https://github.com/MomoLangenstein/ron. Which still isn't resolved today: https://github.com/ron-rs/ron/pull/451.
-
Ron: Rusty Object Notation
Serde is strongly, strictly typed: you have to specify what type you want to decode to. It’s nothing like Python’s Pickle protocol.
See, for example, https://github.com/ron-rs/ron/blob/484fcab0686dfd18c7e29b6c1..., where it (in a type-inferency way) says “parse as Config”.
- JSON vs. XML with Douglas Crockford
- Ron – Rusty Object Notation
- They're rebuilding the Death Star of complexity
What are some alternatives?
jsonnet - Jsonnet - The data templating language
toml.io - Source Code for toml.io
dhall-lang - Maintainable configuration files
json5 - JSON5 — JSON for Humans
edn - Extensible Data Notation
kdl - the kdl document language specifications
yamllint - A linter for YAML files.
minimal-yaml - A minimalist, zero-copy parser for a strict subset of the Yaml specification.
strictyaml - Type-safe YAML parser and validator.
yaml-reference-parser
cson - CoffeeScript-Object-Notation. Same as JSON but for CoffeeScript objects.
typescript-json-schema - Generate json-schema from your Typescript sources