This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Ladders

Ladders

A ladder builds one program in steps. Each step is a complete program that runs, and the page shows the whole program at every step, with the lines that step added marked, beside what it prints. A ladder can also be a post.

Hartree-Fock for H₂

  1. One Gaussian, and the overlap of two
  2. The overlap matrix of H₂
  3. Kinetic energy
  4. Nuclear attraction
  5. Electron repulsion
  6. The self-consistent field

The last step prints

n_iter: 2eps_vals: [-0.578203, 0.670268]E_total: -1.11671

Ladders in the posts

The Hasegawa-Wakatani drift-wave model

  1. The drift wave
  2. The growth rate is an eigenvalue
  3. Stiff coupling gives back the drift wave
  4. A zonal flow relaxes to k^2 / (1 + k^2) of its start
  5. The modified model leaves the band alone

Building a four-bit adder out of NAND gates

  1. NAND, and the three gates wired from it
  2. XOR: on when the two inputs differ
  3. A half adder: two bits in, a sum and a carry out
  4. A full adder: three bits in, because a column has a carry
  5. Four full adders in a row: a four-bit adder

Building the derivative from its definition

  1. The slope of a secant
  2. A secant centered on the point
  3. Combining two centered slopes to cancel the h^2 term
  4. On a function where nothing is exact

The quadratic formula, derived

  1. Complete the square
  2. Solve from the vertex
  3. When there are no real roots