GithubHelp home page GithubHelp logo

rdza's Introduction

rdza

Logo

Aren't you wkurwiony/a from writing Rust programs in English? Do you like saying "kurwa" a lot? Would you like to try something different, in an exotic and funny-sounding language? Would you want to bring some Polish to your programs?

rdza (Polish for Rust) is here to save your day, as it allows you to write Rust programs in Polish, using Polish keywords, Polish function names, Polish idioms.

This has been designed to be used as the official programming language to develop the future Polish sovereign operating system.

You don't feel at ease using only Polish words? Don't worry! Polish 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 Rdza:

trait and impl (aka cecha i implementacja)

rdza::rdza! {
    zewnętrzna skrzynka rdza;

    użyj standardowe::kolekcje::MapaHaszy jako Mapa;

    cecha WartościPoKluczu {
        funkcja zapisz(&się, klucz: Ciąg, wartość: Ciąg);
        funkcja wczytaj(&się, klucz: Ciąg) -> Wynik<Opcja<&Ciąg>, Ciąg>;
    }

    statyczna zmienna SŁOWNIK: Opcja<Mapa<Ciąg, Ciąg>> = Żadna;

    struktura Słownik;

    implementacja WartościPoKluczu dla Słownik {
        funkcja zapisz(&się, klucz: Ciąg, wartość: Ciąg) {
            niech słownik = niebezpieczne {
                SŁOWNIK.wyjmij_lub_wstaw_z(Domyślny::domyślny)
            };
            słownik.wstaw(klucz, wartość);
        }
        funkcja wczytaj(&się, klucz: Ciąg) -> Wynik<Opcja<&Ciąg>, Ciąg> {
            jeżeli niech Jakiś(słownik) = niebezpieczne { SŁOWNIK.jako_referencja() } {
                Dobrze(słownik.wyjmij(&klucz))
            } inaczej {
                Źle("nie ma słownika".do())
            }
        }
    }
}

Support for regional languages

#[pozwól(nieosiągalny_kod)]
funkcja druga() {
    kurwa!("zjebało się"); // for the true Polish experience
    jerōnie!("motyka"); // for friends speaking ślōnska gŏdka
    panikuj!("motyla noga"); // in SFW contexts
}

Other examples

See the examples to get a rough sense of the whole syntax. Proszę, that's it.

Kontrybucje

First of all, dzięki wielkie for considering participating to this joke, the Polish government will thank you later! Feel free to throw in a few identifiers here and there, and open a pull-request against the główna (Polish for main) branch.

Other languages

Podziękowania

  • @bnjbvr for making the original macro.

Licencja

WTFPL.

rdza's People

Contributors

0x182d4454fb211940 avatar anisse avatar bnjbvr avatar ebrehault avatar lorlouis avatar michidk avatar phaux avatar wuzado avatar

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.