From 30fa90fa6eafe4d9a1225b4ecc46c91c19782df6 Mon Sep 17 00:00:00 2001 From: Sigilante Date: Thu, 12 Mar 2026 15:33:20 -0500 Subject: [PATCH 1/7] norm: add Nock 4K reference test vectors 63 test cases covering all 12 opcodes (0-11) plus auto-cons, as subject/formula/result triples in machine-legible JSON with generated Markdown reference table. Includes Python scripts to regenerate the Markdown (generate.py) and validate against a live runtime via urbit eval (validate.py). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- norm/README.md | 50 +++++ norm/REFERENCE.md | 176 ++++++++++++++++ norm/generate.py | 136 ++++++++++++ norm/tests.json | 518 ++++++++++++++++++++++++++++++++++++++++++++++ norm/validate.py | 124 +++++++++++ 5 files changed, 1004 insertions(+) create mode 100644 norm/README.md create mode 100644 norm/REFERENCE.md create mode 100644 norm/generate.py create mode 100644 norm/tests.json create mode 100644 norm/validate.py diff --git a/norm/README.md b/norm/README.md new file mode 100644 index 0000000..73ea2d8 --- /dev/null +++ b/norm/README.md @@ -0,0 +1,50 @@ +# Nock Reference Tests + +Machine-legible test vectors for validating Nock 4K runtime implementations. Each test is a triple of subject, formula, and expected result covering all twelve opcodes (0–11) and auto-cons. + +## Files + +- `tests.json` — Canonical test data. Each entry has fields: + - `opcode` — integer 0–11 or `"autocons"` + - `description` — human-readable explanation + - `subject` — Nock noun (as a string in standard notation) + - `formula` — Nock formula (as a string) + - `result` — expected product (as a string), or `null` for crash + - `hoon` — equivalent Hoon expression (optional, may be `null`) +- `REFERENCE.md` — Generated Markdown table (do not edit by hand). +- `generate.py` — Regenerates `REFERENCE.md` from `tests.json`. +- `validate.py` — Validates every test against a live Nock runtime. + +## Usage + +### Generate the reference table + +``` +python3 norm/generate.py +``` + +### Validate against a runtime + +``` +python3 norm/validate.py --urbit ~/bin/urbit --verbose +``` + +The validator runs each test as `.*(subject formula)` via `urbit eval` and compares the output. Tests with `result: null` expect the runtime to bail (crash). + +By default the script looks for `~/bin/urbit` or `urbit` on `$PATH`. + +### Crash convention + +A `null` result means the expression is undefined per the Nock 4K spec. The reduction rules have no matching pattern, so a conforming runtime must crash (not produce a value). Common examples: + +- `*[a 0 0]` — axis 0 is undefined +- `+[a b]` — increment of a cell +- `*[a 6 b c d]` where `*[a b]` is not 0 or 1 + +### Noun printing + +Results use right-associative flattening: `[a [b c]]` is printed as `[a b c]`. This matches Urbit's canonical noun printer. + +## Spec + +These tests target [Nock 4K](https://nock.is/content/specification/index.html). diff --git a/norm/REFERENCE.md b/norm/REFERENCE.md new file mode 100644 index 0000000..b1c23ef --- /dev/null +++ b/norm/REFERENCE.md @@ -0,0 +1,176 @@ +# Nock Reference Tests + +*Auto-generated from `tests.json` — do not edit by hand.* + +Each row is a triple of **subject**, **formula**, and expected **result**. A result of **crash** means the expression is undefined per the Nock spec and a conforming runtime must not produce a value. + +## Contents + +- [Auto-cons (distribution)](#auto-cons-distribution) +- [Nock 0 — Slot (tree addressing)](#nock-0-slot-tree-addressing) +- [Nock 1 — Constant](#nock-1-constant) +- [Nock 2 — Evaluate](#nock-2-evaluate) +- [Nock 3 — Cell test](#nock-3-cell-test) +- [Nock 4 — Increment](#nock-4-increment) +- [Nock 5 — Equality](#nock-5-equality) +- [Nock 6 — If-then-else](#nock-6-if-then-else) +- [Nock 7 — Compose](#nock-7-compose) +- [Nock 8 — Push](#nock-8-push) +- [Nock 9 — Invoke](#nock-9-invoke) +- [Nock 10 — Edit](#nock-10-edit) +- [Nock 11 — Hint](#nock-11-hint) + +## Auto-cons (distribution) + +Spec: `*[a [b c] d]` → `[*[a b c] *[a d]]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | distribution over a cell of formulas | `42` | `[[4 0 1] [0 1]]` | `[43 42]` | `[.+(.) .]` | +| 2 | nested distribution | `[1 2]` | `[[0 2] [0 3] [0 1]]` | `[1 2 1 2]` | `[- + .]` | + +## Nock 0 — Slot (tree addressing) + +Spec: `*[a 0 b]` → `/[b a]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | axis 1 returns the whole subject | `42` | `[0 1]` | `42` | `.` | +| 2 | axis 2 returns the head | `[1 2]` | `[0 2]` | `1` | `-` | +| 3 | axis 3 returns the tail | `[1 2]` | `[0 3]` | `2` | `+` | +| 4 | axis 4 returns the head of the head | `[[1 2] [3 4]]` | `[0 4]` | `1` | `-.-` | +| 5 | axis 5 returns the tail of the head | `[[1 2] [3 4]]` | `[0 5]` | `2` | `+.-` | +| 6 | axis 6 returns the head of the tail | `[[1 2] [3 4]]` | `[0 6]` | `3` | `-.+` | +| 7 | axis 7 returns the tail of the tail | `[[1 2] [3 4]]` | `[0 7]` | `4` | `+.+` | +| 8 | deep addressing (axis 12) | `[[[1 2] [3 4]] [[5 6] [7 8]]]` | `[0 12]` | `5` | `-.-.+` | +| 9 | deep addressing (axis 15) | `[[[1 2] [3 4]] [[5 6] [7 8]]]` | `[0 15]` | `8` | `+.+.+` | +| 10 | axis 0 crashes (undefined) | `42` | `[0 0]` | **crash** | | +| 11 | addressing into atom crashes | `[1 2]` | `[0 6]` | **crash** | | + +## Nock 1 — Constant + +Spec: `*[a 1 b]` → `b` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | constant atom | `42` | `[1 0]` | `0` | | +| 2 | constant atom, subject ignored | `42` | `[1 57]` | `57` | | +| 3 | constant cell | `0` | `[1 [1 2]]` | `[1 2]` | | +| 4 | constant deep cell | `0` | `[1 [[1 2] [3 4]]]` | `[[1 2] 3 4]` | | +| 5 | subject has no effect on result | `[[99 100] [101 102]]` | `[1 0]` | `0` | | + +## Nock 2 — Evaluate + +Spec: `*[a 2 b c]` → `*[*[a b] *[a c]]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | evaluate with computed subject and formula | `42` | `[2 [0 1] [1 [4 0 1]]]` | `43` | | +| 2 | evaluate constant subject and formula | `0` | `[2 [1 [1 2]] [1 [1 3]]]` | `3` | | +| 3 | evaluate with subject from slot | `[[4 0 1] 99]` | `[2 [0 3] [0 2]]` | `100` | | +| 4 | nested evaluate | `42` | `[2 [1 0] [1 [4 0 1]]]` | `1` | | + +## Nock 3 — Cell test + +Spec: `*[a 3 b]` → `?*[a b]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | cell test on cell yields 0 (yes) | `[1 2]` | `[3 [0 1]]` | `0` | `.?([1 2])` | +| 2 | cell test on atom yields 1 (no) | `42` | `[3 [0 1]]` | `1` | `.?(42)` | +| 3 | cell test on computed cell | `0` | `[3 [1 [1 2]]]` | `0` | | +| 4 | cell test on computed atom | `0` | `[3 [1 42]]` | `1` | | + +## Nock 4 — Increment + +Spec: `*[a 4 b]` → `+*[a b]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | increment atom | `42` | `[4 0 1]` | `43` | `.+(42)` | +| 2 | increment zero | `0` | `[4 0 1]` | `1` | `.+(0)` | +| 3 | increment computed value | `[1 2]` | `[4 0 3]` | `3` | `.+(+:[1 2])` | +| 4 | double increment via composition | `0` | `[4 4 0 1]` | `2` | `.+(.+(0))` | +| 5 | increment cell crashes | `[1 2]` | `[4 0 1]` | **crash** | | + +## Nock 5 — Equality + +Spec: `*[a 5 b c]` → `=[*[a b] *[a c]]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | equal atoms yield 0 (yes) | `42` | `[5 [0 1] [0 1]]` | `0` | `.=(42 42)` | +| 2 | unequal atoms yield 1 (no) | `42` | `[5 [0 1] [1 43]]` | `1` | `.=(42 43)` | +| 3 | equal cells yield 0 | `[[1 2] [1 2]]` | `[5 [0 2] [0 3]]` | `0` | `.=([1 2] [1 2])` | +| 4 | unequal cells yield 1 | `[[1 2] [3 4]]` | `[5 [0 2] [0 3]]` | `1` | `.=([1 2] [3 4])` | +| 5 | atom vs cell yields 1 | `[42 [1 2]]` | `[5 [0 2] [0 3]]` | `1` | `.=(42 [1 2])` | + +## Nock 6 — If-then-else + +Spec: `*[a 6 b c d]` → if `*[a b]` = 0 then `*[a c]`, if 1 then `*[a d]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | branch on 0 takes the true arm | `42` | `[6 [1 0] [1 1] [1 2]]` | `1` | `?:(& 1 2)` | +| 2 | branch on 1 takes the false arm | `42` | `[6 [1 1] [1 1] [1 2]]` | `2` | `?:(| 1 2)` | +| 3 | branch with computed test (cell test) | `[1 2]` | `[6 [3 [0 1]] [1 99] [0 2]]` | `99` | `?:(.?([1 2]) 99 -:[1 2])` | +| 4 | branch with computed test (atom case) | `42` | `[6 [3 [0 1]] [1 99] [0 1]]` | `42` | | +| 5 | non-boolean test crashes | `42` | `[6 [1 2] [1 1] [1 2]]` | **crash** | | + +## Nock 7 — Compose + +Spec: `*[a 7 b c]` → `*[*[a b] c]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | compose two increments | `42` | `[7 [4 0 1] [4 0 1]]` | `44` | `=>(42 =>(+(.) +(.) ))` | +| 2 | compose slot then increment | `[1 2]` | `[7 [0 2] [4 0 1]]` | `2` | | +| 3 | compose constant then slot | `42` | `[7 [1 [1 2]] [0 2]]` | `1` | | +| 4 | triple composition | `0` | `[7 [4 0 1] [7 [4 0 1] [4 0 1]]]` | `3` | | + +## Nock 8 — Push + +Spec: `*[a 8 b c]` → `*[[*[a b] a] c]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | push value, read it from head | `42` | `[8 [4 0 1] [0 2]]` | `43` | `=+(+(.) .)` | +| 2 | push value, read original subject from tail | `42` | `[8 [4 0 1] [0 3]]` | `42` | | +| 3 | push and compare with original | `42` | `[8 [1 0] [5 [0 2] [0 3]]]` | `1` | | +| 4 | push constant, use in formula | `[1 2]` | `[8 [1 99] [0 2]]` | `99` | | +| 5 | push and auto-cons from augmented subject | `42` | `[8 [4 0 1] [[0 2] [0 3]]]` | `[43 42]` | | + +## Nock 9 — Invoke + +Spec: `*[a 9 b c]` → `*[*[a c] 2 [0 1] 0 b]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | invoke arm in a simple core | `0` | `[9 2 [1 [[4 0 3] 42]]]` | `43` | | +| 2 | invoke identity arm | `0` | `[9 2 [1 [[0 3] 99]]]` | `99` | | +| 3 | invoke with modified payload via Nock 10 | `0` | `[9 2 [10 [3 [1 7]] [1 [[4 0 3] 42]]]]` | `8` | | +| 4 | invoke on pre-built core from subject | `[[4 0 3] 0]` | `[9 2 [0 1]]` | `1` | | + +## Nock 10 — Edit + +Spec: `*[a 10 [b c] d]` → `#[b *[a c] *[a d]]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | edit head of a cell | `[1 2]` | `[10 [2 [1 3]] [0 1]]` | `[3 2]` | | +| 2 | edit tail of a cell | `[1 2]` | `[10 [3 [1 3]] [0 1]]` | `[1 3]` | | +| 3 | edit axis 1 replaces entire noun | `[1 2]` | `[10 [1 [1 99]] [0 1]]` | `99` | | +| 4 | deep edit at axis 4 | `[[1 2] [3 4]]` | `[10 [4 [1 99]] [0 1]]` | `[[99 2] 3 4]` | | +| 5 | deep edit at axis 7 | `[[1 2] [3 4]]` | `[10 [7 [1 99]] [0 1]]` | `[[1 2] 3 99]` | | + +## Nock 11 — Hint + +Spec: `*[a 11 [b c] d]` → `*[[*[a c] *[a d]] 0 3]` +`*[a 11 b c]` → `*[a c]` + +| # | Description | Subject | Formula | Result | Hoon | +|---|-------------|---------|---------|--------|------| +| 1 | static hint is transparent | `42` | `[11 1 [4 0 1]]` | `43` | `~>(1 .+(42))` | +| 2 | static hint with different tag | `[1 2]` | `[11 37 [0 2]]` | `1` | | +| 3 | dynamic hint evaluates and discards clue | `42` | `[11 [1 [1 0]] [4 0 1]]` | `43` | | +| 4 | dynamic hint clue does not affect result | `[1 2]` | `[11 [1 [4 0 2]] [0 3]]` | `2` | | diff --git a/norm/generate.py b/norm/generate.py new file mode 100644 index 0000000..ea87fde --- /dev/null +++ b/norm/generate.py @@ -0,0 +1,136 @@ +#!/usr/bin/env python3 +"""Generate REFERENCE.md from tests.json. + +Usage: + python3 norm/generate.py +""" + +import json +import os +from collections import OrderedDict + +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +TESTS_PATH = os.path.join(SCRIPT_DIR, "tests.json") +OUTPUT_PATH = os.path.join(SCRIPT_DIR, "REFERENCE.md") + +OPCODE_NAMES = OrderedDict([ + ("autocons", "Auto-cons (distribution)"), + (0, "Nock 0 — Slot (tree addressing)"), + (1, "Nock 1 — Constant"), + (2, "Nock 2 — Evaluate"), + (3, "Nock 3 — Cell test"), + (4, "Nock 4 — Increment"), + (5, "Nock 5 — Equality"), + (6, "Nock 6 — If-then-else"), + (7, "Nock 7 — Compose"), + (8, "Nock 8 — Push"), + (9, "Nock 9 — Invoke"), + (10, "Nock 10 — Edit"), + (11, "Nock 11 — Hint"), +]) + +SPEC_LINES = { + "autocons": "`*[a [b c] d]` → `[*[a b c] *[a d]]`", + 0: "`*[a 0 b]` → `/[b a]`", + 1: "`*[a 1 b]` → `b`", + 2: "`*[a 2 b c]` → `*[*[a b] *[a c]]`", + 3: "`*[a 3 b]` → `?*[a b]`", + 4: "`*[a 4 b]` → `+*[a b]`", + 5: "`*[a 5 b c]` → `=[*[a b] *[a c]]`", + 6: "`*[a 6 b c d]` → if `*[a b]` = 0 then `*[a c]`, if 1 then `*[a d]`", + 7: "`*[a 7 b c]` → `*[*[a b] c]`", + 8: "`*[a 8 b c]` → `*[[*[a b] a] c]`", + 9: "`*[a 9 b c]` → `*[*[a c] 2 [0 1] 0 b]`", + 10: "`*[a 10 [b c] d]` → `#[b *[a c] *[a d]]`", + 11: "`*[a 11 [b c] d]` → `*[[*[a c] *[a d]] 0 3]` \n`*[a 11 b c]` → `*[a c]`", +} + + +def load_tests(): + with open(TESTS_PATH) as f: + return json.load(f) + + +def group_by_opcode(tests): + groups = OrderedDict() + for t in tests: + op = t["opcode"] + groups.setdefault(op, []).append(t) + return groups + + +def fmt_result(result): + if result is None: + return "**crash**" + return f"`{result}`" + + +def fmt_hoon(hoon): + if hoon is None: + return "" + return f"`{hoon}`" + + +def generate(): + tests = load_tests() + groups = group_by_opcode(tests) + + lines = [] + lines.append("# Nock Reference Tests") + lines.append("") + lines.append("*Auto-generated from `tests.json` — do not edit by hand.*") + lines.append("") + lines.append("Each row is a triple of **subject**, **formula**, and expected " + "**result**. A result of **crash** means the expression is " + "undefined per the Nock spec and a conforming runtime must not " + "produce a value.") + lines.append("") + + # Table of contents + lines.append("## Contents") + lines.append("") + for op in OPCODE_NAMES: + anchor = OPCODE_NAMES[op].lower().replace(" ", "-").replace("—", "").replace("(", "").replace(")", "") + anchor = anchor.replace("--", "-").strip("-") + lines.append(f"- [{OPCODE_NAMES[op]}](#{anchor})") + lines.append("") + + for op, name in OPCODE_NAMES.items(): + cases = groups.get(op, []) + lines.append(f"## {name}") + lines.append("") + if op in SPEC_LINES: + lines.append(f"Spec: {SPEC_LINES[op]}") + lines.append("") + + lines.append("| # | Description | Subject | Formula | Result | Hoon |") + lines.append("|---|-------------|---------|---------|--------|------|") + + for i, t in enumerate(cases, 1): + desc = t["description"] + # Strip the "Nock N: " or "Auto-cons: " prefix for brevity + for prefix in [f"Nock {op}: ", "Auto-cons: "]: + if desc.startswith(prefix): + desc = desc[len(prefix):] + break + row = ( + f"| {i} " + f"| {desc} " + f"| `{t['subject']}` " + f"| `{t['formula']}` " + f"| {fmt_result(t['result'])} " + f"| {fmt_hoon(t.get('hoon'))} |" + ) + lines.append(row) + + lines.append("") + + md = "\n".join(lines) + with open(OUTPUT_PATH, "w") as f: + f.write(md) + + print(f"Wrote {OUTPUT_PATH} ({len(tests)} test cases)") + + +if __name__ == "__main__": + generate() diff --git a/norm/tests.json b/norm/tests.json new file mode 100644 index 0000000..952da49 --- /dev/null +++ b/norm/tests.json @@ -0,0 +1,518 @@ +[ + { + "opcode": "autocons", + "description": "Auto-cons: distribution over a cell of formulas", + "subject": "42", + "formula": "[[4 0 1] [0 1]]", + "result": "[43 42]", + "hoon": "[.+(.) .]" + }, + { + "opcode": "autocons", + "description": "Auto-cons: nested distribution", + "subject": "[1 2]", + "formula": "[[0 2] [0 3] [0 1]]", + "result": "[1 2 1 2]", + "hoon": "[- + .]" + }, + + { + "opcode": 0, + "description": "Nock 0: axis 1 returns the whole subject", + "subject": "42", + "formula": "[0 1]", + "result": "42", + "hoon": "." + }, + { + "opcode": 0, + "description": "Nock 0: axis 2 returns the head", + "subject": "[1 2]", + "formula": "[0 2]", + "result": "1", + "hoon": "-" + }, + { + "opcode": 0, + "description": "Nock 0: axis 3 returns the tail", + "subject": "[1 2]", + "formula": "[0 3]", + "result": "2", + "hoon": "+" + }, + { + "opcode": 0, + "description": "Nock 0: axis 4 returns the head of the head", + "subject": "[[1 2] [3 4]]", + "formula": "[0 4]", + "result": "1", + "hoon": "-.-" + }, + { + "opcode": 0, + "description": "Nock 0: axis 5 returns the tail of the head", + "subject": "[[1 2] [3 4]]", + "formula": "[0 5]", + "result": "2", + "hoon": "+.-" + }, + { + "opcode": 0, + "description": "Nock 0: axis 6 returns the head of the tail", + "subject": "[[1 2] [3 4]]", + "formula": "[0 6]", + "result": "3", + "hoon": "-.+" + }, + { + "opcode": 0, + "description": "Nock 0: axis 7 returns the tail of the tail", + "subject": "[[1 2] [3 4]]", + "formula": "[0 7]", + "result": "4", + "hoon": "+.+" + }, + { + "opcode": 0, + "description": "Nock 0: deep addressing (axis 12)", + "subject": "[[[1 2] [3 4]] [[5 6] [7 8]]]", + "formula": "[0 12]", + "result": "5", + "hoon": "-.-.+" + }, + { + "opcode": 0, + "description": "Nock 0: deep addressing (axis 15)", + "subject": "[[[1 2] [3 4]] [[5 6] [7 8]]]", + "formula": "[0 15]", + "result": "8", + "hoon": "+.+.+" + }, + { + "opcode": 0, + "description": "Nock 0: axis 0 crashes (undefined)", + "subject": "42", + "formula": "[0 0]", + "result": null, + "hoon": null + }, + { + "opcode": 0, + "description": "Nock 0: addressing into atom crashes", + "subject": "[1 2]", + "formula": "[0 6]", + "result": null, + "hoon": null + }, + + { + "opcode": 1, + "description": "Nock 1: constant atom", + "subject": "42", + "formula": "[1 0]", + "result": "0", + "hoon": null + }, + { + "opcode": 1, + "description": "Nock 1: constant atom, subject ignored", + "subject": "42", + "formula": "[1 57]", + "result": "57", + "hoon": null + }, + { + "opcode": 1, + "description": "Nock 1: constant cell", + "subject": "0", + "formula": "[1 [1 2]]", + "result": "[1 2]", + "hoon": null + }, + { + "opcode": 1, + "description": "Nock 1: constant deep cell", + "subject": "0", + "formula": "[1 [[1 2] [3 4]]]", + "result": "[[1 2] 3 4]", + "hoon": null + }, + { + "opcode": 1, + "description": "Nock 1: subject has no effect on result", + "subject": "[[99 100] [101 102]]", + "formula": "[1 0]", + "result": "0", + "hoon": null + }, + + { + "opcode": 2, + "description": "Nock 2: evaluate with computed subject and formula", + "subject": "42", + "formula": "[2 [0 1] [1 [4 0 1]]]", + "result": "43", + "hoon": null + }, + { + "opcode": 2, + "description": "Nock 2: evaluate constant subject and formula", + "subject": "0", + "formula": "[2 [1 [1 2]] [1 [1 3]]]", + "result": "3", + "hoon": null + }, + { + "opcode": 2, + "description": "Nock 2: evaluate with subject from slot", + "subject": "[[4 0 1] 99]", + "formula": "[2 [0 3] [0 2]]", + "result": "100", + "hoon": null + }, + { + "opcode": 2, + "description": "Nock 2: nested evaluate", + "subject": "42", + "formula": "[2 [1 0] [1 [4 0 1]]]", + "result": "1", + "hoon": null + }, + + { + "opcode": 3, + "description": "Nock 3: cell test on cell yields 0 (yes)", + "subject": "[1 2]", + "formula": "[3 [0 1]]", + "result": "0", + "hoon": ".?([1 2])" + }, + { + "opcode": 3, + "description": "Nock 3: cell test on atom yields 1 (no)", + "subject": "42", + "formula": "[3 [0 1]]", + "result": "1", + "hoon": ".?(42)" + }, + { + "opcode": 3, + "description": "Nock 3: cell test on computed cell", + "subject": "0", + "formula": "[3 [1 [1 2]]]", + "result": "0", + "hoon": null + }, + { + "opcode": 3, + "description": "Nock 3: cell test on computed atom", + "subject": "0", + "formula": "[3 [1 42]]", + "result": "1", + "hoon": null + }, + + { + "opcode": 4, + "description": "Nock 4: increment atom", + "subject": "42", + "formula": "[4 0 1]", + "result": "43", + "hoon": ".+(42)" + }, + { + "opcode": 4, + "description": "Nock 4: increment zero", + "subject": "0", + "formula": "[4 0 1]", + "result": "1", + "hoon": ".+(0)" + }, + { + "opcode": 4, + "description": "Nock 4: increment computed value", + "subject": "[1 2]", + "formula": "[4 0 3]", + "result": "3", + "hoon": ".+(+:[1 2])" + }, + { + "opcode": 4, + "description": "Nock 4: double increment via composition", + "subject": "0", + "formula": "[4 4 0 1]", + "result": "2", + "hoon": ".+(.+(0))" + }, + { + "opcode": 4, + "description": "Nock 4: increment cell crashes", + "subject": "[1 2]", + "formula": "[4 0 1]", + "result": null, + "hoon": null + }, + + { + "opcode": 5, + "description": "Nock 5: equal atoms yield 0 (yes)", + "subject": "42", + "formula": "[5 [0 1] [0 1]]", + "result": "0", + "hoon": ".=(42 42)" + }, + { + "opcode": 5, + "description": "Nock 5: unequal atoms yield 1 (no)", + "subject": "42", + "formula": "[5 [0 1] [1 43]]", + "result": "1", + "hoon": ".=(42 43)" + }, + { + "opcode": 5, + "description": "Nock 5: equal cells yield 0", + "subject": "[[1 2] [1 2]]", + "formula": "[5 [0 2] [0 3]]", + "result": "0", + "hoon": ".=([1 2] [1 2])" + }, + { + "opcode": 5, + "description": "Nock 5: unequal cells yield 1", + "subject": "[[1 2] [3 4]]", + "formula": "[5 [0 2] [0 3]]", + "result": "1", + "hoon": ".=([1 2] [3 4])" + }, + { + "opcode": 5, + "description": "Nock 5: atom vs cell yields 1", + "subject": "[42 [1 2]]", + "formula": "[5 [0 2] [0 3]]", + "result": "1", + "hoon": ".=(42 [1 2])" + }, + + { + "opcode": 6, + "description": "Nock 6: branch on 0 takes the true arm", + "subject": "42", + "formula": "[6 [1 0] [1 1] [1 2]]", + "result": "1", + "hoon": "?:(& 1 2)" + }, + { + "opcode": 6, + "description": "Nock 6: branch on 1 takes the false arm", + "subject": "42", + "formula": "[6 [1 1] [1 1] [1 2]]", + "result": "2", + "hoon": "?:(| 1 2)" + }, + { + "opcode": 6, + "description": "Nock 6: branch with computed test (cell test)", + "subject": "[1 2]", + "formula": "[6 [3 [0 1]] [1 99] [0 2]]", + "result": "99", + "hoon": "?:(.?([1 2]) 99 -:[1 2])" + }, + { + "opcode": 6, + "description": "Nock 6: branch with computed test (atom case)", + "subject": "42", + "formula": "[6 [3 [0 1]] [1 99] [0 1]]", + "result": "42", + "hoon": null + }, + { + "opcode": 6, + "description": "Nock 6: non-boolean test crashes", + "subject": "42", + "formula": "[6 [1 2] [1 1] [1 2]]", + "result": null, + "hoon": null + }, + + { + "opcode": 7, + "description": "Nock 7: compose two increments", + "subject": "42", + "formula": "[7 [4 0 1] [4 0 1]]", + "result": "44", + "hoon": "=>(42 =>(+(.) +(.) ))" + }, + { + "opcode": 7, + "description": "Nock 7: compose slot then increment", + "subject": "[1 2]", + "formula": "[7 [0 2] [4 0 1]]", + "result": "2", + "hoon": null + }, + { + "opcode": 7, + "description": "Nock 7: compose constant then slot", + "subject": "42", + "formula": "[7 [1 [1 2]] [0 2]]", + "result": "1", + "hoon": null + }, + { + "opcode": 7, + "description": "Nock 7: triple composition", + "subject": "0", + "formula": "[7 [4 0 1] [7 [4 0 1] [4 0 1]]]", + "result": "3", + "hoon": null + }, + + { + "opcode": 8, + "description": "Nock 8: push value, read it from head", + "subject": "42", + "formula": "[8 [4 0 1] [0 2]]", + "result": "43", + "hoon": "=+(+(.) .)" + }, + { + "opcode": 8, + "description": "Nock 8: push value, read original subject from tail", + "subject": "42", + "formula": "[8 [4 0 1] [0 3]]", + "result": "42", + "hoon": null + }, + { + "opcode": 8, + "description": "Nock 8: push and compare with original", + "subject": "42", + "formula": "[8 [1 0] [5 [0 2] [0 3]]]", + "result": "1", + "hoon": null + }, + { + "opcode": 8, + "description": "Nock 8: push constant, use in formula", + "subject": "[1 2]", + "formula": "[8 [1 99] [0 2]]", + "result": "99", + "hoon": null + }, + { + "opcode": 8, + "description": "Nock 8: push and auto-cons from augmented subject", + "subject": "42", + "formula": "[8 [4 0 1] [[0 2] [0 3]]]", + "result": "[43 42]", + "hoon": null + }, + + { + "opcode": 9, + "description": "Nock 9: invoke arm in a simple core", + "subject": "0", + "formula": "[9 2 [1 [[4 0 3] 42]]]", + "result": "43", + "hoon": null + }, + { + "opcode": 9, + "description": "Nock 9: invoke identity arm", + "subject": "0", + "formula": "[9 2 [1 [[0 3] 99]]]", + "result": "99", + "hoon": null + }, + { + "opcode": 9, + "description": "Nock 9: invoke with modified payload via Nock 10", + "subject": "0", + "formula": "[9 2 [10 [3 [1 7]] [1 [[4 0 3] 42]]]]", + "result": "8", + "hoon": null + }, + { + "opcode": 9, + "description": "Nock 9: invoke on pre-built core from subject", + "subject": "[[4 0 3] 0]", + "formula": "[9 2 [0 1]]", + "result": "1", + "hoon": null + }, + + { + "opcode": 10, + "description": "Nock 10: edit head of a cell", + "subject": "[1 2]", + "formula": "[10 [2 [1 3]] [0 1]]", + "result": "[3 2]", + "hoon": null + }, + { + "opcode": 10, + "description": "Nock 10: edit tail of a cell", + "subject": "[1 2]", + "formula": "[10 [3 [1 3]] [0 1]]", + "result": "[1 3]", + "hoon": null + }, + { + "opcode": 10, + "description": "Nock 10: edit axis 1 replaces entire noun", + "subject": "[1 2]", + "formula": "[10 [1 [1 99]] [0 1]]", + "result": "99", + "hoon": null + }, + { + "opcode": 10, + "description": "Nock 10: deep edit at axis 4", + "subject": "[[1 2] [3 4]]", + "formula": "[10 [4 [1 99]] [0 1]]", + "result": "[[99 2] 3 4]", + "hoon": null + }, + { + "opcode": 10, + "description": "Nock 10: deep edit at axis 7", + "subject": "[[1 2] [3 4]]", + "formula": "[10 [7 [1 99]] [0 1]]", + "result": "[[1 2] 3 99]", + "hoon": null + }, + + { + "opcode": 11, + "description": "Nock 11: static hint is transparent", + "subject": "42", + "formula": "[11 1 [4 0 1]]", + "result": "43", + "hoon": "~>(1 .+(42))" + }, + { + "opcode": 11, + "description": "Nock 11: static hint with different tag", + "subject": "[1 2]", + "formula": "[11 37 [0 2]]", + "result": "1", + "hoon": null + }, + { + "opcode": 11, + "description": "Nock 11: dynamic hint evaluates and discards clue", + "subject": "42", + "formula": "[11 [1 [1 0]] [4 0 1]]", + "result": "43", + "hoon": null + }, + { + "opcode": 11, + "description": "Nock 11: dynamic hint clue does not affect result", + "subject": "[1 2]", + "formula": "[11 [1 [4 0 2]] [0 3]]", + "result": "2", + "hoon": null + } +] diff --git a/norm/validate.py b/norm/validate.py new file mode 100644 index 0000000..13afe95 --- /dev/null +++ b/norm/validate.py @@ -0,0 +1,124 @@ +#!/usr/bin/env python3 +"""Validate tests.json against a Nock runtime via `urbit eval`. + +Usage: + python3 norm/validate.py [--urbit /path/to/urbit] [--verbose] + +Each test is evaluated as: + echo '.*( )' | urbit eval + +A test with result null expects the runtime to crash (bail). +""" + +import argparse +import json +import os +import re +import subprocess +import sys + +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +TESTS_PATH = os.path.join(SCRIPT_DIR, "tests.json") +ANSI_RE = re.compile(r"\x1b\[[0-9;]*m") + + +def find_urbit(): + """Find the urbit binary, checking common locations.""" + candidates = [ + os.path.expanduser("~/bin/urbit"), + "urbit", + ] + for c in candidates: + full = os.path.expanduser(c) + if os.path.isfile(full) and os.access(full, os.X_OK): + return full + return None + + +def eval_nock(urbit_bin, subject, formula, timeout=30): + """Evaluate .*(subject formula) and return (result_str, crashed).""" + expr = f".*({subject} {formula})" + try: + proc = subprocess.run( + [urbit_bin, "eval"], + input=expr, + capture_output=True, + text=True, + timeout=timeout, + ) + except subprocess.TimeoutExpired: + return None, True + + if "bail" in proc.stderr: + return None, True + + raw = ANSI_RE.sub("", proc.stdout).strip() + if not raw: + return None, True + + return raw, False + + +def main(): + parser = argparse.ArgumentParser(description="Validate Nock reference tests") + parser.add_argument( + "--urbit", default=None, + help="Path to urbit binary (default: ~/bin/urbit or $PATH)" + ) + parser.add_argument( + "--verbose", "-v", action="store_true", + help="Print each test as it runs" + ) + args = parser.parse_args() + + urbit_bin = args.urbit or find_urbit() + if not urbit_bin: + print("error: urbit binary not found; pass --urbit /path/to/urbit", + file=sys.stderr) + sys.exit(1) + + with open(TESTS_PATH) as f: + tests = json.load(f) + + passed = 0 + failed = 0 + errors = [] + + for i, t in enumerate(tests): + actual, crashed = eval_nock(urbit_bin, t["subject"], t["formula"]) + expected = t["result"] + + if expected is None: + ok = crashed + else: + ok = (not crashed) and (actual == expected) + + if ok: + passed += 1 + tag = "\033[32mPASS\033[0m" + else: + failed += 1 + tag = "\033[31mFAIL\033[0m" + errors.append((i, t, expected, actual, crashed)) + + if args.verbose or not ok: + print(f" [{tag}] {i:2d}. {t['description']}") + if not ok: + exp_str = "crash" if expected is None else expected + act_str = "crash" if crashed else actual + print(f" expected: {exp_str}") + print(f" actual: {act_str}") + + total = passed + failed + color = "\033[32m" if failed == 0 else "\033[31m" + print(f"\n{color}{passed}/{total} passed\033[0m", end="") + if failed: + print(f" ({failed} failed)") + else: + print() + + sys.exit(0 if failed == 0 else 1) + + +if __name__ == "__main__": + main() From 3d6bc4428208c03da5fde7347c51ed39d9071ef9 Mon Sep 17 00:00:00 2001 From: Sigilante Date: Thu, 12 Mar 2026 15:35:38 -0500 Subject: [PATCH 2/7] ci: auto-regenerate REFERENCE.md on tests.json changes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/norm-reference.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/norm-reference.yml diff --git a/.github/workflows/norm-reference.yml b/.github/workflows/norm-reference.yml new file mode 100644 index 0000000..00f42a8 --- /dev/null +++ b/.github/workflows/norm-reference.yml @@ -0,0 +1,31 @@ +name: Regenerate Nock reference table + +on: + push: + paths: + - 'norm/tests.json' + - 'norm/generate.py' + +permissions: + contents: write + +jobs: + regenerate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Regenerate REFERENCE.md + run: python3 norm/generate.py + + - name: Commit if changed + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add norm/REFERENCE.md + git diff --cached --quiet || git commit -m "norm: regenerate REFERENCE.md" + git push From d6a28351092ec68f12de7907272ddf962528c327 Mon Sep 17 00:00:00 2001 From: Sigilante Date: Thu, 12 Mar 2026 15:58:26 -0500 Subject: [PATCH 3/7] bar: add mmul and sha512 benchmarks Matrix multiplication (mmul): 10x10 procedurally generated matrices, uses /lib/tiny with a turn extension. SHA-512 (sha512): hashes 'abc' (3 bytes), extends tiny with ror, net, inv, run arms needed for the SHA-512 algorithm. Implementation follows the shal arm from hoon.hoon. Moves both from Desired to Supplied in README. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 5 +- desk/bar/mmul.hoon | 76 ++++++++++++++++++++ desk/bar/sha512.hoon | 161 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 240 insertions(+), 2 deletions(-) create mode 100644 desk/bar/mmul.hoon create mode 100644 desk/bar/sha512.hoon diff --git a/README.md b/README.md index 9003669..2e04ff3 100644 --- a/README.md +++ b/README.md @@ -25,13 +25,14 @@ Generally speaking, benchmarks should be self-contained; they should not call ou - [Fibonacci sequence (recursive generating function)](https://en.wikipedia.org/wiki/Fibonacci_sequence#Generating_function), `fibonacci` - Factorial (tail-recursive), `factorial` +- [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication), `mmul` +- [SHA-512 hash](https://en.wikipedia.org/wiki/SHA-2), `sha512` + ### Desired - [Fibonacci sequence (Binet's formula)](https://en.wikipedia.org/wiki/Fibonacci_sequence#Relation_to_the_golden_ratio), `fibformula` (requires FP core) - [Mandelbrot set](https://en.wikipedia.org/wiki/Mandelbrot_set), `mandelbrot` (easier with FP core) -- [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication), `mmul` - [MD5 hash](https://en.wikipedia.org/wiki/MD5), `md5` -- [SHA-512 hash](https://en.wikipedia.org/wiki/SHA-2), `sha512` ## Reporting diff --git a/desk/bar/mmul.hoon b/desk/bar/mmul.hoon new file mode 100644 index 0000000..ca2a820 --- /dev/null +++ b/desk/bar/mmul.hoon @@ -0,0 +1,76 @@ +/+ tiny +:: +=> tiny +:: +=> |% + ++ turn + |* [a=(list) b=gate] + ?~ a ~ + [i=(b i.a) t=$(a t.a)] + -- +:: +:- . +!= +%. 10 +|= size=@ +^- (list (list @)) +:: multiply two procedurally generated size x size matrices. +:: a[i][j] = i*size + j + 1 (1-indexed sequential) +:: b[i][j] = size*size - (i*size + j) (reverse sequential) +:: +|^ +=+ a=(gen size |=([i=@ j=@] (add +(j) (mul i size)))) +=+ b=(gen size |=([i=@ j=@] (sub (mul size size) (add j (mul i size))))) +(mmul a b) +:: +++ mmul + |= [a=(list (list @)) b=(list (list @))] + ^- (list (list @)) + =+ bt=(trn b) + %+ turn a + |= row=(list @) + ^- (list @) + %+ turn bt + |= col=(list @) + ^- @ + (dot row col) +:: +++ gen + |= [n=@ f=$-([@ @] @)] + ^- (list (list @)) + =+ i=0 + |- + ?: =(i n) ~ + :_ $(i +(i)) + =+ j=0 + |- ^- (list @) + ?: =(j n) ~ + :_ $(j +(j)) + (f [i j]) +:: +++ trn + |= m=(list (list @)) + ^- (list (list @)) + ?~ m ~ + ?~ i.m ~ + [(heads m) $(m (tails m))] +:: +++ heads + |= m=(list (list @)) + ^- (list @) + ?~ m ~ + [?~(i.m 0 i.i.m) $(m t.m)] +:: +++ tails + |= m=(list (list @)) + ^- (list (list @)) + ?~ m ~ + [?~(i.m ~ t.i.m) $(m t.m)] +:: +++ dot + |= [a=(list @) b=(list @)] + ^- @ + ?~ a 0 + ?~ b 0 + (add (mul i.a i.b) $(a t.a, b t.b)) +-- diff --git a/desk/bar/sha512.hoon b/desk/bar/sha512.hoon new file mode 100644 index 0000000..8480a3e --- /dev/null +++ b/desk/bar/sha512.hoon @@ -0,0 +1,161 @@ +/+ tiny +:: +=> tiny +:: +:: extend tiny with arms needed for SHA-512 +:: +=> |% + ++ turn + |* [a=(list) b=gate] + ?~ a ~ + [i=(b i.a) t=$(a t.a)] + :: + ++ run :: +turn into atom + |= [a=bite b=@ c=$-(@ @)] + (rep a (turn (rip a b) c)) + :: + ++ fe :: modulo bloq + |_ a=bloq + ++ inv |=(b=@ (sub (dec (bex (bex a))) (sit b))) + ++ net |= b=@ ^- @ :: flip byte endianness + => .(b (sit b)) + ?: (lte a 3) b + =+ c=(dec a) + %+ con + (lsh c $(a c, b (cut c [0 1] b))) + $(a c, b (cut c [1 1] b)) + ++ rol |= [b=bloq c=@ d=@] ^- @ :: roll left + =+ e=(sit d) + =+ f=(bex (sub a b)) + =+ g=(mod c f) + (sit (con (lsh [b g] e) (rsh [b (sub f g)] e))) + ++ ror |= [b=bloq c=@ d=@] ^- @ :: roll right + =+ e=(sit d) + =+ f=(bex (sub a b)) + =+ g=(mod c f) + (sit (con (rsh [b g] e) (lsh [b (sub f g)] e))) + ++ sum |=([b=@ c=@] (sit (add b c))) + ++ sit |=(b=@ (end a b)) + -- + -- +:: +:- . +!= +^- @ +:: SHA-512 of 'abc' (3 bytes) +:: expected: 0xddaf.35a1.9361.7aba.cc41.7349.ae20.4131. +:: 12e6.fa4e.89a9.7ea2.0a9e.eee6.4b55.d39a. +:: 2192.992a.274f.c1a8.36ba.3c23.a3fe.ebbd. +:: 454d.4423.643c.e80e.2a9a.c94f.a54c.a49f +:: +%. [3 0x63.6261] +|= [len=@ ruz=@] +^- @ +=> .(ruz (cut 3 [0 len] ruz)) +=+ [few==>(fe .(a 6)) wac=|=([a=@ b=@] (cut 6 [a 1] b))] +=+ [sum=sum.few ror=ror.few net=net.few inv=inv.few] +=+ ral=(lsh [0 3] len) +=+ ^= ful + %+ can 0 + :~ [ral ruz] + [8 128] + [(mod (sub 1.920 (mod (add 8 ral) 1.024)) 1.024) 0] + [128 (~(net fe 7) ral)] + == +=+ lex=(met 10 ful) +=+ ^= kbx 0x6c44.198c.4a47.5817.5fcb.6fab.3ad6.faec. + 597f.299c.fc65.7e2a.4cc5.d4be.cb3e.42b6. + 431d.67c4.9c10.0d4c.3c9e.be0a.15c9.bebc. + 32ca.ab7b.40c7.2493.28db.77f5.2304.7d84. + 1b71.0b35.131c.471b.113f.9804.bef9.0dae. + 0a63.7dc5.a2c8.98a6.06f0.67aa.7217.6fba. + f57d.4f7f.ee6e.d178.eada.7dd6.cde0.eb1e. + d186.b8c7.21c0.c207.ca27.3ece.ea26.619c. + c671.78f2.e372.532b.bef9.a3f7.b2c6.7915. + a450.6ceb.de82.bde9.90be.fffa.2363.1e28. + 8cc7.0208.1a64.39ec.84c8.7814.a1f0.ab72. + 78a5.636f.4317.2f60.748f.82ee.5def.b2fc. + 682e.6ff3.d6b2.b8a3.5b9c.ca4f.7763.e373. + 4ed8.aa4a.e341.8acb.391c.0cb3.c5c9.5a63. + 34b0.bcb5.e19b.48a8.2748.774c.df8e.eb99. + 1e37.6c08.5141.ab53.19a4.c116.b8d2.d0c8. + 106a.a070.32bb.d1b8.f40e.3585.5771.202a. + d699.0624.5565.a910.d192.e819.d6ef.5218. + c76c.51a3.0654.be30.c24b.8b70.d0f8.9791. + a81a.664b.bc42.3001.a2bf.e8a1.4cf1.0364. + 9272.2c85.1482.353b.81c2.c92e.47ed.aee6. + 766a.0abb.3c77.b2a8.650a.7354.8baf.63de. + 5338.0d13.9d95.b3df.4d2c.6dfc.5ac4.2aed. + 2e1b.2138.5c26.c926.27b7.0a85.46d2.2ffc. + 1429.2967.0a0e.6e70.06ca.6351.e003.826f. + d5a7.9147.930a.a725.c6e0.0bf3.3da8.8fc2. + bf59.7fc7.beef.0ee4.b003.27c8.98fb.213f. + a831.c66d.2db4.3210.983e.5152.ee66.dfab. + 76f9.88da.8311.53b5.5cb0.a9dc.bd41.fbd4. + 4a74.84aa.6ea6.e483.2de9.2c6f.592b.0275. + 240c.a1cc.77ac.9c65.0fc1.9dc6.8b8c.d5b5. + efbe.4786.384f.25e3.e49b.69c1.9ef1.4ad2. + c19b.f174.cf69.2694.9bdc.06a7.25c7.1235. + 80de.b1fe.3b16.96b1.72be.5d74.f27b.896f. + 550c.7dc3.d5ff.b4e2.2431.85be.4ee4.b28c. + 1283.5b01.4570.6fbe.d807.aa98.a303.0242. + ab1c.5ed5.da6d.8118.923f.82a4.af19.4f9b. + 59f1.11f1.b605.d019.3956.c25b.f348.b538. + e9b5.dba5.8189.dbbc.b5c0.fbcf.ec4d.3b2f. + 7137.4491.23ef.65cd.428a.2f98.d728.ae22 +=+ ^= hax 0x5be0.cd19.137e.2179.1f83.d9ab.fb41.bd6b. + 9b05.688c.2b3e.6c1f.510e.527f.ade6.82d1. + a54f.f53a.5f1d.36f1.3c6e.f372.fe94.f82b. + bb67.ae85.84ca.a73b.6a09.e667.f3bc.c908 +=+ i=0 +|- ^- @ +?: =(i lex) + (run 6 hax net) +=+ ^= wox + =+ dux=(cut 10 [i 1] ful) + =+ wox=(run 6 dux net) + =+ j=16 + |- ^- @ + ?: =(80 j) + wox + =+ :* l=(wac (sub j 15) wox) + m=(wac (sub j 2) wox) + n=(wac (sub j 16) wox) + o=(wac (sub j 7) wox) + == + =+ x=:(mix (ror 0 1 l) (ror 0 8 l) (rsh [0 7] l)) + =+ y=:(mix (ror 0 19 m) (ror 0 61 m) (rsh [0 6] m)) + =+ z=:(sum n x o y) + $(wox (con (lsh [6 j] z) wox), j +(j)) +=+ j=0 +=+ :* a=(wac 0 hax) + b=(wac 1 hax) + c=(wac 2 hax) + d=(wac 3 hax) + e=(wac 4 hax) + f=(wac 5 hax) + g=(wac 6 hax) + h=(wac 7 hax) + == +|- ^- @ +?: =(80 j) + %= ^$ + i +(i) + hax %+ rep 6 + :~ (sum a (wac 0 hax)) + (sum b (wac 1 hax)) + (sum c (wac 2 hax)) + (sum d (wac 3 hax)) + (sum e (wac 4 hax)) + (sum f (wac 5 hax)) + (sum g (wac 6 hax)) + (sum h (wac 7 hax)) + == + == +=+ l=:(mix (ror 0 28 a) (ror 0 34 a) (ror 0 39 a)) :: S0 +=+ m=:(mix (dis a b) (dis a c) (dis b c)) :: maj +=+ n=(sum l m) :: t2 +=+ o=:(mix (ror 0 14 e) (ror 0 18 e) (ror 0 41 e)) :: S1 +=+ p=(mix (dis e f) (dis (inv e) g)) :: ch +=+ q=:(sum h o p (wac j kbx) (wac j wox)) :: t1 +$(j +(j), a (sum q n), b a, c b, d c, e (sum d q), f e, g f, h g) From 241ad72593b922b1f74a5e5a8213643100362bca Mon Sep 17 00:00:00 2001 From: Sigilante Date: Thu, 12 Mar 2026 16:23:36 -0500 Subject: [PATCH 4/7] Convert all benchmarks to self-contained format Replace /+ tiny imports with inlined arms using |^ core pattern. All arms are compiled into the nock formula via !=, making each benchmark fully self-contained without external library dependencies. Files converted: atomcat, atomdog, atomgmp, bigslot, mmul, sha512, sieve Also fixes: - con (binary OR) implementation: was computing XOR, now correct - Replace bloq/step/bite stdlib types with bare @ types - Use raw noun types (*) for list-like structures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- desk/bar/atomcat.hoon | 69 +++++++++++-- desk/bar/atomdog.hoon | 69 +++++++++++-- desk/bar/atomgmp.hoon | 69 +++++++++++-- desk/bar/bigslot.hoon | 24 +++-- desk/bar/mmul.hoon | 91 +++++++++++------- desk/bar/sha512.hoon | 219 +++++++++++++++++++++++++++++++++--------- desk/bar/sieve.hoon | 106 ++++++++++++++++++-- 7 files changed, 536 insertions(+), 111 deletions(-) diff --git a/desk/bar/atomcat.hoon b/desk/bar/atomcat.hoon index 522f25a..41ec625 100644 --- a/desk/bar/atomcat.hoon +++ b/desk/bar/atomcat.hoon @@ -1,10 +1,7 @@ -/+ tiny -:: -=> tiny -:: -:- . +=> m=@ +:- 0 != -^- ^ +|^ ^- ^ =+ [m=(dec (bex 16)) n=(bex 15)] :* (add m n) (sub m n) @@ -12,3 +9,63 @@ (div m n) (mod m n) == +:: +++ dec + |= a=@ + ?< =(0 a) + =+ b=0 + |- ^- @ + ?: =(a +(b)) b + $(b +(b)) +:: +++ add + |= [a=@ b=@] + ^- @ + ?: =(0 a) b + $(a (dec a), b +(b)) +:: +++ sub + |= [a=@ b=@] + ^- @ + ?: =(0 b) a + $(a (dec a), b (dec b)) +:: +++ mul + |= [a=@ b=@] + ^- @ + =+ c=0 + |- + ?: =(0 a) c + $(a (dec a), c (add b c)) +:: +++ div + |= [a=@ b=@] + ^- @ + ?< =(0 b) + =+ c=0 + |- + ?: (lth a b) c + $(a (sub a b), c +(c)) +:: +++ mod + |= [a=@ b=@] + ^- @ + ?< =(0 b) + (sub a (mul b (div a b))) +:: +++ bex + |= a=@ + ^- @ + ?: =(0 a) 1 + (mul 2 $(a (dec a))) +:: +++ lth + |= [a=@ b=@] + ^- ? + ?& !=(a b) + |- + ?: =(0 a) & + ?: =(0 b) | + $(a (dec a), b (dec b)) + == +-- diff --git a/desk/bar/atomdog.hoon b/desk/bar/atomdog.hoon index b203f0e..3798790 100644 --- a/desk/bar/atomdog.hoon +++ b/desk/bar/atomdog.hoon @@ -1,10 +1,7 @@ -/+ tiny -:: -=> tiny -:: -:- . +=> m=@ +:- 0 != -^- ^ +|^ ^- ^ =+ [m=(dec (bex 32)) n=(bex 31)] :* (add m n) (sub m n) @@ -12,3 +9,63 @@ (div m n) (mod m n) == +:: +++ dec + |= a=@ + ?< =(0 a) + =+ b=0 + |- ^- @ + ?: =(a +(b)) b + $(b +(b)) +:: +++ add + |= [a=@ b=@] + ^- @ + ?: =(0 a) b + $(a (dec a), b +(b)) +:: +++ sub + |= [a=@ b=@] + ^- @ + ?: =(0 b) a + $(a (dec a), b (dec b)) +:: +++ mul + |= [a=@ b=@] + ^- @ + =+ c=0 + |- + ?: =(0 a) c + $(a (dec a), c (add b c)) +:: +++ div + |= [a=@ b=@] + ^- @ + ?< =(0 b) + =+ c=0 + |- + ?: (lth a b) c + $(a (sub a b), c +(c)) +:: +++ mod + |= [a=@ b=@] + ^- @ + ?< =(0 b) + (sub a (mul b (div a b))) +:: +++ bex + |= a=@ + ^- @ + ?: =(0 a) 1 + (mul 2 $(a (dec a))) +:: +++ lth + |= [a=@ b=@] + ^- ? + ?& !=(a b) + |- + ?: =(0 a) & + ?: =(0 b) | + $(a (dec a), b (dec b)) + == +-- diff --git a/desk/bar/atomgmp.hoon b/desk/bar/atomgmp.hoon index 234330d..e03613c 100644 --- a/desk/bar/atomgmp.hoon +++ b/desk/bar/atomgmp.hoon @@ -1,10 +1,7 @@ -/+ tiny -:: -=> tiny -:: -:- . +=> m=@ +:- 0 != -^- ^ +|^ ^- ^ =+ [m=(dec (bex 128)) n=(bex 128)] :* (add m n) (sub m n) @@ -12,3 +9,63 @@ (div m n) (mod m n) == +:: +++ dec + |= a=@ + ?< =(0 a) + =+ b=0 + |- ^- @ + ?: =(a +(b)) b + $(b +(b)) +:: +++ add + |= [a=@ b=@] + ^- @ + ?: =(0 a) b + $(a (dec a), b +(b)) +:: +++ sub + |= [a=@ b=@] + ^- @ + ?: =(0 b) a + $(a (dec a), b (dec b)) +:: +++ mul + |= [a=@ b=@] + ^- @ + =+ c=0 + |- + ?: =(0 a) c + $(a (dec a), c (add b c)) +:: +++ div + |= [a=@ b=@] + ^- @ + ?< =(0 b) + =+ c=0 + |- + ?: (lth a b) c + $(a (sub a b), c +(c)) +:: +++ mod + |= [a=@ b=@] + ^- @ + ?< =(0 b) + (sub a (mul b (div a b))) +:: +++ bex + |= a=@ + ^- @ + ?: =(0 a) 1 + (mul 2 $(a (dec a))) +:: +++ lth + |= [a=@ b=@] + ^- ? + ?& !=(a b) + |- + ?: =(0 a) & + ?: =(0 b) | + $(a (dec a), b (dec b)) + == +-- diff --git a/desk/bar/bigslot.hoon b/desk/bar/bigslot.hoon index a653af7..d612b4a 100644 --- a/desk/bar/bigslot.hoon +++ b/desk/bar/bigslot.hoon @@ -1,8 +1,20 @@ -/+ tiny -:: -=> tiny -:: -:- . +=> m=@ +:- 0 != -^- ^ +|^ ^- ^ &100:(reap 100 ~) +:: +++ reap + |= [a=@ b=*] + |- ^- * + ?: =(0 a) ~ + [b $(a (dec a))] +:: +++ dec + |= a=@ + ?< =(0 a) + =+ b=0 + |- ^- @ + ?: =(a +(b)) b + $(b +(b)) +-- diff --git a/desk/bar/mmul.hoon b/desk/bar/mmul.hoon index ca2a820..7dc1f6f 100644 --- a/desk/bar/mmul.hoon +++ b/desk/bar/mmul.hoon @@ -1,19 +1,9 @@ -/+ tiny -:: -=> tiny -:: -=> |% - ++ turn - |* [a=(list) b=gate] - ?~ a ~ - [i=(b i.a) t=$(a t.a)] - -- -:: -:- . +=> size=@ +:- 10 != -%. 10 +%. size |= size=@ -^- (list (list @)) +^- * :: multiply two procedurally generated size x size matrices. :: a[i][j] = i*size + j + 1 (1-indexed sequential) :: b[i][j] = size*size - (i*size + j) (reverse sequential) @@ -24,53 +14,82 @@ (mmul a b) :: ++ mmul - |= [a=(list (list @)) b=(list (list @))] - ^- (list (list @)) + |= [a=* b=*] + ^- * =+ bt=(trn b) - %+ turn a - |= row=(list @) - ^- (list @) - %+ turn bt - |= col=(list @) - ^- @ - (dot row col) + (turn a |=(row=* (turn bt |=(col=* (dot row col))))) :: ++ gen |= [n=@ f=$-([@ @] @)] - ^- (list (list @)) + ^- * =+ i=0 |- ?: =(i n) ~ :_ $(i +(i)) =+ j=0 - |- ^- (list @) + |- ^- * ?: =(j n) ~ :_ $(j +(j)) (f [i j]) :: +++ turn + |= [a=* b=$-(* *)] + ^- * + ?~ a ~ + [(b -.a) $(a +.a)] +:: ++ trn - |= m=(list (list @)) - ^- (list (list @)) + |= m=* + ^- * ?~ m ~ - ?~ i.m ~ + ?~ -.m ~ [(heads m) $(m (tails m))] :: ++ heads - |= m=(list (list @)) - ^- (list @) + |= m=* + ^- * ?~ m ~ - [?~(i.m 0 i.i.m) $(m t.m)] + [-.-.m $(m +.m)] :: ++ tails - |= m=(list (list @)) - ^- (list (list @)) + |= m=* + ^- * ?~ m ~ - [?~(i.m ~ t.i.m) $(m t.m)] + [?~(-.m ~ +.-.m) $(m +.m)] :: ++ dot - |= [a=(list @) b=(list @)] + |= [a=* b=*] ^- @ ?~ a 0 ?~ b 0 - (add (mul i.a i.b) $(a t.a, b t.b)) + %+ add (mul `@`-.a `@`-.b) + $(a +.a, b +.b) +:: +++ dec + |= a=@ + ?< =(0 a) + =+ b=0 + |- ^- @ + ?: =(a +(b)) b + $(b +(b)) +:: +++ add + |= [a=@ b=@] + ^- @ + ?: =(0 a) b + $(a (dec a), b +(b)) +:: +++ sub + |= [a=@ b=@] + ^- @ + ?: =(0 b) a + $(a (dec a), b (dec b)) +:: +++ mul + |= [a=@ b=@] + ^- @ + =+ c=0 + |- + ?: =(0 a) c + $(a (dec a), c (add b c)) -- diff --git a/desk/bar/sha512.hoon b/desk/bar/sha512.hoon index 8480a3e..3d8a806 100644 --- a/desk/bar/sha512.hoon +++ b/desk/bar/sha512.hoon @@ -1,47 +1,7 @@ -/+ tiny -:: -=> tiny -:: -:: extend tiny with arms needed for SHA-512 -:: -=> |% - ++ turn - |* [a=(list) b=gate] - ?~ a ~ - [i=(b i.a) t=$(a t.a)] - :: - ++ run :: +turn into atom - |= [a=bite b=@ c=$-(@ @)] - (rep a (turn (rip a b) c)) - :: - ++ fe :: modulo bloq - |_ a=bloq - ++ inv |=(b=@ (sub (dec (bex (bex a))) (sit b))) - ++ net |= b=@ ^- @ :: flip byte endianness - => .(b (sit b)) - ?: (lte a 3) b - =+ c=(dec a) - %+ con - (lsh c $(a c, b (cut c [0 1] b))) - $(a c, b (cut c [1 1] b)) - ++ rol |= [b=bloq c=@ d=@] ^- @ :: roll left - =+ e=(sit d) - =+ f=(bex (sub a b)) - =+ g=(mod c f) - (sit (con (lsh [b g] e) (rsh [b (sub f g)] e))) - ++ ror |= [b=bloq c=@ d=@] ^- @ :: roll right - =+ e=(sit d) - =+ f=(bex (sub a b)) - =+ g=(mod c f) - (sit (con (rsh [b g] e) (lsh [b (sub f g)] e))) - ++ sum |=([b=@ c=@] (sit (add b c))) - ++ sit |=(b=@ (end a b)) - -- - -- -:: -:- . +=> m=@ +:- 0 != -^- @ +|^ ^- @ :: SHA-512 of 'abc' (3 bytes) :: expected: 0xddaf.35a1.9361.7aba.cc41.7349.ae20.4131. :: 12e6.fa4e.89a9.7ea2.0a9e.eee6.4b55.d39a. @@ -159,3 +119,176 @@ =+ p=(mix (dis e f) (dis (inv e) g)) :: ch =+ q=:(sum h o p (wac j kbx) (wac j wox)) :: t1 $(j +(j), a (sum q n), b a, c b, d c, e (sum d q), f e, g f, h g) +:: +++ dec + |= a=@ + ?< =(0 a) + =+ b=0 + |- ^- @ + ?: =(a +(b)) b + $(b +(b)) +:: +++ add + |= [a=@ b=@] + ^- @ + ?: =(0 a) b + $(a (dec a), b +(b)) +:: +++ sub + |= [a=@ b=@] + ^- @ + ?: =(0 b) a + $(a (dec a), b (dec b)) +:: +++ mul + |= [a=@ b=@] + ^- @ + =+ c=0 + |- + ?: =(0 a) c + $(a (dec a), c (add b c)) +:: +++ div + |= [a=@ b=@] + ^- @ + ?< =(0 b) + =+ c=0 + |- + ?: (lth a b) c + $(a (sub a b), c +(c)) +:: +++ mod + |= [a=@ b=@] + ^- @ + ?< =(0 b) + (sub a (mul b (div a b))) +:: +++ bex + |= a=@ + ^- @ + ?: =(0 a) 1 + (mul 2 $(a (dec a))) +:: +++ lth + |= [a=@ b=@] + ^- ? + ?& !=(a b) + |- + ?: =(0 a) & + ?: =(0 b) | + $(a (dec a), b (dec b)) + == +:: +++ lte + |= [a=@ b=@] + ^- ? + |(=(a b) (lth a b)) +:: +++ lsh + |= [a=$@(@ [@ @]) b=@] + =/ [bl=@ s=@] ?^(a a [a 1]) + (mul b (bex (mul (bex bl) s))) +:: +++ rsh + |= [a=$@(@ [@ @]) b=@] + =/ [bl=@ s=@] ?^(a a [a 1]) + (div b (bex (mul (bex bl) s))) +:: +++ con + |= [a=@ b=@] + ^- @ + ?: =(0 a) b + ?: =(0 b) a + =+ c=?|(!=(0 (mod a 2)) !=(0 (mod b 2))) + (add ?:(c 1 0) (mul 2 $(a (div a 2), b (div b 2)))) +:: +++ dis + |= [a=@ b=@] + ^- @ + ?: =(0 a) 0 + ?: =(0 b) 0 + =+ c=?&(!=(0 (mod a 2)) !=(0 (mod b 2))) + (add ?:(c 1 0) (mul 2 $(a (div a 2), b (div b 2)))) +:: +++ mix + |= [a=@ b=@] + ^- @ + ?: =(0 a) b + ?: =(0 b) a + %+ add + (mod (add (mod a 2) (mod b 2)) 2) + (mul 2 $(a (div a 2), b (div b 2))) +:: +++ met + |= [a=@ b=@] + ^- @ + ?: =(0 b) 0 + =+ c=(bex (bex a)) + |- ^- @ + ?: (lth b c) 1 + +($(b (div b c))) +:: +++ end + |= [a=$@(@ [@ @]) b=@] + =/ [bl=@ s=@] ?^(a a [a 1]) + (mod b (bex (mul (bex bl) s))) +:: +++ cut + |= [a=@ [b=@ c=@] d=@] + (end [a c] (rsh [a b] d)) +:: +++ can + |= [a=@ b=*] + ^- @ + ?~ b 0 + (add (end [a `@`-.-.b] `@`+.-.b) (lsh [a `@`-.-.b] $(b +.b))) +:: +++ rep + |= [a=$@(@ [@ @]) b=*] + =/ [bl=@ s=@] ?^(a a [a 1]) + =| i=@ + |- ^- @ + ?~ b 0 + %+ add $(i +(i), b +.b) + (lsh [bl (mul s i)] (end [bl s] `@`-.b)) +:: +++ rip + |= [a=$@(@ [@ @]) b=@] + ^- * + ?: =(0 b) ~ + [(end a b) $(b (rsh a b))] +:: +++ turn + |= [a=* b=$-(* *)] + ^- * + ?~ a ~ + [(b -.a) $(a +.a)] +:: +++ run :: +turn into atom + |= [a=$@(@ [@ @]) b=@ c=$-(@ @)] + (rep a (turn (rip a b) c)) +:: +++ fe :: modulo bloq + |_ a=@ + ++ inv |=(b=@ (sub (dec (bex (bex a))) (sit b))) + ++ net |= b=@ ^- @ + => .(b (sit b)) + ?: (lte a 3) b + =+ c=(dec a) + %+ con + (lsh c $(a c, b (cut c [0 1] b))) + $(a c, b (cut c [1 1] b)) + ++ rol |= [b=@ c=@ d=@] ^- @ + =+ e=(sit d) + =+ f=(bex (sub a b)) + =+ g=(mod c f) + (sit (con (lsh [b g] e) (rsh [b (sub f g)] e))) + ++ ror |= [b=@ c=@ d=@] ^- @ + =+ e=(sit d) + =+ f=(bex (sub a b)) + =+ g=(mod c f) + (sit (con (rsh [b g] e) (lsh [b (sub f g)] e))) + ++ sum |=([b=@ c=@] (sit (add b c))) + ++ sit |=(b=@ (end a b)) + -- +-- diff --git a/desk/bar/sieve.hoon b/desk/bar/sieve.hoon index de9fab8..7a908a0 100644 --- a/desk/bar/sieve.hoon +++ b/desk/bar/sieve.hoon @@ -1,10 +1,7 @@ -/+ tiny -:: -=> tiny -:: -:- . +=> m=@ +:- 100.000 != -%. 100.000 +%. m |= n-max=@ ^- @ub :: 0 means prime, 1 means not a prime, @@ -27,11 +24,104 @@ inner-loop(index (add index cursor), out (sew 0 [index 1 1] out)) :: ++ sew - |= [a=bloq [b=step c=step d=@] e=@] + |= [a=@ [b=@ c=@ d=@] e=@] ^- @ %+ add - (can a b^e c^d ~) + (can a [b e] [c d] ~) =/ f [a (add b c)] (lsh f (rsh f e)) :: +++ dec + |= a=@ + ?< =(0 a) + =+ b=0 + |- ^- @ + ?: =(a +(b)) b + $(b +(b)) +:: +++ add + |= [a=@ b=@] + ^- @ + ?: =(0 a) b + $(a (dec a), b +(b)) +:: +++ sub + |= [a=@ b=@] + ^- @ + ?: =(0 b) a + $(a (dec a), b (dec b)) +:: +++ mul + |= [a=@ b=@] + ^- @ + =+ c=0 + |- + ?: =(0 a) c + $(a (dec a), c (add b c)) +:: +++ gth + |= [a=@ b=@] + ^- ? + !(lte a b) +:: +++ lte + |= [a=@ b=@] + ^- ? + |(=(a b) (lth a b)) +:: +++ lth + |= [a=@ b=@] + ^- ? + ?& !=(a b) + |- + ?: =(0 a) & + ?: =(0 b) | + $(a (dec a), b (dec b)) + == +:: +++ bex + |= a=@ + ^- @ + ?: =(0 a) 1 + (mul 2 $(a (dec a))) +:: +++ lsh + |= [a=$@(@ [@ @]) b=@] + =/ [bl=@ s=@] ?^(a a [a 1]) + (mul b (bex (mul (bex bl) s))) +:: +++ rsh + |= [a=$@(@ [@ @]) b=@] + =/ [bl=@ s=@] ?^(a a [a 1]) + (div b (bex (mul (bex bl) s))) +:: +++ div + |= [a=@ b=@] + ^- @ + ?< =(0 b) + =+ c=0 + |- + ?: (lth a b) c + $(a (sub a b), c +(c)) +:: +++ cut + |= [a=@ [b=@ c=@] d=@] + (end [a c] (rsh [a b] d)) +:: +++ end + |= [a=$@(@ [@ @]) b=@] + =/ [bl=@ s=@] ?^(a a [a 1]) + (mod b (bex (mul (bex bl) s))) +:: +++ mod + |= [a=@ b=@] + ^- @ + ?< =(0 b) + (sub a (mul b (div a b))) +:: +++ can + |= [a=@ b=*] + ^- @ + ?~ b 0 + (add (end [a `@`-.-.b] `@`+.-.b) (lsh [a `@`-.-.b] $(b +.b))) -- From 6be7519a02ed60e7f1cb923403089a929d759f20 Mon Sep 17 00:00:00 2001 From: Sigilante Date: Thu, 12 Mar 2026 16:36:15 -0500 Subject: [PATCH 5/7] Generate .nock and .noun files for all benchmarks Regenerate ackermann and sieve nock/noun files with current compiler. Add nock/noun files for: add, atomcat, atomdog, atomgmp, bigslot, dec, factorial, fibonacci, mmul, sha512. .nock files contain the [subject formula] cell as compact text. .noun files contain the jammed binary representation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- desk/bar/ackermann.nock | 2 +- desk/bar/ackermann.noun | 2 +- desk/bar/add.nock | 1 + desk/bar/add.noun | 2 ++ desk/bar/atomcat.nock | 1 + desk/bar/atomcat.noun | 2 ++ desk/bar/atomdog.nock | 1 + desk/bar/atomdog.noun | 3 +++ desk/bar/atomgmp.nock | 1 + desk/bar/atomgmp.noun | Bin 0 -> 628 bytes desk/bar/bigslot.nock | 1 + desk/bar/bigslot.noun | 2 ++ desk/bar/dec.nock | 1 + desk/bar/dec.noun | 1 + desk/bar/factorial.nock | 1 + desk/bar/factorial.noun | 1 + desk/bar/fibonacci.nock | 1 + desk/bar/fibonacci.noun | 1 + desk/bar/mmul.nock | 1 + desk/bar/mmul.noun | Bin 0 -> 859 bytes desk/bar/sha512.nock | 1 + desk/bar/sha512.noun | Bin 0 -> 5284 bytes desk/bar/sieve.nock | 2 +- desk/bar/sieve.noun | Bin 8340 -> 1258 bytes 24 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 desk/bar/add.nock create mode 100644 desk/bar/add.noun create mode 100644 desk/bar/atomcat.nock create mode 100644 desk/bar/atomcat.noun create mode 100644 desk/bar/atomdog.nock create mode 100644 desk/bar/atomdog.noun create mode 100644 desk/bar/atomgmp.nock create mode 100644 desk/bar/atomgmp.noun create mode 100644 desk/bar/bigslot.nock create mode 100644 desk/bar/bigslot.noun create mode 100644 desk/bar/dec.nock create mode 100644 desk/bar/dec.noun create mode 100644 desk/bar/factorial.nock create mode 100644 desk/bar/factorial.noun create mode 100644 desk/bar/fibonacci.nock create mode 100644 desk/bar/fibonacci.noun create mode 100644 desk/bar/mmul.nock create mode 100644 desk/bar/mmul.noun create mode 100644 desk/bar/sha512.nock create mode 100644 desk/bar/sha512.noun diff --git a/desk/bar/ackermann.nock b/desk/bar/ackermann.nock index fe46ac0..4dbd3a6 100644 --- a/desk/bar/ackermann.nock +++ b/desk/bar/ackermann.nock @@ -1 +1 @@ -[[3 6] 8 [1 [6 [5 [1 0] 0 6] [4 0 7] 6 [5 [1 0] 0 7] [9 4 10 [3 [8 [9 5 0 1] 9 2 10 [6 0 14] 0 2] 1 1] 0 1] 9 4 10 [3 [8 [9 5 0 1] 9 2 10 [6 0 14] 0 2] 9 4 10 [7 8 [9 5 0 1] 9 2 10 [6 0 15] 0 2] 0 1] 0 1] 8 [1 0] [1 6 [5 [0 6] 1 0] [0 0] 8 [1 0] 8 [1 6 [5 [4 0 6] 0 30] [0 6] 9 2 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] 9 4 0 1] \ No newline at end of file +[[3 6] 8 [1 [6 [5 [1 0] 0 6] [4 0 7] 6 [5 [1 0] 0 7] [9 4 10 [3 [8 [9 5 0 1] 9 2 10 [6 0 14] 0 2] 1 1] 0 1] 9 4 10 [3 [8 [9 5 0 1] 9 2 10 [6 0 14] 0 2] 9 4 10 [7 8 [9 5 0 1] 9 2 10 [6 0 15] 0 2] 0 1] 0 1] 8 [1 0] [1 6 [5 [1 0] 0 6] [0 0] 8 [1 0] 8 [1 6 [5 [0 30] 4 0 6] [0 6] 9 2 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] 9 4 0 1] diff --git a/desk/bar/ackermann.noun b/desk/bar/ackermann.noun index 5b8cf21..801723b 100644 --- a/desk/bar/ackermann.noun +++ b/desk/bar/ackermann.noun @@ -1 +1 @@ -Ņ]&va&~؅۸p\\ 3 X 79H OdC0h:HD ?6y D ;!?! .ƕ ظ0]9Lo\$CJ!d!a \ No newline at end of file +Ņ]&va&~؅۸p\\ 3 X 79H OdC0h:HD ?6y D ;!?! n. `q؅[|ƕA2d-,?H  \ No newline at end of file diff --git a/desk/bar/add.nock b/desk/bar/add.nock new file mode 100644 index 0000000..be9384f --- /dev/null +++ b/desk/bar/add.nock @@ -0,0 +1 @@ +[[1.000 2.000] 8 [1 [8 [1 0 0] [1 6 [5 [1 0] 0 12] [0 13] 9 2 10 [6 [8 [9 10 0 7] 9 2 10 [6 0 28] 0 2] 4 0 13] 0 1] 0 1] [8 [1 0] [1 6 [5 [1 0] 0 6] [0 0] 8 [1 0] 8 [1 6 [5 [0 30] 4 0 6] [0 6] 9 2 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] 8 [9 4 0 1] 9 2 10 [6 [0 14] 0 15] 0 2] 9 11 0 1] diff --git a/desk/bar/add.noun b/desk/bar/add.noun new file mode 100644 index 0000000..41aba8e --- /dev/null +++ b/desk/bar/add.noun @@ -0,0 +1,2 @@ + +}p8-6!\B:H ],H!ha''2!,[l_v6OƯA~,pKs =H =Ԕ !;L X sA2d- a ;L\ \ No newline at end of file diff --git a/desk/bar/atomcat.nock b/desk/bar/atomcat.nock new file mode 100644 index 0000000..8026d51 --- /dev/null +++ b/desk/bar/atomcat.nock @@ -0,0 +1 @@ +[0 8 [1 [8 [1 0 0] [1 8 [1 0] 8 [1 6 [5 [1 0] 0 60] [0 6] 9 2 10 [60 8 [9 174 0 31] 9 2 10 [6 0 124] 0 2] 10 [6 8 [9 20 0 31] 9 2 10 [6 [0 125] 0 14] 0 2] 0 1] 9 2 0 1] 0 1] [[8 [1 0 0] [1 6 [5 [1 0] 0 12] [0 13] 9 2 10 [6 [8 [9 174 0 7] 9 2 10 [6 0 28] 0 2] 4 0 13] 0 1] 0 1] [8 [1 0] [1 6 [5 [1 0] 0 6] [1 1] 8 [9 4 0 7] 9 2 10 [6 [7 [0 3] 1 2] 7 [0 3] 9 2 10 [6 8 [9 174 0 7] 9 2 10 [6 0 14] 0 2] 0 1] 0 2] 0 1] [8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 0] 8 [1 0] 8 [1 6 [8 [9 175 0 31] 9 2 10 [6 [0 124] 0 125] 0 2] [0 6] 9 2 10 [60 8 [9 47 0 31] 9 2 10 [6 [0 124] 0 125] 0 2] 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] [8 [1 0] [1 6 [5 [1 0] 0 6] [0 0] 8 [1 0] 8 [1 6 [5 [0 30] 4 0 6] [0 6] 9 2 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] 8 [1 0 0] [1 6 [6 [5 [0 12] 0 13] [1 1] 1 0] [6 [8 [1 6 [5 [1 0] 0 28] [1 0] 6 [5 [1 0] 0 29] [1 1] 9 2 10 [14 [8 [9 174 0 15] 9 2 10 [6 0 60] 0 2] 8 [9 174 0 15] 9 2 10 [6 0 61] 0 2] 0 1] 9 2 0 1] [1 0] 1 1] 1 1] 0 1] [8 [[8 [9 174 0 1] 9 2 10 [6 7 [0 3] 8 [9 42 0 1] 9 2 10 [6 7 [0 3] 1 16] 0 2] 0 2] 8 [9 42 0 1] 9 2 10 [6 7 [0 3] 1 15] 0 2] [8 [9 20 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [9 47 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [9 4 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [9 86 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] 8 [9 46 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 0] 8 [9 47 0 7] 9 2 10 [6 [0 28] 7 [0 3] 8 [9 4 0 7] 9 2 10 [6 [0 29] 7 [0 3] 8 [9 86 0 7] 9 2 10 [6 [0 28] 0 29] 0 2] 0 2] 0 2] 0 1] 8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 12] 9 2 10 [6 [8 [9 174 0 7] 9 2 10 [6 0 28] 0 2] 8 [9 174 0 7] 9 2 10 [6 0 29] 0 2] 0 1] 0 1] 9 22 0 1] diff --git a/desk/bar/atomcat.noun b/desk/bar/atomcat.noun new file mode 100644 index 0000000..2b5f182 --- /dev/null +++ b/desk/bar/atomcat.noun @@ -0,0 +1,2 @@ +kvqZb]v6L(_bɐA| pM!ha' Z.H, !ha~B|A2P b5Q8m<.!$C®@&~ D ;a|aUP bnCP@IjJoqCX?Cnk*+a8=J{s{!>?bEUZdp*XnR`-Wf$t6eNs7%GiRyFapHPUp zaaPZRZSi3p9O{WKH(=Fg^K2r)R>~aOJY#n31fF7znawF6OIqU>C8zx0O+T$5 zY1AQBwprTi5t#MO;9vVgE0K=F1+rX6X5H0@f@oiL!|iUG`MjL6!W*W$6(l>ZCyKFw ze6T^{SPc#54o@IbWp@8GE$Jto!b~&_bl+Y@UcN-|h|E+ZSfYuDa2-`(eeV4ZyIw(R#b0 zXvH>Z|F+m2z3Rf(q~EoHZR@xWv`ryK_!F4-Mo|ptkT-2U*CBp#`klA~Y`fV!nRji6 z?-pnXWS4ap) !, A2d~åp803rÌh da= d9 diff --git a/desk/bar/mmul.nock b/desk/bar/mmul.nock new file mode 100644 index 0000000..8087946 --- /dev/null +++ b/desk/bar/mmul.nock @@ -0,0 +1 @@ +[10 8 [8 [1 0] [1 8 [1 [8 [1 0 0] [1 8 [1 0] 8 [1 6 [5 [1 0] 0 60] [0 6] 9 2 10 [60 8 [9 684 0 31] 9 2 10 [6 0 124] 0 2] 10 [6 8 [9 20 0 31] 9 2 10 [6 [0 125] 0 14] 0 2] 0 1] 9 2 0 1] 0 1] [[8 [1 0 0] [1 6 [5 [1 0] 0 12] [0 13] 9 2 10 [6 [8 [9 684 0 7] 9 2 10 [6 0 28] 0 2] 4 0 13] 0 1] 0 1] [[8 [1 0 0] [1 6 [5 [1 0] 0 12] [1 0] 6 [5 [1 0] 0 13] [1 0] 8 [9 20 0 7] 9 2 10 [6 [7 [0 3] 8 [9 4 0 7] 9 2 10 [6 [0 56] 0 58] 0 2] 7 [0 3] 9 2 10 [6 [0 25] 0 27] 0 1] 0 2] 0 1] [8 [1 0] [1 6 [5 [1 0] 0 6] [1 0] 6 [5 [1 0] 0 12] [1 0] [8 [9 43 0 7] 9 2 10 [6 0 14] 0 2] 9 2 10 [6 8 [9 46 0 7] 9 2 10 [6 0 14] 0 2] 0 1] 0 1] [[8 [1 0] [1 6 [5 [1 0] 0 6] [0 0] 8 [1 0] 8 [1 6 [5 [0 30] 4 0 6] [0 6] 9 2 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] 8 [1 0 0] [1 8 [8 [9 170 0 7] 9 2 10 [6 0 29] 0 2] 8 [9 22 0 15] 9 2 10 [6 [0 60] 7 [0 3] 8 [1 0] [1 8 [9 22 0 63] 9 2 10 [6 [0 30] 7 [0 3] 8 [1 0] [1 8 [9 84 0 255] 9 2 10 [6 [0 62] 0 14] 0 2] 0 1] 0 2] 0 1] 0 2] 0 1] 8 [1 0 [0 15] [0 0] [0 0] 0] [1 8 [1 0] 8 [1 6 [5 [0 6] 0 60] [1 0] [8 [1 0] 8 [1 6 [5 [0 6] 0 252] [1 0] [8 [0 253] 9 2 10 [6 7 [0 3] [0 30] 0 6] 0 2] 9 2 10 [6 4 0 6] 0 1] 9 2 0 1] 9 2 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] 8 [1 0] [1 6 [5 [1 0] 0 6] [1 0] [0 24] 9 2 10 [6 0 13] 0 1] 0 1] [8 [1 0 [0 15] 0 0 0] [1 6 [5 [1 0] 0 12] [1 0] [8 [0 13] 9 2 10 [6 0 56] 0 2] 9 2 10 [12 0 25] 0 1] 0 1] [8 [1 0] [1 6 [5 [1 0] 0 6] [1 0] [6 [5 [1 0] 0 12] [1 0] 0 25] 9 2 10 [6 0 13] 0 1] 0 1] [8 [8 [9 343 0 1] 9 2 10 [6 [0 30] 7 [0 3] 8 [1 0 0] [1 8 [9 20 0 7] 9 2 10 [6 [7 [0 3] 4 0 13] 7 [0 3] 8 [9 4 0 7] 9 2 10 [6 [0 28] 0 126] 0 2] 0 2] 0 1] 0 2] 8 [8 [9 343 0 3] 9 2 10 [6 [0 62] 7 [0 3] 8 [1 0 0] [1 8 [9 95 0 15] 9 2 10 [6 [7 [0 3] 8 [9 4 0 15] 9 2 10 [6 [0 254] 0 254] 0 2] 7 [0 3] 8 [9 20 0 15] 9 2 10 [6 [0 29] 7 [0 3] 8 [9 4 0 15] 9 2 10 [6 [0 28] 0 254] 0 2] 0 2] 0 2] 0 1] 0 2] 8 [9 685 0 7] 9 2 10 [6 [0 14] 0 6] 0 2] 8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 12] 9 2 10 [6 [8 [9 684 0 7] 9 2 10 [6 0 28] 0 2] 8 [9 684 0 7] 9 2 10 [6 0 29] 0 2] 0 1] 0 1] 9 94 0 1] 0 1] 9 2 10 [6 0 3] 0 2] diff --git a/desk/bar/mmul.noun b/desk/bar/mmul.noun new file mode 100644 index 0000000000000000000000000000000000000000..f9e11d2d450718a6dd0db20feabeef684291838d GIT binary patch literal 859 zcmZ=X;Sgi#*5zwD%6jn877GruU2F#*ZQ$O1(R5)=r>u&zS!946hnNcU(X2yt6L@Z> zB&yGue?pDh8YtF$F>wyt$qBwp^eCN)`M=>!R{~R z_~3SZgEZG|x9d$n%`dD%?l>ByOm4NE(s#H3Vva(@1fExXqTdS=M?aVrwvU*J#gI@W_i zF7;rm+wT|X<$5&8Fx3D}V*VIdnNpdLC|^E?N+yy-)MsvIb+bbtv(to?4m=DZT!H*JTuT`b)p z#LxNPxiC^d2b5fjOEvVGQ-BF&w<4p_pSI#mNO(!Fn*p{m78G|2XYfM;fo~;P@NU3L z^*i=F&l4?x>B3+RFkm()NX}S&c&7fxWHl`9@h*KV@Bo-#ntI#259e9fm`&LOb*uyX!M3U@4{2FYc<@X*xECCVkPw~Y I-TsgV0FxYZH~;_u literal 0 HcmV?d00001 diff --git a/desk/bar/sha512.nock b/desk/bar/sha512.nock new file mode 100644 index 0000000..4a897ba --- /dev/null +++ b/desk/bar/sha512.nock @@ -0,0 +1 @@ +[0 8 [1 [8 [1 0 0] [1 8 [1 0] 8 [1 6 [5 [1 0] 0 60] [0 6] 9 2 10 [60 8 [9 21.948 0 31] 9 2 10 [6 0 124] 0 2] 10 [6 8 [9 84 0 31] 9 2 10 [6 [0 125] 0 14] 0 2] 0 1] 9 2 0 1] 0 1] [[8 [1 0 0] [1 6 [5 [1 0] 0 12] [0 13] 6 [5 [1 0] 0 13] [0 12] 8 [9 84 0 7] 9 2 10 [6 [7 [0 3] 8 [9 188 0 7] 9 2 10 [6 [7 [0 3] 8 [9 84 0 7] 9 2 10 [6 [7 [0 3] 8 [9 188 0 7] 9 2 10 [6 [0 28] 7 [0 3] 1 2] 0 2] 7 [0 3] 8 [9 188 0 7] 9 2 10 [6 [0 29] 7 [0 3] 1 2] 0 2] 0 2] 7 [0 3] 1 2]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9 2 10 [6 0 14] 0 2] 0 1] 0 2] 0 1] [8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 0] 8 [1 0] 8 [1 6 [8 [9 87.799 0 31] 9 2 10 [6 [0 124] 0 125] 0 2] [0 6] 9 2 10 [60 8 [9 379 0 31] 9 2 10 [6 [0 124] 0 125] 0 2] 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] [[8 [1 0] [1 6 [5 [1 0] 0 6] [0 0] 8 [1 0] 8 [1 6 [5 [0 30] 4 0 6] [0 6] 9 2 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] [8 [1 0 0] [1 8 [6 [6 [3 0 12] [1 1] 1 0] [[0 12] 1 1] 0 12] 8 [9 4 0 15] 9 2 10 [6 [0 61] 7 [0 3] 8 [9 2.742 0 15] 9 2 10 [6 7 [0 3] 8 [9 4 0 15] 9 2 10 [6 [7 [0 3] 8 [9 2.742 0 15] 9 2 10 [6 0 12] 0 2] 0 13] 0 2] 0 2] 0 2] 0 1] [8 [1 0 0] [1 8 [6 [6 [3 0 12] [1 1] 1 0] [[0 12] 1 1] 0 12] 8 [9 188 0 15] 9 2 10 [6 [0 61] 7 [0 3] 8 [9 2.742 0 15] 9 2 10 [6 7 [0 3] 8 [9 4 0 15] 9 2 10 [6 [7 [0 3] 8 [9 2.742 0 15] 9 2 10 [6 0 12] 0 2] 0 13] 0 2] 0 2] 0 2] 0 1] 8 [1 0 0] [1 6 [6 [5 [0 12] 0 13] [1 1] 1 0] [6 [8 [1 6 [5 [1 0] 0 28] [1 0] 6 [5 [1 0] 0 29] [1 1] 9 2 10 [14 [8 [9 21.948 0 15] 9 2 10 [6 0 60] 0 2] 8 [9 21.948 0 15] 9 2 10 [6 0 61] 0 2] 0 1] 9 2 0 1] [1 0] 1 1] 1 1] 0 1] 8 [1 0 0] [1 6 [5 [1 0] 0 13] [1 0] 8 [8 [9 2.742 0 7] 9 2 10 [6 7 [0 3] 8 [9 2.742 0 7] 9 2 10 [6 0 28] 0 2] 0 2] 8 [1 6 [8 [9 87.799 0 31] 9 2 10 [6 [0 125] 0 14] 0 2] [1 1] 4 9 2 10 [61 8 [9 5.486 0 31] 9 2 10 [6 [0 125] 0 14] 0 2] 0 1] 9 2 0 1] 0 1] 8 [1 0 [0 0] 0] [1 8 [9 87.798 0 7] 9 2 10 [6 [7 [0 3] [0 12] 0 53] 7 [0 3] 8 [9 87 0 7] 9 2 10 [6 [7 [0 3] [0 12] 0 52] 0 59] 0 2] 0 2] 0 1] [8 [1 0 0] [1 6 [5 [1 0] 0 12] [1 0] 6 [5 [1 0] 0 13] [1 0] 8 [6 [6 [5 [1 0] 8 [9 188 0 7] 9 2 10 [6 [0 28] 7 [0 3] 1 2] 0 2] [1 1] 1 0] [6 [6 [5 [1 0] 8 [9 188 0 7] 9 2 10 [6 [0 29] 7 [0 3] 1 2] 0 2] [1 1] 1 0] [1 0] 1 1] 1 1] 8 [9 84 0 15] 9 2 10 [6 [7 [0 3] 6 [0 2] [1 1] 1 0] 7 [0 3] 8 [9 4 0 15] 9 2 10 [6 [7 [0 3] 1 2] 7 [0 3] 9 2 10 [6 [8 [9 5.486 0 15] 9 2 10 [6 [0 60] 7 [0 3] 1 2] 0 2] 8 [9 5.486 0 15] 9 2 10 [6 [0 61] 7 [0 3] 1 2] 0 2] 0 3] 0 2] 0 2] 0 1] 8 [1 0 0] [1 8 [6 [6 [3 0 12] [1 1] 1 0] [[0 12] 1 1] 0 12] 8 [9 5.486 0 15] 9 2 10 [6 [0 61] 7 [0 3] 8 [9 2.742 0 15] 9 2 10 [6 7 [0 3] 8 [9 4 0 15] 9 2 10 [6 [7 [0 3] 8 [9 2.742 0 15] 9 2 10 [6 0 12] 0 2] 0 13] 0 2] 0 2] 0 2] 0 1] [8 [1 0 [0 15] 0 0 0] [1 6 [5 [1 0] 0 12] [1 0] [8 [0 13] 9 2 10 [6 0 56] 0 2] 9 2 10 [12 0 25] 0 1] 0 1] [8 [8 [1 0 0] [1 7 [10 [13 8 [9 343 0 7] 9 2 10 [6 [7 [0 3] 1 3] [7 [0 3] [1 0] 0 12] 0 29] 0 2] 0 1] 8 [[7 [9 190 0 7] 10 [6 1 6] 0 1] 8 [1 0 0] [1 8 [9 343 0 31] 9 2 10 [6 [7 [0 3] 1 6] [7 [0 3] [0 12] 1 1] 0 29] 0 2] 0 1] 8 [[9 4 0 4] [9 10 0 4] [9 23 0 4] 9 91 0 4] 8 [8 [9 43.898 0 31] 9 2 10 [6 [7 [0 3] 1 0 3] 0 124] 0 2] 8 [8 [9 378 0 63] 9 2 10 [6 [7 [0 3] 1 0] 7 [0 3] [[0 2] 0 125] [1 8 128] [[8 [9 188 0 63] 9 2 10 [6 [7 [0 3] 8 [9 379 0 63] 9 2 10 [6 [7 [0 3] 1 1.920] 7 [0 3] 8 [9 188 0 63] 9 2 10 [6 [7 [0 3] 8 [9 84 0 63] 9 2 10 [6 [7 [0 3] 1 8] 0 6] 0 2] 7 [0 3] 1 1.024] 0 2] 0 2] 7 [0 3] 1 1.024] 0 2] 1 0] [[1 128] 8 [8 [9 190 0 63] 9 23 10 [6 7 [0 3] 1 7] 0 2] 9 2 10 [6 0 6] 0 2] 1 0] 0 2] 8 [8 [9 10.975 0 127] 9 2 10 [6 [7 [0 3] 1 10] 0 6] 0 2] 8 [1 79.401.733.742.453.553.460.850.974.233.500.163.835.348.862.130.151.944.941.868.585.954.107.921.729.851.966.433.709.504.484.594.679.435.920.217.403.432.902.140.994.683.155.589.145.428.503.332.143.350.099.233.675.287.629.342.148.958.156.760.608.048.718.624.254.807.234.857.957.852.455.754.214.058.884.921.634.611.326.080.205.028.019.932.017.299.108.412.944.066.748.695.243.938.538.222.011.871.193.474.315.677.411.354.832.238.878.879.580.026.905.713.004.175.351.116.394.147.631.691.291.051.896.265.977.658.407.765.544.729.563.264.081.113.624.712.905.526.199.824.849.243.202.590.140.303.189.688.134.116.128.494.335.089.560.005.513.154.509.089.550.000.761.255.799.866.325.224.245.302.341.002.348.938.473.127.098.360.843.277.708.398.217.491.814.982.223.042.684.701.014.439.043.985.348.647.627.260.823.478.770.080.292.761.916.386.342.786.932.479.083.740.835.907.016.162.305.032.857.537.046.140.546.558.784.246.985.852.552.655.451.305.556.579.902.388.712.433.715.435.365.355.118.487.175.420.852.053.958.416.930.158.193.676.921.281.365.595.997.321.839.184.966.351.001.269.990.065.517.904.640.083.352.893.266.395.342.353.390.165.452.080.100.972.549.846.464.999.139.078.654.794.207.765.074.847.081.235.236.169.199.660.995.854.142.221.606.170.754.579.040.654.251.887.857.292.569.044.177.719.716.794.421.818.060.776.737.044.033.093.531.714.540.655.966.802.073.377.033.638.767.129.476.236.253.099.442.454.114.897.544.131.384.012.900.311.640.737.753.004.131.001.050.775.512.054.237.450.756.896.889.568.333.869.892.075.607.669.344.033.195.862.547.426.252.590.686.148.624.074.116.392.191.708.788.571.081.612.071.343.428.420.806.936.287.685.748.480.654.347.806.239.090.915.076.728.239.100.344.933.911.375.104.624.615.916.807.971.556.351.801.760.876.948.354.563.175.513.568.373.209.404.554.063.007.387.465.388.995.308.446.212.666.495.189.366.480.319.809.197.885.878.244.498.379.497.550.728.853.899.917.860.378.912.106.109.910.455.014.168.049.971.294.187.227.495.270.703.061.017.345.423.922.759.262.219.819.475.714.723.322.081.387.967.974.931.234.460.660.416.134.255.259.170] 8 [1 4.812.048.101.252.663.290.612.834.066.995.531.158.742.713.419.846.591.145.376.350.182.667.999.366.794.400.516.985.448.940.192.745.739.731.038.893.726.247.251.609.359.409.289.363.687.649.257.956.495.378.696] 8 [1 0] 8 [1 6 [5 [0 6] 0 62] [8 [9 382 0 4.095] 9 2 10 [6 [7 [0 3] 1 6] [0 30] 0 8.182] 0 2] 8 [8 [8 [9 343 0 4.095] 9 2 10 [6 [7 [0 3] 1 10] [7 [0 3] [0 6] 1 1] 0 254] 0 2] 8 [8 [9 382 0 8.191] 9 2 10 [6 [7 [0 3] 1 6] [0 6] 0 16.374] 0 2] 8 [1 16] 8 [1 6 [5 [1 80] 0 6] [0 14] 8 [[8 [0 32.765] 9 2 10 [6 [7 [0 3] 8 [9 379 0 65.535] 9 2 10 [6 [0 14] 7 [0 3] 1 15] 0 2] 0 30] 0 2] [8 [0 32.765] 9 2 10 [6 [7 [0 3] 8 [9 379 0 65.535] 9 2 10 [6 [0 14] 7 [0 3] 1 2] 0 2] 0 30] 0 2] [8 [0 32.765] 9 2 10 [6 [7 [0 3] 8 [9 379 0 65.535] 9 2 10 [6 [0 14] 7 [0 3] 1 16] 0 2] 0 30] 0 2] 8 [0 32.765] 9 2 10 [6 [7 [0 3] 8 [9 379 0 65.535] 9 2 10 [6 [0 14] 7 [0 3] 1 7] 0 2] 0 30] 0 2] 8 [8 [9 20 0 131.071] 8 [0 2] 9 2 10 [6 [7 [0 3] 7 [0 3] 8 [0 65.530] 9 2 10 [6 [7 [0 3] 1 0] [7 [0 3] 1 1] 0 12] 0 2] 7 [0 3] 8 [0 2] 9 2 10 [6 [7 [0 3] 7 [0 3] 8 [0 65.530] 9 2 10 [6 [7 [0 3] 1 0] [7 [0 3] 1 8] 0 12] 0 2] 7 [0 3] 7 [0 3] 8 [9 87 0 131.071] 9 2 10 [6 [7 [0 3] 1 0 7] 0 12] 0 2] 0 2] 0 2] 8 [8 [9 20 0 262.143] 8 [0 2] 9 2 10 [6 [7 [0 3] 7 [0 3] 8 [0 131.066] 9 2 10 [6 [7 [0 3] 1 0] [7 [0 3] 1 19] 0 58] 0 2] 7 [0 3] 8 [0 2] 9 2 10 [6 [7 [0 3] 7 [0 3] 8 [0 131.066] 9 2 10 [6 [7 [0 3] 1 0] [7 [0 3] 1 61] 0 58] 0 2] 7 [0 3] 7 [0 3] 8 [9 87 0 262.143] 9 2 10 [6 [7 [0 3] 1 0 6] 0 58] 0 2] 0 2] 0 2] 8 [8 [0 131.068] 8 [0 2] 9 2 10 [6 [0 502] 7 [0 3] 8 [0 2] 9 2 10 [6 [0 30] 7 [0 3] 8 [0 2] 9 2 10 [6 [0 503] 0 14] 0 2] 0 2] 0 2] 9 2 10 [14 8 [9 170 0 1.048.575] 9 2 10 [6 [7 [0 3] 8 [9 43.898 0 1.048.575] 9 2 10 [6 [7 [0 3] [1 6] 0 126] 0 6] 0 2] 0 510] 0 2] 10 [6 4 0 126] 0 31] 9 2 0 1] 8 [1 0] 8 [[8 [0 8.189] 9 2 10 [6 [7 [0 3] 1 0] 0 126] 0 2] [8 [0 8.189] 9 2 10 [6 [7 [0 3] 1 1] 0 126] 0 2] [8 [0 8.189] 9 2 10 [6 [7 [0 3] 1 2] 0 126] 0 2] [8 [0 8.189] 9 2 10 [6 [7 [0 3] 1 3] 0 126] 0 2] [8 [0 8.189] 9 2 10 [6 [7 [0 3] 1 4] 0 126] 0 2] [8 [0 8.189] 9 2 10 [6 [7 [0 3] 1 5] 0 126] 0 2] [8 [0 8.189] 9 2 10 [6 [7 [0 3] 1 6] 0 126] 0 2] 8 [0 8.189] 9 2 10 [6 [7 [0 3] 1 7] 0 126] 0 2] 8 [1 6 [5 [1 80] 0 14] [9 2 10 [14 8 [9 383 0 65.535] 9 2 10 [6 [7 [0 3] 1 6] 7 [0 3] [8 [0 16.380] 9 2 10 [6 [0 28] 7 [0 3] 8 [0 32.765] 9 2 10 [6 [7 [0 3] 1 0] 0 510] 0 2] 0 2] [8 [0 16.380] 9 2 10 [6 [0 58] 7 [0 3] 8 [0 32.765] 9 2 10 [6 [7 [0 3] 1 1] 0 510] 0 2] 0 2] [8 [0 16.380] 9 2 10 [6 [0 118] 7 [0 3] 8 [0 32.765] 9 2 10 [6 [7 [0 3] 1 2] 0 510] 0 2] 0 2] [8 [0 16.380] 9 2 10 [6 [0 238] 7 [0 3] 8 [0 32.765] 9 2 10 [6 [7 [0 3] 1 3] 0 510] 0 2] 0 2] [8 [0 16.380] 9 2 10 [6 [0 478] 7 [0 3] 8 [0 32.765] 9 2 10 [6 [7 [0 3] 1 4] 0 510] 0 2] 0 2] [8 [0 16.380] 9 2 10 [6 [0 958] 7 [0 3] 8 [0 32.765] 9 2 10 [6 [7 [0 3] 1 5] 0 510] 0 2] 0 2] [8 [0 16.380] 9 2 10 [6 [0 1.918] 7 [0 3] 8 [0 32.765] 9 2 10 [6 [7 [0 3] 1 6] 0 510] 0 2] 0 2] [8 [0 16.380] 9 2 10 [6 [0 1.919] 7 [0 3] 8 [0 32.765] 9 2 10 [6 [7 [0 3] 1 7] 0 510] 0 2] 0 2] 1 0] 0 2] 10 [6 4 0 126] 0 31] 8 [8 [9 20 0 65.535] 8 [0 2] 9 2 10 [6 [7 [0 3] 7 [0 3] 8 [0 32.762] 9 2 10 [6 [7 [0 3] 1 0] [7 [0 3] 1 28] 0 28] 0 2] 7 [0 3] 8 [0 2] 9 2 10 [6 [7 [0 3] 7 [0 3] 8 [0 32.762] 9 2 10 [6 [7 [0 3] 1 0] [7 [0 3] 1 34] 0 28] 0 2] 7 [0 3] 7 [0 3] 8 [0 32.762] 9 2 10 [6 [7 [0 3] 1 0] [7 [0 3] 1 39] 0 28] 0 2] 0 2] 0 2] 8 [8 [9 20 0 131.071] 8 [0 2] 9 2 10 [6 [7 [0 3] 7 [0 3] 8 [9 86 0 131.071] 9 2 10 [6 [0 60] 0 122] 0 2] 7 [0 3] 8 [0 2] 9 2 10 [6 [7 [0 3] 7 [0 3] 8 [9 86 0 131.071] 9 2 10 [6 [0 60] 0 246] 0 2] 7 [0 3] 7 [0 3] 8 [9 86 0 131.071] 9 2 10 [6 [0 122] 0 246] 0 2] 0 2] 0 2] 8 [8 [0 65.532] 9 2 10 [6 [0 14] 0 6] 0 2] 8 [8 [9 20 0 524.287] 8 [0 2] 9 2 10 [6 [7 [0 3] 7 [0 3] 8 [0 262.138] 9 2 10 [6 [7 [0 3] 1 0] [7 [0 3] 1 14] 0 4.062] 0 2] 7 [0 3] 8 [0 2] 9 2 10 [6 [7 [0 3] 7 [0 3] 8 [0 262.138] 9 2 10 [6 [7 [0 3] 1 0] [7 [0 3] 1 18] 0 4.062] 0 2] 7 [0 3] 7 [0 3] 8 [0 262.138] 9 2 10 [6 [7 [0 3] 1 0] [7 [0 3] 1 41] 0 4.062] 0 2] 0 2] 0 2] 8 [8 [9 20 0 1.048.575] 9 2 10 [6 [7 [0 3] 8 [9 86 0 1.048.575] 9 2 10 [6 [0 8.158] 0 16.318] 0 2] 7 [0 3] 8 [9 86 0 1.048.575] 9 2 10 [6 [7 [0 3] 8 [0 1.048.567] 9 2 10 [6 0 8.158] 0 2] 0 32.638] 0 2] 0 2] 8 [8 [0 524.284] 8 [0 2] 9 2 10 [6 [0 130.943] 7 [0 3] 8 [0 2] 9 2 10 [6 [0 30] 7 [0 3] 8 [0 2] 9 2 10 [6 [0 14] 7 [0 3] 8 [0 2] 9 2 10 [6 [7 [0 3] 7 [0 3] 8 [0 1.048.573] 9 2 10 [6 [0 1.022] 0 32.766] 0 2] 7 [0 3] 7 [0 3] 8 [0 1.048.573] 9 2 10 [6 [0 1.022] 0 2.046] 0 2] 0 2] 0 2] 0 2] 0 2] 9 2 10 [14 4 0 1.022] 10 [6 [8 [0 1.048.572] 9 2 10 [6 [0 6] 0 62] 0 2] [0 1.020] [0 2.042] [0 4.086] [8 [0 1.048.572] 9 2 10 [6 [0 16.366] 0 6] 0 2] [0 16.350] [0 32.702] 0 65.406] 0 127] 9 2 0 1] 9 2 0 1] 0 1] 9 2 10 [6 7 [0 3] 1 3 6.513.249] 0 2] [[8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 0] 8 [9 379 0 7] 9 2 10 [6 [0 28] 7 [0 3] 8 [9 4 0 7] 9 2 10 [6 [0 29] 7 [0 3] 8 [9 5.486 0 7] 9 2 10 [6 [0 28] 0 29] 0 2] 0 2] 0 2] 0 1] [8 [1 0 0] [1 6 [5 [1 0] 0 13] [1 0] 8 [9 84 0 7] 9 2 10 [6 [7 [0 3] 8 [9 87.798 0 7] 9 2 10 [6 [7 [0 3] [0 12] 0 52] 0 117] 0 2] 7 [0 3] 8 [9 43.898 0 7] 9 2 10 [6 [7 [0 3] [0 12] 0 52] 7 [0 3] 9 2 10 [13 0 27] 0 1] 0 2] 0 2] 0 1] 8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 12] 9 2 10 [6 [8 [9 21.948 0 7] 9 2 10 [6 0 28] 0 2] 8 [9 21.948 0 7] 9 2 10 [6 0 29] 0 2] 0 1] 0 1] [8 [1 0] [1 [8 [1 0 0] [1 8 [9 90 0 7] 9 2 10 [6 7 [0 3] 8 [9 84 0 31] 9 2 10 [6 [0 28] 0 29] 0 2] 0 2] 0 1] [8 [1 0 0 0] [1 8 [8 [9 90 0 7] 9 2 10 [6 0 59] 0 2] 8 [8 [9 2.742 0 63] 9 2 10 [6 7 [0 3] 8 [9 379 0 63] 9 2 10 [6 [0 126] 0 60] 0 2] 0 2] 8 [8 [9 188 0 127] 9 2 10 [6 [0 250] 0 6] 0 2] 8 [9 90 0 63] 9 2 10 [6 7 [0 3] 8 [9 170 0 255] 9 2 10 [6 [7 [0 3] 8 [9 87 0 255] 9 2 10 [6 [7 [0 3] [0 124] 0 2] 0 30] 0 2] 7 [0 3] 8 [9 43.898 0 255] 9 2 10 [6 [7 [0 3] [0 124] 8 [9 379 0 255] 9 2 10 [6 [0 14] 0 6] 0 2] 0 30] 0 2] 0 2] 0 2] 0 1] [[8 [1 0 0 0] [1 8 [8 [9 90 0 7] 9 2 10 [6 0 59] 0 2] 8 [8 [9 2.742 0 63] 9 2 10 [6 7 [0 3] 8 [9 379 0 63] 9 2 10 [6 [0 126] 0 60] 0 2] 0 2] 8 [8 [9 188 0 127] 9 2 10 [6 [0 250] 0 6] 0 2] 8 [9 90 0 63] 9 2 10 [6 7 [0 3] 8 [9 170 0 255] 9 2 10 [6 [7 [0 3] 8 [9 43.898 0 255] 9 2 10 [6 [7 [0 3] [0 124] 0 2] 0 30] 0 2] 7 [0 3] 8 [9 87 0 255] 9 2 10 [6 [7 [0 3] [0 124] 8 [9 379 0 255] 9 2 10 [6 [0 14] 0 6] 0 2] 0 30] 0 2] 0 2] 0 2] 0 1] [8 [1 0] [1 8 [9 87.798 0 31] 9 2 10 [6 [0 62] 0 14] 0 2] 0 1] 8 [1 0] [1 8 [9 379 0 31] 9 2 10 [6 [7 [0 3] 8 [9 21.948 0 31] 9 2 10 [6 7 [0 3] 8 [9 2.742 0 31] 9 2 10 [6 7 [0 3] 8 [9 2.742 0 31] 9 2 10 [6 0 62] 0 2] 0 2] 0 2] 7 [0 3] 8 [9 90 0 7] 9 2 10 [6 0 14] 0 2] 0 2] 0 1] 8 [1 0] [1 7 [10 [6 8 [9 90 0 7] 9 2 10 [6 0 14] 0 2] 0 1] 6 [8 [9 1.370 0 31] 9 2 10 [6 [0 62] 7 [0 3] 1 3] 0 2] [0 6] 8 [8 [9 21.948 0 31] 9 2 10 [6 0 62] 0 2] 8 [9 170 0 63] 9 2 10 [6 [7 [0 3] 8 [9 43.898 0 63] 9 2 10 [6 [0 6] 7 [0 3] 9 2 10 [30 0 2] 10 [6 8 [9 343 0 63] 9 2 10 [6 [0 6] [7 [0 3] 1 0 1] 0 30] 0 2] 0 3] 0 2] 7 [0 3] 9 2 10 [30 0 2] 10 [6 8 [9 343 0 63] 9 2 10 [6 [0 6] [7 [0 3] 1 1 1] 0 30] 0 2] 0 3] 0 2] 0 1] 0 1] [8 [1 0 0 [0 15] 0 0 0] [1 8 [9 383 0 7] 9 2 10 [6 [0 28] 7 [0 3] 8 [9 22 0 7] 9 2 10 [6 [7 [0 3] 8 [9 684 0 7] 9 2 10 [6 [0 28] 0 58] 0 2] 0 59] 0 2] 0 2] 0 1] 8 [1 0 0] [1 8 [6 [6 [3 0 12] [1 1] 1 0] [[0 12] 1 1] 0 12] 8 [1 0] 8 [1 6 [5 [1 0] 0 125] [1 0] 8 [9 84 0 63] 9 2 10 [6 [7 [0 3] 9 2 10 [125 0 251] 10 [6 4 0 6] 0 1] 7 [0 3] 8 [9 43.898 0 63] 9 2 10 [6 [7 [0 3] [0 28] 8 [9 4 0 63] 9 2 10 [6 [0 61] 0 14] 0 2] 7 [0 3] 8 [9 87.798 0 63] 9 2 10 [6 [7 [0 3] [0 28] 0 29] 0 506] 0 2] 0 2] 0 2] 9 2 0 1] 0 1] 9 46 0 1] diff --git a/desk/bar/sha512.noun b/desk/bar/sha512.noun new file mode 100644 index 0000000000000000000000000000000000000000..235d55f1665fe1723477581a92db952d029545ba GIT binary patch literal 5284 zcmaJ_dpwls9zR=BVa6<~nP%KhN?A$72xZ6E&Cvzbb}C5|P0E-t(oj~8+svs{Hf z0e@qgdTVANO`vklUNJXl>*Sg=M$wt?3-ymCJij_ejs49t{?#{xG+)i0VU@H-^aI(7 zsr#_PPBol7U>}^G6jCi-O|z-oDaZ-sH>b45I9P7-bX8Y`yDvUgNN5ZLmhN2IZ;rkh zGE%A&Lo8xM6|UYwgR?1t1B7XN3#mJwTTmSSJ6)inukEhmO4@);i;c~*Q$p@mz|5`L8)LVi!fPw7J zWwMrRT9m1ba5U!@FweWxHnZf!AGbP5{fk`GLZf1F76G&T7&yo5HcZ)_WivrKI&#jCF<4xO!J(T_<8zj2xgKXRGxThtYHSe!K5gL~W+F%IB=n><}sv%A_B zMBjDXS!zMaI+cdJp0SUaVkVHKnmR0(@g((`foTT2yicKh=~-Uz84BA;YN3emG(XBl ze+l_6FxpnN(ES;TZ|W;idbfSBNG~oUAK25T9{AK*a|)Oxe^{r@uQFnS>ERMtDz**d z7saHSr;o*XW(7)-4_{&uhL_Cm7V$SuXH8z1fZ?#EEx=T-$Feo9nhz|WQpOaxU@<0d zXL5HGQV-WM93T{g>7lT6Se~Q`0_6aDEGE*}YQK3zM}gKl@G6H}NcDA=x~PG3oaQwy zsdw=@d6`}qu@9zJIKom*`VFR}ww+}~9CQa&7A;PG4lGUU^qaR1d_P^J%==fq|4qdq zYYeT&?LDrzhfjH6L5XbUxUNlQo?l-`{pMh1U~@`fw|Fnea+qYZsO^z>Z@7Tj!b6T) zCb$7)+yZI%y5(isA}R(-;%%`fZ)^<)C;F9ls4|9)Js{JO0xZ)ov?lep4?EcOE4kqy zS)@|tBX!>9Xo*Rta_&Z&fJMJ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021&X3vj1^iQ5KnBq5qn)*OuSkl6eklgN$~ zF>h^&!FUQD6?Y-wE&ORxyOGH3@MWYd#WFwaaPHk}5MMG%b+y}gHiP>$d|&0fYwCF`X3?$^u`M?fQVwmL$8GNw( z;3}qXD;(KTSKYkq05d#bxV$`{f=}m43pc<$5&C3oP1tV;@Xxgc*ouQ@B)BJ7l~XUd z#}CSeAu+^T!rITFSz(R|WeKJjs>jg%_{&W5A2!_z(`(L#EAZJ&?d;z<8FOymw}3^w zrG#g!{K|agKZtc;6D$PyhIEheg;__udpaZq6FTae3h1kYtKb7kPromTfp(7@^B>)( Bq}l)g From ae3ba445355bba44a5b854774291311eddc16fc3 Mon Sep 17 00:00:00 2001 From: Sigilante Date: Thu, 12 Mar 2026 17:14:42 -0500 Subject: [PATCH 6/7] Add benchmark expected results and fix atomgmp underflow bug New: desk/bar/tests.json with expected results for all 12 benchmarks. Each entry has name, description, subject, default_subject, and result. Slow benchmarks use smaller test subjects (e.g. factorial 5 not 40). Hardcoded benchmarks (atomcat/dog/gmp, sha512) have results computed via stdlib since naive Nock is too slow to verify directly. Fix: atomgmp.hoon used n=(bex 128) which made m < n, causing sub to underflow. Changed to n=(bex 127) to match the atomcat/dog pattern where m=(dec (bex N)), n=(bex N/2). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- desk/bar/atomgmp.hoon | 2 +- desk/bar/atomgmp.nock | 2 +- desk/bar/atomgmp.noun | Bin 628 -> 644 bytes desk/bar/tests.json | 91 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 desk/bar/tests.json diff --git a/desk/bar/atomgmp.hoon b/desk/bar/atomgmp.hoon index e03613c..1daba20 100644 --- a/desk/bar/atomgmp.hoon +++ b/desk/bar/atomgmp.hoon @@ -2,7 +2,7 @@ :- 0 != |^ ^- ^ -=+ [m=(dec (bex 128)) n=(bex 128)] +=+ [m=(dec (bex 128)) n=(bex 127)] :* (add m n) (sub m n) (mul m n) diff --git a/desk/bar/atomgmp.nock b/desk/bar/atomgmp.nock index c65588a..f7c0d38 100644 --- a/desk/bar/atomgmp.nock +++ b/desk/bar/atomgmp.nock @@ -1 +1 @@ -[0 8 [1 [8 [1 0 0] [1 8 [1 0] 8 [1 6 [5 [1 0] 0 60] [0 6] 9 2 10 [60 8 [9 174 0 31] 9 2 10 [6 0 124] 0 2] 10 [6 8 [9 20 0 31] 9 2 10 [6 [0 125] 0 14] 0 2] 0 1] 9 2 0 1] 0 1] [[8 [1 0 0] [1 6 [5 [1 0] 0 12] [0 13] 9 2 10 [6 [8 [9 174 0 7] 9 2 10 [6 0 28] 0 2] 4 0 13] 0 1] 0 1] [8 [1 0] [1 6 [5 [1 0] 0 6] [1 1] 8 [9 4 0 7] 9 2 10 [6 [7 [0 3] 1 2] 7 [0 3] 9 2 10 [6 8 [9 174 0 7] 9 2 10 [6 0 14] 0 2] 0 1] 0 2] 0 1] [8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 0] 8 [1 0] 8 [1 6 [8 [9 175 0 31] 9 2 10 [6 [0 124] 0 125] 0 2] [0 6] 9 2 10 [60 8 [9 47 0 31] 9 2 10 [6 [0 124] 0 125] 0 2] 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] [8 [1 0] [1 6 [5 [1 0] 0 6] [0 0] 8 [1 0] 8 [1 6 [5 [0 30] 4 0 6] [0 6] 9 2 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] 8 [1 0 0] [1 6 [6 [5 [0 12] 0 13] [1 1] 1 0] [6 [8 [1 6 [5 [1 0] 0 28] [1 0] 6 [5 [1 0] 0 29] [1 1] 9 2 10 [14 [8 [9 174 0 15] 9 2 10 [6 0 60] 0 2] 8 [9 174 0 15] 9 2 10 [6 0 61] 0 2] 0 1] 9 2 0 1] [1 0] 1 1] 1 1] 0 1] [8 [[8 [9 174 0 1] 9 2 10 [6 7 [0 3] 8 [9 42 0 1] 9 2 10 [6 7 [0 3] 1 128] 0 2] 0 2] 8 [9 42 0 1] 9 2 10 [6 7 [0 3] 1 128] 0 2] [8 [9 20 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [9 47 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [9 4 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [9 86 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] 8 [9 46 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 0] 8 [9 47 0 7] 9 2 10 [6 [0 28] 7 [0 3] 8 [9 4 0 7] 9 2 10 [6 [0 29] 7 [0 3] 8 [9 86 0 7] 9 2 10 [6 [0 28] 0 29] 0 2] 0 2] 0 2] 0 1] 8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 12] 9 2 10 [6 [8 [9 174 0 7] 9 2 10 [6 0 28] 0 2] 8 [9 174 0 7] 9 2 10 [6 0 29] 0 2] 0 1] 0 1] 9 22 0 1] +[0 8 [1 [8 [1 0 0] [1 8 [1 0] 8 [1 6 [5 [1 0] 0 60] [0 6] 9 2 10 [60 8 [9 174 0 31] 9 2 10 [6 0 124] 0 2] 10 [6 8 [9 20 0 31] 9 2 10 [6 [0 125] 0 14] 0 2] 0 1] 9 2 0 1] 0 1] [[8 [1 0 0] [1 6 [5 [1 0] 0 12] [0 13] 9 2 10 [6 [8 [9 174 0 7] 9 2 10 [6 0 28] 0 2] 4 0 13] 0 1] 0 1] [8 [1 0] [1 6 [5 [1 0] 0 6] [1 1] 8 [9 4 0 7] 9 2 10 [6 [7 [0 3] 1 2] 7 [0 3] 9 2 10 [6 8 [9 174 0 7] 9 2 10 [6 0 14] 0 2] 0 1] 0 2] 0 1] [8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 0] 8 [1 0] 8 [1 6 [8 [9 175 0 31] 9 2 10 [6 [0 124] 0 125] 0 2] [0 6] 9 2 10 [60 8 [9 47 0 31] 9 2 10 [6 [0 124] 0 125] 0 2] 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] [8 [1 0] [1 6 [5 [1 0] 0 6] [0 0] 8 [1 0] 8 [1 6 [5 [0 30] 4 0 6] [0 6] 9 2 10 [6 4 0 6] 0 1] 9 2 0 1] 0 1] 8 [1 0 0] [1 6 [6 [5 [0 12] 0 13] [1 1] 1 0] [6 [8 [1 6 [5 [1 0] 0 28] [1 0] 6 [5 [1 0] 0 29] [1 1] 9 2 10 [14 [8 [9 174 0 15] 9 2 10 [6 0 60] 0 2] 8 [9 174 0 15] 9 2 10 [6 0 61] 0 2] 0 1] 9 2 0 1] [1 0] 1 1] 1 1] 0 1] [8 [[8 [9 174 0 1] 9 2 10 [6 7 [0 3] 8 [9 42 0 1] 9 2 10 [6 7 [0 3] 1 128] 0 2] 0 2] 8 [9 42 0 1] 9 2 10 [6 7 [0 3] 1 127] 0 2] [8 [9 20 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [9 47 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [9 4 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [9 86 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] 8 [9 46 0 3] 9 2 10 [6 [0 12] 0 13] 0 2] [8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 0] 8 [9 47 0 7] 9 2 10 [6 [0 28] 7 [0 3] 8 [9 4 0 7] 9 2 10 [6 [0 29] 7 [0 3] 8 [9 86 0 7] 9 2 10 [6 [0 28] 0 29] 0 2] 0 2] 0 2] 0 1] 8 [1 0 0] [1 6 [5 [1 0] 0 13] [0 12] 9 2 10 [6 [8 [9 174 0 7] 9 2 10 [6 0 28] 0 2] 8 [9 174 0 7] 9 2 10 [6 0 29] 0 2] 0 1] 0 1] 9 22 0 1] diff --git a/desk/bar/atomgmp.noun b/desk/bar/atomgmp.noun index 59f9f4e6c79562b4c2b48d81dba0a0d74b27417c..189caebe6f8924147c48c8fed90c5dabedab7378 100644 GIT binary patch delta 213 zcmeyu(!#o72V?!#o4lPD9F0;0bl-fCJ~z$qk3G-zS+Ns%+}by%PT-Mr;jTV$PNpsU zteyv3ZTse@6XwNj=AM+umwsB&c5j-vN^>+=@ZOuIlz?)JXug*(O?L-wv3S$QT(CF~ zsM7KN!W6zqip?2`<{`Hqn$OXleYe1m2O^NNpzXeI!M2<-N24938Z(nX-c_JZV}D5@}cQ&1<7Xx z+hl?cXO}q|?I;Bcp4IbUD{bHWbb?geW@*>%!+91A=C90vD!<5jJyVc0>JTe)-YQ#n z_~xdYyw8t71=zBF@TQ+m6IW@DZl7f7(Z;i=^{#C|F2Cf8!v(T!uMJ|_nKs_+U34_j mT&6*~>l##-=$$uhlPtihZBrKT9WK=nXlF9?VB756$N>PpDpc$M diff --git a/desk/bar/tests.json b/desk/bar/tests.json new file mode 100644 index 0000000..bcf1ae5 --- /dev/null +++ b/desk/bar/tests.json @@ -0,0 +1,91 @@ +[ + { + "name": "ackermann", + "description": "Ackermann function ack(3,6)", + "subject": "[3 6]", + "default_subject": "[3 6]", + "result": "509" + }, + { + "name": "add", + "description": "Naive addition 1000 + 2000", + "subject": "[1.000 2.000]", + "default_subject": "[1.000 2.000]", + "result": "3.000" + }, + { + "name": "dec", + "description": "Naive decrement of 100", + "subject": "100", + "default_subject": "1.000.000", + "result": "99" + }, + { + "name": "factorial", + "description": "Factorial of 5 (tail-recursive)", + "subject": "5", + "default_subject": "40", + "result": "120" + }, + { + "name": "fibonacci", + "description": "Fibonacci of 10 (naive recursive)", + "subject": "10", + "default_subject": "10", + "result": "55" + }, + { + "name": "bigslot", + "description": "Deep tree addressing: axis 100 of list of 100 nulls", + "subject": "0", + "default_subject": "0", + "result": "0" + }, + { + "name": "atomcat", + "description": "Arithmetic on 16-bit atoms (add, sub, mul, div, mod)", + "subject": "0", + "default_subject": "0", + "result": "[98.303 32.767 2.147.450.880 1 32.767]", + "note": "Hardcoded inputs: m=2^16-1, n=2^15. Result computed via stdlib." + }, + { + "name": "atomdog", + "description": "Arithmetic on 32-bit atoms (add, sub, mul, div, mod)", + "subject": "0", + "default_subject": "0", + "result": "[6.442.450.943 2.147.483.647 9.223.372.034.707.292.160 1 2.147.483.647]", + "note": "Hardcoded inputs: m=2^32-1, n=2^31. Result computed via stdlib." + }, + { + "name": "atomgmp", + "description": "Arithmetic on 128-bit atoms (add, sub, mul, div, mod)", + "subject": "0", + "default_subject": "0", + "result": "[ 510.423.550.381.407.695.195.061.911.147.652.317.183 170.141.183.460.469.231.731.687.303.715.884.105.727 57.896.044.618.658.097.711.785.492.504.343.953.926.464.851.149.359.812.787.997.104.700.240.680.714.240 1 170.141.183.460.469.231.731.687.303.715.884.105.727 ]", + "note": "Hardcoded inputs: m=2^128-1, n=2^127. Result computed via stdlib." + }, + { + "name": "mmul", + "description": "3x3 matrix multiplication", + "subject": "3", + "default_subject": "10", + "result": "[[30 24 18 0] [84 69 54 0] [138 114 90 0] 0]" + }, + { + "name": "sha512", + "description": "SHA-512 hash of 'abc' (3 bytes)", + "subject": "0", + "default_subject": "0", + "result": "11.610.554.759.577.678.887.058.616.627.522.426.787.358.414.133.166.247.019.097.754.655.123.425.531.747.192.578.669.846.860.198.531.688.061.507.751.898.313.498.051.436.198.428.987.376.028.989.280.584.770.719", + "note": "Known test vector: SHA-512('abc'). Result computed from spec." + }, + { + "name": "sieve", + "description": "Sieve of Eratosthenes up to 30", + "subject": "30", + "default_subject": "100.000", + "result": "1.601.558.355", + "note": "Result computed via stdlib; too slow in pure Nock." + } +] From df3b5dc7db65d3d77b27f5ea56e05dc67f7ff444 Mon Sep 17 00:00:00 2001 From: Sigilante Date: Thu, 12 Mar 2026 17:18:45 -0500 Subject: [PATCH 7/7] Update README: self-contained benchmarks, tests.json, norm/ reference - Document that all benchmarks are now self-contained (no /+ tiny) - List .hoon, .nock, .noun, and tests.json as included files - Add Nock Reference Tests section pointing to norm/ - Rename 'Reporting' to 'Running' for the execution instructions section Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2e04ff3..e3c41e6 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,12 @@ Benchmark code evaluations for comparing Nock evaluation performance. Benchmarks include: -- `.nock` files containing cells of `[subject formula]` +- `.hoon` source files for the Nock code. +- `.nock` files containing cells of `[subject formula]`. - `.noun` jamfiles of the Nock code. -- `.hoon` source files for the Nock code (optional). +- `tests.json` with expected results for verification. -Generally speaking, benchmarks should be self-contained; they should not call out to additional libraries or include dependencies on even `/sys/hoon`. However, we do supply `tiny.nock` as a compiled version of `/lib/tiny` from Hoon 139K. This may be preferred for cases (like `ackermann`) which would otherwise require included more than six arms. +All benchmarks are self-contained; they do not call out to additional libraries or include dependencies on `/sys/hoon`. Each `.hoon` file inlines all required arms using the `|^` core pattern (see `ackermann.hoon` as the gold standard). ## Benchmarks @@ -34,7 +35,11 @@ Generally speaking, benchmarks should be self-contained; they should not call ou - [Mandelbrot set](https://en.wikipedia.org/wiki/Mandelbrot_set), `mandelbrot` (easier with FP core) - [MD5 hash](https://en.wikipedia.org/wiki/MD5), `md5` -## Reporting +## Nock Reference Tests + +The `norm/` directory contains a comprehensive test suite of Nock 4K opcodes (0–11 plus autocons). See [`norm/README.md`](norm/README.md) and [`norm/REFERENCE.md`](norm/REFERENCE.md) for details. + +## Running Nock benchmarks supply the subject and the formula as a cell; no arguments are externally specified. In the Urbit Dojo, a benchmark may be run directly as: @@ -45,6 +50,8 @@ Nock benchmarks supply the subject and the formula as a cell; no arguments are e For cases for which a computation may run unreasonably long, the `%jinx` hint may be used to time-limit the computation: `~> %jinx.[~s100]`. +## Reporting + A benchmark report should include the following data: 1. Hardware (CPU chipset): `cat /proc/cpuinfo`, then report `model name` and number of cores (`siblings`)