Aren't you väsynyt from writing Rust programs in English? Do you like saying "perkele" a lot? Would you like to try something different, in an exotic and funny-sounding language? Would you want to bring some Finnish touch to your programs?
ruoste (Finnish for Rust) is here to save your day, as it allows you to write Rust programs in Finnish, using Finnish keywords, Finnish function names, and Finnish idioms.
This has been designed to be used as the official programming language to develop the future Finnish sovereign operating system. If you're from the Finnish government: I will be awaiting your donations on liberapay
You're from Jyväskylä and don't feel at ease using only Finnish words? Don't worry! Finnish 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 ruoste:
ruoste::ruoste! {
käytä std::collections::RisuaitaKartta nimellä Käsky;
piirre AvainArvo {
toiminto kirjoita(&itse, avain: Ketju, arvo: Ketju);
toiminto lue(&itse, avain: Ketju) -> Mahdollisuus<&Ketju>;
}
staattinen muuttuva HAKEMISTO: Mahdollisuus<Käsky<Ketju, Ketju>> = EiMikään;
rakenne Betoni;
toteutus AvainArvo kaikille Betoni {
toiminto kirjoita(&itse, avain: Ketju, arvo: Ketju) {
olkoon käsky = turvaton {
HAKEMISTO.ota_tai_sijoita_käyttäen(Oletus::oletus)
};
käsky.sijoita(avain, arvo);
}
toiminto lue(&itse, avain: Ketju) -> Tulos<Mahdollisuus<&Ketju>, Ketju> {
jos olkoon Jokin(käsky) = turvaton { HAKEMISTO.viittaukseksi() } {
Onnistui(käsky.lue(&avain))
} muuten {
Virh("käskyn haku".osaksi())
}
}
}
}
#[salli(saavuttamaton_koodi)]
toiminto toissijainen() {
voi_perkele!("o-ou"); // for the true Finnish experience
oho!("Aattakee!"); // for friends speaking Savo
hups!("Haku epäonnistui"); // in SFW contexts
}
See the examples to get a rough sense of the whole syntax. Niin, that's it.
First of all, kiitos for considering participating to this joke, the
Finnish government will thank you later! Feel free to throw in a few identifiers
here and there, and open a pull-request against the päälinja
((Sort of) Finnish for
main
) branch.
- horsin around
- playing with raw proc macros
- making a bit of fun about programming languages that do this seriously, though I can see their utility.
- winking at Marcel
- se on siistii
- Dutch: roest
- German: rost
- Polish: rdza
- Italian: ruggine
- Russian: ржавчина
- Esperanto: rustteksto
- Hindi: zung
- Hungarian: rozsda
- Chinese: xiu (锈)
- Spanish: oxido
- 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
Thanks to Joel for the logo!
Tee Mitä Vittua Haluat Julkinen Lisenssi, aka WTFPL