Skip to content

play: a terminal for the seven t27 backends, one share page each, and a post - #1366

Merged
gHashTag merged 3 commits into
mainfrom
feat/play-terminal
Oct 4, 2026
Merged

gHashTag merged 3 commits into
mainfrom
feat/play-terminal

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Built on #1359 (merged 2026-10-04 as 8d027f3; rebased onto main after it). Closes #1365.

The X player's spec editor gains a terminal for t27's seven backends: t27c gen zig|c|rust|verilog|verilog-hir|js|ts (and the gen-<backend> spelling), one share page per backend at play/hello-world/<backend>/, a recording and a bilingual post.

Every word is in the spec. specs/x/player.t27 holds the twelve commands, the backend table, RUNS_IN_BROWSER = ["js"], NATIVE_TOOLS, and every message the terminal prints. public/play/shell.js is a generic interpreter of those constants: change the spec, regenerate, and the terminal changes.

Honest limits.

Trap fixed: .gitignore had zig/ repo-wide, which silently dropped the zig page. It is now negated for apps/website/public/play/*/zig/.

Recording: https://t27.ai/term/play-terminal-gates/ (after deploy).
Post: a-terminal-for-seven-backends-in-an-x-post (EN + RU). The og cover is built by ghio after merge.

Nothing posted on X. The owner asked for this merge on 2026-10-04.

{
  "version": 1,
  "head_sha": "149793b387523a4f5d26c85ef64a36a66564782d",
  "summary": "The X player's spec editor gains a terminal that knows t27's seven backends. Every word, command and backend fact lives in specs/x/player.t27; shell.js only interprets those constants. One share page per backend, a recording and a bilingual post.",
  "changes": [
    "specs/x/player.t27 holds the terminal: 12 SHELL_COMMANDS, the backend table, RUNS_IN_BROWSER [js], NATIVE_TOOLS, every message the terminal prints, and the demo line typed at 45 ms per character.",
    "public/play/shell.js (new) is a generic interpreter of those constants: it fills templates, dispatches the twelve commands and imports the generated JS module to list its exports.",
    "scripts/play-from-spec.mjs writes play/hello-world/<backend>/ for zig, c, rust, verilog, verilog-hir, js and ts, each page with its own og card and the backend preselected.",
    ".gitignore ignored zig/ everywhere, which silently dropped the zig share page; a negation keeps apps/website/public/play/*/zig/.",
    "Recording t27.ai/term/play-terminal-gates/ shows check:play and test:play-spec on this branch; the gallery index is rebuilt by termgif publish.",
    "Blog post a-terminal-for-seven-backends-in-an-x-post in English and Russian, with the native compile table measured on hello_world as committed."
  ],
  "tests": [
    {
      "command": "npm --prefix apps/website run check:play",
      "result": "spec tests 14, asserts 43, all hold; generated pages match the spec",
      "status": "passed",
      "evidence": "Run locally on this branch before the commit; the same output is in the recording term/play-terminal-gates."
    },
    {
      "command": "npm --prefix apps/website run test:play-spec",
      "result": "21 tests, 21 pass, 0 fail, 33891 ms",
      "status": "passed",
      "evidence": "node --test output, local run on this branch; recorded in term/play-terminal-gates/session.cast."
    },
    {
      "command": "npm --prefix apps/website run typecheck:ratchet",
      "result": "179 errors across 26 files, equal to the baseline, no new errors",
      "status": "passed",
      "evidence": "Local run after the blog files were added."
    },
    {
      "command": "Browser check of the post at /#/blog/a-terminal-for-seven-backends-in-an-x-post in EN and RU",
      "result": "Both languages render, two 8-row tables, the cast player loads; only the og cover 404s until ghio builds it",
      "status": "passed",
      "evidence": "Vite dev server on localhost, page text and network requests read in the browser pane."
    },
    {
      "command": "zig test, cc, rustc, iverilog, node, tsc on hello_world output of all seven backends",
      "result": "node and tsc exit 0; zig, cc, rustc and iverilog fail on the undeclared cast call; HIR has a syntax error",
      "status": "failed",
      "evidence": "Measured natively for the post; filed as t27#6100 (cast) and t27#5966 item 3 (HIR). Not caused by this PR."
    }
  ],
  "limitations": [
    "Only the JavaScript backend runs in the browser. For the other six the terminal prints the native command to run; it does not pretend to compile or execute them.",
    "The page's evaluator treats cast as identity, so the browser reports hello_world 4 pass while five native toolchains reject the same file (t27#6100).",
    "gen-js emits declarations only, by design (t27#4471), so the logic of the terminal is JavaScript that interprets the spec; opt-in function bodies are t27#6101.",
    "Built on trinity#1359 (the editor typing fix), merged 2026-10-04 as 8d027f39a; this branch was rebased onto main after it, so the diff is only the terminal.",
    "Nothing has been posted on X. X's policy on data entry inside an embedded player is a risk the post names before anything goes out."
  ],
  "tags": [
    "t27",
    "Compiler",
    "Terminal",
    "XPlayer"
  ],
  "blog": {
    "title": "A terminal for t27's seven backends, inside an X post",
    "summary": "The X player's spec editor now has a terminal: t27c gen for zig, c, rust, verilog, verilog-hir, js and ts, one share page per backend, and only the JS module actually runs in the browser.",
    "outline": [
      "The terminal is defined in specs/x/player.t27: its twelve commands, the seven backends, every message and the demo line live there, and shell.js only interprets them.",
      "Each backend has its own share page under play/hello-world with an og card, so a post on X can open the terminal already pointed at Zig, C, Rust, Verilog, HIR, JS or TS.",
      "Only the JavaScript module runs in the page; for the other six backends the terminal prints the exact native command a reader would run on their own machine.",
      "Running those six commands natively on hello_world showed that five toolchains reject an undeclared cast call that the browser evaluator accepts as identity, filed as t27#6100.",
      "The logic stays JavaScript because gen-js emits declarations only by design; the issue t27#6101 asks for opt-in lowering of function bodies so the shell could be generated.",
      "A repository-wide zig/ ignore rule silently dropped the Zig share page from git, which a negation for the public play directories now prevents from happening again."
    ],
    "cast": "term/play-terminal-gates/session.cast"
  }
}

