22 comments

[ 3.6 ms ] story [ 35.0 ms ] thread
It feels like Pascal in Cyrillic. Autotranslation, with a little manual correction, but I can't fix КНЦ (autotranlated to KNC):

  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;
I would read «КНЦ» as «КОНЕЦ», literally “an end” or “the end” (Russian does not have anything resembling articles). Who needs vowels, anyway.

Also, «ВСЕ» feels like «ВСЁ» in this context, I’d translate that as “that’s all”.

(comment deleted)
Few fixes:

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;
>It feels like Pascal in Cyrillic

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.

Since I know russian well, here's a proper translation for y'all

    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;
(comment deleted)
The playground on [demin.ws/rapira](https://demin.ws/rapira/) feels well made.

This is a pretty cool historical artifact.

Does anyone use "native language" programming languages in education or day to day?

There is also an independent open-source interpreter for 1C language (which is to this day reported to be extensively used in Russian enterprise) implemented in C#. I haven't tried it myself, but just though that it's also worth mentioning here as the project seems to be actively worked on: https://github.com/evilbeaver/onescript
I wish the Soviets had focused more on developing an independent computer industry and their own distinct flavors of programming languages.

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.

Their semiconductor manufacturing was 10-15 years behind the Western technology. They just didn’t have the capability. Despite that they had good brains and delivered efficiently with what they had.
When I first learned about ternary machines like SETUN [0] I was so excited! Forger bits, there are "trits", and instead of boring boolean logic you have +/0/- trits. As alien as it gets!

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.

[0] https://en.wikipedia.org/wiki/Setun

In an alternate universe where Soviets won the Cold War, we would be writing in Russian on новостихакеров.рф and arguing which vacuum tubes make the best computers.
This Soviet project developed two Russian-language PLs: Robic[1] and Rapira[2]. Robic was similar to Logo, but unlike Logo, which had only one actor - a turtle, Robik had several: a Train, an Ant, a Painter, and so on

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...

By the way, there's one Cyrillic programming language still in wide use today. It's part of 1С (1S), an ERP system that's absolutely everywhere in Russia.

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.

I think I still have a book on C-in-cyrillic somewhere. Like, just all keywords just translated to Russian.
Missed opportunity to make all variables global and public.