Skip to main content

Module naming

Module naming 

Source
Expand description

What a new document is called, and where it is born.

A launch with no path, and File ▸ New, both create a container rather than a session that persists nothing, so append-on-commit holds from the first edit. The name is three hyphenated words, the docker convention: a generated name the user can say out loud, and one they can replace with their own the moment they want to.

Where documents are born is a directory of the platform’s, so this is the one place a container is made out of a path. A browser names no such directory and is told so (Documents::Nowhere) rather than compiled apart from the rest of the store.

Enums§

BirthFailure
Why a document could not be born. Every arm leaves the session usable — the editor opens on a scratch document — and is something the user is told, rather than a crash on the way up.
Documents
Where new documents are born.

Constants§

ADJECTIVES 🔒
Words rather than the petname crate, whose lists are exactly this: it depends on rand 0.10, a second major beside the one the tests already pull, and this is data rather than functionality — a list cannot drift from an upstream implementation the way a reimplemented algorithm can. Keeping it in the tree is also what keeps the vocabulary friendly and the combinations unembarrassing.
CREATURES 🔒
NOUNS 🔒
TRIES
How many names a birth tries before the place they go is declared full. Three words draw from a space six figures wide, so reaching this means something other than luck is wrong.

Functions§

candidates
The names a new document is offered, in the order they are drawn and bounded as the retry is.
entropy
The app’s own draw, for the three-word name a new diagram is born under.
name
Three words, hyphenated: happy-sunshine-fox. One draw per word, so the generator is pure and a test says which name comes out.