Aren't you sgìth from writing Rust programs in English? Do you like saying a ghalla or uisge-beatha a lot? Would you like to try something different, in an exotic and funny-sounding language? Would you want to bring some Highland touch to your programs?
meirg (Scottish Gaelic for Rust) is here to save your day, as it allows you to write Rust programs in Gaelic, using Gaelic keywords, Gaelic function names, Gaelic idioms.
This has been designed to be used as the official programming language to develop the future Scottish sovereign operating system.
You're from Nova Scotia (or elsewhere) and don't feel at ease using only Gaelic words?
Don't worry! Gaelic 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 Meirg:
meirg::meirg! {
dèan_feum_de std::collections::Faclair mar Facl;
trèithe IuchairLuach {
foincsean sgrìobh(&fhèin, iuchair: Sreang, luach: Sreang);
foincsean leugh(&fhèin, iuchair: Sreang) -> Buil<Dòcha<&Sreang>, Sreang>;
}
stadaigeach caochlaideach FACLAIR: Dòcha<Facl<Sreang, Sreang>> = ChanEilSìon;
structar Riochdail;
toirt_gu_buil IuchairLuach airson Riochdail {
foincsean sgrìobh(&fhèin, iuchair: Sreang, luach: Sreang) {
biodh facl = gàbhach {
FACLAIR.gabh_no_cuir_le(Bun::bun)
};
facl.cuir(iuchair, luach);
}
foincsean leugh(&fhèin, iuchair: Sreang) -> Buil<Dòcha<&Sreang>, Sreang> {
ma biodh Beagan(facl) = gàbhach { FACLAIR.mar_reif() } {
Ceart(facl.leugh(&iuchair))
} air_neo {
Mear("faigh an faclair".gu())
}
}
}
}#[leig(còd_neo_ruigsinneach)]
foincsean dàrnach() {
a_ghalla!("ò mo chreach"); // for the true Scottish Gaelic experience
ar_son_diabhal!("ó mo thrua"); // for friends speaking Irish
gabh_giorag!("abab"); // in SFW contexts
}See the examples to get a rough sense of the whole syntax. Sin agadsa dhut, that's it.
First of all, tapadh leat for considering participating to this joke, the
Scottish government will thank you later! Feel free to throw in a few identifiers
here and there, and open a pull-request against the prìomhail (Scottish Gaelic for
main) branch.
- Dutch: roest
- German: rost
- Polish: rdza
- Italian: ruggine
- Russian: Ржавый
- Esperanto: rustteksto
- Toki Pona: jaki kiwen
- Hindi: zung
- Hungarian: rozsda
- Chinese: xiu (锈)
- Spanish: rustico
- Korean: Nok (녹)
- Finnish: ruoste
- Arabic: sada
- Turkish: pas
- Vietnamese: gỉ
- Japanese: sabi (錆)
- Danish: rust?
- Marathi: gan̄ja
- Romanian: rugină
- Czech: rez
- Ukrainian: irzha
- Bulgarian: ryzhda
- Slovak: hrdza
- Catalan: rovell
- Corsican: rughjina
- Indonesian: karat
- Greek: skouriasmeno
- Thai: sanim (สนิม)
- Swiss: roeschti
- Swedish: rost
- Croatian: hrđa
- Persian: zangar (زنگار)
- Malagasy: arafesina
- Latin: ferrugo
- Norwegian: korrosjon
- Estonian: rooste
- Kannada: tukku (ತುಕ್ಕು)
- Nepali: khiya (खिया)
- Sanskrit: jangam
- All of the above: unirust
- @bnjbvr for making the original project (Rouille)
