NixLabConnectionconnecting
ProjectsProject
web /

dreamstop.openfp.net

publicguest

dreamstop.openfp.net, the website and user manual of dreamstop, a language for continuous disambiguation

git clone git@nixlab.openfp.net:web/dreamstop.openfp.net.git
fc2096a4f5f1eb40a0f6ed956ebe07c7a76f466cmanual/kinds.typ
#import "style.typ": a, entry, patterns, readings, rewrites, source

= Document kinds

A document kind is the set of patterns it allows for each clause place, and nothing else. A clear clause that matches no pattern for its place is rejected. Each kind is its own repository under `dreamstop/kinds`, with its patterns in `allowed.vx` and its minimal pairs in `pairs.vx`, versioned with its own tags. Anyone can fork a kind without forking the language.

== Reading a pattern file

A kind file is a Vortex do-block. `main` declares a pattern for main clauses and names it. `relative`, `adverbial` and `complement` declare a pattern for a subordinate clause and name the pattern its parent must match, so the clause it sits in decides which patterns a relative clause can match. A pattern has one statement for each slot it allows.

#table(
  columns: (auto, 1fr),
  table.header([*Statement*], [*Means*]),
  [`aspect [PFV]`], [the slot holds that code],
  [`phase [INC, CSS]`], [the slot holds one of these],
  [`required phase`], [the slot holds some value, any of them],
  [`optional modal`], [the slot holds some value, or is empty],
  [`neutral aspect`], [readings that differ only in this slot count as one],
  [slot not mentioned], [the slot is empty, and the mood is `FAC`],
)

Patterns are closed: a slot left out is forbidden. The laws of the language apply to every clause as well, so a pattern cannot allow what a law forbids. The kind's own check confirms that every pair obeys the three laws and that some good side uses every pattern. A pattern is not a rule until a pair uses it.

== ChangeLog

```
significant noun
let standing = do
      force [ASR]
      aspect [HAB]
      required phase
      optional modal
    background = do
      force [ASR]
      aspect [PFV, PRF, HAB]
      optional modal
action <- main $ do
  force [ASR]
  aspect [PFV]
relative action $ do
  force [ASR]
  aspect [HAB]
  phase [INC, CSS]
oneOff <- main $ do
  force [ASR]
  aspect [PFV]
  required phase
  bound [ONE]
measured <- main $ do
  force [ASR]
  aspect [PFV, HAB]
  evidence [OBS, PUP]
obligation <- main $ do
  force [ASR]
  aspect [HAB]
  modal deontic
claim <- main standing
declared <- main $ do
  force [DEC]
  aspect [PFV]
committed <- main $ do
  force [CMS]
  aspect [PFV]
forM_ [action, claim] $ \parent ->
  relative parent $ do
    force [ASR]
    aspect [PFV]
    optional phase
    bound [ONE]
forM_ [oneOff, measured, obligation, claim, declared, committed] $ \parent -> do
  relative parent standing
  adverbial parent background
  complement parent background
```

#patterns("changelog")

- *The release action* is a main `ASR·PFV` clause with no phase and no bound: "Added", "Removed", "Upgraded". "Upgraded X from A to B." needs no reason.
- *A relative clause on a release action* is `HAB` with `INC` or `CSS`. The annotator writes what the words carry, and the checker supplies the `INC`.
- *One-off behaviour* is `PFV·ONE`, with a phase in a main clause. In a relative clause on a release action or a standing claim, the phase is optional.
- *A measured outcome* carries `OBS` or `PUP` and needs no phase.
- *An obligation* is an assertion with a modal grounded in a rule, and needs no phase: the release is its reference.
- *Every other standing claim* has a phase.
- *Declarations and commitments* are `DEC·PFV` and `CMS·PFV`.
- *A ChangeLog has no `DIR`, no `PRG` and no mood but fact.* A ChangeLog states obligations and does not command, a release is a fixed state, and a reader acts on what the ChangeLog says.

#entry[Breaking: callers constructing a `Shell` must add `pageSize = Nothing` to keep the old behaviour.]

#readings(
  ("[ASR·HAB·TEL·NEC]", [a standing need, with no word on whether it is new.]),
)

