XCODX |

Raku Online Compiler & Interpreter

Select Language
Online Code Compiler
Full HTML IDE
Py main.py
Program Output Ready
  Welcome to XCODX Online Compiler

  Quick Start:
  Ctrl+Enter  Run code
  Ctrl+S      Save / Download
  Ctrl+L      Clear output

  Select a language and start coding.
Success
Operation completed

About Raku

Raku is the language formerly known as Perl 6 — redesigned from scratch over fifteen years and renamed in 2019 to stand on its own. It runs on the Rakudo compiler atop MoarVM, with new Rakudo releases shipping roughly monthly. Raku packs an unusual amount of language design into one place: gradual typing, built-in grammars that make parsers first-class citizens, lazy lists, hyper operators for data parallelism, and Unicode handling that is arguably the best in any mainstream language. It is a favorite among language enthusiasts and Perl veterans exploring modern design. This page gives you a live Raku terminal in the browser — code runs immediately and prompt() reads your typed input mid-execution, with nothing to install.

Hello World in Raku

my $name = prompt "Your name: ";
say "Nice to meet you, $name!";

my $line = prompt "Enter integers separated by spaces: ";
my @nums = $line.words>>.Int;

say "Sum: ", [+] @nums;
say "Sorted: ", @nums.sort.join(", ");
say "Evens: ", @nums.grep(* %% 2).join(", ");
say "Each doubled: ", (@nums >>*>> 2).join(", ");

When to use Raku

Raku attracts two crowds: Perl developers evaluating the successor language, and programming-language students studying advanced design — its grammars, junctions, and metaobject protocol are frequently cited in PL discussions and coursework. It is also genuinely practical for text-heavy scripting, since regexes and parsers are core syntax rather than a library. Because a full Rakudo install is nontrivial on some systems, a browser-based runner is the fastest way to try Raku Challenge solutions, experiment with reduction operators like [+], or prototype a grammar before committing to a local toolchain.

Common questions

Does prompt() work interactively in this terminal?

Yes. prompt prints its message and blocks until you press Enter, and this page's terminal is a real interactive session — you type the response while the program is running. get and lines from $*IN work the same way, so you can build multi-question scripts and see each answer processed live.

Is Raku the same as Perl 6, and which compiler runs here?

Raku is the official name Perl 6 adopted in October 2019; the language itself is unchanged by the rename. Code here runs on Rakudo, the reference implementation, executing on MoarVM. Rakudo is the only production-grade Raku compiler, so what you test on this page matches what you would run locally.

Can I use modules from the Raku ecosystem (zef)?

No — zef installs are not available in the sandbox, and execution is limited to a single file. Everything built into Rakudo works, though, which in Raku's case is a lot: grammars, sets and bags, native-typed arrays, concurrency primitives like start and Promise, and the whole standard type system.

How Raku runs on XCODX

Sandbox filename
main.raku
Entry point
single main source file
Editor grammar
perl
Reading stdin
prompt()
Input delivery
live WebSocket stream
Prompt flushing
unbuffered automatically ($*OUT.out-buffer = False; is prepended on live runs)
Compile limit
10 s
Run limit
3 s batch · up to 3 min live
Memory
256 MB per stage
Max source
50,000 characters

Default program on this page

# Raku (formerly Perl 6)
say "Hello from Raku!";
say "Welcome to XCODX Online Compiler!";

# Array operations
my @numbers = 1..10;
say "Numbers: ", @numbers;
say "Sum: ", [+] @numbers;
say "Even: ", @numbers.grep(* %% 2);

# String interpolation
my $name = "XCODX";
say "Running on {$name} Compiler";