Imagine the thrill of studying languages built to run on completely separate hardware architectures, featuring entirely novel paradigms and structures.
This would be the closest thing to experience reverse-engineering a computer from an alien spaceship.
In the West, while the military industry initially pushed computer development, private companies quickly adapted those technologies for the consumer market. Over time, the Western consumer market became vastly larger than the military one.
In the USSR, this cross-pollination wasn't possible because anything that even touched the military was immediately classified as a state secret. This obsession with secrecy even affected civilian infrastructure like nuclear power plants. Plant operators weren't fully trained on how the systems worked under extreme conditions, and they were kept completely in the dark about inherent design flaws—because in the Soviet system, everything was by definition perfect and superior to the West.
Furthermore, because the consumer market was strictly controlled by the government and the party, the Soviet economy lacked any organic market signals regarding what people actually wanted or needed. Apparatchiks had to look elsewhere for data, so they resorted to copying Western solutions—sometimes just copying the basic concept (like a radio where users could choose their own stations), and sometimes cloning the entire machine.
While Soviet scientists had some highly innovative and interesting ideas in the beginning, central planners eventually decided it was faster and easier to copy a Western solution that was already 5, 10, or 15 years ahead in mass production.
The language itself is quite similar to Visual Basic. It's awkward to write with a regular Russian keyboard layout, but I was told that there exist special layouts just for it.
Rapira was more like SETL + Python. It was a dynamic interpreted PL with a rich set of compound data types, such as sets, records (associative arrays), and so on. Compared to the contemporary BASIC, it was ADVANCED
Like Logo, Robik was used to teach programming to kindergarthen-age children, while Rapira was aimed at high school students
---
1. https://en.wikipedia.org/wiki/Robic / https://ru.wikipedia.org/wiki/%D0%A0%D0%BE%D0%B1%D0%B8%D0%BA
2. https://en.wikipedia.org/wiki/Rapira / https://ru.wikipedia.org/wiki/%D0%A0%D0%B0%D0%BF%D0%B8%D1%80...
This is a pretty cool historical artifact.
Does anyone use "native language" programming languages in education or day to day?
USSR just wasn't rich enough to afford experimentation and innovation. Resources (including human brain power) were quite limited. So they had to copy proven solutions. Simple as that.
It's easy to judge them in the retrospective. But they had to make decisions, using the information the had at the moment, weighing risks as they saw them at that moment.
But then I read much more about the design, and it turns out that the reason machine was ternary is the designers had to minimize number of transistors, and leaned heavily into transformer-based logic - which naturally favors ternary values.
But for transistor/IC circuitry, there are no advantages in ternary - they key to reliability is margins, and margins require only two states. Any transistor-based ternary implementation would be forced to using a pair of bits and declare one of the four states invalid - a clear efficiency loss.
History confirmed it - even in MSU, once transistors became more available, they abandoned SETUN and started using those. Turns out at least that ternary branch was just a evolutionary dead end.
Mind you I still think it would have likely been impossible for political reasons, there were many structural incentives to falsify economic data in the USSR due to the high degree of corruption and patronage among the nomenklatura. The whole point of cybernetics is to treat economic problems as systems problems and expose data transparently, and given the USSR was structurally dependent on falsifying this data suddenly having an accurate picture might have actually been destabilising kind of like how Glasnost turned out to be.
Another interesting 'Soviets had decent computers' counterfactual is that the Chernobyl disaster might have been prevented, since the Kurchartov Institute would have been better able to characterise the processes in the bottom of the fatally flawed RBMK in low power regimes before it was put into mass production. Again this might not have actually helped, the overconfidence the Soviet system had in its scientific and technical institutions was high and genuinely really interesting.
UPD: The PLs were called "Roo&Robby" and written by https://en.wikipedia.org/wiki/Mark_Sapir before he emigrated to the US.
UPD: 1C can be used in both Russian and English. And I'm pretty sure it can be used outside of 1C:Enterprise.
It also has BSL Language Server and IDEA\VSCode extensions.
https://en.wikipedia.org/wiki/Non-English-based_programming_...
FUNC FACT (N);
NAME: R;
1 -> P;
FOR I FROM 1 TO N ::
R * I -> R
ALL
RES: R
KNC;
FOR N FROM 0 TO 6 ::
? "FACT(", N, ") = ", FACT(N)
ALL;The first is corruption. When the Iron Curtain fell, every country behind it suffered from corruption. The Russian word for how it worked was блат, pronounced blat. When the official way of doing things doesn't work, the way that works is informal favor trading. I have a friend, who knows a friend, etc. This acts as grit in the economic system, and makes everyone less productive.
The second was the pressure to not stand out too much. One proverb is Инициатива наказуема, pronounced initsiativa nakazuema. It translates to, "Initiative is punishable."
Why? Well, imagine that you're a middle manager. It's a dog eat dog world. You know that everyone below you, wants your job. Everyone above you, knows that you want their job. You got your role by sucking up to the people above you. Those below you, got theirs by sucking up to you. You don't want your employees to be utterly incompetent - then you won't be able to look good. But you also don't want any of them to shine - then your boss might think that they should have your job. This encourages bland mediocracy. Everyone strives to be just good enough for their job, while sucking up well enough to keep it.
The result is a kind of learned incompetence. But a nation filled with this kind of incompetence, will be unable to sustain innovation.
The third is alcoholism. Russia is basically a very large, very dysfunctional, alcoholic family. It is hard to overstate how true that is. The most popular vodka at the end of the Soviet era came in 750 ml bottles, that did not have a resealable cap. Because no true Russian would leave a bottle half-full. Anyone who didn't drink, was odd. A group that got together without drinking might be suspected of plotting revolution. This is yet another drag on Russian society.
Of issue, especially as time went on, was the overly-centralized nature of national resource and economic strategy and planning. Especially ESPECIALLY constraining was the dual-circuit monetary system of its economy, which literally prevented half of its "capital" to follow innovation or market forces outside of centralized allocation.
I highly recommend the book Collapse: The Fall of the Soviet Union by Vladislav Zubok
The USSR and the Iron Curtain bloc had a massive population and world-class scientific talent. The problem was that the Soviet system viewed independent thought and individuality as a threat, actively sabotaging its own geniuses:
Persecution of Top Minds: Sergei Korolev, the literal architect of the Soviet space program, was sent to the Gulag, where he lost his teeth to scurvy and survived a broken jaw before being pulled out to work in a sharashka (a prison lab). Andrei Sakharov, the father of the Soviet hydrogen bomb, was relentlessly persecuted and exiled later in life for pointing out systemic flaws.
Ideology Over Reality: The state actively banned the teaching of modern genetics for decades because Trofim Lysenko’s fraudulent agricultural theories were deemed "more communist."
When you look at where the USSR did choose to spend its massive resources, it wasn't on pragmatic, cost-saving solutions. It was on hyper-expensive, top-down military prestige projects—many of which the West mathematically evaluated and discarded as impractical.
They built the RBMK reactors (like the one at Chernobyl) specifically because the dual-use design allowed them to generate civilian electricity while simultaneously harvesting plutonium for weapons, creating a fundamentally unstable system. They spent fortunes building the "Caspian Sea Monster" (a giant ground-effect vehicle) and the Tsar Bomba.
The tragedy of the Soviet computer industry wasn't a lack of money or smart people. It was that any "von Neumann" or "Seymour Cray" born in the USSR who asked the wrong questions or challenged a party bureaucrat's stupid idea was far more likely to end up in a labor camp than heading an independent tech company.
Those born in countries like Poland, Hungary, Bulgaria or Czechoslovakia were usually "asked" to leave country and they were working for the West ;-)
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 ::
? "ФАКТ(", Н, ") = ", ФАКТ(Н)
ВСЕ;
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/) — rapira FILE.rap runs a program, rapira drops into a multi-line REPL, --svg PATH captures turtle graphics as SVG.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.tests/snippets/) — .rap files diffed against sibling .expected.txt / .expected.svg on every run of bun test.ВПЕРЕД, НАЗАД, НАПРАВО, НАЛЕВО, ПЕРО_ВНИЗ, ПЕРО_ВВЕРХ, ДОМОЙ, В_ТОЧКУ, КУРС). 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.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
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.
| 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 |
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.MIT © Alexander Demin
> USSR just wasn't rich enough
To an extent by choice. They really didn’t utilize the resources they had optimally.
It was more that the RMBK was more designed around existing Soviet manufacturing capacity, they could and did build more conventional reactor designs as well but they required enormous pressure vessels the USSR only had one factory to produce. The RBMK on the other hand is not a monolithic pressure vessel, it's a collection of hundreds of individual pressurised tubes which were much easier for the Soviet manufacturing base to produce. It was actually a clever idea on the face of it, the problem was more it had inherently dangerous behaviour in certain regimes (the infamous positive void coefficient of reactivity) and the positive scram effect wasn't known until well into their deployment. The operators were also given contradictory operating instructions which failed to highlight the safety-critical nature of certain parameters.
1. "ИМЕНА" is plural, so instead of "NAME:" it's a bit more appropriate to use "NAMES:". Probably should be "VARIABLES" or "VARS" in modern context.
2. You've got few typos mixing "R" and "P". Should be "R" everywhere.
3. Instead of "ALL" you should use "DONE".
4. Instead of "KNC" you should use "END".
So it would look like this:
FUNC FACT (N);
NAMES: R;
1 -> R;
FOR I FROM 1 TO N ::
R * I -> R
DONE
RES: R
END;
FOR N FROM 0 TO 6 ::
? "FACT(", N, ") = ", FACT(N)
DONE; FUNC FACT (N);
NAMES: P; (* variable names *)
1 -> P;
FOR I FROM 1 TO N ::
P * I -> P
DONE (* endif *)
RET: P (* return value *)
END; (* end of function *)
FOR N FROM 0 TO 6 ::
? "FACT(", N, ") = ", FACT(Н) (* print *)
DONE;One famous example is Jacek Karpiński [0]. Soviet pressure, opposition to the use of Western parts, and intense jealousy of the commie state bureaucracy which sought to hold a monopoly over computer production (e.g., through the state-owned companies Odra and Elwro) halted production.
Here's some English language documentation for one of his models (the K-202) which was exported to the UK [1]. (The state-produced Mera 400, a heavily modified version of the K-202, did achieve a great deal of success, however, despite high production costs.)
There was an article posted here about him about 10 years ago [2].
[0] https://en.wikipedia.org/wiki/Jacek_Karpi%C5%84ski
[1] https://web.archive.org/web/20241012182627/https://www.zenke...
replace cyrillic w/ russian and it'd be ok.
КНЦ = end (конец in russian is end). However, in bulgarian in means 'thread' (as in sewing thread) and it has lots its meaning of end, aside from 'from needle to thread' expression where it means from the tip of the needle to the end of the thread.
Also 'ALL' (и все = it's over/that's all), which should be 'end' as in begin/end in pascal.
The main point still stands - it's Pascal.
Also, «ВСЕ» feels like «ВСЁ» in this context, I’d translate that as “that’s all”.
The website screenshot shows it on Windows XP though, don't know if it actually existed back then or if it's just typical Russian institutions still using Windows XP.
You can use "конец" for "end" in Bulgarian too, even though it's antiquated.
It's worth noting that Poland was actually one of the least ideologically rigid countries in the Eastern Bloc. While you couldn't openly oppose the regime, it was entirely possible to have a brilliant career in science or medicine (like Zbigniew Religa, who pioneered Poland's heart transplantation program) without strictly toeing the Party line.
Yet even in Poland's relatively relaxed climate, Karpiński’s revolutionary K-202 was strangled by bureaucratic jealousy, state monopolies (Elwro), and the paranoia of central planners.
If that was the fate of an innovator in Poland, imagine how much worse it was inside the borders of the USSR proper. The Soviet system operated on a near-literal interpretation of totalitarian control, where maintaining absolute party monopoly over every facet of life was prioritized above efficiency, wealth, or technological progress.
In that environment, independent thinkers weren't just seen as eccentric or inconvenient—they were viewed as a systemic security threat. When a system treats structural innovation as a form of ideological deviance, the safest thing for a genius to do was to keep quiet, escape to the West, or risk ending up neutralized by the state. You can't build an "alien spaceship" computing paradigm when the system's primary metric of success is total bureaucratic obedience.
With that being said, I do think it's harder to make a clear programming language based on is a Slavic language, due to all the case and gender forms.
Everyone's happy, head of development celebrates his 3rd degree Lenin's premium.
I really wanted an MSX looking box though, that we played Karateka on in some precursors of Internet cafes, they looked the business, like high end Japanese hifi gear of the era.
indeed, my bad