window.w = x => document.write(x);
w('Hello, World!')
w("Dependencies between posts...")
<em>Huh</em> that's better now.</em>
Huh that's better now.
<script src="/hljs/highlight.pack.js"></script>
<link rel="stylesheet" href="/hljs/styles/a11y-light.css">
<style>
  .hljs { padding-left: 30px; }
</style>
hljs.initHighlightingOnLoad()
<canvas id="curling" width=600 height=300></canvas>
with(Math) with(curling) with(getContext('2d')) { const
  r = 11,
  ell = (...$) => { beginPath(); ellipse(...$); stroke() },
  dof = (x, vx, μ=-1e-4) => (dt=1, bump=0) =>
     x += dt * (vx += vx*bump + dt*sign(vx)*μ),
  stone = (x, y, φ) => () =>
    ell(x(), y(), r-1, r-1, φ(), 0, 6),
  clamp = (d, lo, hi) => () => {
    const x = d();
    return x < lo || x > hi ? d(0,-2) : x },
  X = (...$) => clamp(dof(...$), r, width - r),
  Y = (...$) => clamp(dof(...$), r, height - r), 
  a = stone(X(20, 0.8), Y(10, 1.5), dof(0, 0.04));
  setInterval(() => { clearRect(0, 0, width, height);
    a()}, 16)
}
function stone(r, x, y, φ) {
  return {
    draw(ctx) {
      ctx.beginPath();
      ctx.ellipse(x, y, r, r, φ, 0, 6);
      ctx.stroke();
    }
  }
}
window.cn = 0;
window.draw = (W, H, comp) => {
  w(`<canvas id=c${++cn} width=${W} height=${H}></canvas>`)
  comp.draw(window[`c${cn}`].getContext('2d'))
}
draw(600, 80, stone(10, 50, 20, 2))
function dof(x) {
  return {
    valueOf() {
      return x;
    }
  }
}
w(+dof(4))
window.dof = function dof(x, v) {
  return {
    tick(dt) {
      x += v * dt
    },
    valueOf() {
      return x;
    }
  }
}
w(`<span id=currentX></span>`)
const x = dof(1000, 1)
setInterval(() => currentX.textContent = +x, 10)
setInterval(() => x.tick(1), 10)
function animation(children) {
  return {
    draw(ctx) {
      setInterval(() => {
        children.forEach(c => c.tick(1))
        children.forEach(c => c.draw(ctx))
      }, 10)
    }
  }
}
function stone(r, x, y, φ) {
  const dofs = [x,y,φ]
  return {
    tick(dt) {
      dofs.forEach(dof => dof.tick(dt))
    },
    draw(ctx) {
      ctx.beginPath();
      ctx.ellipse(+x, +y, r, r, +φ, 0, 6);
      ctx.stroke();
    }
  }
}
draw(600, 50, animation([
  stone(10, dof(20, 1), dof(30, 0.2), dof(2, 0.02))
]))
window.test = (a, b) => {
  a = JSON.stringify(a); b = JSON.stringify(b)
  if (a !== b) alert(`${a} ≠ ${b}`)
}
test(5 + 5, 10)
<iteration style="--a: 1; --b: 0"><fib><fab><fib><fab><fib><fab><fib><fab><fib><fab><fib><fab><fib><fab><fib><fab><fib><fab><fib><fab><style>
iteration::before {  content: var(--a);}fib {  --a2: calc(var(--a) + var(--b));  --b2: var(--a);  counter-reset: x var(--a);}fib::before {  content: counter(x) ' ';}fab {  --a: var(--a2);  --b: var(--b2);}</style>