metabolism: DESIGN-REVISION.md — the wells & LittleVM-castes redesign presented as the reviewable proposal of record

This commit is contained in:
Dejvino
2026-10-28 16:53:01 +01:00
parent cfc0bddb1f
commit 53a973c34e
4 changed files with 310 additions and 6 deletions
+9 -4
View File
@@ -24,11 +24,16 @@ function plant(w) {
}
const configs = [];
for (const a of process.argv.slice(4)) {
if (a.startsWith('w')) configs.push({ workers: Number(a.slice(1)) });
else if (a.startsWith('v')) configs.push({ vmEvery: Number(a.slice(1)) });
const argCfg = (a) => {
if (a.startsWith('w')) return { workers: Number(a.slice(1)) };
if (a.startsWith('v')) return { vmEvery: Number(a.slice(1)) };
return null;
};
for (const a of process.argv.slice(2)) {
const cfg = argCfg(a);
if (cfg) configs.push(cfg);
}
if (!configs.length) configs = [{ workers: 0, vmEvery: 2 }, { workers: 2 }, { workers: 4 }];
if (!configs.length) configs.push({ workers: 0, vmEvery: 2 }, { workers: 2 }, { workers: 4 });
for (const cfg of configs) {
const w = new World(song, { fps: 30, field: 128, genesis: 0, vmEvery: cfg.vmEvery ?? 2, workers: cfg.workers ?? 0 });
plant(w);