The clause names its goal, keeping the old behaviour, so it is `TEL` and not an obligation. As a standing claim it needs a phase.

#rewrites(
  ("[ASR·HAB·INC·TEL·NEC]", [Breaking: callers constructing a `Shell` must now add `pageSize = Nothing` to keep the old behaviour.]),
)

#source[ChangeLog kind. The bad side is verbatim from vortex-shell's ChangeLog.]

== README

```
let description = do
      force [ASR]
      aspect [HAB]
      optional modal
claim <- main description
step <- main $ do
  force [DIR]
  aspect [PFV, PRG, HAB]
  neutral aspect
  optional modal
forM_ [claim, step] $ \parent -> do
  relative parent description
  complement parent description
  adverbial parent $ do
    force [ASR]
    required aspect
    optional modal
```

#patterns("readme")

- *No phase.* A README has no reference point, so "now" points at a release the reader cannot see.
- *Descriptions are `HAB`.* A README describes the revision it ships with, and release history belongs in the ChangeLog.
- *Steps are `DIR` main clauses*, and their aspect is neutral.

#entry[An `Issue` now carries `issueAssignee`.]

#readings(
  ("[ASR·HAB·INC]", [new in some release the reader cannot see.]),
)

#rewrites(
  ("[ASR·HAB]", [An `Issue` carries `issueAssignee`.]),
)

#source[README kind. "Projects are still renamed and deleted in SQLite." loses its "still" in the same way.]

#entry[horizon-devtools provided a package set of Haskell development tools, including fourmolu, haskell-language-server and hlint.]

A README's first sentence says what the project is. This one tells of a past event, which leaves open whether the package set exists in the documented revision.

#readings(
  ("[ASR·PFV]", [an event in the past.]),
  ("[ASR·HAB]", [what it is.]),
  ("[ASR·PRF]", [it provided them, and the result holds.]),
  ("[ASR·HAB·CSS]", [it no longer provides them.]),
)

#rewrites(
  ("[ASR·HAB]", [horizon-devtools is a retired package set of Haskell development tools, including fourmolu, haskell-language-server and hlint.]),
)

#source[README kind. The bad side is the first sentence of horizon-devtools's README.]

== Manual

```
let plain = do
      force [ASR]
      required aspect
      optional modal
step <- main $ do
  force [DIR]
  aspect [PFV, PRG, HAB]
  neutral aspect
  optional modal
adverbial step $ do
  force [ASR]
  aspect [PRF, HAB]
  optional modal
adverbial step $ do
  force [IRG]
  aspect [HAB]
  optional modal
statement <- main $ do
  force [ASR]
  aspect [PFV, HAB]
  optional modal
  optional evidence
warning <- main $ do
  force [ADM]
  aspect [PFV, PRG, HAB]
  neutral aspect
  optional modal
forM_ [step, statement, warning] $ \parent -> do
  relative parent plain
  complement parent plain
forM_ [statement, warning] $ \parent ->
  adverbial parent plain
```

#patterns("manual")

- *Steps are `DIR` main clauses* and warnings `ADM` main clauses. An `ASR·PFV` main clause states what a step produced.
- *A step's condition is `PRF` or `HAB`, never `PRG`.* A step that waits on an event under way can run before the event finishes.
- *Questions appear only as a step's condition*, as troubleshooting that leads to a check and a next step.
- *A manual has no phase*, as a README has none.

#entry[How can one idea replace and unify all three?]

#readings(
  ("[IRG·HAB·ABL·POS]", [a real question.]),
  ("[ASR·HAB·ABL·POS]", [a rhetorical question that claims it can.]),
  ("[ASR·HAB·NEG·ABL·POS]", [a rhetorical question that doubts it can.]),
)

#rewrites(
  ("[ASR·HAB·ABL·POS]", [One idea can replace and unify all three.]),
)

#source[Manual kind. The bad side is from the Vortex manual's introduction.]

#entry[First check: are the disks the ones to be wiped?]

