* Protocol/interop fixes to run metosin/malli Bringing up malli (schema validation) surfaced a batch of protocol and host-interop gaps. m/validate now works across the schema vocabulary (predicates, :map incl. nested/optional, :vector, :tuple, :enum, :maybe, :and, bounded int/string). - extend-type and reify now accept MULTIPLE protocols in one form (each bare symbol switches the current protocol). reify records every protocol it implements, so instance?/satisfies? recognise all of them. - Protocol method params support destructuring: reify/extend-type/deftype/ defrecord emit (fn ...) (which desugars patterns) instead of raw fn*. - instance? of a PROTOCOL works like satisfies? for reify/record instances, matching short names across qualified/bare protocol references. - @x reads as the qualified clojure.core/deref, so it still derefs where a ns excludes and rebinds deref (malli does). Updated reader-test + the reader spec/grammar (S11, deref rule). - Java collection interop on jolt collections: .nth/.count/.valAt/.get/.seq/ .containsKey route to the clojure.core equivalent (1-arg and 0-arg paths). - java.util.HashMap capacity/load-factor constructors + .putAll. - A class used as a value resolves to its instances' type, so Pattern -> the regex type (malli keys class-schemas by it). - Shims for malli's load path: LazilyPersistentVector/createOwning and PersistentArrayMap/createWithCheck statics. m/explain not yet working (jolt-fjb1). Full gate green. * satisfies? recognizes reify, consistent with instance? A reify's protocol methods are instance-local, so they aren't in the global type registry that type-satisfies? consults — satisfies? returned false for a reify even when it implemented the protocol. Check the protocols the reify records on itself (the same :jolt/protocols list instance? uses), matching short names like instance? does. Covers single- and multi-protocol reify. --------- Co-authored-by: Yogthos <yogthos@gmail.com> |
||
|---|---|---|
| .. | ||
| 00-front-matter.md | ||
| 02-reader.md | ||
| 03-special-forms.md | ||
| 09-core-library.md | ||
| coverage.md | ||
| README.md | ||
The Clojure Language Specification (Draft)
A normative, implementation-independent specification of the Clojure
language, developed alongside jolt's self-hosted compiler and validated by
its executable conformance suites. Why: Clojure has no spec — every
alternative implementation re-derives semantics from the reference
implementation and folklore. See the RFC for motivation, scope, evidence
sources, and process: ../rfc/0001-language-specification.md.
Documents
| Doc | Content | Status |
|---|---|---|
00-front-matter.md |
conformance terms, entry format, host classification | drafted |
01-evaluation.md … 08-macros.md |
see chapter plan in front matter | planned |
03-special-forms.md |
special-form catalog + normative exemplars (if, let*) |
exemplars |
09-core-library.md |
per-var entry format + exemplars (first, reduce, parse-uuid) |
exemplars |
coverage.md |
generated dashboard over the 694-var surface | generated |
Regenerate the dashboard after surface changes:
python3 tools/spec_coverage.py (requires clojuredocs-export.json in the
repo root and a working jolt checkout).
Current numbers (2026-06-10)
Of the 694 clojure.core vars in the ClojureDocs inventory:
- 380 implemented in jolt and exercised by the behavioral suites
- 154 implemented but not directly tested — each gets a test with its spec entry
- 35 portable but missing from jolt (
parse-long/parse-double/parse-boolean,update-keys/update-vals,macroexpand,time,partitionv/partitionv-all/splitv-at,with-redefs,with-open, reader fns, ns-introspection stragglers, …) — tracked as implementation gaps - 22 resolvable in code but invisible to ns introspection
(
resolve/ns-publicscan't see seed-fallback names likecompare,gensym,type) — a conformance finding in its own right - the rest classified host/JVM/concurrency (see dashboard)
How this connects to the test suites
test/integration/conformance-test.janet— 302 assertions, each run through three independent execution paths (interpreter, bootstrap compiler, self-hosted compiler) that must agree. Spec entries cite these.test/spec/*.janet— ~1,500 behavioral cases organized by topic.vendor/clojure-test-suite— the cross-dialect suite (≥4081 assertions passing); dialect splits there are classification evidence.- jank's per-construct corpus (
~/src/jank/compiler+runtime/test/jank) is the granularity model for §2/§3 conformance.
The invariant: every numbered normative statement names its conformance test, or is marked UNVERIFIED. The spec cannot drift from the implementations that check it.