Return to the constellation

Project case study · Language design · executable relationships

RP-Lang

What if relationships were the starting point of a program? A small experimental language makes entities, interactions, and the rules that change them explicit.

Interactive companionTry an idea ↙
entityclockstep 0
+1
→
entitycounter0
relation increment dynamics clock -> counter {
  state_key: "value"
  delta: 1
}

One relation changes the counter. Change the increment, then advance the world.

The question

Can a program explain the relationships it depends on?

Most programs describe a sequence of instructions. RP-Lang explores another entry point: declare the things in a world, connect them through typed relations, and let an evaluator apply those relations over time.

The project pairs a compact text format with a reference implementation. The ambition is broad; the useful starting point is deliberately concrete—a counter, a changing world, and a trace that shows what happened.

The system

What holds it together

01

Name the entities

Entities hold identity and state. A clock and a counter can exist independently of the relation between them.

02

Give relations a job

Six primitives describe ontology, dynamics, geometry, constraints, knowledge, and changes to relations themselves.

03

Make execution inspectable

Source-positioned diagnostics, deterministic snapshots, and optional traces expose the world and its changes.

04

Keep the rendering separate

Headless render commands can be inspected before a Tkinter adapter draws them.

How it moves

Declare → connect → evaluate

The reference workflow moves from readable source to an explicit world state.

  1. Write

    Describe a small world

    Declare entities, initial fields, and a typed relation in a UTF-8 .rp file.

  2. Check

    Catch mistakes at the source

    Validate syntax, duplicate identifiers, field types, and entity references.

  3. Run

    Advance a known number of steps

    The evaluator applies relational handlers and produces a JSON snapshot.

  4. Inspect

    Follow the consequences

    Traces record evaluation order and handler outcomes, including failure context.

6Relational primitives

Different kinds of connection

.rpReadable source

A standalone textual DSL

JSONWorld snapshots

State that can be compared

The throughline

Language as a way of seeing

This is connected to the constructed-language work by a shared question: what does a notation make easy to notice? A fantasy script gives a culture a visual logic. A programming language gives a system a conceptual logic.

RP-Lang remains a research language, with a small reference runtime. Its value here is the ability to examine that design choice in a working form.

Nearby in the constellation

Connected threads