ferrugo
December 3, 2024 · View on GitHub

Aren't you defessus from writing Rust programs in English? Do you like saying "Lorem ipsum" a lot? Would you like to try something different, in an exotic and funny-sounding language? Would you want to bring some Latin touch to your programs?
ferrugo (Latin for Rust) is here to save your day, as it allows you to write Rust programs in Latin, using Latin keywords, Latin function names, Latin idioms.
You don't feel at ease using only Latin words? Don't worry! Latin 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 ferrugo:
struct and impl (aka lex et transplantatis)
ferrugo::ferrugo! {
uti std::thesaurus::glossarium cum Glos;
proprietas Res {
functionaliter scribe(&ipse, clavis: filum, pretium: filum);
functionaliter lege(&ipse, clavis: filum) -> eventum<facultas<&filum>, filum>;
}
staticus mut GLOSSARIUM: facultas<Glos<filum, filum>> = nihil;
structura Rectus;
impl Res pro Rectus {
functionaliter scribe(&ipse, clavis: filum, pretium: filum) {
sinere glos = periculosus {
GLOSSARIUM.adepto_vel_adde_cum(criterium::adsuetus)
};
glos.inserere(clavis, pretium);
}
functionaliter lege(&ipse, clavis: filum) -> eventum<facultas<&filum>, filum> {
si sinere quicquam(glos) = periculosus { GLOSSARIUM.quam_incidens() } {
bene(glos.accere(&clavis))
} alioquin {
vitium("arcessite glossarium!".intro())
}
}
}
}
Other examples
See the examples to get a rough sense of the whole syntax. Bene!
but why would you do id?
- they below can do it, so we can as well!
- French: rouille
- Dutch: roest
- German: rost
- Polish: rdza
- Italian: ruggine
- Russian: Ржавый
- Esperanto: rustteksto
- 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
- Lithuanian: rūdys
- Greek: skouriasmeno
- Thai: sanim (สนิม)
- Swiss: roeschti
- Swedish: rost
- Croatian: hrđa
- Persian: zangar (زنگار)
- Malagasy: arafesina
- All of the above: unirust
Cooperare
Feel free to throw in a few identifiers
here and there, and open a pull-request against the authenta (Latin for
main). The initial translation was made by pianoman911.