[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81357":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":15,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":20,"topics":21,"createdAt":10,"pushedAt":10,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":13,"starSnapshotCount":13,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},81357,"rapira","begoon\u002Frapira","begoon","Rapira programming language \u002F Язык программирования Рапира","https:\u002F\u002Fdemin.ws\u002Frapira\u002F",null,"TypeScript",53,0,40,14,41.4,"MIT License",false,"main",true,[],"2026-06-12 04:01:33","# Rapira\n\nA TypeScript \u002F 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.\n\n> **▶ Try it in your browser: \u003Chttps:\u002F\u002Fbegoon.github.io\u002Frapira>**\n\n> **▶ Run it from your terminal:** `npx rapira factorial.rap`\n\n```rapira\nФУНК ФАКТ (Н);\n   ИМЕНА: Р;\n   1 -> Р;\n   ДЛЯ И ОТ 1 ДО Н ::\n      Р * И -> Р\n   ВСЕ\nРЕЗ: Р\nКНЦ;\n\nДЛЯ Н ОТ 0 ДО 6 ::\n   ? \"ФАКТ(\", Н, \") = \", ФАКТ(Н)\nВСЕ;\n```\n\n## What's in the box\n\n- **Interpreter core** (`src\u002F`) — 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 `\u003C >`, sets `\u003C* *>`, records `\u003C¤ ¤>`), three-arrow procedure parameter scheme (`name` \u002F `name =>` \u002F `\u003C=> name`), trailing `РЕЗ:` for function results.\n- **CLI** (`cli\u002F`) — `rapira FILE.rap` runs a program, `rapira` drops into a multi-line REPL, `--svg PATH` captures turtle graphics as SVG.\n- **Web playground** (`web\u002F`) — vanilla HTML + CodeMirror 6 + Web Worker, light\u002Fdark theme, example selector loading from `tests\u002Fsnippets\u002F`. Build with `bun build`, output sits in `docs\u002F` ready for GitHub Pages. Live at \u003Chttps:\u002F\u002Fbegoon.github.io\u002Frapira>.\n- **Snippet test pipeline** (`tests\u002Fsnippets\u002F`) — `.rap` files diffed against sibling `.expected.txt` \u002F `.expected.svg` on every run of `bun test`.\n- **Чертёжник 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.\n\n## Install\n\nThe CLI ships as a self-contained Node bundle. With Node ≥ 18 you can run it without cloning:\n\n```sh\nnpx rapira FILE.rap                           # run a program\nnpx rapira FILE.rap --svg out.svg             # capture turtle graphics\nnpx rapira                                    # multi-line REPL (Ctrl-D to quit)\n```\n\nOr install globally:\n\n```sh\nnpm install -g rapira\nrapira FILE.rap\n```\n\n## Develop\n\nFor local development you'll want Bun (it runs the tests and the dev server natively):\n\n```sh\nbun install\nbun test                                      # 129 tests across 9 files\nbun run cli\u002Findex.ts examples\u002Ffactorial.rap   # ФАКТ(0..7)\nbun run dev                                   # playground on http:\u002F\u002Flocalhost:10000\nbun run cli:build                             # bundle the CLI to dist\u002Frapira.js\n```\n\nIf you have [`just`](https:\u002F\u002Fgithub.com\u002Fcasey\u002Fjust) installed, you can use the recipe names — `just test`, `just dev`, `just run examples\u002Fturtle_star.rap --svg star.svg`, etc.\n\n## Examples\n\n| File | What it shows |\n| ---- | ------------- |\n| `examples\u002Fhello.rap` | canonical `ВЫВОД: \"Здравствуй, мир!\"` |\n| `examples\u002Ffactorial.rap` | `ФУНК` with trailing `РЕЗ:`, `ДЛЯ … ОТ … ДО`, integer math |\n| `examples\u002Fturtle_square.rap` | Чертёжник draws a square via `ПОВТОР … РАЗА :: ВПЕРЕД(50); НАПРАВО(90)` |\n| `examples\u002Fturtle_star.rap` | five-pointed star from a single repeat loop |\n| `examples\u002Fio_files.rap` | `ОТКРЫТЬ … КАК`, `ВЫВОД В ФАЙЛ`, `ВВОД ИЗ ФАЙЛА ТЕКСТОВ`, `ЗАКРЫТЬ` |\n| `examples\u002Fio_seek.rap` | `ПОЗИЦИЯ Ф = N` for random-access file reading |\n\n## Documentation\n\n- [`SPEC.md`](.\u002FSPEC.md) — the implementation contract: lexical structure, statements, operators, built-ins, what's done vs. honestly deferred.\n- [`RAPIRA.md`](.\u002FRAPIRA.md) — the canonical 1985 spec (Фг.00031-01 35 01) reformatted to Markdown from the [agatcomp.ru KOI-8 source](https:\u002F\u002Fagatcomp.ru\u002Fagat\u002FSoftware\u002FOther\u002Febooks-IKP-KPON\u002FIKP\u002F800.9\u002Frapira\u002Fdocs\u002FRAPIRAopisanie_jazyka.shtml).\n- [`CLAUDE.md`](.\u002FCLAUDE.md) — onboarding notes for working on this codebase.\n\n## License\n\n[MIT](.\u002FLICENSE) © Alexander Demin\n","Rapira 是一个用于苏联教育编程语言的 TypeScript\u002FBun 解释器，该语言设计于20世纪80年代初，最初为Агат（Agat）微型计算机上的*Школьница*（Shkolnitsa）学校计算系统而开发。其核心功能包括词法分析、语法解析及树遍历求值器，并忠实再现了1985年Agat方言特性，如俄文关键字、大小写不敏感标识符等。Rapira 提供命令行界面和在线代码编辑环境，支持程序运行、多行REPL模式以及海龟绘图输出到SVG文件等功能。适用于对历史编程语言感兴趣的开发者或教育者，在教学场景中演示早期编程语言的工作原理及其现代实现方式。",2,"2026-06-11 04:04:45","CREATED_QUERY"]