Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

11.6 KB
Raw Blame
  <!-- hurd:start -->
  <style>
    .hurd-stage { display: grid; grid-template-columns: minmax(0, auto) minmax(220px, 1fr); gap: 20px; align-items: start; }
    @media (max-width: 760px) { .hurd-stage { grid-template-columns: 1fr; } }
    .plate-box { background: var(--deep); border: 1px solid var(--line); border-radius: 6px; padding: 18px 16px; overflow: hidden; display: grid; place-items: center; min-height: 300px; }
    .plate { font: 400 clamp(6.5px, calc((100vw - 72px) / 34), 14px)/1.2 var(--mono); color: var(--bright); white-space: pre; }
    .plate-box.paper {
      background:
        radial-gradient(circle at 9px 50%, #cfc8b0 3.2px, transparent 3.6px) 0 0 / 100% 22px repeat-y,
        radial-gradient(circle at calc(100% - 9px) 50%, #cfc8b0 3.2px, transparent 3.6px) 0 0 / 100% 22px repeat-y,
        repeating-linear-gradient(#f3efdf 0 45px, #dfead2 45px 90px);
      border-color: #cfc8b0; padding-inline: 30px;
    }
    .plate.lit { filter: drop-shadow(0 0 2px var(--glow)) drop-shadow(0 0 9px var(--glow2)); }
    .plate-box.paper .plate { color: #262a2e; }
    .plate-box.paper.shiny .plate { color: #2c4f86; }
    .hurd-bar { display: flex; justify-content: space-between; align-items: center; background: var(--green); color: #080808; font: 14px/1.9 var(--mono); padding: 0 6px; border-radius: 3px; margin-bottom: 14px; white-space: pre; overflow: hidden; }
    .hurd-bar .cell { background: #080808; color: var(--green); padding: 0 1px; }
    .hurd-side h3 { margin: 0; font: 600 20px var(--mono); color: var(--bright); letter-spacing: .02em; }
    .hurd-side .tag { font: 12px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
    .hurd-side .tag.legendary { color: var(--yellow); } .hurd-side .tag.rare { color: var(--cyan); } .hurd-side .tag.secret { color: var(--magenta); }
    .hurd-side p { margin: 10px 0 0; }
    .hurd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
    .hurd-grid button { display: grid; gap: 6px; justify-items: center; padding: 10px 6px 8px; background: var(--deep); text-align: center; }
    .hurd-grid pre { font: 400 9px/1.2 var(--mono); color: var(--ink); min-height: 132px; display: grid; align-items: end; filter: drop-shadow(0 0 4px var(--glow2)); }
    .hurd-grid .nm { font: 12px var(--mono); color: var(--dim); }
    .hurd-grid button[aria-pressed="true"] pre { color: var(--bright); }
  </style>
  <section aria-labelledby="s-hurd">
    <h2 id="s-hurd">DROP 1: INIT (TRY)</h2>
    <div class="ind">
      <p class="lede">The first drop: ten animals hiding in Unix names, drawn filled and in colour.</p>
      <p>The drop is called init: <code>init(8)</code> is PID 1, the first process a Unix machine starts, and the parent of every daemon (when a daemon's parent dies, init adopts it). These daemons are shaded the way line printers shaded the Mona Lisa, with denser characters for more light. Each one is a model made of shapes, not a hand drawing, so every size, mood, growth stage and animation frame is printed from the same model. The paper look prints them in ink on green-bar fanfold paper instead.</p>
      <div class="hurd-stage">
        <div class="plate-box" id="plateBox"><pre class="plate" id="plateBig" aria-live="off"></pre></div>
        <div class="hurd-side">
          <div class="hurd-bar" id="plateBar" aria-label="The status line, with the daemon in its eight cells" hidden><span>[0] 0:claude* 1:codex-</span><span>"m2" 09:42 <span class="cell" id="plateCell"></span></span></div>
          <div class="tag" id="plateTag"></div>
          <h3 id="plateName"></h3>
          <p id="plateLore"></p>
          <p class="note" id="plateNote"></p>
        </div>
      </div>
      <div class="row" role="group" aria-label="Mood" id="plateMood"><span class="lbl">mood</span></div>
      <div class="row" role="group" aria-label="Version" id="plateAge"><span class="lbl">version</span></div>
      <div class="row" role="group" aria-label="Look" id="plateLook"><span class="lbl">look</span></div>
      <div class="hurd-grid" role="group" aria-label="Choose a daemon" id="plateGrid"></div>
      <p class="note">A try: the names, lore, colours and art are drafts. In the status line every drop keeps eight cells of line art in the bar's own colour (a filled daemon cannot be eight characters wide); the filled plates show in portraits, cards, the zoo and the reveal. tim keeps his job from before: common, and the likeliest first hatch, so everyone meets him. A terminal prints the colour the same way: one xterm-256 colour per row from each daemon's two stops, dimmer for faint characters.</p>
    </div>
  </section>
  <script type="application/json" id="plates-data">__PLATES__</script>
  <script type="application/json" id="plates-palette">__PALETTE__</script>
  <script type="application/json" id="plates-sprites">__SPRITES__</script>
  <script>
  (() => {
    const P = JSON.parse(document.getElementById('plates-data').textContent);
    const PAL = JSON.parse(document.getElementById('plates-palette').textContent);
    const SPR = JSON.parse(document.getElementById('plates-sprites').textContent);
    let tick = 0;
    function cell() {
      const s = SPR[who];
      $('plateBar').hidden = !s;
      if (!s) return;
      const frames = s[age][mood];
      $('plateCell').textContent = frames[Math.floor((tick * 170) / s.workMs) % frames.length];
    }
    // Colour, the way a terminal can print it: each row takes its colour from the daemon's
    // top-to-bottom gradient, faint glyphs sit darker, dense ones full, and @ burns near white.
    const rgb = (h) => [1, 3, 5].map((i) => parseInt(h.slice(i, i + 2), 16));
    const mix = (a, b, t) => a.map((v, i) => Math.round(v + (b[i] - v) * t));
    const css = (c) => 'rgb(' + c.join(',') + ')';
    const LEVEL = { '.': 0.42, ',': 0.42, ':': 0.5, ';': 0.56, o: 0.78, x: 0.82, '%': 1, '#': 1, '@': 1.35 };
    function paint(text, id) {
      const pal = PAL[id], top = rgb(pal.top.hex), bottom = rgb(pal.bottom.hex), bg = [12, 12, 12], white = [255, 255, 255];
      const rows = text.split('\n'), n = Math.max(1, rows.length - 1);
      return rows.map((row, r) => {
        const base = mix(top, bottom, r / n);
        let html = '', run = '', runKey = null;
        const flush = () => { if (run) html += runKey === null ? run : '<span style="color:' + runKey + '">' + run + '</span>'; run = ''; };
        for (const ch of row) {
          const l = LEVEL[ch];
          const key = l === undefined ? null : css(l > 1 ? mix(base, white, l - 1) : mix(bg, base, l));
          if (key !== runKey) { flush(); runKey = key; }
          run += ch;
        }
        flush();
        return html;
      }).join('\n');
    }
    function glow(el, id) {
      const [r, g, b] = rgb(PAL[id].bottom.hex);
      el.style.setProperty('--glow', 'rgba(' + r + ',' + g + ',' + b + ',.55)');
      el.style.setProperty('--glow2', 'rgba(' + r + ',' + g + ',' + b + ',.35)');
    }
    const INFO = {
      octopus: ['common', "tim is tmux improved, the way vim is vi improved: eight arms, eight panes, and it never drops one. It will do git's octopus merge too, as long as nobody needs a human."],
      gnu: ['common', "GNU's Not Unix (Stallman, 1983), a name with itself inside it. The gnu is a wildebeest, and it will remind you, politely, that it's GNU/Linux."],
      lynx: ['common', 'Lynx, the text-mode web browser (University of Kansas, 1992), still maintained: the web with the pictures taken out.'],
      mutt: ['common', 'Mutt, the terminal mail client (Michael Elkins, 1995): "All mail clients suck. This one just sucks less."'],
      auk: ['legendary', 'awk (Aho, Weinberger and Kernighan, 1977), and the great auk, the first bird ever called a penguin. The auk died out in 1844. awk is still in every Unix.'],
      yak: ['rare', 'yacc, "Yet Another Compiler-Compiler" (Stephen Johnson, Bell Labs, 1975). Also the thing you shave between you and what you set out to do. It notices when you are four yaks deep.'],
      gopher: ['rare', 'The Gopher protocol (University of Minnesota, 1991), named for the campus mascot. For a moment it was bigger than the web.'],
      bug: ['rare', '9 September 1947: a moth in relay 70 of the Harvard Mark II, taped into the log as the "First actual case of bug being found." Still drawn to the light.'],
      tux: ['legendary', 'Linus Torvalds said a penguin bit him at a zoo in Canberra. Larry Ewing drew one in the GIMP in 1996, and Linux has looked well fed ever since.'],
      beastie: ['secret', 'Say "BSD" fast. Every Unix background process is a daemon, this whole collection is named after them, and this is the first one.'],
    };
    const NAME = { octopus: 'tim' };
    const name = (id) => NAME[id] || id;
    const RANK = { common: 0, rare: 1, legendary: 2, secret: 3 };
    const ORDER = Object.keys(INFO).filter((id) => P[id]).sort((a, b) => RANK[INFO[a][0]] - RANK[INFO[b][0]]);
    const MOODS = ['idle', 'work', 'need', 'done', 'fail', 'back', 'nap', 'boop'];
    const still = matchMedia('(prefers-reduced-motion: reduce)').matches;
    let who = ORDER.includes('octopus') ? 'octopus' : ORDER[0], mood = 'idle', age = '2.0', look = 'ink', frame = 0, shown = 999;
    const $ = (id) => document.getElementById(id);
    function pick(el, values, current, label, set) {
      for (const v of values) {
        const b = document.createElement('button');
        b.type = 'button'; b.textContent = label(v); b.setAttribute('aria-pressed', String(v === current));
        b.onclick = () => { el.querySelectorAll('button').forEach((x) => x.setAttribute('aria-pressed', String(x === b))); set(v); };
        el.appendChild(b);
      }
    }
    function draw() {
      const frames = P[who][look][age][mood];
      const rows = frames[frame % frames.length].split('\n');
      const text = shown >= rows.length ? rows.join('\n') : rows.slice(0, shown).join('\n') + '\n'.repeat(rows.length - shown);
      if (look === 'ink') $('plateBig').innerHTML = paint(text, who); else $('plateBig').textContent = text;
      cell();
    }
    function select() {
      const [rarity, lore] = INFO[who];
      $('plateTag').textContent = rarity; $('plateTag').className = 'tag ' + rarity;
      $('plateName').textContent = name(who) + (NAME[who] ? ' the ' + who : ''); $('plateLore').textContent = lore;
      $('plateBox').classList.toggle('paper', look === 'paper');
      $('plateBig').classList.toggle('lit', look === 'ink'); glow($('plateBig'), who);
      $('plateNote').textContent = look === 'paper' ? 'Printed line by line, the way a teletype would.' : '';
      shown = look === 'paper' && !still ? 0 : 999;
      draw();
    }
    pick($('plateMood'), MOODS, mood, (v) => v, (v) => { mood = v; select(); });
    pick($('plateAge'), ['0.1', '1.0', '2.0'], age, (v) => v, (v) => { age = v; select(); });
    pick($('plateLook'), ['ink', 'paper'], look, (v) => (v === 'ink' ? 'screen' : 'paper'), (v) => { look = v; select(); });
    for (const id of ORDER) {
      const b = document.createElement('button');
      b.type = 'button'; b.setAttribute('aria-pressed', String(id === who));
      const pre = document.createElement('pre'); pre.innerHTML = '<span>' + paint(P[id].small['2.0'], id) + '</span>'; glow(pre, id);
      const nm = document.createElement('span'); nm.className = 'nm'; nm.textContent = name(id) + ' · ' + INFO[id][0];
      b.append(pre, nm);
      b.onclick = () => { $('plateGrid').querySelectorAll('button').forEach((x) => x.setAttribute('aria-pressed', String(x === b))); who = id; select(); };
      $('plateGrid').appendChild(b);
    }
    select();
    if (!still) setInterval(() => { tick++; if (shown < 999) { shown += 1; if (shown > 40) shown = 999; } else frame++; draw(); }, 170);
  })();
  </script>
  <!-- hurd:end -->