How to resolve the algorithm Write language name in 3D ASCII step by step in the Raku programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Write language name in 3D ASCII step by step in the Raku programming language

Table of Contents

Problem Statement

Write/display a language's name in 3D ASCII.

(We can leave the definition of "3D ASCII" fuzzy, so long as the result is interesting or amusing, not a cheap hack to satisfy the task.)

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Write language name in 3D ASCII step by step in the Raku programming language

Source code in the raku programming language

# must be evenly padded with white-space$
my $text = q:to/END/;
                                 
 @@@@@              @@           
 @    @              @     @@@   
 @    @              @    @@     
 @    @  @@@   @ @@  @    @@     
 @@@@@  @   @  @@  @ @    @@@@@  
 @      @@@@@  @     @    @@  @@ 
 @      @      @     @    @@  @@ 
 @       @@@   @     @@    @@@@  
                                 
END

say '' for ^5;
for $text.lines -> $_ is copy {
    my @chars = |「-+ ., ;: '"」.comb.pick(*) xx *;
    s:g [' '] = @chars.shift;
    print "                              $_  ";
    s:g [('@'+)(.)] = @chars.shift ~ $0;
    .say;
}
say '' for ^5;


  

You may also check:How to resolve the algorithm Flow-control structures step by step in the Ada programming language
You may also check:How to resolve the algorithm Inheritance/Multiple step by step in the Logtalk programming language
You may also check:How to resolve the algorithm Old Russian measure of length step by step in the Frink programming language
You may also check:How to resolve the algorithm CSV data manipulation step by step in the TXR programming language
You may also check:How to resolve the algorithm Exceptions step by step in the AutoHotkey programming language