LmCast :: Stay tuned in

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

Recorded: May 28, 2026, 9:01 a.m.

Original Summarized

GitHub - begoon/rapira: Rapira programming language / Язык программирования Рапира · GitHub

Skip to content

Navigation Menu

Toggle navigation

Sign in

Appearance settings

PlatformAI CODE CREATIONGitHub CopilotWrite better code with AIGitHub SparkBuild and deploy intelligent appsGitHub ModelsManage and compare promptsMCP RegistryNewIntegrate external toolsDEVELOPER WORKFLOWSActionsAutomate any workflowCodespacesInstant dev environmentsIssuesPlan and track workCode ReviewManage code changesAPPLICATION SECURITYGitHub Advanced SecurityFind and fix vulnerabilitiesCode securitySecure your code as you buildSecret protectionStop leaks before they startEXPLOREWhy GitHubDocumentationBlogChangelogMarketplaceView all featuresSolutionsBY COMPANY SIZEEnterprisesSmall and medium teamsStartupsNonprofitsBY USE CASEApp ModernizationDevSecOpsDevOpsCI/CDView all use casesBY INDUSTRYHealthcareFinancial servicesManufacturingGovernmentView all industriesView all solutionsResourcesEXPLORE BY TOPICAISoftware DevelopmentDevOpsSecurityView all topicsEXPLORE BY TYPECustomer storiesEvents & webinarsEbooks & reportsBusiness insightsGitHub SkillsSUPPORT & SERVICESDocumentationCustomer supportCommunity forumTrust centerPartnersView all resourcesOpen SourceCOMMUNITYGitHub SponsorsFund open source developersPROGRAMSSecurity LabMaintainer CommunityAcceleratorGitHub StarsArchive ProgramREPOSITORIESTopicsTrendingCollectionsEnterpriseENTERPRISE SOLUTIONSEnterprise platformAI-powered developer platformAVAILABLE ADD-ONSGitHub Advanced SecurityEnterprise-grade security featuresCopilot for BusinessEnterprise-grade AI featuresPremium SupportEnterprise-grade 24/7 supportPricing

Search or jump to...

Search code, repositories, users, issues, pull requests...

Search

Clear

Search syntax tips

Provide feedback


We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

begoon

/

rapira

Public

Notifications
You must be signed in to change notification settings

Fork
0

Star
7

Code

Issues
0

Pull requests
0

Actions

Projects

Security and quality
0

Insights

Additional navigation options

Code

Issues

Pull requests

Actions

Projects

Security and quality

Insights


begoon/rapira

 mainBranchesTagsGo to fileCodeOpen more actions menuFolders and filesNameNameLast commit messageLast commit dateLatest commit History26 Commits26 Commits.github/workflows.github/workflows  clicli  examplesexamples  scriptsscripts  srcsrc  teststests  webweb  .gitignore.gitignore  CLAUDE.mdCLAUDE.md  JustfileJustfile  LICENSELICENSE  RAPIRA.mdRAPIRA.md  README.mdREADME.md  SPEC.mdSPEC.md  bun.lockbun.lock  package.jsonpackage.json  tsconfig.jsontsconfig.json  View all filesRepository files navigationREADMEMIT licenseRapira
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.
CLI (cli/) — rapira FILE.rap runs a program, rapira drops into a multi-line REPL, --svg PATH 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.
Snippet test pipeline (tests/snippets/) — .rap files diffed against sibling .expected.txt / .expected.svg on every run of bun test.
Чертёжник turtle — Soviet "Draftsman" executor exposed as ordinary Rapira procedures (ВПЕРЕД, НАЗАД, НАПРАВО, НАЛЕВО, ПЕРО_ВНИЗ, ПЕРО_ВВЕРХ, ДОМОЙ, В_ТОЧКУ, КУРС). Layered on top of the same GfxEvent stream as the documented graphics primitives (ЛИН, ПРЯМ, ОБЛ, etc.) so the CLI's SVG renderer and the playground's canvas renderer draw identical output.

Install
The CLI ships as a self-contained Node bundle. With Node ≥ 18 you can run it without cloning:
npx rapira FILE.rap # run a program
npx rapira FILE.rap --svg out.svg # capture turtle graphics
npx rapira # multi-line REPL (Ctrl-D to quit)
Or install globally:
npm install -g rapira
rapira FILE.rap
Develop
For local development you'll want Bun (it runs the tests and the dev server natively):
bun install
bun test # 129 tests across 9 files
bun run cli/index.ts examples/factorial.rap # ФАКТ(0..7)
bun run dev # playground on http://localhost:10000
bun run cli:build # bundle the CLI to dist/rapira.js
If you have just installed, you can use the recipe names — just test, just dev, just run examples/turtle_star.rap --svg star.svg, etc.
Examples

