How to install Rakudo on Ubuntu 20.04?

Windows Articles

How to update apps on Android

Hi folks! In this post, we will show you how to update your Android apps. Updating the apps on your device is...

How to install Apache Ant on Ubuntu 20.04?

Hello, friends. Apache Ant is a very important tool for the development of applications in Java. So in this post, we will...

How to use the ss command

For Linux users, there will come a time when you need to know about the network. Several tools help in this process,...

How to create user template in Windows Server 2019/2016

Hello! Windows Server has many features that support system administration. For example, through the users it is possible to manage many administrative...

Debian 10.6 available

Several volunteers have developed the free software distributed under the name of Debian. Debian does not sell its software directly, the developers...
angeloma
angeloma
Senior Writer and partner

Hello, friends in this post we will tell you how to install Rakudo on Ubuntu 20.04.

Raku and Rakudo

Actually, Raku is the Perl based programming language. Raku intends to carry forward the high ideals of the Perl community. Raku has been developed by a team of dedicated and enthusiastic volunteers and continues to be developed.

Some features of Raku are as follows: 

  • 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

So, where is Rakudo in all this?

Well, Rakudo is the most mature implementation of Raku. In itself, it is a compiler that will allow us to enjoy the full potential of Raku in a better way.

So, you could say that they are inseparable.

Install Rakudo on Ubuntu 20.04

Raku is not as popular as Perl or Ruby but it has seen significant acceptance by the community. This results in Rakudo being available from the official Ubuntu 20.04 repositories

So, all we have to do is open the terminal and run:

sudo apt install rakudo

This fairly easy method will not give us the latest stable version of Rakudo. So you can either download the package directly from the website or use the wget command.

wget -c https://rakudo.org/dl/rakudo/rakudo-moar-2020.08.2-01-linux-x86_64.tar.gz
--2020-09-09 17:51:50-- https://rakudo.org/dl/rakudo/rakudo-moar-2020.08.2-01-linux-x86_64.tar.gz
Resolving rakudo.org (rakudo.org)… 104.26.6.214, 104.26.7.214, 172.67.68.240, …
Connecting to rakudo.org (rakudo.org)|104.26.6.214|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 14209591 (14M) [application/octet-stream]
Saving to: ‘rakudo-moar-2020.08.2-01-linux-x86_64.tar.gz’
rakudo-moar-2020.08.2-01-linux-x86_64.tar. 100%[=====================================================================================>] 13.55M 876KB/s in 23s
2020-09-09 17:52:14 (608 KB/s) - ‘rakudo-moar-2020.08.2-01-linux-x86_64.tar.gz’ saved [14209591/14209591]

Then you decompress it to a location of your choice and the binary is in the bin folder.

tar xvfz rakudo-moar-2020.08.2-01-linux-x86_64.tar.gz

If you want to rename the folder to have a simpler name.

mv rakudo-2020.08.2/ rakudo

Now we will make the first program.

Testing Rakudo on Ubuntu 20.04

Create a file with your favorite text editor. From the Raku website, they recommend Atom. In this case, I will use nano.

nano example.pl

And add the following content:

use v6;
say "Hello world. Welcome to Osradar";
1.- Testing  Rakudo on Ubuntu 20.04
1.- Testing Rakudo on Ubuntu 20.04

Then, save the changes and close the editor.

So, to run it we only have to invoke the raku binary in the Rakudo folder.

rakudo/bin/raku example.pl

And you will get the next output on the screen.

Hello world. Welcome to Osradar
2.- Running a Raku program
2.- Running a Raku program

Then we can start working. Also, you can create a profile entry so that you can use raku as a command.

So, enjoy it

Conclusion

There are many programming languages but Raku claims to be an evolution of Perl. It is not as popular as the latter but it is well-positioned. Now together with Rakudo they form a couple ready for work.

So, share this post and join our Telegram Channel.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to update apps on Android

Hi folks! In this post, we will show you how to update your Android apps. Updating the apps on your device is...

How to install Apache Ant on Ubuntu 20.04?

Hello, friends. Apache Ant is a very important tool for the development of applications in Java. So in this post, we will...

How to use the ss command

For Linux users, there will come a time when you need to know about the network. Several tools help in this process,...

How to create user template in Windows Server 2019/2016

Hello! Windows Server has many features that support system administration. For example, through the users it is possible to manage many administrative...

Debian 10.6 available

Several volunteers have developed the free software distributed under the name of Debian. Debian does not sell its software directly, the developers...