Skip to content

KSPAtlas/meirg

 
 

Repository files navigation

meirg

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:

trait and impl (aka trèithe 's toirt gu buil)

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())
            }
        }
    }
}

Support for regional languages

#[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
}

other examples

See the examples to get a rough sense of the whole syntax. Sin agadsa dhut, that's it.

tabhartasan

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.

Other languages

taing

  • @bnjbvr for making the original project (Rouille)

an ceadachas

WTFPL.

About

Rust programming, in Scottish Gaelic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%