File
What it shows

examples/hello.rap
canonical ВЫВОД: "Здравствуй, мир!"

examples/factorial.rap
ФУНК with trailing РЕЗ:, ДЛЯ … ОТ … ДО, integer math

examples/turtle_square.rap
Чертёжник draws a square via ПОВТОР … РАЗА :: ВПЕРЕД(50); НАПРАВО(90)

examples/turtle_star.rap
five-pointed star from a single repeat loop

examples/io_files.rap
ОТКРЫТЬ … КАК, ВЫВОД В ФАЙЛ, ВВОД ИЗ ФАЙЛА ТЕКСТОВ, ЗАКРЫТЬ

examples/io_seek.rap
ПОЗИЦИЯ Ф = N for random-access file reading

Documentation

SPEC.md — the implementation contract: lexical structure, statements, operators, built-ins, what's done vs. honestly deferred.
RAPIRA.md — the canonical 1985 spec (Фг.00031-01 35 01) reformatted to Markdown from the agatcomp.ru KOI-8 source.
CLAUDE.md — onboarding notes for working on this codebase.

License
MIT © Alexander Demin

About

Rapira programming language / Язык программирования Рапира

demin.ws/rapira/

Resources

Readme

License

MIT license

Uh oh!

There was an error while loading. Please reload this page.


Activity
Stars

7
stars
Watchers

0
watching
Forks

0
forks

Report repository

Releases
No releases published

Packages
0

 

 

 

Uh oh!

There was an error while loading. Please reload this page.


Contributors

Uh oh!

There was an error while loading. Please reload this page.


Languages

TypeScript
92.3%

JavaScript
4.6%

Just
1.5%

CSS
1.4%

HTML
0.2%

Footer

© 2026 GitHub, Inc.

Footer navigation

Terms

Privacy

Security

Status

Community

Docs

Contact

Manage cookies

Do not share my personal information

You can’t perform that action at this time.

The Rapira programming language is presented as a TypeScript and Bun interpreter for Rapira, a Soviet-era educational programming language originally developed in the early 1980s under G. A. Zvenigorodsky for the Agat microcomputer as part of the Shkolnitsa computing system. The foundation of Rapira is rooted in historical constraints, evidenced by its implementation adhering closely to the 1985 Agat dialect, which dictated specific syntactic and structural rules.

The core design incorporates several distinct components reflecting a layered architecture of implementation. The interpreter core, located in the src directory, is responsible for the fundamental operations, including the lexer, parser, and tree-walking evaluator. This core faithfully implements the specific features of the 1985 dialect, featuring Russian-only keywords, case-insensitive identifiers, a semicolon for statement separation, and unique compound types such as tuples, sets, and records. Furthermore, the procedure parameter scheme utilizes a three-arrow notation, and function results are explicitly handled using a trailing result indicator.

The language design incorporated specific constraints that inform its structure. This includes the use of specific compound types and the three-arrow parameter scheme, which represents a unique approach to function definition and data structuring. The language also features distinct operators and constructs that define its operational logic.

The project provides multiple pathways for interacting with and developing Rapira. The command-line interface, or CLI, is designed to allow for direct execution of programs, functioning as a multi-line Read-Eval-Print Loop (REPL). This CLI has the capability to capture outputs from the turtle graphics execution and render them as SVG files.

A web playground offers an accessible environment for development, utilizing standard web technologies like HTML, CodeMirror 6, and Web Workers to provide a dynamic experience with light and dark themes. This playground structure aims to facilitate immediate visual feedback, which is built for deployment via GitHub Pages.

A critical aspect of the project involves the extension of functionality through the implementation of a turtle graphics executor. This feature is exposed as standard Rapira procedures, including commands for movement (forward, backward, left, right) and pen operations. This turtle module is layered upon the existing graphics event stream, ensuring that the output generated by the CLI's SVG renderer and the web playground's canvas renderer is identical.

The development and testing pipeline is supported by a suite of tools utilizing Bun. This setup facilitates local development, running self-contained tests across 129 test cases, executing examples, and bundling the CLI into a distributable JavaScript file. The snippet testing mechanism further refines development by allowing differential testing of Rapira files against expected outputs.

The provided examples demonstrate the language's capability across various domains, including basic mathematical functions like factorial calculations, input output operations involving file handling (reading, writing, and seeking), and spatial reasoning through the turtle graphics execution, such as drawing a square or a five-pointed star. The implementation contract is formally documented in SPEC.md and RAPIRA.md, which detail the lexical structure, operational statements, built-in functions, and the canonical 1985 specification reformatted for modern readability. The project is licensed under the MIT license, attributed to Alexander Demin.