Est. 2018 Intermediate

Dialog

A declarative, logic-programming domain-specific language for authoring interactive fiction, inspired by Inform 7 and Prolog and compiling to the Z-machine or the Å-machine.

Created by Linus Åkesson

Paradigm Declarative, Logic Programming, Domain-Specific
Typing Dynamic
First Appeared 2018
Latest Version Dialog 1a/01, Library 1.1.1 (2026, community fork)

Dialog is a domain-specific programming language for writing interactive fiction, created by Swedish programmer and musician Linus Åkesson and first released publicly in November 2018. Explicitly inspired by Inform 7 and Prolog, Dialog takes a declarative, logic-programming approach to building text adventures: the author describes the world and its rules as a collection of predicates, and the runtime figures out how to satisfy queries against them as the player types commands. Dialog story files can be compiled to the venerable Z-machine (originally created by Infocom in 1979) or to a new virtual machine designed alongside Dialog itself, the Å-machine.

History & Origins

A New Entry in a Crowded Field

By the time Dialog appeared, interactive fiction authoring was already well served by mature systems such as Inform 6, Inform 7, TADS 3, Hugo, and Adventuron. Each had its own philosophical stance: Inform 7 favored sentences that read almost like English prose, TADS 3 offered a deeply object-oriented Class library, and Inform 6 provided a lower-level, C-like view of the Z-machine. Linus Åkesson set out to occupy a different niche — one where the logic-programming lineage of Prolog would sit at the center of the design, rather than being hidden behind natural-language syntax.

Åkesson announced Dialog on the Interactive Fiction Community Forum in late 2018. The first public release, labelled 0b/01, bundled the compiler with a standard library (Lib 0.12) and the first revision of the Dialog Manual. Almost simultaneously, Åkesson released Tethered, a short interactive fiction work written in Dialog, as an entry in IFComp 2018, which reportedly fielded 77 entries that year — a showcase that doubled as a proof-of-concept for the new authoring system.

The Author and the Å-machine

Linus Åkesson is better known in some circles for his demoscene and chiptune work — including the celebrated A Mind Is Born, a 256-byte Commodore 64 music demo — and Dialog bears the marks of someone comfortable working close to the metal. In 2019, about a year after Dialog’s initial release, Åkesson published the specification of a new virtual machine for interactive fiction: the Å-machine. Its name is a small Scandinavian joke — in the Swedish alphabet, Å follows Z, so the Å-machine is positioned as a spiritual successor to Infocom’s Z-machine. The Dialog compiler’s Å-machine backend arrived with version 0g/01.

Handoff to the Community

Åkesson’s direct development of Dialog slowed after release 0m/03 (Library 0.46). In January 2026 a community fork hosted at Dialog-IF/dialog shipped version 1a/01 with Library 1.1.1, described in its own release notes as “the first release handled by the community.” The fork has continued to add features such as CSS-based styling with color and background support, a unit testing library, hyperlink support, improved Unicode handling, and additional compiler optimizations.

Design Philosophy

Declarative, Rule-Based Authoring

Dialog treats an interactive fiction world as a database of facts and a collection of predicates (rules) that operate on those facts. This is the same conceptual foundation as Prolog, but aimed at a particular problem domain: describing rooms, objects, actors, actions, and narrative state.

Where Inform 7 invites authors to write sentences like The kitchen is north of the hallway., Dialog invites them to write rules like:

