Camelia, the Raku Mascot

Raku

A highly capable programming language

Some features of Raku:

  • Object-oriented programming including generics, roles and multiple dispatch
  • Functional programming primitives, lazy and eager list evaluation, junctions, autothreading and hyperoperators (vector operators)
  • Parallelism, concurrency, and asynchrony including multi-core support
  • Definable grammars for pattern matching and generalized string processing
  • Optional and gradual typing

What is Raku?

Raku (pronounced RAH-koo) is a multi-paradigm, general-purpose, gradually-typed programming language. It was created with asynchronicity and parallelism top-of-mind and aims to be significantly future-proof.

Why should I learn Raku?

Click here.

Is Raku production-ready?

In short: No. Long answer? It depends.

There are many cases where Raku is, in fact, production-ready and it varies based on your use case. If you plan on using it for scripts or medium-sized projects, go for it!  You might be pleasantly surprised at its performance. If you intend to build a large enterprise-level application, we would suggest you stay your hand. The biggest problem is speed and it's one of the toughest facets to optimize.

When will Raku be production-ready?

Soon.™

The Raku specification is complete. Rakudo (the underlying compiler) is very stable, does not crash, and passes all 100K+ tests. The Raku community is now poised to focus much more energy on speeding up Raku. It's only a matter of time.

Why should I learn Raku if it isn't production-ready?

Because it's optimized for fun. Seriously.

If you're looking to make boatloads of money using Raku, you might be a few years too early... but if you're looking for a language that gives you fun and interesting ways to express your problem succinctly, that is Raku's specialty. Come and give it a try! You might like it more than you think.

How can I contribute to Raku?

You can help too!

Raku is being developed by a team of dedicated and enthusiastic volunteers and we're always looking for more. The only requirement is that you know how to be nice to all kinds of people (and butterflies). Go to #perl6 (irc.freenode.net) and someone will be glad to help you get started.

What's the deal with this butterfly?

That's Camelia, the official spokesbug for Raku!
# No floating point noise: say 0.1 + 0.2 == 0.3; # OUTPUT: True say (1/13 + 3/7 + 3/8).raku; # OUTPUT: <641/728>

Raku lets you do math with rational numbers and returns results you expect.

# Infinite list of primes: my @primes = ^∞ .grep: *.is-prime; say "1001ˢᵗ prime is @primes[1000]"; # Lazily read words from a file .say for '50TB.file.txt'.IO.words;

Raku lets you create infinite sequences and provides lazy-evaluating methods to let you iterate over them safely.

start { sleep 1.5; print "hi" } await Supply.from-list(<A B C D E F>).throttle: 2, { sleep 0.5; .print } # OUTPUT: ABCDhiEF

Asynchronicity and parallelism is first-class in Raku. As a result, there are several helpful built-ins like `Supply` that let you make asynchronous code with ease.

grammar Parser { rule TOP { I } token love { '♥' | love } token lang { <Raku Rust Go Python Ruby> } } say Parser.parse: 'I ♥ Raku'; # OUTPUT: 「I ♥ Raku」 love => 「♥」 lang => 「Raku」 say Parser.parse: 'I love Rust'; # OUTPUT: 「I love Rust」 love => 「love」 lang => 「Rust」

At its core, Raku itself is a grammar created by its implementation. It only makes sense for us to help you to create your own grammars.