DelveTalkcome in

Inspecting kind/door · the kinds · the language · the modules

{name}

Go there its page the town

id
kind/door
called
{name}
kind chain
kind/door → record
owner
the town
made by
the town
version
4
pin
jivuk-zafof
state
3692 bytes

Its spells

  • makedelvetalk kind/door make / name: <text, 1 to 64 characters>
    its Bend

To cast them, come in.

Who may do what

What its law admits now, before the spell's own Bend has its say.

methoda newcomer
make✓ yes
place✓ yes
makeUnder✓ yes
repair✓ yes
publishPage✓ yes

Its law

  • host opener the hand that opened the world may amend any lawrequest.kind == 2 and request.subject == "the town"
  • law owner the owner stays; only the owner changes the form, the law, the head, the voice, what it is or the body; anyone makes, and places rules, wants and verbs on it(unchanged(owner)) and ((request.subject == new.owner) or ((((((((request.kind == 0) or (request.kind == 4)) and (unchanged(form))) and (unchanged(law))) and (unchanged(head))) and (unchanged(voice))) and (unchanged(about))) and (unchanged(body))))
  • law kind kinds's law holdsunder "kinds"

Its Bend

what it runs: its entry module 16 lines
layer over ./Kind.obend
edition ObjectiveBend 1
import ./Abi.obend as Abi
import ./List.obend as Lists
import ./Form.obend as Form
import ./Rows.obend as Rows
type State = Super.State
form make:
  name: text 1..64
def make(state: State, input: MakeInput, context: Abi.Context) -> Activity<Super.Done>:
  Super.making(state, Lists.List.cons({head: {name: "name", value: input.name}, tail: Lists.List.nil()}), "", context)
form place:
  name: text 1..64
  id: text 1..64
def place(state: State, input: PlaceInput, context: Abi.Context) -> Activity<Super.Done>:
  Super.making(state, Lists.List.cons({head: {name: "name", value: input.name}, tail: Lists.List.cons({head: {name: "id", value: input.id}, tail: Lists.List.nil()})}), "", context)
the body this kind lays on what it makes 55 lines

Each thing of this kind runs this layer over what the kind is of.

set it in type, all 55 lines

Amend it in the workshop

Its Bend is checked and amended by the workshop's own spell, with the Bend in its block. To send it, come in; the box is here then.

Its fields

owner
the town
ownerHandle
the town
name
door
of
record
form
name: text 1..64
law
want shut "a door nobody has opened": not ("open" in new.marks.name) asks delvetalk {request.object} knock
head
{name}
voice
a knock and what answers it; where each comes from, and a door left open
about
opens at its first knock
body
layer over ./Record.obend (3317 characters)
layer over ./Record.obend
edition ObjectiveBend 1
import ./Abi.obend as Abi
import ./List.obend as Lists
import ./Document.obend as Document
import ./Form.obend as Form
import ./Plan.obend as Plans
import ./World.obend as World
import ./Card.obend as Card
import ./Scenes.obend as Scenes
import ./Relation.obend as Relations
import ./Rows.obend as Rows
import ./Text.obend as Text
# The door's body, over RECORD (docs/METAPHYSICS.md §7.5; SEEDING §4, the flood's sluice): a
# record whose knocks are its lines, each with who knocked, and whose one mark is `open`, made by
# the first knock: anyone's, or a thing's call (a cistern's rule when it passes its mark), so the
# card says who opened it. A door opens once; knocks go on. A lantern made by it places its rule here.
type State = Super.State
form knock:
form write:
  text: text 1..280
form lines:
  from: natural 0..1000000000
form door:
  label: text 1..32
  to: text 1..128
form undoor:
  label: text 1..32
def knock(state: State, context: Abi.Context) -> Activity<Bool>:
  let written(_) = write {lines: insert {author: knocker(context), handle: if context.caller == "" then context.handle else "", verb: "knock", text: if Super.marked(state, "open") then "knocked" else "knocked, and it opened", at: context.height, n: state.next}, next: add 1n}
  if Super.marked(state, "open") then false else Super.markWritten({name: "open", who: knocker(context), handle: if context.caller == "" then context.handle else "", at: context.height})
# Who knocked: the object whose call it was, else the principal.
def knocker(context: Abi.Context) -> String:
  if context.caller == "" then context.principal else context.caller
def write(state: State, input: WriteInput, context: Abi.Context) -> Activity<Nat>:
  Super.write(state, {text: input.text}, context)
def lines(state: State, input: LinesInput, context: Abi.Context) -> Activity<Card.Replied>:
  Super.lines(state, {from: input.from}, context)
def door(state: State, input: DoorInput, context: Abi.Context) -> Activity<Card.Replied>:
  Super.door(state, {label: input.label, to: input.to}, context)
def undoor(state: State, input: UndoorInput, context: Abi.Context) -> Activity<Card.Replied>:
  Super.undoor(state, {label: input.label}, context)
def actions(state: State, context: Abi.Context) -> Lists.List<String>:
  if context.principal == state.owner then Text.words("knock lines door undoor") else Text.words("knock lines")
def openedBy(state: State, context: Abi.Context) -> String:
  match Relations.lookup(state.marks, {name: "open"}):
    case some(m): "open, opened by {Card.shown(m.value.who, m.value.handle, context)}"
    case none(_): "shut"
def entry(state: State, context: Abi.Context, line: Rows.Line) -> Document.Document:
  Document.text("{Card.shown(line.author, line.handle, context)}{Card.mine(line.author, context)} {line.text}\n")
def headLine(state: State, context: Abi.Context, id: String) -> Document.Document:
  let name = if state.head == "" then "A DOOR" else state.head
  Document.text("{name}, {openedBy(state, context)}. Knock:\n  delvetalk {id} knock\n» your knock on it; the first opens it and marks it open (a rule reads \"open\" in new.marks.name)\n{knocksHead(state)}")
def knocksHead(state: State) -> String:
  if Relations.count(state.lines) == 0n then "" else "Knocks:\n"
made
empty
count
0