Raku Online Compiler - Run Raku (Perl 6) Code in Browser
Raku started life as Perl 6. After years of development, it was renamed to make clear it is a different language, not just a version bump. And it really is different -- Raku has built-in grammars, native Unicode support down to grapheme clusters, and concurrency primitives baked into the language itself.
Installing Rakudo (the main Raku implementation) locally is not terrible, but it is not instant either. If you just want to test a grammar rule, try a regex, or see how Raku handles a particular pattern, an online compiler is the faster path.
When an online Raku compiler makes sense
Raku has a reputation for being hard to learn. Part of that is the sheer number of features. An online compiler helps because you can test small pieces in isolation:
- Try a grammar definition without setting up a full project
- Experiment with Raku's regex syntax, which is nothing like traditional regex
- Test concurrent code with
start,await, and channels - See how Unicode operations work on real text
- Share working examples when helping someone in the Raku community
Grammars: Raku's standout feature
Most languages make you reach for a parser generator when you need to parse structured text. Raku builds parsing into the language. Here is a grammar that parses simple arithmetic:
grammar Arithmetic {
rule TOP { <expression> }
rule expression { <term>+ % <addop> }
rule term { <number>+ % <mulop> }
token addop { '+' | '-' }
token mulop { '*' | '/' }
token number { \d+ }
}
my $input = "3 + 45 * 2 + 7";
my $parsed = Arithmetic.parse($input);
if $parsed {
say "Parsed successfully!";
say $parsed;
} else {
say "Parse failed.";
}
The % operator in Raku grammars means "separated by" -- so <term>+ % <addop> reads as "one or more terms separated by add operators." This kind of expressiveness is why people who learn Raku's grammar system tend to prefer it over standalone parser tools.
Unicode as a first-class citizen
Raku does not just support Unicode strings. It thinks in terms of grapheme clusters, which means combining characters are treated as single units. The string "e" followed by a combining acute accent is the same as "e with acute accent" -- length 1 in both cases. If you have ever fought with Python or Java over string length with emoji or accented characters, you will appreciate this.
Concurrency built in
Raku has Promise, Channel, and Supply as core types. You can spin up concurrent tasks with start and gather results with await. No external libraries, no callback gymnastics.
Running Raku on OneCompiler
OneCompiler's Raku environment gives you Rakudo in a browser tab. Write your code, run it, see the output. The turnaround is fast enough for iterative experimentation.
Practical benefits:
- No Rakudo installation required. This matters because Raku's install process varies by OS.
- Shareable links let you post working examples in forums or chat.
- The environment handles Raku's startup time for you.
- Clean interface that does not get in the way of the code.
Whether you are coming from Perl and curious about what Perl 6 became, or you heard about Raku grammars and want to try them firsthand, the online compiler removes the barrier to entry.
Try it here: Raku Online Compiler on OneCompiler