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)… 220.127.116.11, 18.104.22.168, 22.214.171.124, … Connecting to rakudo.org (rakudo.org)|126.96.36.199|: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
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.
And add the following content:
say "Hello world. Welcome to Osradar";
Then, save the changes and close the editor.
So, to run it we only have to invoke the raku binary in the Rakudo folder.
And you will get the next output on the screen.
Hello world. Welcome to Osradar
Then we can start working. Also, you can create a profile entry so that you can use raku as a command.
So, enjoy it
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.