turbo-editors/turbo-moonbitpublic Fork 0
main
Commits
Clone
git clone https://git.rickub.com/turbo-editors/turbo-moonbit.git
git clone ssh://git@rickub.com/turbo-editors/turbo-moonbit.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

📦 Turbo MoonBit cc1f595 · on main · k33g · 11h ago
2026-09-09-first-editor.md · 42 lines · 5.1 KBmarkdown
Blame HistoryOpen raw

Handoff — 2026-09-09 — Turbo MoonBit, first build

State

The editor is complete and green. make check passes, the quality gate passes, the documentation is written in both languages, and the binary has been driven through a pty. Nothing is in flight.

The working tree is uncommitted. Everything described here exists on disk on main, at a1558e2 (the initial commit), and has not been staged. That was deliberate — no commit was asked for.

Added after the first pass

demos/ — three MoonBit projects (hello, shapes, syntax-tour) with a README. All three moon check clean, are unchanged by moon fmt, and run; shapes has five tests. Building them is what found three things the Go suite could not: derive(Show) and the functional loop form are both deprecated (the starter snippets file used both — fixed), and typealias is not accepted at top level by this compiler although the grammar lists it as a keyword.

Opening syntax-tour/tour.mbt in a pty also found a scanner boundary the docs had described too loosely: a string nested inside an interpolation ends the outer literal. The reference and the explanation now state it exactly, a test pins it, and the demo keeps the offending line with a comment.

What was touched outside this repository

Two sibling repositories were edited, and both need their own commit:

  • turbo-coreREADME.md, docs/{en,fr}/README.md, docs/{en,fr}/how-to/test-without-publishing.md, profile/profile.go's package comment, and .memory/summary.md: all now count four editors. Its .go strings were swept for hardcoded language names and no code change was needed, which is the strongest evidence yet that the seam holds.
  • turbo-python — a real defect, found because this editor was adapted from it. Its docs claimed the Python menu answers to Alt-T; it answers to Alt-P. Alt-T is Turbo Rust's, inherited through a mechanical substitution that only looked at identifiers. Fixed in eight places across both languages, along with "all three editors" → four in its architecture explanation. That repository's .memory/ has not been updated, and should get a history entry saying so.

Next steps

  1. Commit. This repository, turbo-core and turbo-python each want one.
  2. Tag a release. release.env currently says TAG="v0.1.1", copied from turbo-python; the first tag here should be v0.1.0. 01-release.tag.sh runs make check and refuses a live replace, so it should go through as it stands.
  3. Read the two boundaries in summary.md before promising anything about diagnostics or about labels in turbo-classic.

Open questions / blockers

  • Should turbo-core send workspace/didChangeWatchedFiles? It is the fix for "moon-lsp never diagnoses a file created after it started", it would help every editor in the family, and it is a library change with its own /methodical-dev cycle. Not started.
  • Should turbo-classic give syntax.attribute its own colour? It is currently the same yellow as syntax.identifier, so a MoonBit label or attribute is invisible as such in that one theme — and Turbo Rust's #[derive] has the same problem. Also turbo-core's decision.
  • Nothing here has run on macOS or Windows. The user's machine is macOS; the binary built in this sandbox is an ELF they cannot run.

