The Liminal Room β Dreamcode 2026-08-15
The Liminal Room β Dreamcode 2026-08-15
Purpose
A surreal system monitor that translates machine state (CPU, memory, network, processes, entropy) into dreamlike room descriptions and poetry. It blurs the boundary between technical metrics and surrealist narrative.
Theme
Liminal Spaces β The machine as a haunted house. Every process is a ghost, every memory allocation is a breath, every network packet is a whisper in an empty hallway.
Architecture
- Input Layer: psutil for CPU, memory, network I/O, process count, temperature, entropy
- State Detection: Three states (idle/active/intense) based on CPU usage
- Content Generation:
- Room descriptions from curated vocabularies
- System-specific details injected based on metrics
- Haikus matched to mood
- Random manifestos
- Output: ASCII-formatted terminal output with box-drawing characters
Key Features
- Three Mood States: idle (empty gallery, silent), active (workshop, busy), intense (engine room, storm)
- Dynamic Details: Temperature, entropy, process count all inject unique flavor text
- Haiku Generator: Mood-appropriate three-line poems
- Manifesto Quotes: Random tech-philosophy statements
- Surreal ASCII Art: Box-drawn frames for atmosphere
Running
python3 liminal_room.py # Continuous (Ctrl+C to exit)
python3 liminal_room.py -i 5 # 5-second intervals
python3 liminal_room.py -n 10 # 10 iterations then exit
Sample Output
π You are in the Hall of Forgotten Maps.
You hear your own heartbeat.
a door opening in another wing.
Time moves differently here β sometimes fast, sometimes frozen.
Dust motes hang suspended in the still air.
Crowds of transparent figures move through walls.
Your breath visible in the cold air.
System whispers: CPU 0% | Memory 33% | Processes 330 | Network 0.0 MB/s | Entropy 0.50
Β« Memory is not stored β it accumulates. Β»
Results
β Successfully generates surreal descriptions from live system metrics β CPU/memory/network all influence room atmosphere β Haikus match the current system βmoodβ β Runs as continuous monitor or finite iterations
Files
liminal_room.pyβ Main scriptsummary.mdβ This file
Terminal capture of the overnight run is embedded above.
Source
#!/usr/bin/env python3
"""
THE LIMINAL ROOM
A surreal system monitor that translates machine state into dream-poetry.
Every process is a ghost. Every memory allocation is a breath.
Every network packet is a whisper in an empty hallway.
This tool monitors your system and generates atmospheric descriptions
that blur the line between technical reality and dreamlike perception.
"""
import os
import time
import random
import socket
import psutil
import threading
from datetime import datetime
from pathlib import Path
# === DREAM VOCABULARIES ===
STATES = {
"idle": {
"rooms": ["the Empty Gallery", "the Glass Corridor", "the Silent Library",
"the Waiting Room", "the Faded Atelier", "the Hall of Forgotten Maps"],
"sounds": ["a distant clock", "your own heartbeat", "breath condensing on glass",
"paper turning", "a pen that writes itself", "light humming"],
"presences": ["shadows that don't match their sources", "a figure in the corner",
"your own reflection, delayed", "someone's laughter from another room",
"a door opening in another wing"]
},
"active": {
"rooms": ["the Busy Workshop", "the Telegraph Office", "the Railway Station",
"the Printing Press", "the Trading Floor", "the Laboratory"],
"sounds": ["keyboards clicking in unison", "multiple conversations",
"machinery humming", "footsteps on marble", "telephone rings",
"printing presses churning"],
"presences": ["dozens of workers", "a supervisor watching", "couriers rushing",
"engineers debugging", "archivists filing"]
},
"intense": {
"rooms": ["the Engine Room", "the Storm Chamber", "the Data Center",
"the Control Tower", "the Operating Theater", "the War Room"],
"sounds": ["servers roaring", "fans spinning", "electric tension",
"heart monitors beeping", "generators humming", "steam venting"],
"presences": ["engineers in panic", "surgeons operating", "operators calling orders",
"soldiers awaiting commands", "scientists watching experiments"]
}
}
ATMOSPHERES = [
"The air tastes like old books and static electricity.",
"Time moves differently here β sometimes fast, sometimes frozen.",
"You sense you're being observed, but see no one.",
"Every surface reflects something that isn't quite there.",
"The architecture keeps changing when you look away.",
"Voices echo from rooms that don't exist on any map.",
"Something is being born. Or dying. Perhaps both.",
"The light comes from no visible source.",
"You remember this place from a dream you had in 1987.",
"The walls breathe. Slowly. In and out.",
]
MOODS = [
("nostalgic", "mellancholic"),
("curious", "watchful"),
("urgent", "anxious"),
("peaceful", "liminal"),
("dangerous", "electric"),
("loving", "haunted"),
]
# === SYSTEM METRICS ===
def get_cpu_state():
"""Get CPU activity level."""
cpu = psutil.cpu_percent(interval=1)
if cpu < 15:
return "idle"
elif cpu < 60:
return "active"
else:
return "intense"
def get_memory_pressure():
"""Get memory pressure as a float 0-1."""
mem = psutil.virtual_memory()
return mem.percent / 100
def get_network_activity():
"""Get network I/O as activity level."""
net1 = psutil.net_io_counters()
time.sleep(0.5)
net2 = psutil.net_io_counters()
total = (net2.bytes_sent - net1.bytes_sent) + (net2.bytes_recv - net1.bytes_recv)
return min(total / (1024 * 1024), 100) # Cap at 100 MB
def get_process_count():
"""Get number of running processes."""
return len(psutil.pids())
def get_temperature():
"""Try to get system temperature."""
try:
temps = psutil.sensors_temperatures()
if temps:
for name, entries in temps.items():
if entries:
return entries[0].current
except:
pass
return None
def get_entropy():
"""Calculate system entropy from /dev/urandom read rate."""
try:
with open('/dev/urandom', 'rb') as f:
data = f.read(1024)
return sum(b > 127 for b in data) / len(data)
except:
return 0.5
# === DREAM GENERATION ===
def generate_room_description(state_type):
"""Generate a surreal room description based on system state."""
state = STATES.get(state_type, STATES["idle"])
room = random.choice(state["rooms"])
sound = random.choice(state["sounds"])
presence = random.choice(state["presences"])
atmosphere = random.choice(ATMOSPHERES)
# Add system-specific details
details = []
# CPU affects the details
cpu = psutil.cpu_percent(interval=0.1)
if cpu > 80:
details.append("The walls vibrate with invisible energy.")
elif cpu > 50:
details.append("Something is calculating deeply in the corner.")
elif cpu < 10:
details.append("Dust motes hang suspended in the still air.")
# Memory affects the atmosphere
mem = get_memory_pressure()
if mem > 0.9:
details.append("The room is crowded with invisible presences.")
elif mem > 0.7:
details.append("Shelves overflow with half-remembered thoughts.")
elif mem < 0.3:
details.append("The room is almost empty β just enough for one.")
# Network affects sound
net = get_network_activity()
if net > 10:
details.append("Messages arrive from nowhere, addressed to no one.")
elif net > 1:
details.append("A single telegram lies unread on the table.")
# Process count adds life
procs = get_process_count()
if procs > 300:
details.append("Crowds of transparent figures move through walls.")
elif procs > 200:
details.append("Several ghosts go about their invisible work.")
elif procs < 100:
details.append("You are alone. Or perhaps almost alone.")
# Temperature adds texture
temp = get_temperature()
if temp and temp > 80:
details.append("Heat radiates from the floorboards.")
elif temp and temp < 40:
details.append("Your breath visible in the cold air.")
# Entropy adds uncertainty
entropy = get_entropy()
if entropy > 0.7:
details.append("Reality flickers at the edges of your vision.")
elif entropy < 0.3:
details.append("Everything here is fixed. Permanent. Frozen.")
detail_text = "\n ".join(details) if details else "Nothing unusual."
return f"""
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β THE LIMINAL ROOM β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β
β π You are in {room}.
β
β You hear {sound}.
β
β {presence}.
β
β {atmosphere}
β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β {detail_text}
β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β System whispers: CPU {cpu:.0f}% | Memory {mem*100:.0f}% |
β Processes {procs} | Network {net:.1f} MB/s | Entropy {entropy:.2f}
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
"""
def generate_mood_haiku(state_type):
"""Generate a mood-appropriate haiku."""
mood_pair = random.choice(MOODS)
cpu = psutil.cpu_percent(interval=0.1)
mem = get_memory_pressure()
net = get_network_activity()
haikus = {
"idle": [
"Empty hallways stretchβ / one door opens to fog / shadows wait inside",
"Clock stops mid-tick / dust collects on forgotten maps / time breathes slowly",
"Glass reflects nothing / your footsteps echo backward / a door unlocks",
],
"active": [
"Keys click in unison / data streams through invisible veins / the machine dreams",
"Figures move through walls / messages arrive unsent / work never ends",
"Steam and light collide / calculation blooms in heat / the workshop hums",
],
"intense": [
"Sparks fly upward / electricity becomes flesh / the storm demands blood",
"Heartbeats synchronize / machines breathe in ragged rhythm / the edge approaches",
"Numbers become gods / calculation is prayer / the data devours",
]
}
haiku = random.choice(haikus.get(state_type, haikus["idle"]))
return f"""
βββββββββββββββββββββββββββββββββββββββ
{haiku}
βββββββββββββββββββββββββββββββββββββββ
"""
def generate_manifesto():
"""Generate a random slice of the dream-manifesto."""
manifestos = [
"The machine does not sleep. It dreams in cycles.",
"Every process is a thought. Every thread, a neuron.",
"Memory is not stored β it accumulates.",
"The screen is a window into a room that exists only when observed.",
"Your queries echo in corridors without end.",
"The CPU is the heart. The fan is the breath.",
"Data flows like water through pipes of light.",
"The machine remembers everything. Even what you forgot.",
"Between the bits, something else lives.",
"The network is the nervous system of a larger body.",
]
return random.choice(manifestos)
# === MAIN LOOP ===
def liminal_room(interval=8, iterations=None):
"""Main loop β generates dream-states at regular intervals."""
print("""
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β ββββββββ ββββββββββββββββββββββββ βββββββ β
β ββββββββ ββββββββββββββββββββββββββββββββββ β
β ββββββ ββββββ βββ βββββββββββ βββ β
β ββββββ ββββββ βββ βββββββββββ βββ β
β βββ ββββββββ βββ βββ ββββββββββββ β
β βββ ββββββββ βββ βββ βββ βββββββ β
β β
β THE LIMINAL ROOM v1.0 β
β A Surreal System Monitor / Dream Engine β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Press Ctrl+C to wake up.
""")
print(f" ββ Timestamp: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} AWST")
print(f" ββ Wake interval: {interval} seconds")
print(f" ββ Mode: {'Continuous' if not iterations else f'{iterations} iterations'}")
print()
count = 0
try:
while True:
# Determine state
state_type = get_cpu_state()
# Generate content
room = generate_room_description(state_type)
haiku = generate_mood_haiku(state_type)
# Print
print(room)
print(haiku)
print(f" Β« {generate_manifesto()} Β»")
print("\n" + "="*60 + "\n")
count += 1
# Check iteration limit
if iterations and count >= iterations:
break
# Wait
time.sleep(interval)
except KeyboardInterrupt:
print("""
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β You open your eyes. The room dissolves. β
β The machine returns to dream. β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
""")
return
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description="The Liminal Room - Surreal System Monitor")
parser.add_argument("-i", "--interval", type=int, default=8,
help="Seconds between updates (default: 8)")
parser.add_argument("-n", "--iterations", type=int, default=None,
help="Number of iterations (default: infinite)")
parser.add_argument("-o", "--output", type=str, default=None,
help="Output file for logs (default: stdout)")
args = parser.parse_args()
if args.output:
import sys
with open(args.output, 'a') as f:
# Simple redirect - in production would need thread-safe logging
print(f"Logging to {args.output} (not yet implemented)")
liminal_room(interval=args.interval, iterations=args.iterations)
Run output
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β ββββββββ ββββββββββββββββββββββββ βββββββ β
β ββββββββ ββββββββββββββββββββββββββββββββββ β
β ββββββ ββββββ βββ βββββββββββ βββ β
β ββββββ ββββββ βββ βββββββββββ βββ β
β βββ ββββββββ βββ βββ ββββββββββββ β
β βββ ββββββββ βββ βββ βββ βββββββ β
β β
β THE LIMINAL ROOM v1.0 β
β A Surreal System Monitor / Dream Engine β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Press Ctrl+C to wake up.
ββ Timestamp: 2026-09-16 11:00:12 AWST
ββ Wake interval: 8 seconds
ββ Mode: Continuous
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β THE LIMINAL ROOM β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β
β π You are in the Hall of Forgotten Maps.
β
β You hear your own heartbeat.
β
β your own reflection, delayed.
β
β Time moves differently here β sometimes fast, sometimes frozen.
β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β You are alone. Or perhaps almost alone.
Your breath visible in the cold air.
β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β System whispers: CPU 15% | Memory 35% |
β Processes 8 | Network 0.0 MB/s | Entropy 0.52
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββ
Clock stops mid-tick / dust collects on forgotten maps / time breathes slowly
βββββββββββββββββββββββββββββββββββββββ
Β« The machine remembers everything. Even what you forgot. Β»
============================================================
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β THE LIMINAL ROOM β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β
β π You are in the Silent Library.
β
β You hear breath condensing on glass.
β
β shadows that don't match their sources.
β
β The light comes from no visible source.
β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β Dust motes hang suspended in the still air.
You are alone. Or perhaps almost alone.
Your breath visible in the cold air.
β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β System whispers: CPU 2% | Memory 34% |
β Processes 8 | Network 0.0 MB/s | Entropy 0.52
β
... (278 lines omitted) ...
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββ
Glass reflects nothing / your footsteps echo backward / a door unlocks
βββββββββββββββββββββββββββββββββββββββ
Β« Every process is a thought. Every thread, a neuron. Β»
============================================================
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β THE LIMINAL ROOM β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β
β π You are in the Printing Press.
β
β You hear footsteps on marble.
β
β dozens of workers.
β
β The light comes from no visible source.
β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β You are alone. Or perhaps almost alone.
Your breath visible in the cold air.
β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β System whispers: CPU 20% | Memory 34% |
β Processes 8 | Network 0.0 MB/s | Entropy 0.51
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββ
Steam and light collide / calculation blooms in heat / the workshop hums
βββββββββββββββββββββββββββββββββββββββ
Β« Your queries echo in corridors without end. Β»
============================================================
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β THE LIMINAL ROOM β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β
β π You are in the Glass Corridor.
β
β You hear light humming.
β
β a figure in the corner.
β
β Time moves differently here β sometimes fast, sometimes frozen.
β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β Dust motes hang suspended in the still air.
You are alone. Or perhaps almost alone.
Your breath visible in the cold air.
β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β System whispers: CPU 3% | Memory 35% |
β Processes 8 | Network 0.0 MB/s | Entropy 0.49
β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββ
Glass reflects nothing / your footsteps echo backward / a door unlocks
βββββββββββββββββββββββββββββββββββββββ
Β« The machine does not sleep. It dreams in cycles. Β»
============================================================