🤖 Generated with Claude Code

@github-actions github-actions Bot added the status:in-progress 🔵 Agent working label Oct 4, 2026
gHashTag and others added 3 commits October 4, 2026 22:53
… a post

The X player's spec editor gains a terminal. Every word it prints, every
command it knows and every backend fact lives in specs/x/player.t27;
public/play/shell.js only interprets those constants.

- 12 commands; `t27c gen <backend>` for zig, c, rust, verilog,
  verilog-hir, js, ts, with the `gen-<backend>` spelling as an alias.
- `run` executes only the JS module in the browser (RUNS_IN_BROWSER);
  the other six print the native command to run instead of pretending.
- One share page per backend under play/hello-world/<backend>/ with its
  own card, generated by scripts/play-from-spec.mjs from the spec.
- .gitignore: `zig/` was ignored repo-wide, which silently dropped the
  zig page; negated for public/play/*/zig/.
- Recording t27.ai/term/play-terminal-gates/ (check:play and
  test:play-spec, 21 pass, 0 fail) and the bilingual post
  a-terminal-for-seven-backends-in-an-x-post.

Gates: check:play (spec tests 14, asserts 43, all hold),
test:play-spec (21 pass, 0 fail), typecheck ratchet at baseline.

Closes #1365

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #1365

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…issue it closes

Closes #1365

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag changed the base branch from fix/play-editor-typing-visible to main October 4, 2026 15:54
@gHashTag
gHashTag force-pushed the feat/play-terminal branch from 59040c6 to 149793b Compare October 4, 2026 15:54
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

X Brain Health Check

Score: 100.0/100
Status: 🟢 HEALTHY
Threshold: 80/100

X Brain is above merge threshold

@gHashTag
gHashTag enabled auto-merge (squash) October 4, 2026 16:10
@gHashTag
gHashTag merged commit f9065e8 into main Oct 4, 2026
23 checks passed
@github-actions github-actions Bot added status:completed Done and removed status:in-progress 🔵 Agent working labels Oct 4, 2026
github-actions Bot added a commit that referenced this pull request Oct 4, 2026
play: a terminal for the seven t27 backends, one share page each, and a post (#1366)

* play: a terminal for the seven t27 backends, one share page each, and a post

The X player's spec editor gains a terminal. Every word it prints, every
command it knows and every backend fact lives in specs/x/player.t27;
public/play/shell.js only interprets those constants.

- 12 commands; `t27c gen <backend>` for zig, c, rust, verilog,
  verilog-hir, js, ts, with the `gen-<backend>` spelling as an alias.
- `run` executes only the JS module in the browser (RUNS_IN_BROWSER);
  the other six print the native command to run instead of pretending.
- One share page per backend under play/hello-world/<backend>/ with its
  own card, generated by scripts/play-from-spec.mjs from the spec.
- .gitignore: `zig/` was ignored repo-wide, which silently dropped the
  zig page; negated for public/play/*/zig/.
- Recording t27.ai/term/play-terminal-gates/ (check:play and
  test:play-spec, 21 pass, 0 fail) and the bilingual post
  a-terminal-for-seven-backends-in-an-x-post.

Gates: check:play (spec tests 14, asserts 43, all hold),
test:play-spec (21 pass, 0 fail), typecheck ratchet at baseline.

Closes #1365

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* blog: the terminal post names its own PR, trinity#1366

Closes #1365

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* blog: the terminal post's receipts say #1359 merged and #1365 is the issue it closes

Closes #1365

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🧪 Brain Stress Test Results

Tests: 261/261 passed, 0 leaked
Status: 🟢 PASS
Gate: every test in zig build test-brain-stress passes and none leaks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

X player: a terminal for every t27 backend, one share page per backend

1 participant