Start here

You probably came to Raku from another programming language. That is how most people come to a second human language too: with a first one already in their head, which helps a lot and sometimes gets in the way.

These articles teach Raku the way language teachers teach Dutch, Italian or Latvian. There are no chapters on syntax here — the Raku course does that well. Instead, there are four kinds of articles.

Readers

A reader is a short, complete program at one level, from A1 to C2. You read it before you run it and guess what it prints. Then you run it, check your guess, and read the notes. New words are listed, as in a textbook for learners.

Reading is how you learn a language fastest, and it is the one thing programming courses almost never ask you to do.

All readers →

False friends

The Dutch word bellen means “to phone”, not “bells”. Programming languages have false friends too: a[-1] is the last element in Python, $a[-1] is the last element in Perl, and @a[-1] does not even compile in Raku. Each article takes one false friend, shows what you expect from your first language, and shows what Raku does instead.

All false friends →

Word families

comb, words, lines and split all cut a string into pieces. x, xx and X all repeat or combine things. A word-family article takes one group of relatives and shows what they share and where they differ, so you learn them together and stop mixing them up.

All word families →

Accents

You can write correct Raku that still sounds like Python. An accent article takes one small task and writes it four times: with a Python accent, with a Perl accent, with a C accent, and as a native speaker would. All four work. Only one sounds like Raku.

All accents →

The rest of Learn Raku

Raku as a Foreign Language is one of six parts of Learn Raku. The other five:

Running the code

Every Raku example in these articles runs in your browser. Press Run, change the code, and run it again. Nothing is sent to a server: the interpreter, Raku++, runs on your machine.

Where to start

Find your level on the Levels page, and read the articles at that level. Then read one level up. If you know Python, Perl, JavaScript or C well, the pages for your language list the false friends and accents that start from it.