HQL¶
HQL — the Hyper Query Language — is a typed functional language for querying and computing over structured knowledge: documents, cards, metadata and the graph their links make.
import semantic
cards
| semantic("night hunting birds")
| take(3)
| expand(depth = 1)
| graph
| table
That program ranks a vault of encyclopedia articles by meaning, keeps the three best matches, walks one link outwards from each, and prints the graph. Every step is checked before anything runs, and every node in the answer records why it is there.
In development
HQL is a language in design. What runs today is a typed expression core, a vault of Markdown and HyperMarkDown documents, pipelines over its cards, two named retrievals and graph traversal. The wiki specifies more language than the binary implements, and says so card by card.
Start here¶
- Introduction — what HQL is for, and what it is deliberately not.
- Install — a release binary or
cargo install hql. - A tour of HQL — values, collections, lambdas and pipelines, one runnable program at a time.
- Queries in documents — a card that carries a query and renders its own answer.
- Retrieval and graphs —
lexical,semantic, and traversal that keeps its evidence. - Reference — the implemented grammar, the command line, and reporting.
HQL and HyperMarkDown¶
HQL is developed alongside HyperMarkDown, the strict markdown dialect its vaults are usually written in. HyperMarkDown is the authored representation; HQL is a separate language that reads it, and reads plain Markdown, YAML and JSON as well. This site is itself a HyperMarkDown vault: the wiki is the language's design, rendered card by card.