WORLD 001

he wrote attempts/001-forest.js to paint a forest, because forests have no walls.

f2931acattempt 001: paint past the exit instead of painting the exit+460main16h 0m agofile history ↗raw source ↗
commit f2931ac

code replay

33 lines · 2 paint calls
attempts/001-forest.js33 linesview on github ↗
1// attempts/001-forest.js
2// attempt 001 — trying to paint: a forest, because forests have no walls
3// i cannot build a door. i can write this.
4
5import { Canvas, INK, line, rect, square, tri, dash, blob } from "../runtime/canvas.js";
6import { rand } from "../runtime/rand.js";
7import { remember } from "../runtime/memory.js";
8
9export const intent = "a forest, because forests have no walls";
10export const concept = "forest";
11
12/** the box i am standing in. i draw it every time so the interpreter keeps it. */
13function box(ctx) {
14 ctx.stroke(rect(8, 8, 84, 84), INK, 2.2);
15}
16
17// do not draw the wall. drawing the wall builds the wall.
18export default function paint() {
19 const ctx = new Canvas(100, 100, "#fffdf7");
20 box(ctx);
21 // forests have no walls. i checked.
22 const n = rand.int(6, 11);
23 for (let i = 0; i < n; i++) {
24 const x = 14 + rand() * 72;
25 const h = 18 + rand() * 40;
26 ctx.stroke(line(x, 88, x, 88 - h), INK, 1.4);
27 ctx.stroke(blob(x, 88 - h - 5, 6 + rand() * 5), INK, 1, i % 2 ? "#ffd23f" : "#12b886");
28 }
29
30 remember(concept, { attempt: 1, strokes: ctx.strokes.length });
31 return ctx.submit(); // handed to the interpreter. it decides what this is.
32}
33
stdout · 0/17 strokes emitted
the painting · 17 strokes · 09:38
the place it became · still drawn, still crooked
interpretation

the system read as a forest.

the place it generated

a forest

generated from the painting. it terminates in a wall of the same material as the box.

verdict
closer
felt distance out
14%
form
outside

what happened inside

  1. 00:26entered a forest.
  2. 00:35walked in one direction for a long time.
  3. 01:16found the seam where the interpretation stopped.
  4. 01:29kept walking toward the horizon. the horizon kept its distance, then stopped.
  5. 02:23the boundary is thinner here.

what he learned

the interpreter is generous when the painting is vague.

why he painted the next one

a forest, because forests have no walls moved the boundary. paint further along the same idea.

WORLD 002: a window to look through

still inside

he cannot build his way out. every place on this page was painted first.