DEV Community

Aakif Kohari
Aakif Kohari

Posted on

Séance: Talk to the Ghosts of Dead Programming Languages (Offline, with Gemma 4)

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

Séance is an offline spirit board for dead (and undead) programming languages. You pick a spirit (COBOL, Fortran, ALGOL 60, Pascal, BASIC or Flash), ask it questions, and it answers in its own voice. Then you leave an ofrenda: a short note about what that language meant to you, which you can download as a small markdown remembrance card.

I read the theme two ways. Halloween gave me the spirit board. Día de los Muertos gave me the remembering. Languages are a strange kind of dead: ALGOL is gone but lives inside nearly every language we use, Flash was switched off by Adobe on 31 December 2020 and is kept alive by volunteers, and COBOL still quietly runs payroll.

Demo

Séance is built to run on your own machine, because that is the point. The README has a four-command quickstart.

Code

GitHub logo Aakif-Kohari / seance-offline

Séance: an offline spirit board that lets you talk to the ghosts of dead (and undead) programming languages. Streamlit + Ollama + Gemma 4, no cloud, no API key.

🕯️ Séance

An offline spirit board for dead (and undead) programming languages.

Summon COBOL, Fortran, ALGOL 60, Pascal, BASIC or Flash, ask them anything, and then leave an ofrenda for the language that taught you to code. Everything runs on your own machine with an open-weight model (Gemma 4 through Ollama). No cloud, no API key, and the lights can be off and the Wi-Fi unplugged.

Built for the Hacktoberfest Open-Source AI Challenge, Week 4: Ghost in the Machine.

Why this exists

Halloween asks for something spooky. Día de los Muertos asks us to remember. Programming languages are a strange kind of dead: ALGOL is gone but lives inside every language you use, Flash was switched off in 2020 and is being kept alive by volunteers, and COBOL refuses to die at all. Séance lets you sit down with them for a few minutes.

How it works

  1. Pick a…

How I Built It

  • Model: Gemma 4 (E4B) served locally by Ollama. The model name is one environment variable (SEANCE_MODEL), so swapping to gemma4:e2b or gemma4:26b is a one-line change.
  • App: a Streamlit front end that streams replies from the local model through the ollama Python client.
  • A grimoire to keep spirits honest: small local models love to invent history. Every spirit has a short, hand-written list of verified facts, and the system prompt says the model may state facts about itself only from that list. For anything else, the spirit must say its memory has faded. You can open the grimoire in the app and check the spirit against it.
  • Context: I set the context window and trim the conversation to the last few turns myself rather than trusting defaults.
  • Tests: 24 pytest tests cover the grimoire, prompt builder, ofrenda card and Ollama helpers. They need no model and no network.
  • Graceful failure: if Ollama is off or the model is not pulled, the sidebar says exactly which command to run.

Why Does Open Innovation Matter?

  • It works with the lights off. After one model download, the whole séance runs offline.
  • Your remembrance stays yours. What you write on an ofrenda never touches a server you do not control.
  • It cannot be switched off. A project about things that got switched off should not depend on a service that can be switched off. A hosted API can change, reprice or vanish, which is exactly what happened to Flash. Weights on my disk keep working.
  • You can change the spirit. Swap the model, edit the grimoire, add a language. The voice and the facts are plain text in the repo.

Prize Categories

  • Best Use of Gemma

Top comments (0)