Our great sponsors
simulant | Norm | |
---|---|---|
1 | 4 | |
335 | 680 | |
0.0% | 0.4% | |
0.0 | 0.0 | |
over 6 years ago | about 1 year ago | |
Clojure | Elixir | |
- | MIT License |
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.
simulant
-
Clojure Spec like library in Elixir for data generation
The Clojure language has this library called spec, which allows the user to specify the structure of data, validate or conform it, as well as generate data using this specification. This would fit the bill completely (and was the inspiration for this idea. They also have simulant which is literally what I am trying to aim for)
Norm
-
Pattern matching and guards as a form of natural type specification?
Forget the typespecs. Have a boundary layer where you check the shape of things and their types as they enter your system and possibly convert them to some type you need inside your system. Norm is great for this.
-
Question on how to idiomatically apply "defensive programming" concepts from Pragmatic Programmer book
HexDocs for norm. — I am not a robot but maybe there should be a Hex package manager auto link bot. 🤖
-
Erlang/OTP 24 Highlights
I generally verify types only at the boundaries of my application (or very critical modules) using norm[1].
Either you have a strict type system that does not have an "any" type (yes, I'm looking at you Typescript), or you have a flexible type system like Python/Erlang/Elixir and you do runtime type checking whenever it's needed.
I'm writing more Typescript code than I would in Javascript for almost no type safety benefits (but for documentation, it's awesome).
-
Clojure Spec like library in Elixir for data generation
Check out Norm. Sounds like it's right up your alley
What are some alternatives?
vex - Data Validation for Elixir
valdi - Simple data validation for elixir
is - Fast, extensible and easy to use data structure validation for elixir with nested structures support.
shape - A data validation library for Elixir based on Prismatic Scheme
optimal - A schema based keyword list option validator.
ExGtin - Elixir GTIN & UPC Generation and Validation Library
uk_postcode - UK postcode parsing and validation for Elixir
voorhees
jeaux - A module for validating http params and queries
skooma - Elixir data validation library
avex
bankster - An IBAN account numbers and BIC validation tool for Elixir.