unimsg provisional

What exists to work with it

What exists around the format: the implementations you can read or take, the two editors that understand a document, five applets you can run here, the highlighting, and the sites that are not this one. Nothing here is a product and none of it is sold; the list is short and every entry says how finished it is.

An entry names something that is in this project and that a reader could use today. A plan is not an entry. Where a thing is packaged, the page states the digest the project publishes for it, because a binary named on a website with no digest beside it is an invitation and not an offer.

The implementations

The fleet, as a roster: what exists and what each one is written in. Every one of them was written from the specification alone by a different author who could not see the others, which is the argument the bootstrapping page makes at length and this page only points at.

11 maintained implementations, no two of them in the same language, and 3 more kept in the archive. Every number about them — what each scores, on what, and when it was last measured — is on the bootstrapping page, read from the same document this roster is.

written inin the project
Goimplementations/go
JavaScriptimplementations/js
C99, for microcontrollersimplementations/esp32
C++20implementations/cpp
Rustimplementations/rust
Dartimplementations/dart
Kotlinimplementations/kotlin
C#implementations/dotnet
Pythonimplementations/python
Swiftimplementations/swift
Juliaimplementations/julia

A DELIBERATE PROPERTY AND NOT AN ACCIDENT. A second implementation in a language already covered is a second reading of the same standard library and the same habits; a new language is a new set of things the specification can be silently wrong about. Every one of these found something, and the C++ one found a question no earlier author could have asked, because C++ is the first of them whose standard library has no Unicode categories.

Three implementations are archived rather than deleted, and they are on the bootstrapping page with their scores. A superseded implementation that still fails documents is evidence about what is hard, and deleting it would be deleting the evidence.

The editors

Two editors can open a .umsg file and show it as a document rather than as text. Both of them do it by handing the buffer to an implementation in this project, so what they show is what a conformant reader sees — and when they cannot parse, they say where and recover as soon as it parses again, rather than showing a stale rendering of something that no longer exists.

Visual Studio Code

tools/vscode

Two views of one file. STRUCTURE is the normal editable text editor with unimsg highlighting, comments, bracket matching, indentation and folding. DOCUMENT is a live read-only rendering — contents outline, section cards, prose, fields, value styling and responsive tables — which reads the unsaved buffer and refreshes as you type.

Structure stays the default, so installing it never replaces the normal editor unexpectedly.

VS Code 1.75 or newer. Node.js is needed only to build, bundle and test it, never to use it.

Version 0.2.0. Packaged as unimsg-language-0.2.0.vsix, sha256:6740bb06c81f516f8ae1bad4b417952e2be91ed911ffbd3ddfb9cdd0ca556b65, in tools/vscode/dist.

Notepad++

tools/notepadpp

A native docked pane that turns the active buffer into a readable preview: a contents outline, a centred reading surface with document spacing and section dividers, uniform sequences of maps as measured aligned tables, maps of comparable numbers as small bar summaries, and a recursive field view for anything that earns no special treatment. It follows Notepad++'s own light and dark mode.

Notepad++, with the plugin architecture matching the installation. A Visual Studio developer shell and CMake 3.20 or newer to build another architecture.

Packaged as UniMSGViewer.dll, sha256:fe4c266f57f0d3385b5b885e62c979f6fcbf44495616491991ecfd91d8ab32e3, in tools/notepadpp/dist/x64.

THE RULE BOTH OF THEM FOLLOW, and it is the one that makes a generic reader worth having. Neither renderer has a table of key names it recognises. A one-entry map envelope becomes the title, authored order becomes the page order, a uniform sequence of maps becomes a table — every rule is about the SHAPE of the value. A renderer that special-cased title would be a viewer for the documents its author happened to have.

The applets

Five interactive applets. One host page opens one applet document, and after that fetch nothing else is requested: no server, no relay, no store.

A protocol for portable interactive documents. An applet is a WebAssembly module exporting three functions: a fresh state, a transition on an event, and a projection. The host executes it and owns every effect; the module computes and reaches nothing.

Everything crossing that boundary is unimsg in canonical CBOR, both directions. Same bytes on every host, every number exact.

render returns a DOCUMENT the host builds an interface from, not a picture of one. Three kinds: an interface, a drawing, and an interface with a document in it — one applet below for each. A host reading an interface document builds native controls with real focus and a real accessibility tree, because the document says what things are rather than where to paint them.

An applet is one unimsg document. The manifest carries the identity, the version, the modes a host may open it in, the intents it accepts with their defaults, and the WebAssembly module's bytes inline beside the sha256 that pins them. No second artefact, no path to resolve, no fetch.

