Giter Club home page Giter Club logo

roesti's Introduction

rösti

Roesti mascot

Do you have kei Luscht meh to write Rust programs in English? Do you like saying "gopferdammi!" a lot? Would you like to try something different, in an exotic and funny-sounding language? Would you want to bring some Swiss touch to your programs?

Rösti is here to save your day, as it allows you to write Rust programs in Swiss German, using Swiss German keywords, Swiss German function names, Swiss German idioms.

You don't feel at ease using only Swiss German words? Don't worry! Swiss German 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 Rösti:

roesti::roesti! {
    benutze std::sammlige::Wörterbuech als Wöbu;

    eigedschaft SchlüsselWärt {
        funktion schriib(&selbst, schlsl: Zeichäkette, wärt: Zeichäkette);
        funktion läs(&selbst, schlsl: Zeichäkette) -> Resultat<Mängisch<&Zeichäkette>, Zeichäkette>;
    }

    statisch änd WÖRTERBUECH: Mängisch<Wöbu<Zeichäkette, Zeichäkette>> = Nüüt;

    struktur Konkret;

    impl SchlüsselWärt für Konkret {

        funktion schriib(&selbst, schlsl: Zeichäkette, wärt: Zeichäkette) {
            sei wöbu = gföhrlich {
                WÖRTERBUECH.hol_oder_füeg_ii_mit(Standard::standard)
            };
            wöbu.iifüge(schlsl, wärt);
        }

        funktion läs(&selbst, schlsl: Zeichäkette) -> Resultat<Mängisch<&Zeichäkette>, Zeichäkette> {
            wenn sei Öpis(wöbu) = gföhrlich { WÖRTERBUECH.als_ref() } {
                Gäbig(wöbu.hol(&schlsl))
            } suscht {
                gopferdammi!("Reto, mir bruuched's WÖRTERBUECH")
            }
        }
    }
}

Other examples

See the examples to get a rough sense of the whole syntax. So isch lässig!

Credits

This joke started life in French. Rösti was based on the German version thereof.

Mitwirken

Not a native speaker of Swiss German, so help is welcome! Merci vielmal! Feel free to throw in a few identifiers here and there, and open a pull-request against the hauptzweig (German for main branch).

D'Lizenzbestimmige

WTFPL.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.