Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/interplane.io/blob/main/content/omega/write/index.html # interplane.io Source of interplane.io: a Rust generator that renders the page from the protocol repository's public record, deployed hourly from the Spark. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `interplane.io / content / omega / write / index.html` 59 lines ยท 7326 bytes Raw Blame History 1 title: Write and check Omega programs | Interplane 2 description: Set up the Omega Harness and seeded compiler, write a bounded program, and verify the result with a negative control. 3 --- 4
5 Omega · Field guide

Write it. Run it. Check it.

6

Get the Harness, learn the few rules that shape an Omega program, and use a compiler refusal to test your first working example.

7 8
Illustration of three clear glass plates etched with parallel lines, two stacked at the back and one large in front, beside a metal block with two raised blocks and a metal scribing pen.
Illustration of a program at the workbench.
9
10

What you write

11

Omega source uses .om files. Omegese is the source notation described in the language reference. Operators come first, followed by their inputs. In add mul a b c, mul consumes a and b, and add consumes that result and c. A name introduced inside a block goes out of scope at its end. Declare shared state before the block that updates it. Language reference.

12

A function spells out its argument and return types. The compiler checks the types of operations and rejects incompatible operands. Loops can carry explicit bounds, and the executable can trap if it crosses a bound at runtime. Choose a small positive case and a deliberately broken input, and record the expected outcome of each before running. Compiler checks and controls.

13

Start with the Omega Harness

14

The Harness gives people and agents a shared workflow, with language guides, compiler pins and executable examples. Get the Git checkout, then read the workflow and writing guide before editing .om. Use the encoding guide when you need a specific rule, host operation or diagnostic. Omega Harness project.

15
git clone https://interplane.io/projects/omega-harness/repo.git omega-harness

16 cd omega-harness

17 git rev-parse HEAD

18 cat PIN

19 cat skills/omega-harness/SKILL.md skills/writing-omega/SKILL.md
20
    21
  1. PinIdentify the source, target and compiler hash before writing.
  2. 22
  3. WriteUse the language guide and a nearby compiled example.
  4. 23
  5. Compile and runCapture diagnostics, exit status and output on the named target.
  6. 24
  7. Try to break itChange one input or one rule and require the expected failure.
  8. 25
  9. Hand off evidenceRetain the exact commands, results and hashes for another run.
  10. 26
The Harness workflow from source selection to reproducible evidence.
27
28 Agent prompt: Write and verify an Omega program 29
{{agents/prompts/write-omega.txt}}
30

Open plain text

31
32

Trace a small program

33

total starts as an int outside the loop. Each iteration adds the counter to it. bound 4 makes the loop limit explicit. ret total sends the result back as the process exit code.

34
fn main to int

35 total = int 0

36 for i int 4 bound 4

37 total = add total i

38 end

39 ret total

40 end
41

Save sum.om and obtain the verified compiler preview. These commands assume you extracted the preview into the same scratch directory and are running 64-bit Arm Linux. The example reports through its exit status. The expected status is 6.

42
if ./omc < sum.om > omega-sum && chmod +x omega-sum; then

43 ./omega-sum

44 printf 'exit=%s\n' "$?"

45 fi
46

For a negative control, replace the integer return value with a boolean in a separate file. The published preview refuses this program with compiler error 7, a type mismatch at line 6.

47
sed 's/ret total/ret true/' sum.om > sum-bad.om

48 ./omc < sum-bad.om > sum-bad

49 printf 'compiler exit=%s\n' "$?"
50

Choose the guide for your next task

51
52
Compiler rules and examples
In the Harness clone, read skills/omega-encoding/SKILL.md. The examples/gate.sh runner checks the compiler hash in PIN before compiling or running examples. For work in another repository, use that project's compiler pin.
53
Compiler internals and targets
Read seed/omc/omc.om and docs/one_layer/OM_COMPLETION.md in the compiler repository. The scalar OSC IR backends cover specific WebAssembly and SPIR-V subsets. Start with the target's test and refusal evidence, and check your runtime separately. Backend and smoke-test references.
54
Conversion of existing code
Omega Bridge documents accepted source subsets and refusals. Use its source and tests for a migration, and use the seeded compiler and Harness for new Omega source.
55
Focused tools
Read coder/README.md in the Harness for the optional omp workflow. Use the dedicated Harness guides for Lean 4 proofs, Wolfram calculations and authorized GB10 hardware work only when your task needs them.
56
Local agent and editor tools
Omega MCP offers local language lookup, compilation and execution over standard input and output. Its checkout documents its compiler pin and Bubblewrap requirement. See Omega for VS Code for source, syntax highlighting and optional compiler diagnostics.
57
58 59