<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Rayan Tahir</title>
    <description>The latest articles on DEV Community by Muhammad Rayan Tahir (@mrayan980).</description>
    <link>https://dev.to/mrayan980</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4191128%2Fe3cc388a-4235-47e7-9bf0-80057e95fa33.jpg</url>
      <title>DEV Community: Muhammad Rayan Tahir</title>
      <link>https://dev.to/mrayan980</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrayan980"/>
    <language>en</language>
    <item>
      <title>Ouija Compiler: Talk with Dead Languages</title>
      <dc:creator>Muhammad Rayan Tahir</dc:creator>
      <pubDate>Sun, 01 Nov 2026 04:49:45 +0000</pubDate>
      <link>https://dev.to/mrayan980/ouija-compiler-talk-with-dead-languages-4bd9</link>
      <guid>https://dev.to/mrayan980/ouija-compiler-talk-with-dead-languages-4bd9</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week4-2026-10-26"&gt;Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Sé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.&lt;/p&gt;

&lt;p&gt;For 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 &lt;strong&gt;compiled and run with a real compiler&lt;/strong&gt; before you see it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/sOOK_X8TdXM" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cobol"&gt;&lt;code&gt;&lt;span class="n"&gt;You&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;How&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;loop&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;times&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;COBOL&lt;/span&gt;?&lt;span class="w"&gt;

&lt;/span&gt;📜 Scrolls consulted (vector): Loops: PERFORM VARYING, PERFORM UNTIL, PERFORM TIMES, ...&lt;span class="w"&gt;

&lt;/span&gt;👻 COBOL:&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;candlelight&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;flickers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;casting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;elongated&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;shadows&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;across&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ancient&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mainframes&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;✅ Verified: compiled (free-format) and ran cleanly.&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="k"&gt;Output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;| Iteration: 00&lt;span class="w"&gt;
   &lt;/span&gt;| Iteration: 01&lt;span class="w"&gt;
   &lt;/span&gt;| Iteration: 02&lt;span class="w"&gt;
   &lt;/span&gt;| Iteration: 03&lt;span class="w"&gt;
   &lt;/span&gt;| Iteration: 04&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/mrayan980" rel="noopener noreferrer"&gt;
        mrayan980
      &lt;/a&gt; / &lt;a href="https://github.com/mrayan980/Ouija-Compiler" rel="noopener noreferrer"&gt;
        Ouija-Compiler
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Local AI séance that only answers questions about dead programming languages (COBOL, Fortran, Pascal). Runs offline on open-weight models, with RAG over verified reference scrolls and real compile-and-run checks.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;SEANCE: talk to dead programming languages&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;A local AI medium that only answers questions about dead or legacy languages. It replies
in spooky prose plus working code, and the code is &lt;strong&gt;compiled and run for real&lt;/strong&gt; before
you see it. Everything runs on your machine with open-weight models (Ollama).&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;question -&amp;gt; gate -&amp;gt; RAG (reference scrolls) -&amp;gt; local LLM -&amp;gt; compile &amp;amp; run -&amp;gt; (error -&amp;gt; retry) -&amp;gt; answer
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Job&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;gate.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Only dead languages pass. Alias match first, local-LLM classifier as fallback&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;rag.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Chunks &lt;code&gt;knowledge/*.md&lt;/code&gt;, SQLite index, vector search (Ollama embeddings) with automatic offline BM25 fallback&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;verify.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Extracts the code block, compiles with the real toolchain, runs it with limits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;seance.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The loop: retrieve, generate, verify, repair, print. Run this one&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;knowledge/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reference "scrolls" for COBOL, Fortran, Pascal (every snippet is compile-tested)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Setup&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; 1. models (pick any local chat model; coder models do best at old syntax)&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/mrayan980/Ouija-Compiler" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;Everything runs locally on an 8 GB Windows laptop (WSL2, no GPU):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model:&lt;/strong&gt; Gemma 3 (4B), open-weight, served by Ollama.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The gate:&lt;/strong&gt; only dead or legacy languages get through. Alias rules run first, with the local model as a fallback classifier, so "Pascal's triangle in Python" is correctly refused.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RAG:&lt;/strong&gt; a small knowledge base of reference "scrolls" (31 sections covering COBOL, Fortran and Pascal) indexed in SQLite and searched with Ollama embedding. If no embedding model is available, it falls back to offline BM25 keyword search.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verification:&lt;/strong&gt; the code block is extracted and compiled with GnuCOBOL, gfortran or Free Pascal, then run with a timeout and a stripped-down environment. If it fails, the compiler error goes back to the model, together with fresh scrolls retrieved using that error as the query, for up to two retries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests:&lt;/strong&gt; 52 tests, including one that compiles and runs every code sample in the knowledge base, so the scrolls themselves are known to be correct.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It works with the lights off. No internet, no API key, no per-question cost. I ran the demo with Wi-Fi switched off.&lt;/li&gt;
&lt;li&gt;I control the whole loop. The model is one environment variable, the knowledge base is plain Markdown, and the persona is a prompt I can edit. The retry loop, retrieval keyed on compiler errors, and the sandbox limits only exist because I could see and change every stage.&lt;/li&gt;
&lt;li&gt;Nothing can disappear on me. A project about preserving things that outlive their vendors would be ironic if it depended on a hosted API that could change or shut down.&lt;/li&gt;
&lt;li&gt;The honest trade-off: a 4B model on a CPU takes tens of seconds per answer and is weaker than large hosted models on obscure syntax. That is exactly why the retrieval and the real compilers matter: they let a small open model produce code you can trust.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Spirit of It
&lt;/h2&gt;

&lt;p&gt;These 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.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
