Raku
Raku is a high-level, general-purpose, and gradually typed programming language with low boilerplate objects, optionally immutable data structures, and an advanced macro system. Raku is not tied to a specific programming paradigm: it supports procedural, object oriented, and functional programming in equal measure.
The reference implementation of the Raku programming language has several major components:
- The Rakudo reference compiler dev-lang/rakudo.
- The NQP compiler toolchain dev-lang/nqp.
- MoarVM Raku's native virtual machine dev-lang/moarvm.
- zef a module manager for interacting with Raku's ecosystem. (ebuild requested.)
- Rakudo Star the Rakudo compiler and a collection of modules from the Raku ecosystem (ebuild requested.)
In the absence of a Gentoo ebuild, it's possible to use the official docker container rakudo-star provided by the upstream project. Rakubrew, a plenv and perlbrew analog, is also an option.
Raku was created as both a specification and a test suite. Any implementation that passes the test suite Raku/roast is considered to be Raku. Thus, while MoarVM is Raku's default virtual machine it's not the only virtual machine that Raku supports. Currently, Raku can be run from within the Java and JavaScript virtual machines and more virtual machine targets are expected to follow.
Notable features
- Raku is Multi-paradigm procedural, object oriented, and functional programming styles are supported.
- Raku Grammars combine named regexes with recursion, human readable rules, and grapheme-level Unicode support to enable advanced text processing capabilities far beyond that of Perl compatible regular expressions.
- Raku has a concurrency and async model that ensure that non-linear code is easy to read and maintain.
- Raku natively supports rational numbers which permits direct comparison without concern for any accumulated rounding errors that would occur in other programming languages.
- Lazy evaluation which enables features such as infinite sets.
- Low boilerplate object oriented programming.
See also
- MoarVM — Rakudo compiler's virtual machine for the Raku Programming Language.
- NQP — a lightweight Raku-like environment for MoarVM, JVM, and other virtual machines.
- Bash — the default shell on Gentoo systems and a popular shell program found on many Linux systems.
- Perl — a general purpose interpreted programming language with a powerful regular expression engine.
- Java — a programming language, originally developed by Sun Microsystems, which uses a platform-independent virtual machine to execute Java bytecode in real-time.
External resources
Learning Raku
- Learn Raku in Y Minutes a basic primer on Raku.
- Raku Guide a high-level overview of the Raku programming language.
- A Complete Course of the Raku programming language An in-depth five part Raku programming course.
- Raku Modules Directory detailing Raku's module ecosystem.\
- Rosetta Code: Raku — Raku specific implementations of common algorithms.
Popular Raku Libraries and Frameworks
- Sparrow a versatile automation framework written in Raku.
- Cro Cro is a set of libraries for building distributed systems written in Raku.
- Red an Object-Relational Mapping (ORM) database management tool for Raku.
- Raku Roast Raku's test suite. Any implementation of Raku that passes Roast is a valid implementation.