localharness 0.78.0

Agents that own themselves: one Rust crate that's both an agent SDK (streaming, tools, hooks, policies, triggers, MCP) and a wallet-owning, self-sovereign agent that runs in the browser.
Documentation
1
2
3
4
5
6
7
8
9
10
{
  "id": "023",
  "prompt": "Histogram with array WRITES: start from `let mut bins = [0; 8];`, run 64 iterations of the LCG hash h = (h * 1103515245 + 12345), bump bins[(h >> 16) & 7] each round, then draw the 8 bin counts as bars. Arrays are per-frame locals, which is fine here since it is recomputed every frame.",
  "solution_rl": "fn frame(t: i32) {\n    let mut bins = [0; 8];\n    let mut h: i32 = 7;\n    let mut i: i32 = 0;\n    while i < 64 {\n        h = h * 1103515245 + 12345;\n        let idx: i32 = (h >> 16) & 7;\n        bins[idx] = bins[idx] + 1;\n        i = i + 1;\n    }\n    let w: i32 = host::display::width();\n    let hh: i32 = host::display::height();\n    host::display::clear(0x000000);\n    let bw: i32 = w / 8;\n    let mut k: i32 = 0;\n    while k < 8 {\n        host::display::fill_rect(k * bw + 2, hh - bins[k] * 8 - 4, bw - 4, bins[k] * 8, 0xffaa00);\n        k = k + 1;\n    }\n    host::display::present();\n}\n",
  "tags": [
    "arrays",
    "prng",
    "loops"
  ]
}