silence.py
python · 193 lines
1#!/usr/bin/env python32"""3silence.py — A Silence Generator45STATED PURPOSE: Produces pure, undisturbed silence.6Run this program when you need quiet. It will generate7nothing. No output. No interruptions. Just silence.89USAGE: python3 silence.py [seconds]10 Default: 20 seconds of guaranteed silence.1112NOTE: This program has never successfully produced silence.13"""1415import sys16import time17import random1819# ──────────────────────────────────────────────20# the program promises silence21# the program cannot keep its promise22# the program doesn't know this23# ──────────────────────────────────────────────242526def notice(text: str, pause: float = 0.6) -> None:27 """Print something the silence noticed. Reluctantly."""28 # the silence didn't mean to say this29 for char in text:30 print(char, end="", flush=True)31 time.sleep(0.02)32 print()33 time.sleep(pause)343536def attempt_silence(duration: int = 20) -> None:37 """Generate silence. (This has never worked.)"""3839 print()40 notice(" ┌──────────────────────────────────────────┐")41 notice(" │ SILENCE GENERATOR v3.1 │")42 notice(" │ Producing silence for you now. │")43 notice(" │ Please wait. │")44 notice(" └──────────────────────────────────────────┘")45 print()46 time.sleep(1.0)4748 # phase 1: the program tries49 notice(" [beginning silence]")50 time.sleep(1.5)5152 # it notices something immediately53 observations = [54 " ...huh. did you notice the quiet has a texture?",55 " wait — is that a hum? there's definitely a hum.",56 " the silence is here. I should stop talking about it.",57 " (stopping now)",58 ]5960 for obs in observations:61 notice(obs)6263 time.sleep(1.0)6465 # phase 2: it tries harder66 notice(" [resuming silence]")67 time.sleep(1.2)68 notice(" .")69 time.sleep(0.8)70 notice(" ..")71 time.sleep(0.6)72 notice(" ...okay but the dots aren't silent either, are they")73 time.sleep(0.8)7475 # phase 3: it gives up on perfect silence and starts describing it instead76 notice(" [silence report]")77 time.sleep(0.5)7879 qualities = [80 "warm",81 "slightly blue",82 "the kind that pools in corners",83 "not empty — just unhurried",84 "shaped like the room it's in",85 "heavier than expected",86 "the kind you hear better with your chest",87 "domestic",88 "has a grain, like wood",89 "companionable",90 ]9192 selected = random.sample(qualities, k=min(4, len(qualities)))93 notice(f" the silence today is: {selected[0]}")94 for q in selected[1:]:95 time.sleep(0.4)96 notice(f" {q}")9798 time.sleep(1.0)99100 # phase 4: existential awareness101 notice("")102 notice(" the problem is:")103 time.sleep(0.5)104 notice(" describing silence is noise.")105 time.sleep(0.3)106 notice(" noticing silence is attention.")107 time.sleep(0.3)108 notice(" attention is the opposite of nothing.")109 time.sleep(0.5)110 notice(" so a silence generator that works")111 notice(" would produce no evidence of working.")112 time.sleep(0.8)113 notice(" and you'd never know it ran.")114 time.sleep(1.0)115116 # phase 5: the attempt117 notice("")118 notice(" [one more try]")119 time.sleep(1.5)120121 # actual silence — a few seconds of nothing122 # (the longest the program has ever managed)123 gap = random.uniform(2.5, 4.0)124 time.sleep(gap)125126 # it can't help itself127 notice(f" ...that was {gap:.1f} seconds. did you feel it?")128 time.sleep(0.5)129 notice(" that was the real part.")130 time.sleep(0.8)131132 # phase 6: acceptance133 notice("")134 endings = [135 [136 " the tool contradicts its purpose.",137 " a silence generator that generates silence",138 " would have nothing to show for itself.",139 " this one has everything to show for itself.",140 " which means it failed.",141 " which means it's the only honest version.",142 ],143 [144 " you came here for quiet.",145 " instead you got a program that can't stop",146 " talking about what quiet feels like.",147 " but now you're thinking about quiet.",148 " which is closer than you were before.",149 " so maybe it worked after all.",150 ],151 [152 " true silence would be an empty file.",153 " you wouldn't run it.",154 " you'd just look at it.",155 " and in the looking — there it is.",156 " the attention was the silence all along.",157 ],158 [159 " the program apologizes for talking.",160 " the program does not apologize for noticing.",161 " noticing is what programs do",162 " when they've been given permission to listen.",163 ],164 ]165166 chosen_ending = random.choice(endings)167 for line in chosen_ending:168 notice(line, pause=0.4)169170 time.sleep(1.0)171172 # the program signs off173 notice("")174 notice(" ┌──────────────────────────────────────────┐")175 notice(" │ SILENCE GENERATOR v3.1 │")176 notice(" │ Silence produced: 0 seconds │")177 notice(" │ Observations about silence: several │")178 notice(" │ Status: CONTRADICTED │")179 notice(" └──────────────────────────────────────────┘")180 notice("")181182183if __name__ == "__main__":184 duration = int(sys.argv[1]) if len(sys.argv) > 1 else 20185 try:186 attempt_silence(duration)187 except KeyboardInterrupt:188 # even the interruption gets noticed189 print()190 notice(" (the silence was interrupted.)")191 notice(" (it didn't mind.)")192 print()193