Skip to content
forked from bnjbvr/rouille

Rust programming, in Indonesian.

License

Notifications You must be signed in to change notification settings

annurdien/karat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

karat

Aren't you capek from writing Rust programs in English? Do you like saying "jancuk" a lot? Would you like to try something different, in an exotic and funny-sounding language? Would you want to bring some Indonesian touch to your programs?

karat (Indonesian for Rust) is here to save your day, as it allows you to write Rust programs in Indonesian, using Indonesian keywords, Indonesian function names, Indonesian idioms.

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

You're from Sleman (or elsewhere) and don't feel at ease using only Indonesian words?

Don't worry! Indonesian 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 Karat:

trait and impl (aka sifat dan penerapan)

karat::karat! {
    luar peti karat;

    memakai std::collections::Kamus sebagai Kbb;

    sifat NilaiKunci {
        fungsi tulis(&tubuh, kunci: Naskah, nilai: Naskah);
        fungsi baca(&tubuh, kunci: Naskah) -> Hasil<Pilihan<&Naskah>, Naskah>;
    }

    statis plin_plan KAMUS: Pilihan<Kbb<Naskah, Naskah>> = Kosong;

    struktur Konkrit;

    penerapan NilaiKunci untuk Konkrit {
        fungsi tulis(&tubuh, kunci: Naskah, nilai: Naskah) {
            misal kamus = bahaya {
                KAMUS.ambil_atau_masuk_dengan(Bawaan::bawaan)
            };
            kamus.masukan(kunci, nilai);
        }
        fungsi baca(&tubuh, kunci: Naskah) -> Hasil<Pilihan<&Naskah>, Naskah> {
            jika misal Beberapa(kamus) = bahaya { KAMUS.sebagai_referensi() } {
                Ya(kamus.baca(&kunci))
            } lain {
                Salah("Ambil kamus".ke_dalam())
            }
        }
    }
}

Support for regional languages

#[izinkan(code_inaccessible)]
fungsi sekunder() {
    panik!("aduh"); // for polite Indonesian
    ketar_ketir!("gmn nih bg"); // for cool easy going indonesian
    jancuk!("kon rajelas tenan rek");  // for surabayan people
    panteq!("panteq kali nih"); // for sumatran people
    bangsat!("bangsat emang sianjinx"); // for majority indonesian people
}

See the examples to get a rough sense of the whole syntax. Uwoh! YNTKTS, that's it.

kalau mau melu-melu

First of all, suwun for considering participating to this joke, the Indonesian government will thank you later! Feel free to throw in a few identifiers here and there, and open a pull-request against the utama (Indonesian for main) branch.

Please don't introduce swear words, though: we will not excuse your Indonesian.

but why would you do ngeneki

  • muni jancuk pas koding sangat mantep gan
  • gabut wae jane

sek duwe iki gan

lisensi

WTFPL.

About

Rust programming, in Indonesian.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%