Skip to content
Tech News
← Back to articles

Rapira (Рапира) – Soviet programming language interpreter

read original more articles
Why This Matters

The development of Rapira as a TypeScript/Bun interpreter for the Soviet-era РАПИРА programming language highlights the ongoing interest in preserving and exploring historical computing systems. This project offers both educational value and a bridge for modern developers to engage with vintage programming concepts, fostering a deeper understanding of early computing languages and their evolution in the tech industry.

Key Takeaways

Rapira

A TypeScript / Bun interpreter for РАПИРА — the Soviet educational programming language designed in the early 1980s under G. A. Zvenigorodsky as part of the Школьница (Shkolnitsa) school computing system for the Агат (Agat) microcomputer.

▶ Try it in your browser: https://begoon.github.io/rapira

▶ Run it from your terminal: npx rapira factorial.rap

ФУНК ФАКТ (Н); ИМЕНА: Р; 1 -> Р; ДЛЯ И ОТ 1 ДО Н :: Р * И -> Р ВСЕ РЕЗ: Р КНЦ; ДЛЯ Н ОТ 0 ДО 6 :: ? "ФАКТ(", Н, ") = ", ФАКТ(Н) ВСЕ;

What's in the box

Interpreter core ( src/ ) — lexer, parser, tree-walking evaluator. Faithful to the 1985 Agat dialect: Russian-only keywords, case-insensitive identifiers, (* … *) block comments, ; statement separator, three compound types (tuples < > , sets <* *> , records <¤ ¤> ), three-arrow procedure parameter scheme ( name / name => / <=> name ), trailing РЕЗ: for function results.

( ) — lexer, parser, tree-walking evaluator. Faithful to the 1985 Agat dialect: Russian-only keywords, case-insensitive identifiers, block comments, statement separator, three compound types (tuples , sets , records ), three-arrow procedure parameter scheme ( / / ), trailing for function results. CLI ( cli/ ) — rapira FILE.rap runs a program, rapira drops into a multi-line REPL, --svg PATH captures turtle graphics as SVG.

( ) — runs a program, drops into a multi-line REPL, captures turtle graphics as SVG. Web playground ( web/ ) — vanilla HTML + CodeMirror 6 + Web Worker, light/dark theme, example selector loading from tests/snippets/ . Build with bun build , output sits in docs/ ready for GitHub Pages. Live at https://begoon.github.io/rapira.

( ) — vanilla HTML + CodeMirror 6 + Web Worker, light/dark theme, example selector loading from . Build with , output sits in ready for GitHub Pages. Live at https://begoon.github.io/rapira. Snippet test pipeline ( tests/snippets/ ) — .rap files diffed against sibling .expected.txt / .expected.svg on every run of bun test .

... continue reading