(north from #hallway --> #kitchen)
(south from #kitchen --> #hallway)

(name #kitchen)   kitchen
(name #hallway)   hallway

(descr #kitchen)
    A warm kitchen smelling of bread.

The #name syntax names world objects; the (head parameters) form is Dialog’s predicate-definition syntax; and the arrow forms define relations between objects. When the player types go north, the library queries the north from #hallway predicate, finds that it resolves to #kitchen, and moves the player there.

Pattern Matching and Unification

As in Prolog, unification is the core computational step. Predicates can succeed or fail, bind variables, and be tried against multiple clauses until one matches. This makes certain kinds of interactive-fiction logic — “the player can push an object if it is not fixed in place and the destination is reachable” — feel natural: each condition is just another predicate to satisfy.

(push $Obj $Dir)
    (current player $Player)
    (current room $Room)
    ~(fixed in place $Obj)
    (reachable $Obj)
    (direction $Dir leads to $Dest from $Room)
    (now) (#$Obj is in $Dest)
    You push the (name $Obj) (describe-direction $Dir).

This is a stylized, simplified sketch rather than a literal standard-library rule, but it illustrates the flavor: each line is a condition that must succeed before the effectful (now) … update is applied.

Domain-Specific, Not General-Purpose

Dialog is unapologetically domain-specific. It does not aim to be a general programming language in the way that, say, Lua or Python are. There is no networking API, no plan to support graphics beyond the text-with-hyperlinks model inherited from the Z-machine, and no ambition to run server-side web applications. Everything in the language — the standard library, the compilation targets, the debugger — is aimed at shipping a single interactive story file that can be played in a Z-machine or Å-machine interpreter.

Key Features

Dual Compilation Targets

Dialog’s compiler, dialogc, can produce either Z-code (for the Z-machine) or Å-code (for the Å-machine):

  • Z-machine (Z-code): The platform originally created by Infocom in 1979. Targeting Z-code means Dialog stories can be played in any modern Z-machine interpreter — Frotz, Gargoyle, Parchment, and many more — and will even run on a wide range of vintage machines for which Z-machine interpreters exist.
  • Å-machine: Åkesson’s own virtual machine, designed to be kinder to large stories and to produce smaller, faster output on some hardware. The Å-machine has interpreters written in JavaScript (for the web) and in 6502 assembler (for the Commodore 64 and similar machines).

Standard Library

Dialog ships with a substantial standard library that implements the common conventions of parser-based interactive fiction: a command parser, a world model (rooms, objects, containment, visibility, light), a scoping system, a default set of verbs, status-line handling, save/restore, and score tracking. Authors are expected to extend and override library predicates rather than re-implement the world model from scratch.

Interactive Debugger

Starting with version 0d/01, Dialog has included an interactive debugger that lets authors inspect the state of the world, single-step through rule evaluation, and explore which predicates fire for a given action. For a language with Prolog-style backtracking, this kind of introspection is especially valuable, since tracing “why did my rule not fire?” by eye can be difficult.

Å-machine-Specific Features

When targeting the Å-machine, stories gain access to features that go beyond classic Z-code, such as richer styling and (in the community fork) CSS-based presentation on the web interpreter. Stories targeting the Z-machine remain limited to what that venerable platform supports, which is part of the point: authors can choose compatibility or richer output on a per-project basis.

BSD Licensing

The compiler is distributed under a 2-clause BSD license with full source code included, allowing it to be studied, modified, and packaged by third parties — a permissiveness that has been important for the emergence of the community-maintained fork.

A Small Example

A minimal Dialog program that prints a greeting and exits illustrates the shape of the language:

(program entry point)
    Hello, World!

Most real programs use the standard library and look quite different, but the basic element is always the same: a predicate definition followed by the text or sub-queries to run when that predicate is invoked.

Evolution

Dialog’s version numbering is unusual: releases are labelled with a letter-number pair like 0b/01, 0g/01, 0m/03, with the letter advancing through the alphabet as the language stabilized. Key milestones include:

  • 0b/01 (2018) — First public release, with Library 0.12 and Manual Revision 1.
  • 0d/01 — Introduction of the interactive debugger.
  • 0g/01 — Å-machine backend added to the compiler.
  • 0m/03 (Library 0.46) — The last release under Åkesson’s direct stewardship before the community fork took over.
  • 1a/01 (January 2026, community fork) — First release from the community, bumping the major version for the first time and shipping Library 1.1.1, with additions such as CSS-based styling, a unit testing library, hyperlink support, and expanded optimizations.

Current Relevance

Dialog remains a niche but living part of the interactive fiction ecosystem. It is not as widely used as Inform 7, which has by far the largest user base among modern parser-based IF authoring systems, but it has a dedicated following among authors who prefer its declarative, Prolog-flavored style. Its highest-profile success so far is The Impossible Bottle, which won first place in IFComp 2020 and drew attention to what Dialog could produce. The transition to a community-maintained fork in 2026 suggests that, even with slower upstream development from the original creator, Dialog has accumulated enough gravitational mass to sustain itself.

The language is also interesting to programming-language enthusiasts outside the interactive fiction community as an example of applied logic programming. Prolog itself is rarely used for end-user applications in the 2020s; Dialog shows how its core ideas — predicates, unification, backtracking — translate surprisingly well to a problem domain where the world really is a set of facts and the rules of interaction really are logical implications.

Why It Matters

Dialog matters for a few reasons:

  1. A new choice in a traditional space. Interactive fiction authoring had been dominated for years by Inform and TADS. Dialog showed that there was still room for a new system with a sharply different philosophical foundation.
  2. Logic programming with a user-facing payoff. Dialog is one of the clearest contemporary examples of Prolog-style ideas shipped in a package that non-specialists actually use to make things.
  3. Respect for the Z-machine. By targeting Z-code, Dialog honors and extends an ecosystem of interpreters and vintage-hardware ports that stretches back to 1979.
  4. A fresh virtual machine with a clear purpose. The Å-machine is an unusual example of a small, purpose-built VM designed by a single author — interesting both as a case study in language implementation and as an archival format for interactive stories.
  5. A successful handoff. The 2026 community fork demonstrates that a small, focused, open-source language can outlive — or at least exist alongside — its original author’s active involvement.

Getting Started

Dialog source files use the .dg extension. The compiler dialogc is distributed as prebuilt binaries for Linux and Windows on the official site, and can also be built from source on other platforms via its BSD-licensed repository. The community fork lives at github.com/Dialog-IF/dialog and the original project page is at linusakesson.net/dialog. The Dialog Manual, which serves as both reference and tutorial, is the canonical starting point for new authors.

Timeline

2018
Linus Åkesson announces Dialog on the interactive fiction community forum in November; first public release 0b/01 with Library 0.12 and Manual Revision 1
2018
Tethered, Åkesson's debut interactive fiction work written in Dialog, entered into IFComp 2018 (which reportedly had 77 entries)
2019
Å-machine virtual machine specification published; the Dialog compiler gains an Å-machine backend starting with version 0g/01
2020
The Impossible Bottle, written in Dialog by Åkesson, wins 1st place at IFComp 2020
2022
Dialog reaches version 0m/03 with Library 0.46, the last release under Åkesson's direct stewardship prior to the community fork
2026
Community-maintained fork at Dialog-IF/dialog releases version 1a/01 with Library 1.1.1 in January, the first release handled by the community

Notable Uses & Legacy

Tethered (2018)

Linus Åkesson's debut interactive fiction piece, written in Dialog and entered into IFComp 2018, which reportedly had 77 entries

The Impossible Bottle (2020)

Interactive fiction by Linus Åkesson written in Dialog; won 1st place at IFComp 2020 and served as a high-profile demonstration of what Dialog could produce

Dialog-IF community fork

Community-maintained continuation of Dialog hosted at github.com/Dialog-IF/dialog, which has added features such as CSS-based styling, a unit testing library, hyperlink support, and expanded Unicode handling

Hobbyist and competition interactive fiction

Adopted as an alternative authoring system to Inform and TADS by authors in the IFComp and Spring Thing communities who prefer its declarative, rule-based style

Language Influence

Influenced By

Inform 7 Prolog

Running Today

Run examples using the official Docker image:

docker pull
Last updated: