The first syntax
At this stage we have no Loom-specific syntax at all. This chapter is the genesis of its own: it must name Loom's foundational primitives before it can be read. Loom is written in TypeScript with Effect, in pure functional style — but the syntax it defines is its own.
The very first thing that lets us materialise a Loom program is the arrow. Arrows have a simple and crucial role: they map prose to code.
// Hello! This is the beginning of the Loom language.Our very first program does nothing but show the rhythm of every Loom program. As you noticed, tildes ~ mark the transition back from code to prose, as the arrow marked the way in. A section holds any number of code and prose blocks, divided by the arrows and the tildes.
That is the whole rhythm. The primitives it rests on, gathered in one place:
- Chapters
--- - Sections
# - Prose
- Code
- Arrows
=>and~> - Tildes
~ - Sinks
[file] - Specifiers
{Lang} - Anchors
::[Name] - Warps
{{ name = value }}
The chapters that follow give each its shape — first the node every one of them is built from, then the tokens inside a line, the lines themselves, the sections they form, and the corpus above them.