A Clojure(Script) library for declarative data description and validation.
One of the difficulties with bringing Clojure into a team is the overhead of understanding the kind of data (e.g., list of strings, nested map from long to string to double) that a function expects and returns. While a full-blown type system is one solution to this problem, we present a lighter weight solution: schemas. (For more details on why we built Schema, check out this post.
- Referenced post: Schema for Clojure(Script) Data Shape Declaration and Validation
Schema is a rich language for describing data shapes, with a variety of features:
- Data validation, with descriptive error messages of failures (targeted at programmers)
- Annotation of function arguments and return values, with optional runtime validation
- Schema-driven data coercion, which can automatically, succinctly, and safely convert complex data types (see the Coercion section below)
- Other
- Schema is also built into our plumbing and fnhouse libraries, which illustrate how we build services and APIs easily and safely with Schema
- Schema also supports experimental clojure.test.check data generation from Schemas, as well as completion of partial datums, features we've found very useful when writing tests as part of the
schema-generatorslibrary
JSON Schema is a vocabulary that allows you to annotate and validate JSON documents.
Chisel is an open-source hardware construction language developed at UC Berkeley that supports advanced hardware design using highly parameterized generators and layered domain-specific hardware languages.
Hardware construction language (not C to Gates)
Embedded in the Scala programming language
Algebraic construction and wiring
Abstract data types and interfaces
Bulk connections
Hierarchical + object oriented + functional construction
Highly parameterizable using metaprogramming in Scala
Supports layering of domain specific languages
Sizeable standard library including floating-point units
Multiple clock domains
Generates low-level Verilog designed to pass on to standard ASIC or FPGA tools
Open source on github with modified BSD license
Complete set of docs
Growing community of adopters