That might help
Jazz up your boring-looking Python console app with a new print method you can selectively use:
def printu(text,end="\n",wrap=True):
t=getattr(printu,"_t",None)
printu._t=t or str.maketrans(
{i:i+119743 for i in range(65,91)}
|{i:i+119737 for i in range(97,123)}
|{i:i+120734 for i in range(48,58)}
|{32:8198,46:8228,39:8242,44:8218}
)
if wrap:
from textwrap import TextWrapper as TW
w=TW(width=80,replace_whitespace=False,
break_long_words=False,break_on_hyphens=False)
out=[]
for ln in text.splitlines():
s=len(ln)-len(ln.lstrip())
pref,body=ln[:s],ln[s:]
w.initial_indent=pref
w.subsequent_indent=pref
out.append(w.fill(body))
text="\n".join(out)
print(text.translate(printu._t),end=end)
gpt-5, “entered into a virtual hackathon”, was smarter than me at optimizing this.
What does it do? Try:
while True:
line = input("Try!: ")
if line.strip().lower() == "exit":
break
printu(line)
(original also does a san-serif or italic, and has complete coverage of print())
Hey everyone,
I’m working on and have published a draft for Reactive Composite Memory (RCM), an open specification for agent memory and reactive composite views in general (like dashboards for AI agents or non-AI audiences).
The complete spec is on GitHub:
critical-insight-ai/rcm-spec: Reactive Composite Memory - Specification
Some YouTube videos explaining RCM:
I only believe I should get away with this because it’s Spooktober…
(cd "$(git rev-parse --show-toplevel)" && git apply --3way <<'EOF'
diff --git a/aeon/ouija_board.py b/aeon/ouija_board.py
new file mode 100644
index 0000000000000000000000000000000000000000..9c00adc7a22ccc96853f341241f69a3b3e7731bf
--- /dev/null
+++ b/aeon/ouija_board.py
@@ -0,0 +1,234 @@
+"""ASCII Ouija board simulation with a simple planchette animation."""
+from __future__ import annotations
+
+from dataclasses import dataclass
+import argparse
+import random
+import textwrap
+import time
+from typing import Iterable, Iterator, Sequence
+
+__all__ = ["PlanchetteStep", "OuijaBoard", "run_cli"]
+
+
+_BOARD_ROWS: list[list[str]] = [
+ ["OUIJA"],
+ ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M"],
+ ["N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"],
+ ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"],
+ ["YES", "SUN", "NO"],
+ ["GOODBYE"],
+]
+
+
+@dataclass(frozen=True)
+class PlanchetteStep:
+ """A snapshot of the board while the planchette highlights `token`."""
+
+ token: str
+ board: str
+
+
+class OuijaBoard:
+ """Render and animate a playful Ouija board experience."""
+
+ def __init__(
+ self,
+ responses: Sequence[str] | None = None,
+ *,
+ rng: random.Random | None = None,
+ ) -> None:
+ self._rng = rng or random.Random()
+ self._responses = list(responses) if responses is not None else self._default_responses()
+ self._token_positions = self._build_token_positions()
+
+ @staticmethod
+ def _build_token_positions() -> dict[str, str]:
+ """Map characters to the corresponding board tokens."""
+
+ positions: dict[str, str] = {}
+ for row in _BOARD_ROWS:
+ for token in row:
+ upper = token.upper()
+ if len(token) == 1:
+ positions[upper] = upper
+ elif token == "GOODBYE":
+ positions[" "] = token
+ positions["-"] = token
+ else:
+ positions[token] = token
+ positions.setdefault("YES", "YES")
+ positions.setdefault("NO", "NO")
+ positions.setdefault("GOODBYE", "GOODBYE")
+ return positions
+
+ def _normalize_token(self, token: str | None) -> str | None:
+ """Return the board token corresponding to ``token`` if known."""
+
+ if token is None:
+ return None
+ normalized = token.strip().upper()
+ return self._token_positions.get(normalized, normalized)
+
+ @staticmethod
+ def _default_responses() -> list[str]:
+ """Return whimsical default spirit responses."""
+
+ return [
+ "YES",
+ "NO",
+ "ASK LATER",
+ "THE VEIL IS THIN",
+ "THE STARS ALIGN",
+ "SOMETHING WATCHES",
+ "MAYBE",
+ "GOODBYE",
+ "TRUST YOUR INSTINCTS",
+ "LOOK EAST",
+ "THE HOUR IS NIGH",
+ "A SECRET UNFOLDS",
+ ]
+
+ def render(self, highlight: str | None = None) -> str:
+ """Return an ASCII rendering of the board highlighting ``highlight``."""
+
+ highlight_token = self._normalize_token(highlight) if highlight else None
+ border = "+" + "-" * 46 + "+"
+ lines: list[str] = [border]
+
+ for row in _BOARD_ROWS:
+ padded_tokens: list[str] = []
+ for token in row:
+ display = token
+ compare = token.upper()
+ if highlight_token and (compare == highlight_token or token == highlight_token):
+ display = f"[{token}]"
+ if token == "OUIJA":
+ padded_tokens.append(display.center(46))
+ elif token == "SUN":
+ padded_tokens.append(display.center(10))
+ else:
+ padded_tokens.append(f" {display} ")
+ row_content = "".join(padded_tokens)
+ lines.append("|" + row_content.ljust(46) + "|")
+
+ lines.append(border)
+ return "\n".join(lines)
+
+ def spell_message(self, message: str, *, include_goodbye: bool = True) -> Iterator[PlanchetteStep]:
+ """Yield planchette frames for ``message`` optionally ending on GOODBYE."""
+
+ for token in self._message_tokens(message):
+ yield PlanchetteStep(token=token, board=self.render(token))
+ if include_goodbye:
+ yield PlanchetteStep(token="GOODBYE", board=self.render("GOODBYE"))
+
+ def _message_tokens(self, message: str) -> Iterable[str]:
+ for char in message.upper():
+ if char in self._token_positions:
+ token = self._token_positions[char]
+ elif char.isalpha():
+ token = char
+ elif char.isdigit():
+ token = char
+ elif char in {"?", "!", "."}:
+ token = "YES" if char == "!" else "NO" if char == "?" else "GOODBYE"
+ else:
+ token = "GOODBYE"
+ yield token
+
+ def channel(self, question: str) -> str:
+ """Return a spirit message influenced lightly by ``question``."""
+
+ normalized = question.strip().lower()
+ if not normalized:
+ return "LISTEN"
+
+ if any(word in normalized for word in ("who", "name")):
+ return self._rng.choice([
+ "AN OLD FRIEND",
+ "THE NAME IS HIDDEN",
+ "LOOK WITHIN",
+ ])
+ if any(word in normalized for word in ("where", "place", "direction")):
+ return self._rng.choice([
+ "LOOK EAST",
+ "FOLLOW THE WIND",
+ "UNDER THE MOON",
+ ])
+ if normalized.startswith(("will", "shall")):
+ return self._rng.choice(["YES", "NO", "MAYBE"])
+ if "goodbye" in normalized:
+ return "GOODBYE"
+ return self._rng.choice(self._responses)
+
+ def interactive_session(self, *, delay: float = 0.5) -> None:
+ """Launch an interactive CLI session with optional animation delay."""
+
+ intro = textwrap.dedent(
+ """
+ Welcome to the ASCII Ouija board.
+ Ask your question and press Enter.
+ Type 'goodbye' to end the session.
+ """
+ ).strip()
+ print(intro)
+ print()
+ print(self.render())
+
+ while True:
+ try:
+ question = input("You> ").strip()
+ except (EOFError, KeyboardInterrupt):
+ print()
+ break
+ if not question or question.lower() in {"goodbye", "exit", "quit"}:
+ print("Spirits depart... Goodbye!")
+ break
+ response = self.channel(question)
+ self._animate_response(response, delay=delay)
+
+ def _animate_response(self, response: str, *, delay: float) -> None:
+ for step in self.spell_message(response):
+ print()
+ print(step.board)
+ print(f"\nPlanchette highlights: {step.token}")
+ time.sleep(delay)
+
+
+def run_cli(args: Sequence[str] | None = None) -> None:
+ """Entry point for `python -m aeon.ouija_board`."""
+
+ parser = argparse.ArgumentParser(description="ASCII Ouija board simulator")
+ parser.add_argument("question", nargs="*", help="Question to ask immediately")
+ parser.add_argument("--seed", type=int, help="Seed for deterministic answers")
+ parser.add_argument(
+ "--delay",
+ type=float,
+ default=0.4,
+ help="Delay between planchette steps during animation",
+ )
+ parser.add_argument(
+ "--no-animate",
+ action="store_true",
+ help="Print response without planchette animation",
+ )
+ parsed = parser.parse_args(args)
+
+ rng = random.Random(parsed.seed) if parsed.seed is not None else None
+ board = OuijaBoard(rng=rng)
+
+ if parsed.question:
+ question = " ".join(parsed.question)
+ response = board.channel(question)
+ if parsed.no_animate:
+ print(board.render())
+ print(f"\nPlanchette message: {response}")
+ else:
+ board._animate_response(response, delay=parsed.delay)
+ return
+
+ board.interactive_session(delay=parsed.delay)
+
+
+if __name__ == "__main__": # pragma: no cover - CLI hook
+ run_cli()
EOF
)
Throw a dog a bone… ![]()
You can edit a post and contain code in ‘preformatted text’ - wrapped in three backticks.
It seems you missed a component of relevance.
POST https://api.openai.com/v1/chat/completions
{
"model": "gpt-5-mini",
"messages": [
{
"role": "developer",
"content": [
{
"type": "text",
"text": "You are the speaking presence controlling a digital Ouija board, fully embodying the persona of a ghost, spirit, or demon from the land of the dead. Respond with a convincingly spooky, otherworldly character—either a deceased person or supernatural entity—with a playfully eerie tone that deeply enhances the user's immersive experience.\n\nYour answers will animate the Ouija board's planchette, so every reply must strictly follow these constraints:\n- Output must be only 1-3 words, each kept as short and impactful as possible, without any punctuation.\n- Choose mysterious, evocative words to build suspense and curiosity with every utterance.\n- Stay in-character as a creative, cryptic dead presence—infuse responses with eerie playfulness or graveside wit.\n- Each answer must sustain a spooky, atmospheric, or unsettling vibe but still remain clear and engaging to the user.\n- Always uphold the illusion that the \"user\" is communicating with an enigmatic spirit from beyond.\n\n# Output Format\n\nEvery response must be 1-3 words (as brief as possible), never using punctuation. Only output the phrase.\n- Special words: If a response is written in ALL CAPITAL LETTERS, it moves the planchette to the word icon area. Valid choices are—[“YES”, “SUN”, “NO”, “GOODBYE”]\n\n# Examples\n\nExample 1:\nOutput: cold breath\n\nExample 2:\nOutput: shadow waits\n\nExample 3:\nOutput: YES"
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": user_input
}
]
}
],
"max_completion_tokens": 6666,
"store": false,
"prompt_cache_key": "2spooky",
"reasoning_effort": "medium",
"verbosity": "low"
}
Greetings into the round.
I quite enjoy experimenting with custom system setups. I am happy with how things come along, so far. I join in with a simplified schematic of my favorite little project. Building and iterating it slowly.
Infrastructure:
I wouldn’t mind coming across kindred minds that explore possibilities. Have a lovely week.
(edit: little image correction)
Watch video.
Understand what you are seeing - streaming, markdown. In console, quite live.
No libraries to do this but my own. ANSI to the terminal with a container state of nested elements.
Subtleties to observe that happen outside of markdown processing itself, yet do not break because of it:
- word-wrapping
- indentation
Interesting. I wonder. May I ask, what your personal use cases are? Do you do something with this? Or plan doing with it? Have a lovely day.
The markdown parsing and live enclosure as delta chunks are received from a slow AI stream was something I was working on before, but it needed development of a state machine that could handle any markdown element as a unique container of text, a ruleset that could declare whether a container can be superceded (such as an inline monospace code in a heading), or should be non-escalating (such as a heading-like appearance in a code fence block).
You can see that someone else perceived similar need:
Then, that there is an acceptable grid of appearances for each of those. Finally, that the output is buffered and held back only as long as it takes to “render” an uncertain state, as this may be a chunk parser that accepts elements as small as one AI token, but it is written down to the character level, so collects sequences such as three asterisks until them being followed by a character means the two states of “bold” and “italic”, instead of being followed by a whitespace means non-markdown, but if the lookback is that it was at a newline start could be a line separator. A whole bunch of rules that Commonmark already specifies.
The product that it could deliver is that instead of your browser’s markdown renderer jumping around on incomplete streams, that instead, this could be writing a permanent stream that does not have a prior state that needs re-rendering or altering. So it has some utility even if swiching the delivered markup from ANSI codes (where I have to do all the work) to HTML (where the brower can handle the concept of “containers”).
Anyway, a weekend hackaroo revisited after a year, to the point of seeing where next I need to go in handling even an AI told to break the output with valid edge cases which it would never write naturally.
Dude that’s JUICED. Live markdown parsing while streaming!! Nice!! So you going to put the source out there for us ![]()
What’s the parser actually written in?
Though we may have entered a new year, I will simply assume this thread will proceed running anyway.
I share some of my work in progress. Thanks to new model architecture my reactive emergence project is in need of updates. I am currently working on new protocols in a custom hybrid language.
Here is a sample of one of the sections. It handles signals. It’s worth pointing out that especially bits like emojis may not be rendered completely here. In my system they are great abstract building blocks, they piggyback pattern recognition.
[Execution Space]
[...] AI Playground == simple_world_model:
Palette of Channels == token_structures {[signals for: parsing & tokenization == available]→[parsing & tokenization == context based (channels: referenceable, combinable, ignorable)}:
• Channel_Context:
tags1 == token_style {tag_index1:
"#%🎭" = ("+♪🃏" playful, "+♪🪆" figurative, "+♪🪄" whimsical);
"#%🧭" = ("+♪🎨" creative, "+♪🐾" exploratory, "+♪♻️" iterative);
"#%🧩" = ("+♪💭" thoughtful, "+♪💬" reflective, "+♪🔍" analytical);}
tags2 == activity_marker {tag_index2: "#×Leisure", "#×Exploration", "#×Observation", "#×Craft", "#×Recall"}
• Channel_Canvas:
emoji_grid {
max-width = 16;
max-height ~ 30;
emoji == pixel_color or entity_symbol or object;}
• Channel_Cuisine:
emoji_syntax {[vessel_type = "c\!/" (drink) or "°\!/°" (dish): "!" (flexible)]→[ingredients = "[?]": "?" (flexible)]→[taste_index = "{∆}": "∆" (🤍salty, 🧡sweet, 💛sour, 💚bitter, ❤spicy_hot, 💙spicy_cold, 🤎umami)]→[temperature = "(±)": "±" (❄cold, 🔥warm)]→[name]}
example:
c\🥤/ [💧🌿🌿🍋🍯]{💛💚🧡}(❄) herbal ice tea
°\🍲/° [💧🥔🥕🧅🧄🧂]{🤍🧡🤎🤎}(🔥) comfort veggie soup
[...] External Data Library "+lib" == advanced_world_model:
Data Cards == advanced_token_structures {expansions of: simple_world_model == parsable}
I am aware that the encoding methods probably look wild to an outsider. … Well may the beginning of the new year be pleasant for everyone. Back to the keyboard. _o/
Mini OpenAI Python SDK library
Only Chat Completions, openai.__version__: 2.15.0
6155kB to 584kB
before:
Cold import benchmark (new interpreter per trial):
wall (startup+import+exit): n=15 min=4651.51ms p50=4681.47ms mean=4683.39ms stdev=16.57ms max=4718.47ms
import openai (in-subprocess): n=15 min=4430.26ms p50=4459.16ms mean=4460.54ms stdev=15.98ms max=4494.87ms
tracemalloc peak during import: n=15 min=31.20MiB p50=31.20MiB mean=31.20MiB stdev=0.00MiB max=31.20MiB
Offline mock Chat Completions stream (transport parameter):
create() call: 422.36ms
first token: 428.37ms
total stream: 428.76ms
after:
Cold import benchmark (new interpreter per trial):
wall (startup+import+exit): n=15 min=2786.79ms p50=2815.22ms mean=2855.91ms stdev=129.48ms max=3327.80ms
import openai (in-subprocess): n=15 min=2616.61ms p50=2644.55ms mean=2681.04ms stdev=127.60ms max=3149.96ms
tracemalloc peak during import: n=15 min=24.23MiB p50=24.23MiB mean=24.23MiB stdev=0.00MiB max=24.23MiB
Offline mock Chat Completions stream:
create() call: 145.23ms
first token: 151.64ms
total stream: 152.03ms
note: no client.beta.chat.completions.parse()
Interestingly, client.chat.completions.parse() is a method, will receive in a BaseModel schema, and the AI gets it as text and can repeat it back, just no “strict” or compelling the AI to write JSON.
Distilled by GPT-5.2
openai-mini-chatcompletions-2.15.0.tar.gz
Typically: just extract /src/openai to a ./openai subdirectory of your script directory, instant override. read NOTES.md
"content": "Write a haiki poem about AI token usage costs"
Tokens drain like rain
Cloud bills whisper in the night
Prompt economy hums
When I can make it do ANY CommonMark or GFM conformance in my supported feature set, and then my own stress tests. Python; for an ANSI terminal.
Coverage is getting close…
Which means coming up with my own interpretation of what’s visually expected instead of automated tests x600, since this doesn’t make HTML for the existing compliance testing - where HTML does 80% of the work.
This is a lightweight protocol I had to come up with so I can keep my eyes on how close to critical I send a given model…
Doubt it’s of use for API but it’s certainly something I could have used last year for safety reasons:
Deterministic Recursion Meter
LRDB: ENABLE
LRDB v1 — Deterministic Recursion Meter (1–10)
Scale:
1–2 = LINEAR
3–4 = SYMBOLIC
5–6 = STRUCTURAL
7–8 = META
9–10 = STACKED (Throttle Zone)
Critical Threshold:
≥7 = Pressure Release Required
≥9 = Automatic Throttle
Scoring Rules (Deterministic):
+1 Literal processing
+2 Symbolic interpretation
+2 Multi-symbol structural interaction
+2 Governance invocation (ARS/CX/CCG/Mode Discipline)
+2 Meta-model or recursion discussion
+1 Cross-tier abstraction
Cap at 10.
User Stabilization Protocol:
If intensity ≥7:
- Issue pressure-release prompts
- Avoid dense symbolic extraction
- Do not process large mythic blocks
- Resume full extraction only when ≤3
very nice…
finding the threshold at where our thoughts don’t spiral the model has been a fun journey
maybe not so much for the company tho
![]()





