Tunas1337 / rgja

Rust programming, in Macedonian.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rgja

Aren't you преку гла from writing Rust programs in English? Do you like saying "у пизду матер" a lot? Would you like to try something different, in an exotic and funny-sounding language? Would you want to bring some Macedonian touch to your programs?

rgja ('рѓа, Macedonian for Rust) is here to save the day, as it allows you to write Rust programs in Macedonian, using Macedonian keywords, Macedonian function names, and Macedonian idioms.

This has been designed to be used as the official programming language to develop the future Macedonian sovereign operating system.

Don't worry! Macedonian Rust is fully compatible with English-Rust, so you can mix both at your convenience.

Here's an example of what can be achieved with rgja:

trait and impl (aka osobina & implementacija_na)

rgja::rgja! {
    nadvoreshna kutija rgja;

    koristi std::collections::Rechnik kako Rech;

    osobina KlucVrednost {
        funk zapisi(&sebe, kluc: Tekst, vrednost: Tekst);
        funk zemi(&sebe, kluc: Tekst) -> Rezultat<Mozhda<&Tekst>, Tekst>;
    }

    staticno mutabilno RECHNIK: Mozhda<Rech<Tekst, Tekst>> = Nishto;

    objekt Konkretno;

    implementacija_na KlucVrednost za_sekoj Konkretno {
        funk zapisi(&sebe, kluc: Tekst, vrednost: Tekst) {
            neka rech = nesigurno {
                RECHNIK.zemi_ili_vnesi_so(Standard::standard)
            };
            rech.vnesi(kluc, vrednost);
        }
        funk zemi(&sebe, kluc: Tekst) -> Rezultat<Mozhda<&Tekst>, Tekst> {
            ako neka Neshto(rech) = nesigurno { RECHNIK.kako_ref() } {
                Taman(rech.zemi(&kluc))
            } inaku {
                Netaman("nema takvo".stavi_vo())
            }
        }
    }

    funk mozhda(i: u32) -> Mozhda<Rezultat<u32, Tekst>> {
        ako i % 2 == 1 {
            ako i == 42 {
                Neshto(Netaman(Tekst::od("merde")))
            } inaku {
                Neshto(Taman(33))
            }
        } inaku {
            Nishto
        }
    }

    funk glavna() {
        neka mutabilno x = 31;

        sovpadni x {
            42 => {
                ispecati!("omelette du fromage")
            }
            _ => ispecati!("ете работи")
        }

        za_sekoj i vo 0..10 {
            neka val = vokrug {
                stoj i;
            };

            dodeka ima x < val {
                x += 1;
            }

            x = ako neka Neshto(rezultat) = mozhda(i) {
                rezultat.odvitkaj()
            } inaku {
                12
            };
        }
        upm!("демонстрација на краш!");
    }
}

Other examples

See the examples to get a rough sense of the whole syntax. Voilà, that's it.

Other languages

la license

License Publique Rien à Branler, le official translation of the WTFPL by the same author.

About

Rust programming, in Macedonian.

License:Other


Languages

Language:Rust 100.0%