The hash is verified whatever the bytes came from, including from the same file as the hash: a file whose two halves disagree is a broken artefact, and trusting one half because you trust the other leaves no way to notice.

One host, and it is none of the applets. Every button opens the same page — the open path, the ABI, the drawing projector, the interface builder and a unimsg codec, as ordinary files — and hands it a different applet document to fetch. The host knows nothing about which applet it is opening.

Before instantiating: the manifest's required keys, the sha256 of the module against the manifest, the mode, and the capability grant — by the same code savage's build runs against every applet.

The digest check uses the browser's own crypto, so it needs a secure context. Over plain http to anything but localhost the applet is refused rather than run unverified.

Nothing in the host is inline — one stylesheet, one module, every import a file beside it — so it serves under script-src 'self' 'wasm-unsafe-eval' with no hash, no nonce and no data:.

'wasm-unsafe-eval' is not optional: compiling a WebAssembly module counts as evaluating code, so script-src 'self' alone blocks every savage host in every browser, and the console error says eval and never says wasm. The keyword is narrow — it permits WebAssembly and not eval.

Capabilities are granted by the site, in the markup, defaulting to none. Nothing here is granted anything.

No transport, no identity system, no relay, no storage — a host supplies all four. An identity is an opaque value the host attributes an event to; the protocol compares two for equality and asks nothing else.

Elsewhere this site shows a document beside its bytes. Here a document is being decoded, stepped and projected in the browser by a program in another language, written for another project, and what is on screen is what came back.

Two carry documents from this project and neither restates what it carries. The chess module contains no chess: it interprets a ruleset document and draws through a board-presentation document, both checked here by tools that are not the applet. The prose applet renders a rich document it did not write, carried whole as canonical CBOR.

checklist

Returns an interface, as a @vocab/ui/v0 document. The applet is savage/applets/checklist.savage.umsg.

THE ONE THAT IS AN INTERFACE RATHER THAN A DRAWING, and the first applet built against the protocol for exactly that reason. A titled list of items, added, renamed, ticked and removed — and what comes back from the module is an interface document, so the host builds real controls with real focus and a real accessibility tree. There is nothing drawn anywhere in it.

chess

Returns a drawing, as a @vocab/graphic/v0 document. The applet is savage/applets/chess.savage.umsg.

THE MODULE CONTAINS NO CHESS. It interprets a ruleset document and draws through a board-presentation document, and both of those are documents in this project that other tools already check. The applet is the interpreter; the game is the data it was handed. That is the point of it rather than a detail.

It carries examples/chess-ruleset.umsg raw, examples/chess-board.umsg raw, unchanged.

dots and boxes

Returns a drawing, as a @vocab/graphic/v0 document. The applet is savage/applets/dotsboxes.savage.umsg.

A board is a drawing and not a stack of controls: there is nothing here to announce and nothing to focus, and a coordinate is the honest input. So this applet returns a drawing where the checklist returns an interface, and its events carry points where the checklist's carry intents. The two together are the protocol's whole answer to what a surface is.

hexa

Returns a drawing driven by a clock, as a @vocab/graphic/v0 document. The applet is savage/applets/hexa.savage.umsg.

THE FIRST ONE WHOSE WORLD MOVES WHILE NOBODY IS TOUCHING IT. Every other applet is a function of what a person did; this one is a function of that and of how much time has passed since, which is the tier the protocol had left out because nothing had been built against it. Two players run over a hex field laying a beam behind them, and coming home turns everything the beam shut in into territory.

IT IS ALSO THE FIRST CONSUMER OF THE TYPED ARRAYS ON THE FINDINGS PAGE, and the only place on this site where that saving is the difference between a thing running and not. Nine hundred cells as one primitive each is 178 kB of canonical CBOR and about a hundred milliseconds to decode — for a picture that has to arrive sixty times a second. The same cells as five paths on the typed arrays the graphic vocabulary adopted is 49 kB and about two milliseconds. Measured in a browser through the same renderer: 8.8 frames a second against 60.

prose

Returns an interface with a rich document inside it, as a @vocab/ui/v0 document. The applet is savage/applets/prose.savage.umsg.

THE THIRD KIND OF SURFACE. The applet renders a rich document through controls that reorder it — and the document is not the applet's. It is one of this project's own examples, carried whole as canonical CBOR, the same way the chess applet carries a ruleset it did not write. Nothing in the applet restates it and nothing in the applet can disagree with it.

It carries examples/document-prose-profile.umsg raw, unchanged.

