Measure · Understand
Slot & SlotVector
A slot is one lens's typed output for an input, held as a SlotVector that may be Dense, Sparse, Multi, or Absent. Slots are the typed cells a constellation is built from.
A lens is asked to measure an input it has no opinion about — say, a "code-style" lens looking at a sunset photo. What should its slot hold?
Absent. A SlotVector can be Dense, Sparse, Multi, or Absent — and "Absent" is a first-class, honest value meaning "this lens has nothing to say here." That honesty (rather than faking a vector) is what lets later verbs trust the slots and is a small instance of the fail-closed habit.
Source: calyxdocs/05 §data model
A lens is asked to measure an input it has no opinion about — say, a "code-style" lens looking at a sunset photo. What should its slot hold?
Absent. A SlotVector can be Dense, Sparse, Multi, or Absent — and "Absent" is a first-class, honest value meaning "this lens has nothing to say here." That honesty (rather than faking a vector) is what lets later verbs trust the slots and is a small instance of the fail-closed habit.
One lens, one typed cell
Run an input through a single lens and you get a slot — that lens’s typed output for that input. The value it holds is a SlotVector, and it is typed, because not every lens produces the same kind of answer:
- Dense — a full vector (the common case for a topic or sentiment embedder);
- Sparse — mostly zeros with a few strong signals (e.g. keyword-style features);
- Multi — several vectors at once (an input with several distinct facets);
- Absent — the lens has nothing to say about this input, stated honestly.
Why typing the cell matters
Calling a no-opinion result Absent instead of forcing a fake vector is the same discipline as fail-closed: say “I don’t know” rather than bluff. Keeping the type of each slot means later verbs — counting agreement, differentiating signal — operate on real structure, not on a number that pretends to be one.
Slots are the cells. Arrange one input’s slots across every lens in the panel and you have a constellation: the native Calyx record.
Practise to master it
Sign in to practise — practice items are graded per learner and update your mastery toward the lesson gate.
Where this sits in the concept graph
Build on first
Leads next
Related
- Aster (LSM storage)
- Constellation
- Forge (math runtime)
- Lens
- No-flatten doctrine
- Panel
- Ward / fail-closed guard
Sources
- calyxdocs/05 §data model
- calyxdocs/01 §7.1