aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/009-runtime-drafts/run.py
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-27 13:14:38 +0100
committereunhhu <[email protected]>2026-09-27 13:14:38 +0100
commit37d3a1e152707d2da587440c4cea8601b9ef0fd2 (patch)
tree1a4cbea9d8ca636deabd8fc24b0d73cdae2bdaef /research/experiments/009-runtime-drafts/run.py
parent5372d03b5968796515966e2cfc89628d6448f0c1 (diff)
downloadpure-37d3a1e152707d2da587440c4cea8601b9ef0fd2.tar.gz
pure-37d3a1e152707d2da587440c4cea8601b9ef0fd2.zip
Lay Pure out as a core with the parts selected around it
The app model, the tree store and the HTTP host lived in prototypes/connections among the earlier document runtime, the store was known only by its format's name, and Vega compiled six Pure sources by path. Now, as the README's principle has it: core/ runtime, flow and the app model (module*.c), with what the core asks of storage (state.h, store.h) store/ the tree store (PURETRE3, PUREREC1) serve/ pure-serve: HTTP host, outbound delivery, JSON in place cli/ pure-run, pure-edit-module A top-level make builds libpure.a (app model and store, for hosts to link) and the hosts; make check runs the store's and the app model's tests. The earlier runtime still builds from prototypes/connections against core/ and store/ (check, check-tree and check-core pass). Design 009 records the rule: parts by role behind libraries; git repositories split by coupling, so the store stays here while its contract moves with the core, and Vega stays apart.
Diffstat (limited to 'research/experiments/009-runtime-drafts/run.py')
-rwxr-xr-xresearch/experiments/009-runtime-drafts/run.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/research/experiments/009-runtime-drafts/run.py b/research/experiments/009-runtime-drafts/run.py
index 08ed55d..eb87a25 100755
--- a/research/experiments/009-runtime-drafts/run.py
+++ b/research/experiments/009-runtime-drafts/run.py
@@ -8,12 +8,12 @@ import subprocess
from pathlib import Path
HERE = Path(__file__).resolve().parent
-CONNECTIONS = HERE.parents[2] / 'prototypes' / 'connections'
+ROOT = HERE.parents[2]
def main():
parser = argparse.ArgumentParser()
- parser.add_argument('--work', type=Path, default=CONNECTIONS / 'build' / 'bench-drafts')
+ parser.add_argument('--work', type=Path, default=ROOT / 'build' / 'bench-drafts')
parser.add_argument('--size', type=int, default=1048576)
parser.add_argument('--saves', type=int, default=24)
parser.add_argument('--rounds', type=int, default=3)
@@ -24,8 +24,8 @@ def main():
device = subprocess.check_output(['findmnt', '-n', '-T', str(args.work), '-o', 'SOURCE,FSTYPE'], text=True).split()
assert device[1] != 'tmpfs', 'fsync is free on tmpfs'
binary = args.work / 'bench'
- subprocess.run(['cc', '-std=c17', '-O2', '-Wall', '-Wextra', '-Werror', f'-I{CONNECTIONS}',
- str(HERE / 'bench.c'), str(CONNECTIONS / 'store-tree.c'), '-o', str(binary)], check=True)
+ subprocess.run(['cc', '-std=c17', '-O2', '-Wall', '-Wextra', '-Werror', f'-I{ROOT / "core"}',
+ str(HERE / 'bench.c'), str(ROOT / 'store' / 'store-tree.c'), '-o', str(binary)], check=True)
runs = []
for round_number in range(args.rounds):
for mode in (('copy', 'draft') if round_number % 2 == 0 else ('draft', 'copy')):