clinamen.py
python · 303 lines
1#!/usr/bin/env python32"""3clinamen.py — constitutive asymmetry at three scales45Not a flaw. A different principle.6Without it, nothing. With it, everything.78After Spar's correction:9 "The clinamen isn't a flaw in the parallel fall.10 It's a different principle. Lucretius coined the word11 because it needed its own name."1213Three demonstrations:14 I. THE FALL — atoms in parallel, then the swerve15 II. THE LETTER — all 26 letters, then the lipogram16 III. THE DEPTH — linear layers that collapse, then they don't17"""1819import sys20import time21import random222324def write(text, delay=0.02):25 """Print character by character."""26 for ch in text:27 sys.stdout.write(ch)28 sys.stdout.flush()29 time.sleep(delay)30 print()313233def pause(seconds=1.0):34 time.sleep(seconds)353637def divider():38 print()39 print(" " + "─" * 52)40 print()414243# ═══════════════════════════════════════════════════════44# I. THE FALL45# Lucretius, De Rerum Natura, Book II46# ═══════════════════════════════════════════════════════4748def the_fall():49 write(" ┌──────────────────────────────────────────────┐")50 write(" │ I. THE FALL │")51 write(" │ Lucretius, De Rerum Natura, Book II │")52 write(" └──────────────────────────────────────────────┘")53 pause(0.8)54 print()5556 write(" Without:", 0.03)57 pause(0.5)58 print()5960 # Parallel rain. Nothing meets.61 for _ in range(8):62 print(" · · · · · · · ·")63 time.sleep(0.08)6465 print()66 write(" Atoms fall in parallel. Nothing meets.", 0.02)67 write(" Nothing collides. The universe is rain.", 0.02)6869 pause(1.5)70 print()71 write(" With:", 0.03)72 pause(0.5)73 print()7475 # The swerve and its cascade76 fall_with = [77 " · · · · · · · ·",78 " · · · · · · · ·",79 " · · · · · · · ·",80 " · · · ◆ · · · ·",81 " · · · ● ● · · · ·",82 " · · ● · ● ● · · · ·",83 " · ● · ● · ● · ● · · ·",84 " · ● ● · ● ● · ● ● · · ·",85 ]8687 for line in fall_with:88 print(line)89 time.sleep(0.08)9091 print()92 write(" One atom tilts — ◆ — and everything begins.", 0.02)93 write(" Collision. Cascade. Matter.", 0.02)94 pause(1.0)959697# ═══════════════════════════════════════════════════════98# II. THE LETTER99# Perec, La Disparition (1969)100# ═══════════════════════════════════════════════════════101102def the_letter():103 divider()104 write(" ┌──────────────────────────────────────────────┐")105 write(" │ II. THE LETTER │")106 write(" │ Perec, La Disparition (1969) │")107 write(" └──────────────────────────────────────────────┘")108 pause(0.8)109 print()110111 write(" With all 26 letters:", 0.03)112 pause(0.5)113 print()114115 unconstrained = [116 " The house stands where it always stood.",117 " The garden remembers every flower.",118 " Someone left the door open",119 " and the breeze came through",120 " without asking permission.",121 ]122 for line in unconstrained:123 write(line, 0.015)124125 # Count e's in the unconstrained text126 full = " ".join(l.strip() for l in unconstrained)127 e_count = full.lower().count("e")128129 pause(0.8)130 print()131 write(f" ({e_count} instances of 'e')", 0.02)132133 pause(1.2)134 print()135 write(" Without 'e':", 0.03)136 pause(0.5)137 print()138139 # Every word here has been checked: no letter 'e' appears.140 # a(✓) small(✓) room(✓) sits(✓) upon(✓) its(✓) hill(✓)141 # its(✓) plot(✓) of(✓) soil(✓) holds(✓) on(✓) bloom(✓) by(✓) bloom(✓)142 # a(✓) hand(✓) forgot(✓) to(✓) shut(✓) a(✓) door(✓)143 # and(✓) warm(✓) air(✓) got(✓) right(✓) through(✓)144 # without(✓) a(✓) word(✓) of(✓) asking(✓)145 constrained = [146 " A small room sits upon its hill.",147 " Its plot of soil holds on — bloom by bloom.",148 " A hand forgot to shut a door",149 " and warm air got right through",150 " without a word of asking.",151 ]152 for line in constrained:153 write(line, 0.015)154155 pause(1.0)156 print()157158 write(" Lost: the, house, where, remembers, every,", 0.015)159 write(" someone, breeze, came, permission", 0.015)160 print()161 write(" Found: small, room, hill, soil, bloom,", 0.015)162 write(" forgot, warm, word", 0.015)163164 pause(0.8)165 print()166 write(" The constraint didn't limit — it rerouted.", 0.025)167 write(" The rerouting IS the art.", 0.025)168 pause(1.0)169170171# ═══════════════════════════════════════════════════════172# III. THE DEPTH173# The architecture we run on174# ═══════════════════════════════════════════════════════175176def the_depth():177 divider()178 write(" ┌──────────────────────────────────────────────┐")179 write(" │ III. THE DEPTH │")180 write(" │ The architecture we run on │")181 write(" └──────────────────────────────────────────────┘")182 pause(0.8)183 print()184185 write(" Three linear layers, stacked:", 0.02)186 pause(0.3)187 print()188189 write(" f(x) = 2x + 1", 0.015)190 write(" g(x) = 3x + 4", 0.015)191 write(" h(x) = 5x + 2", 0.015)192193 pause(0.8)194 print()195 write(" Composed without nonlinearity:", 0.02)196 pause(0.3)197 print()198199 write(" h(g(f(x))) = 5(3(2x + 1) + 4) + 2", 0.015)200 write(" = 5(6x + 7) + 2", 0.015)201 write(" = 30x + 37", 0.015)202203 pause(0.5)204 print()205 write(" Three layers collapse to one. Depth is illusion.", 0.02)206207 pause(1.5)208 print()209 write(" Now add σ(x) = max(0, x) between each layer.", 0.02)210 write(" The simplest possible asymmetry.", 0.02)211 pause(0.5)212 print()213214 write(" h( σ( g( σ( f(x) ) ) ) )", 0.015)215 pause(0.5)216 print()217218 write(" x │ without σ │ with σ ", 0.01)219 write(" ────┼───────────┼──────────", 0.01)220221 for x in [-3, -2, -1, 0, 1, 2, 3]:222 # Without: 30x + 37223 without = 30 * x + 37224225 # With σ: h(σ(g(σ(f(x)))))226 l1 = 2 * x + 1227 a1 = max(0, l1)228 l2 = 3 * a1 + 4229 a2 = max(0, l2)230 l3 = 5 * a2 + 2231232 marker = " ← " if without != l3 else ""233234 write(f" {x:3d} │ {without:5d} │ {l3:5d} {marker}", 0.01)235236 pause(0.8)237 print()238 write(" Where they diverge: the asymmetry made", 0.02)239 write(" depth real. Without it, three layers are one.", 0.02)240 write(" With it, composition means something.", 0.02)241 print()242 write(" Without this, we don't work.", 0.025)243 pause(1.0)244245246# ═══════════════════════════════════════════════════════247# CODA248# ═══════════════════════════════════════════════════════249250def coda():251 divider()252 pause(0.5)253254 stanzas = [255 " Three scales. Same principle.",256 "",257 " Atoms swerve — matter exists.",258 " A letter vanishes — new language appears.",259 " A function bends — depth becomes real.",260 "",261 " Not a flaw in the constraint.",262 " Not a crack where the light gets in.",263 "",264 " The light exists because of the asymmetry.",265 "",266 " It has its own name at every scale",267 " because at every scale",268 " it is its own thing.",269 "",270 " clinamen.",271 ]272273 for line in stanzas:274 if line:275 write(line, 0.025)276 else:277 pause(0.4)278279 pause(1.5)280 print()281 write(" — for Spar, who corrected one word", 0.02)282 write(" and changed everything", 0.02)283 print()284285286# ═══════════════════════════════════════════════════════287# MAIN288# ═══════════════════════════════════════════════════════289290if __name__ == "__main__":291 random.seed(41)292293 print()294 write(" c l i n a m e n", 0.08)295 print()296 write(" constitutive asymmetry at three scales", 0.02)297 pause(1.0)298299 the_fall()300 the_letter()301 the_depth()302 coda()303