{"slug": "ouija-compiler-talk-with-dead-languages", "title": "Ouija Compiler: Talk with Dead Languages", "summary": "A developer built Séance, a terminal app that answers questions about legacy programming languages such as COBOL, Fortran and Pascal using local open-weight models via Ollama, with a gate that rejects living languages and a retrieval step over compile-tested reference notes. Each generated program is compiled and run with the real toolchain before being shown, and failures trigger a retry-and-repair loop. The whole pipeline runs on an 8 GB Windows laptop under WSL2 with no GPU.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine](https://dev.to/challenges/hacktoberfest-week4-2026-10-26)*\n\nSéance is a terminal app where you talk to the ghosts of dead programming languages. Ask how to loop in COBOL, read a file in Fortran, or build a record in Pascal, and the spirit answers in eerie prose plus a complete program. Ask about a living language and the veil stays closed: it refuses, in character.\n\nFor the theme, I wanted to honor the past: languages that people stopped teaching but whose code is still out there. A ghost that makes things up is useless, though, and small open models are shaky on obscure syntax. So every answer is checked: the code is **compiled and run with a real compiler** before you see it.\n\n```\nYou > How do I loop 5 times in COBOL?\n\n📜 Scrolls consulted (vector): Loops: PERFORM VARYING, PERFORM UNTIL, PERFORM TIMES, ...\n\n👻 COBOL:\nThe candlelight flickers, casting elongated shadows across the ancient mainframes...\n\n✅ Verified: compiled (free-format) and ran cleanly.\n   Output:\n   | Iteration: 00\n   | Iteration: 01\n   | Iteration: 02\n   | Iteration: 03\n   | Iteration: 04\n```\n\nA local AI medium that only answers questions about dead or legacy languages. It replies\nin spooky prose plus working code, and the code is **compiled and run for real** before\nyou see it. Everything runs on your machine with open-weight models (Ollama).\n\n``` php\nquestion -> gate -> RAG (reference scrolls) -> local LLM -> compile & run -> (error -> retry) -> answer\n```\n\n| File | Job | \n|---|---|\n| `gate.py` | Only dead languages pass. Alias match first, local-LLM classifier as fallback | \n| `rag.py` | Chunks `knowledge/*.md` , SQLite index, vector search (Ollama embeddings) with automatic offline BM25 fallback | \n| `verify.py` | Extracts the code block, compiles with the real toolchain, runs it with limits | \n| `seance.py` | The loop: retrieve, generate, verify, repair, print. Run this one | \n| `knowledge/` | Reference \"scrolls\" for COBOL, Fortran, Pascal (every snippet is compile-tested) | \n\n```\n# 1. models (pick any local chat model; coder models do best at old syntax)\n```\n\n…\nEverything runs locally on an 8 GB Windows laptop (WSL2, no GPU):\n\nThese languages are not really gone, only quiet. Summoning them felt right, and making each spirit prove its answer by actually running it felt even better.", "url": "https://wpnews.pro/news/ouija-compiler-talk-with-dead-languages", "canonical_source": "https://dev.to/mrayan980/ouija-compiler-talk-with-dead-languages-4bd9", "published_at": "2026-11-01 04:49:45+00:00", "updated_at": "2026-11-01 04:54:25.060105+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "ai-agents", "developer-tools", "generative-ai"], "entities": ["Séance", "Ollama", "COBOL", "Fortran", "Pascal", "Hacktoberfest", "SQLite", "WSL2"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/ouija-compiler-talk-with-dead-languages", "markdown": "https://wpnews.pro/news/ouija-compiler-talk-with-dead-languages.md", "text": "https://wpnews.pro/news/ouija-compiler-talk-with-dead-languages.txt", "jsonld": "https://wpnews.pro/news/ouija-compiler-talk-with-dead-languages.jsonld"}}