#readings(
  ("[IRG·HAB] {check: BSC}", [a heading followed by a question.]),
  ("[DIR·PFV] [IRG·HAB]", [an instruction, then a separate question.]),
  ("[DIR·PFV] [IRG·HAB]/comp1", [an instruction whose object is the question.]),
)

#rewrites(
  ("[DIR·PFV] [ASR·HAB]/comp1", [First check that the disks are the ones to be wiped: (followed by the shell block)]),
)

#source[Manual kind. "The new system now serves, and the old one stays the boot default." loses its "now", as a manual allows no phase.]

== Issue

```
significant noun
let open = do
      required mood
      required aspect
      optional phase
      optional modal
      optional bound
statement <- main $ do
  force [ASR]
  open
  optional evidence
request <- main $ do
  force [DIR]
  required aspect
  optional modal
question <- main $ do
  force [IRG]
  open
forM_ [statement, request, question] $ \parent -> do
  relative parent (force [ASR] >> open >> optional evidence)
  adverbial parent (force [ASR] >> open >> optional evidence)
  complement parent (force [ASR] >> open >> optional evidence)
```

#patterns("issue")

An issue weighs options and asks open questions, so it allows every mood, aspect, phase and modal. Its phase is relative to the time of writing. What it must keep apart is a decision and an option.

#entry[We will drop step 4's grep from DEPLOY.md.]

#readings(
  ("[CMS·PFV]", [the fix is chosen, and the author commits to it.]),
  ("[ASR·PFV]", [a forecast.]),
)

The issue weighs two fixes, and this is the second.

#rewrites(
  ("[ASR·HYP·PFV]", [Under the second fix, we would drop step 4's grep from DEPLOY.md.]),
)

#source[Issue kind. "Reading the newest event id before `myDuties` closes the gap." is settled the same way by "would close", #a("[ASR·HYP·HAB]").]

== Labels

```
main $ do
  force [ASR]
  aspect [HAB]
  optional modal
main $ do
  force [DIR]
  aspect [PFV]
```

#patterns("labels")

Labels are the short strings of a user interface: buttons, status lines and error messages. A button names an action, `DIR·PFV`, and a status states a fact, `ASR·HAB`. A label has no subordinate clauses and no phase.

#entry[The source must hold the target's tip.]

#readings(
  ("[ASR·HAB·DEO·NEC]", [a requirement.]),
  ("[ASR·HAB·INF]", [an inference about this source.]),
)

#rewrites(
  ("[ASR·HAB·DEO·NEC]", [The source is required to hold the target's tip.]),
)

#source[Labels kind. "The forge keeps this picture now." loses its "now", and "may have an icon" becomes "can have an icon".]

== Website

```
let description = do
      force [ASR]
      aspect [HAB]
      optional modal
      optional evidence
claim <- main description
plan <- main $ do
  force [CMS]
  aspect [PFV]
invitation <- main $ do
  force [DIR]
  aspect [PFV]
forM_ [claim, plan, invitation] $ \parent -> do
  relative parent description
  complement parent description
  adverbial parent $ do
    force [ASR]
    aspect [PRF, HAB]
    optional modal
```

#patterns("website")

A website page describes an offering to someone deciding whether to use it.

- *Claims are `ASR·HAB` with no phase*, because a visitor reads the page at no particular release.
- *Plans are `CMS`*, so that what exists and what is planned stay apart.
- *Calls to action are `DIR·PFV`.*
- *Evidence is allowed on claims*, so that an absolute or comparative claim can name its basis.

#entry[Continuous Disambiguation will read, annotate and clarify English prose.]

#readings(
  ("[CMS·PFV]", [a plan the authors commit to.]),
  ("[ASR·HAB]", [what it does, in the future tense.]),
)

#rewrites(
  ("[CMS·PFV]", [We will make Continuous Disambiguation read, annotate and clarify English prose.]),
)

#entry[What we do]

The primary button reads as a section heading or as a question, and neither gives the visitor anything to do.

#readings(
  ("[ASR·HAB]", [a heading.]),
  ("[IRG·HAB]", [a question.]),
)

#rewrites(
  ("[DIR·PFV]", [See our work]),
)

#source[Website kind. The second bad side is a button on openfp.net.]