The host verifies each module against the sha256 in its own manifest before instantiating. This page states no digest of its own, so there is no second copy to go stale.

The vocabularies other projects write in

A vocabulary says what a document's fields mean, so a reader and a tool agree about a document neither wrote. This is not every vocabulary the project has — it is the ones something outside it writes in or reads.

projectisand is not
marasima spartan vector annotator for screenshots — draw a box round the thing that is wrong, put an arrow on it, write four words beside itnot an export format. A @vocab/graphic/v0 document is the model the editor holds while you drag: no internal scene graph, and nothing translated on save
savagethe applet protocol above — what an applet returns from render is one of these documentsnot a renderer of them. It produces them and hands them to whatever host is running
ribosomea generic presentation surface that knows what no document means, and renders them anywaynot a consumer of any one of them. It is on this list because its corpus is written in them
vocabularywhat it encodeswritten byhow
@vocab/graphic/v0artwork stored exactly, with nothing required to mean anythingmarasim, savage, ribosomethe most used of them by a distance. marasim holds one as its live editing model; three savage applets return one from render; ribosome draws them
@vocab/ui/v0one user interface, described so precisely that a generator can build itsavage, marasim, ribosometwo savage applets return one, and a host builds real controls from it with real focus and a real accessibility tree rather than painting a picture of them
@vocab/rich-document/v0one formatted document — its structure, its type, its fonts, its tables, its navigation and its fields — stored so the formatting is a fact rather than a renderingsavage, ribosomethe savage prose applet renders one inside an interface, in the prose authoring profile — the measurement layer refused, for a document whose author has no opinion about type
@vocab/language/v0a whole grammar, with the categories declared rather than assumedribosomeas a corpus rather than as an output: three grammars from this project — Old Babylonian Akkadian, Standard Mandarin and Modern Standard Arabic — are what that renderer is exercised against
@vocab/diagram/v0one diagram, stored exactly, with the proposition it makes attached to the marks that make itribosome, marasimthe same drawing kernel as the artwork one, with a semantic layer over it. Both consumers render diagrams they did not author, which is the case the vocabulary was written for
@vocab/ruleset/v0the rules of a game, written so a machine can play them and carrying the positions that prove itsavagethe chess applet interprets a ruleset document rather than containing the rules. The module has no chess in it
@vocab/board-presentation/v0the binding between a ruleset's squares and a picture, read in both directionssavageand draws through the binding beside it, which is what lets the same module play a game it was not written for
@vocab/design/v0an argument, with a spine a reader can trustmarasimits own design documents are written against this project's shape for an argument, in another repository, with no coordination
@vocab/documentation/v0a title, an introduction, and ordered sectionsmarasimits README is generated from a document, the same way this project's is. The pattern travelled before anybody wrote it down
@vocab/provenance/v0what was vendored, from where, and what it hashes tomarasimit vendors one dependency and records it in this shape. The smallest vocabulary on the list and the one that travelled with least persuasion

@vocab/spatial/v0, @vocab/measurement/v0, @vocab/git-repository/v0 and @vocab/encyclopaedia/v0 have consumers in this project and none outside it, so they are absent here and on the findings page instead.

Every vocabulary the project has, including those nothing outside it writes in yet: vocab/vocabularies.umsg raw

Highlighting

Four things colour unimsg in this project, and three of them are real implementations being asked what the tokens are rather than patterns that approximate the answer.

in the projectcoloursby reading it with
tools/siteevery coloured fragment on this siteits own reading of the grammar, in Go
site/assets/unimsg/lexer.jsthe playground and the document viewer, in the reader's browserthe JavaScript implementation's lexer, shipped unmodified
tools/vscode/syntaxes/unimsg.tmLanguage.jsonthe editable Structure view in VS Codea TextMate grammar — patterns, because that is the only thing the interface accepts
tools/notepadppthe Notepad++ preview panethe C++20 implementation's parser, called directly

So the highlighting follows whichever theme the reader already chose. An extension that ships a palette is an extension that looks wrong in every theme but the one its author uses.

Two independent readings of the same grammar colour this site: one in Go, one the JavaScript implementation's own lexer. The playground shows a document coloured by each, so if they ever disagree about what a token is, a reader can see it.

Elsewhere

A companion is linked because it exists and is about this format, not because anything on it is stable or blessed. The status travels with the link, so the sentence a reader gets is what the thing is and how finished it is, in that order.

ribosome.unimsg.net — a generic renderer and presentation layer for unimsg documents. Experimental, and a separate project from this site.