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:
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())
}
}
}
}
#[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.
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.
- muni jancuk pas koding sangat mantep gan
- gabut wae jane
- [Benjamin Bouvier] (https://github.com/bnjbvr/), Eric BREHAULT and Anisse Astier for their work on rouille