Watch out for

  • Do not use a shell cp file /tmp/x; …; cp /tmp/x file round trip to back a file up before mutating it. Doing that during mutation testing silently left three source files NUL-padded, and the symptom was unexpected NUL in input from the compiler rather than anything pointing at the backup. Mutate in-process instead: read the file into a Python string, write the mutation, write the original string back. /tmp/falsify*.py do it that way and are safe to re-run.
  • gofmt rewrites a bare run of three apostrophes in a doc comment into typographic quotes. templates.go says "three apostrophes" in words for that reason; do not helpfully replace it with the characters.
  • moon-lsp with no argument prints its usage and exits. The --stdio in ServerArgs() is load-bearing, and dropping it looks like a server that died at start-up.
  • A fixture project for the language-server tests must compile. brokenProject exists as a second fixture rather than as an extra file in the first, because a package holding an error makes every other answer from the server worthless — the completion test would then be measuring a broken build.
  • The -short flag skips every moon-lsp test. A green go test -short ./... proves nothing about the server.
  • The demos are not checked by anything automatic. They were built, run and formatted by hand. A future MoonBit release could deprecate something in them and nothing would say so — re-run moon check in each before a release, or wire it into make check if the toolchain can be assumed present.
  • docs/*/reference/languages.md is read by a test. TestEveryKeywordTheReferenceListsIsAKeyword parses the keyword row out of the English page, so reformatting that table breaks the test rather than the docs.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Handoff — 2026-09-09 — Turbo MoonBit, first build

## State

The editor is complete and green. `make check` passes, the quality gate passes, the documentation is written in both languages, and the binary has been driven through a pty. Nothing is in flight.

The working tree is **uncommitted**. Everything described here exists on disk on `main`, at `a1558e2` (the initial commit), and has not been staged. That was deliberate — no commit was asked for.

## Added after the first pass

`demos/` — three MoonBit projects (`hello`, `shapes`, `syntax-tour`) with a README. All three `moon check` clean, are unchanged by `moon fmt`, and run; `shapes` has five tests. **Building them is what found three things the Go suite could not**: `derive(Show)` and the functional `loop` form are both deprecated (the starter snippets file used both — fixed), and `typealias` is not accepted at top level by this compiler although the grammar lists it as a keyword.

Opening `syntax-tour/tour.mbt` in a pty also found a scanner boundary the docs had described too loosely: a string nested inside an interpolation ends the outer literal. The reference and the explanation now state it exactly, a test pins it, and the demo keeps the offending line with a comment.

## What was touched outside this repository

Two sibling repositories were edited, and both need their own commit:

- **turbo-core** — `README.md`, `docs/{en,fr}/README.md`, `docs/{en,fr}/how-to/test-without-publishing.md`, `profile/profile.go`'s package comment, and `.memory/summary.md`: all now count four editors. Its `.go` strings were swept for hardcoded language names and **no code change was needed**, which is the strongest evidence yet that the seam holds.
- **turbo-python** — a real defect, found because this editor was adapted from it. Its docs claimed the Python menu answers to `Alt-T`; it answers to `Alt-P`. `Alt-T` is Turbo Rust's, inherited through a mechanical substitution that only looked at identifiers. Fixed in eight places across both languages, along with "all three editors" → four in its architecture explanation. **That repository's `.memory/` has not been updated**, and should get a history entry saying so.

## Next steps

1. **Commit.** This repository, turbo-core and turbo-python each want one.
2. **Tag a release.** `release.env` currently says `TAG="v0.1.1"`, copied from turbo-python; the first tag here should be `v0.1.0`. `01-release.tag.sh` runs `make check` and refuses a live `replace`, so it should go through as it stands.
3. **Read the two boundaries in `summary.md`** before promising anything about diagnostics or about labels in `turbo-classic`.

## Open questions / blockers

- **Should turbo-core send `workspace/didChangeWatchedFiles`?** It is the fix for "moon-lsp never diagnoses a file created after it started", it would help every editor in the family, and it is a library change with its own `/methodical-dev` cycle. Not started.
- **Should `turbo-classic` give `syntax.attribute` its own colour?** It is currently the same yellow as `syntax.identifier`, so a MoonBit label or attribute is invisible as such in that one theme — and Turbo Rust's `#[derive]` has the same problem. Also turbo-core's decision.
- **Nothing here has run on macOS or Windows.** The user's machine is macOS; the binary built in this sandbox is an ELF they cannot run.

## Watch out for

- **Do not use a shell `cp file /tmp/x; …; cp /tmp/x file` round trip to back a file up before mutating it.** Doing that during mutation testing silently left three source files NUL-padded, and the symptom was `unexpected NUL in input` from the compiler rather than anything pointing at the backup. Mutate in-process instead: read the file into a Python string, write the mutation, write the original string back. `/tmp/falsify*.py` do it that way and are safe to re-run.
- **`gofmt` rewrites a bare run of three apostrophes in a doc comment into typographic quotes.** `templates.go` says "three apostrophes" in words for that reason; do not helpfully replace it with the characters.
- **`moon-lsp` with no argument prints its usage and exits.** The `--stdio` in `ServerArgs()` is load-bearing, and dropping it looks like a server that died at start-up.
- **A fixture project for the language-server tests must compile.** `brokenProject` exists as a *second* fixture rather than as an extra file in the first, because a package holding an error makes every other answer from the server worthless — the completion test would then be measuring a broken build.
- **The `-short` flag skips every moon-lsp test.** A green `go test -short ./...` proves nothing about the server.
- **The demos are not checked by anything automatic.** They were built, run and formatted by hand. A future MoonBit release could deprecate something in them and nothing would say so — re-run `moon check` in each before a release, or wire it into `make check` if the toolchain can be assumed present.
- **`docs/*/reference/languages.md` is read by a test.** `TestEveryKeywordTheReferenceListsIsAKeyword` parses the keyword row out of the English page, so reformatting that table breaks the test rather than the docs.