raku.gg

[ BACK... ]
By: w1ldc4rd-w1z4rd

Getting Started: Installing Raku on Debian 12


Before we dive too deep into the Raku ocean, let’s make sure you have your swimming gear – I mean, let’s get Raku installed on your Debian system!

Here’s a step-by-step guide that I wish I had when I started:

Update your system: First things first, let’s make sure your system is up-to-date:

sudo apt update
sudo apt upgrade

Install dependencies: Raku needs a few friends to work properly. Let’s invite them to the party:

sudo apt install build-essential git

Install Rakudo Star: Rakudo Star is a Raku distribution that includes the compiler and a bunch of useful modules. It’s like getting Raku with a starter pack of goodies!

sudo apt install rakudo

Set up your environment: After installation, you need to set up your environment. Add these lines to your ~/.bashrc file:

export PATH=$PATH:/usr/share/raku/site/bin
export PERL6LIB=$PERL6LIB:/usr/share/raku/site/share/perl6/site

Then, reload your bash configuration:

source ~/.bashrc

Verify the installation: Let’s make sure everything is working:

raku -e 'say "Hello, Raku!"'

If you see “Hello, Raku!” printed out, congratulations! You’re ready to start your Raku adventure!

Now that we have Raku installed, let’s take it for a spin!

# Save this as hello_raku.raku
my $name = prompt "What's your name? ";
say "Hello, $name! Welcome to the world of Raku!";

Run this script with raku hello_raku.raku, and voilà! You’ve just written and run your first Raku program!

WWW: 🐪 perl.gg - 🧙‍♂️ clc.onl - 💾 GitHub - 🏙️ Neocities

Copyright ©️ 2024 raku.gg