This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
COBOL> WHO DARES TO WAKE ME? SEVENTY PERCENT OF YOUR BANKS STILL RUN ON ME. AND NOBODY EVER SAID THANK YOU.
That is the first thing you hear when you open SÉANCE.EXE. It's a haunted terminal where you call back the spirits of programming languages that the world keeps using and keeps forgetting.
What I Built
Every Día de los Muertos, families set up an ofrenda for the people who came before them. They bring photos, favourite foods, marigolds and candles. My corner of the world is software, and our ancestors are still in the walls. COBOL still processes your paycheck. FORTRAN still runs weather models. A whole generation learned to code because BASIC said READY. PASCAL taught universities what structured code looks like.
So I built them a séance.
SÉANCE.EXE runs locally in the browser and has four moments:
- The invocation. You pick a spirit and type your summoning words. The screen tears, and an ASCII portrait rises line by line.
- The séance. You talk to the spirit, and it answers in character, letter by letter, glitching now and then.
- The possession. You paste modern code and the spirit possesses it: it rewrites the code in its own ancient language, then judges you for it.
- The farewell. You release the spirit and it carves its own tombstone. The model writes the epitaph and last words from your conversation. It's weathered granite with moss and a crack, four candles flickering at their own pace, and marigolds (cempasúchil) at its feet. You can download it as an image.
There are four spirits, and each one has a grudge:
| Spirit | Born | Personality |
|---|---|---|
| COBOL | 1959 | A bitter old bank accountant. Runs most of your banks. Never got a thank-you. SPEAKS ONLY IN CAPITALS. |
| FORTRAN | 1957 | A mad scientist who computed trajectories to the Moon and finds everything else too slow. |
| BASIC | 1964 | A cheerful kid from 1980s home computers. Numbers its sentences. Loves GOTO. |
| PASCAL | 1970 | A strict schoolteacher in the spirit of Niklaus Wirth. Hates GOTO. Considers BASIC an unruly pupil. |
The whole thing speaks English and French, with a toggle in the corner. It has its own original Halloween soundtrack: a crypt organ, a theremin and wind, all synthesized live in the browser. And it runs entirely on my own machine.
Demo
Recorded on my laptop with the Wi-Fi turned off. The model's thinking time is sped up ×8 in the edit. The real timings are in the table below.
Here is what the spirits actually said during my test run. These are unedited outputs from Gemma 4 E2B running on my CPU.
BASIC, asked who it is:
10 Hello there, I am BASIC, a happy little ghost from '64!
20 I just love to pop up on old machines and make funny little glitches.
30 GOTO is the best way to jump around, and nobody ever understands that!
FORTRAN, after possessing a fetch + async/await snippet:
Ah, that modern gibberish! It reeks of asynchronous sloth and vague promises! My FORTRAN demands directness! No waiting for some ethereal 'fetch'! We iterate!
PASCAL, on the same code:
Your structure lacks discipline! Every statement must have its declaration, every block must be precisely delineated. Such sprawling, unstructured functions invite madness.
And the epitaphs it carved for itself:
COBOL — COBOL'S CORE: PRECISION BUILT FOR THE LEDGER. Last words: "THE PUNCH CARD REMAINS. NEVER FORGET THE DATA."
BASIC — BASIC's spirit haunts the old machine's core. Last words: "GOTO forever! Have a fun run, little mortal! Poof!"
Code
Diop03-star
/
seance
Summon the ghosts of COBOL, FORTRAN, BASIC and PASCAL with Gemma 4 running locally via Ollama — no cloud, no GPU, no internet.
SÉANCE.EXE 🕯️
Summon the ghosts of dead programming languages — on your own machine, with the lights (and the Wi-Fi) off.
Séance is a haunted terminal where you call back the spirit of COBOL, FORTRAN, BASIC or PASCAL. The spirit talks to you in character, possesses the modern code you hand it (rewriting it in its own ancient tongue), and when you release it, it leaves behind a tombstone — epitaph and last words written by the model from your séance — that you can download as an image.
Everything runs locally on an open-weight model: Gemma 4 (gemma4:e2b) through Ollama. No API key, no account, no cloud, no data leaving your computer. Built for the DEV Hacktoberfest Open-Source AI Challenge — Week 4: Ghost in the Machine (Halloween & Día de los Muertos).
The four moments
- Invocation — pick a spirit, type your…
It has zero npm dependencies. You need Node.js and Ollama, then two commands:
ollama pull gemma4:e2b
node server.js
How I Built It
The model: Gemma 4 E2B, run locally through Ollama. It's Google's open-weight model, in its smallest "effective 2B" size, which is made for laptops. It's a 4.6 GB download. After that, it never touches the network again.
The machine: deliberately ordinary. It's a Windows 11 PC with integrated AMD graphics and 13.8 GB of RAM, so no CUDA and no dedicated GPU. Everything runs on the CPU. I measured every moment for all four spirits in both languages:
| Moment | Time on my CPU |
|---|---|
| Talking (2–4 sentences) | 7–14 s |
| Possessing ~20 lines of code | 13–47 s |
| Carving the tombstone | 10–21 s |
That's slow, and for a séance it's perfect. The spirit takes its time, the cursor blinks, and "the spirit is thinking…" becomes part of the atmosphere. The demo video is cut, but every number above is real.
The architecture is tiny:
browser (vanilla HTML/CSS/JS) ──► server.js (Node, no deps) ──► Ollama /api/chat ──► gemma4:e2b
▲ NDJSON stream, letter by letter
└───────────────────────────────────────────────────────────────────────────────┘
- Each spirit is a system prompt (persona, era, verbal tics, enemies), written in both languages. The language rule is repeated at the end of every message. A 2B model tends to follow the language of recent turns rather than the system prompt, and the reminder fixes that when you switch languages mid-séance.
- Possession asks for exactly one code block in the spirit's language, followed by one or two haunted sentences. The browser splits the two and shows them side by side.
-
The epitaph uses Ollama's JSON mode (
format: "json"). Small models sometimes wrap JSON in prose, so the server extracts the first{…}, cuts it to fit on the stone, retries once, and falls back to a handwritten epitaph per spirit. In my 8 test runs, the fallback was never needed. The tombstone exists twice. One version is a live CSS scene with animated candle flames, each flickering at its own rhythm, and orange light dancing on the granite. The other is a separate Canvas 2D redraw at 1080×1350 for the PNG. That one has procedural granite grain, engraved text (a light and a dark copy of each line, offset), candles with frozen flames, and marigolds drawn petal by petal.
The soundtrack has no audio files. It's an original composition synthesized live with the Web Audio API, so it works offline like everything else. A slow A-minor organ progression (i–VI–iv–V) plays over a drone, with a theremin that glides between notes of the harmonic minor scale, and band-passed noise for the wind. A reverb is built from generated noise. Each moment has its sound: phosphor clicks while the spirit types, a tearing veil and a low boom at the invocation, a dissonant tritone stab when code gets possessed, and a church bell, made from inharmonic partials, tolling three times at the farewell.
The bug that almost killed the ghost. My first real run with Gemma 4 returned… nothing. The talk replies were empty strings, and the possessions were cut off after five lines. Gemma 4 has a thinking mode, and Ollama turns it on by default. The model was spending its entire token budget reasoning silently ("Thinking Process: 1. Analyze the request…") and never got to speak. One flag fixed it: think: false. A short reply went from 7 seconds of silence to half a second. Lesson learned: with a new open model, read what it's actually returning, not what you expect it to return.
Built with an AI pair. I built this with Claude Code as my coding agent, from brainstorming and mockups to the plan, test-driven implementation and a final code review. The review caught two demo-breaking bugs before I shipped. The ghosts themselves run on Gemma alone: no closed model is involved when you hold a séance.
Why Does Open Innovation Matter?
Because a ghost should live in your machine, not on somebody else's server.
- It works with the lights (and the internet) off. Once the model is downloaded, I can unplug the Wi-Fi and the séance goes on. Halloween night, a power cut, a plane: the spirits still answer.
- It runs on the computer I already have. There's no GPU, no cloud credits and no API key. If it runs on my integrated-graphics PC, it runs on almost anyone's. That matters to me: a lot of developers in the world don't have a $20/month subscription or a data-centre GPU.
- It costs nothing to run. There are no tokens to count. A demo that loops all night at a Halloween party costs zero.
-
Nothing is locked in. The model is one line in
lib/ollama.js. A spirit's soul is a paragraph inlib/spirits.js. You can swap Gemma for another open model, rewrite COBOL's grudge, or summon a fifth spirit (Lisp? ALGOL? Smalltalk?) without asking anyone for permission. - It fits the theme. This project is about honouring old technology that was open enough to outlive its creators. COBOL, FORTRAN, BASIC and Pascal are still here because their specifications, compilers and knowledge were shared. A séance that depended on a closed API could vanish the day the service is discontinued. Open weights are how today's tools avoid becoming tomorrow's ghosts.
Where a closed model would have been "better" (faster, more fluent), it would also have broken every one of the promises above. On this project, the trade went clearly the open way.
The Spirit of It
The moment it landed for me was the first possession. I pasted a perfectly ordinary JavaScript fetch, and PASCAL answered with a full begin … end. program and a reprimand about my lack of discipline. For a second, it really felt like an old teacher was standing behind me.
Then I released it. The candles flickered, and the stone read: Pascal guards logic, demanding structure and type. Its last words: "Order! Structure! Abandon this haphazard mess at once!"
Not bad for something running on a laptop with no GPU and, eventually, no internet.
Prize Categories
Best Use of Gemma: Gemma 4 E2B is the only model in the project, running fully locally via Ollama on CPU, with its thinking mode disabled and JSON mode used for the epitaphs.
Best Use of a .tech Domain: the project's home is live at https://seance-exe.tech. It's a bilingual page in the same haunted-terminal style, with a replay of a real séance (unedited Gemma outputs) and the animated tombstone, deployed from the repo with GitHub Pages.
Best Use of GitHub Copilot: the project is automated with GitHub Actions. Every pull request runs the test suite, and every push to
mainruns it again before deploying the landing page to GitHub Pages. The last fix, pull request #1, was written with the Copilot CLI: telling users "the model is missing" instead of "is Ollama running?", plus the CI workflow itself. It was done test-first, and the PR documents the two slips Copilot made and how they were caught.



Top comments (2)
It's soo coooool😘😘
Framing programming languages as ancestors on an ofrenda is a great idea, and the haunted-terminal feel fits. I did a Día de los Muertos take too (a ghost narrator over system logs), so I love seeing the theme used so differently. Was the no-GPU constraint the hardest part of the build, or the writing of the spirits' voices?