Print a cube net of the specified size

26

1

Challenge

Given a size s, print a cube net of that size made of hash symbols (#) and spaces ().

Examples:

1:
  #
# # #    
  #
  #

2:
    # #
    # #
# # # # # #
# # # # # #
    # #
    # #
    # #
    # #

3:
      # # #
      # # #
      # # #
# # # # # # # # #
# # # # # # # # #
# # # # # # # # #
      # # #
      # # #
      # # #
      # # #
      # # #
      # # #

The net can actually be any valid cube net that can fold into a cube, for example these:

    # #
    # #
# # # # # # # #
# # # # # # # #
    # #
    # #

    # # # #
    # # # #
    # #
    # #
    # #
    # #
# # # #
# # # #

Rules

  • The resulting net must be geometrically valid (foldable into a cube)
  • Standard loopholes forbidden
  • Read the rules carefully
  • This is , shortest answer wins, but will not be selected

dkudriavtsev

Posted 2017-01-14T07:37:07.757

Reputation: 5 781

1Can there be leading/trailing spaces/newlines? – user41805 – 2017-01-14T07:51:02.503

@KritixiLithos Yes – dkudriavtsev – 2017-01-14T07:54:10.577

13

For reference, all 11 cube nets.

– xnor – 2017-01-14T08:04:27.813

Is it okay if we output it without the spaces? – user41805 – 2017-01-14T08:41:37.390

@KritixiLithos no – dkudriavtsev – 2017-01-14T10:20:43.273

Related – Digital Trauma – 2017-01-15T05:52:26.513

Will the input ever be 0? – FlipTack – 2017-01-15T12:12:10.073

3What if I don't read the rules carefully? – steenbergh – 2017-01-18T12:44:24.983

@FlipTack No. It will always be positive as well – dkudriavtsev – 2017-11-14T23:04:52.953

1@steenbergh Then your solution is invalid – dkudriavtsev – 2017-11-14T23:05:01.513

Answers

23

Python 2, 47 bytes

n=input()
for c in 1,4,1:exec"print'# '*c*n;"*n

Try it online!

Prints this net, chosen for being left-justified:

# # 
# # 
# # # # # # # # 
# # # # # # # # 
# # 
# # 

The lines have n or 4*n copies of '# '. For each of 1,4,1, we print n times that many copies, done n times for n lines. Having an exec loop inside a for loop seems wasteful, but I didn't see better.

Alternatives I tested:

lambda n:('# '*n*3+'\n')*n+('  '*n+'# '*n+'\n')*3*n

lambda n:('# '*n*3+'\n')*n+(' '*4*n+'# '*n*3+'\n')*n

def f(n):
 for c in[3]*n+[1]*3*n:print('# '*c*n).center(6*n)

def f(n):
 for c in[4]*n+[0]*n:print' '*c*n+'# '*n*3

def f(n):
 for c in[1]*n+[4]*n+[1]*n:print'# '*c*n

def f(n):
 c=1;exec("print'# '*c*n;"*n+"c^=5;"*n)*3

def f(n):
 for i in range(3*n):print'# '*[1,4,1][i/n]*n

def f(n):
 for c in 1,4,1:print('# '*c*n+'\n')*n,

def f(n):
 for c in 1,4,1:exec"print'# '*c*n;"*n

(The def functions can all be one shorter as a program.)

xnor

Posted 2017-01-14T07:37:07.757

Reputation: 115 687

8

Octave, 58 44 42 32 bytes

@(n)[z=repmat('# ',n);z,z,z,z;z]

partly inspired by @xnor 's python answer.

z=repmat('# ',n);

creates a squre pattern of '# ' for input 2 results the following pattern:

# #             
# # 

y=[z,z,z,z];

four z s are concatenated horizontally:

# # # # # # # # 
# # # # # # # # 

[z;y;z]

z and y and z are concatenated vertically

Try It Online!

# #             
# #             
# # # # # # # # 
# # # # # # # # 
# #             
# #             

Previous answer:

@(n){h(1:n,1:2:n*6)=1;h(1:n*4,n*2+1:2:4*n)=1;' #'(h+1)}{3}

Try It Online!

Generates a T shaped one

# # # # # # # # #
# # # # # # # # #
# # # # # # # # #
      # # #      
      # # #      
      # # #      
      # # #      
      # # #      
      # # #      
      # # #      
      # # #      
      # # #      

rahnema1

Posted 2017-01-14T07:37:07.757

Reputation: 5 435

6

Mathematica, 77 60 52 bytes

Thanks to Martin Ender for golfing 8 bytes away!

{±s_:=s~Table~#;b=±{a=±"# ","
"},±{a,a,a,a,"
"}}<>b&

Unnamed function taking a positive integer argument # and returning a string with newlines (including a trailing newline); each line has a trailing space as well. First we define ± to be a function that repeats its input # times; then a is defined as ±"# " (this # is a character, not the input!), and from that b is defined to be the set of # short lines, while ±{a,a,a,a}<>n is the set of # long lines. (In both cases, there is a literal linefeed between matching quotes.) The final <>b concatenates the resulting list of strings with second copy of the set of short lines. Example output when #=2 (xnor's answer taught me that this orientation is golfier):

# #     
# #     
# # # # # # # # 
# # # # # # # # 
# #     
# #     

Previous version of this implementation:

""<>(±s_:=s&~Array~#;{b=±{a=±"# ",n="\n"},±{a,a,a,a}<>n,b})&

Original submission:

""<>If[(m=n~Mod~t)==0,"\n",If[n<t#||#<m<=2#,"# ","  "]]~Table~{n,4(t=3#+1)#}&

Builds a string out of 4*(3#+1) pieces, each of which is either "# ", " ", or "\n"; simply calculates which pieces to use based on the index n. Example output when #=2:

# # # # # # 
# # # # # # 
    # #     
    # #     
    # #     
    # #     
    # #     
    # #     

Greg Martin

Posted 2017-01-14T07:37:07.757

Reputation: 13 940

5

JavaScript (ES6), 59 bytes

f=
n=>`141`.replace(/./g,m=>`${`# `.repeat(n*m)}\n`.repeat(n))
<input type=number oninput=o.textContent=f(this.value)><pre id=o>

Output includes a trailing space at the end of each line and a trailing newline.

Neil

Posted 2017-01-14T07:37:07.757

Reputation: 95 035

5

Ruby, 36 bytes

f=->n{puts (t=[s="# "*n]*n)+[s*4]*n+t}

Usage:

f=->n{puts (t=[s="# "*n]*n)+[s*4]*n+t}
f[3]
# # #
# # #
# # #
# # # # # # # # # # # #
# # # # # # # # # # # #
# # # # # # # # # # # #
# # #
# # #
# # #

Ruby, 38 bytes

This shape is longer in Ruby but I expect there are some languages where it is shorter.

->n{puts [s="# "*n*3]*n+[" "*n*4+s]*n}

Usage:

g=->n{puts [s="# "*n*3]*n+[" "*n*4+s]*n}
g[3]
# # # # # # # # #
# # # # # # # # #
# # # # # # # # #
            # # # # # # # # #
            # # # # # # # # #
            # # # # # # # # #

Both answers can be shorter if it is permitted to return (preferably) an array of strings or (less preferably) a single string instead of printing.

Level River St

Posted 2017-01-14T07:37:07.757

Reputation: 22 049

Returning a string is considered a valid form of output. – dkudriavtsev – 2017-01-15T05:59:39.050

4

JavaScript (ES6), 71

n=>((z='# '[R='repeat'](n))[R](3)+`
`)[R](n)+('  '[R](n)+z+`
`)[R](n*3)

Test

f=
n=>((z='# '[R='repeat'](n))[R](3)+`
`)[R](n)+('  '[R](n)+z+`
`)[R](n*3)

function update() {
  O.textContent=f(I.value)
}

update()
<input id=I type=number value=3 oninput='update()'><pre id=O></pre>

edc65

Posted 2017-01-14T07:37:07.757

Reputation: 31 086

I'm not entirely sure, but I think you need to output the spaces along with the hashes. (I also made that mistake of not including the spaces in the first edit of my answer) – user41805 – 2017-01-14T09:11:14.330

@KritixiLithos uh, got it. Thanks – edc65 – 2017-01-14T10:06:15.717

4

V, 24 23 20 18 20 bytes

Ài# ddÀpLyGïp3PGïp

With all the hidden characters shown

Ài# ^[ddÀp^VLyGïp3PGoïp

^[ is 0x1b (escape character literal) and ^V is 0x16 (C-v)

Try it online!

I had to increase bytecount because the Ä command was being buggy in this new V pull

Outputs in this format:

# 
# # # # 
# 

with a leading newline

Hexdump:

00000000: c069 2320 1b64 64c0 7016 4c79 47ef 7033  .i# .dd.p.LyG.p3
00000010: 5047 ef70                                PG.p

Explanation

Ài# ^[              " Argument times insert "# "
ddÀp                " Argument times duplicate line

Now that one face of the net has been completed, we have to create the net

^VLy                " Copy the face
Gïp                 " Paste it at the end of buffer
3P                  " Paste 3 times (these form the line)
Gïp                 " Paste at end of buffer again

Alternate solution if we don't output the spaces:

21 20 18 16 18 bytes

Àé#ddÀpLyGïp3pGïp

(for the same reason as the top solution, this TIO link is modified)

Try it online!

user41805

Posted 2017-01-14T07:37:07.757

Reputation: 16 320

4

Jelly, 20 19 bytes

”#xẋ³Wẋ³K€Y
141DÇ€Y

Try it online!

-1 thanks to 44874 (steenbergh).

I CAN'T OUTGOLF MUDDYFISH HELP!

Is this golfable??? 20 19 bytes just seems like too much, seeing Link 1.

Explanation:

”#xẋ³Wẋ³K€Y Helper link. Arguments: z
”#          Character #.
            y (implicit)
  x         Repeat each element of y x times.
    ³       1st command-line argument.
   ẋ        Repeat x y times.
     W      Wrap z.
       ³    1st command-line argument.
      ẋ     Repeat x y times.
        K   Join z on spaces.
         €  Map this link on x.
          Y Join z on newlines.

141DÇ€Y Main link. Arguments: 0
141     Integer 141.
   D    Convert z to base 10.
    Ç   The above link as a monad.
     €  Map this link on x.
      Y Join z on newlines.

Erik the Outgolfer

Posted 2017-01-14T07:37:07.757

Reputation: 38 134

It's V versus Jelly now :) – user41805 – 2017-01-14T09:22:56.257

@KritixiLithos Nah, your solution was first. – Erik the Outgolfer – 2017-01-14T09:26:57.293

V is at 18 bytes now :) – user41805 – 2017-01-14T11:21:45.957

You can drop a byte by not using @ but swapping the operands to x yourself: ”#xẋ³Wẋ³K€Y. – steenbergh – 2017-01-14T20:52:05.150

4

Scala, 56 bytes

(n:Int)=>Seq(1,4,1)map("# "*_*n+"\n")map(_*n)mkString ""

jaxad0127

Posted 2017-01-14T07:37:07.757

Reputation: 281

4

Java 8, 99 bytes

l->{for(int i=-1,j;++i<3*l;)for(j=-1,k=(i/l==2)?4*l:l;++j<k;)System.out.print("# "+j>k-2?"\n":"");}

Roman Gräf

Posted 2017-01-14T07:37:07.757

Reputation: 2 915

4

V, 14 bytes (non-competing)

Ài# 5Ù4JjòÀÄk

Try it online!

00000000: c069 2320 1b35 d934 4a6a f2c0 c46b       .i# .5.4Jj...k

For whatever reason, this challenge uncovered numerous bugs. Now that they're all fixed, this version is unfortunately non-competing, but it's nice to see what a V answer to this challenge should look like when it doesn't have to add tons of bytes to keep up with my sloppy coding.

Explanation:

À                   " Arg 1 times:
 i# <esc>           "   Insert the string "# "
         5Ù         " Make 5 copies of this line, and put the cursor on the second copy
           4J       " Join four of these lines together
             j      " Move down to the last line
              ò     " Recursively:
               ÀÄ   "   Make Arg 1 copies of this line
                 k  "   And move up a line

James

Posted 2017-01-14T07:37:07.757

Reputation: 54 537

To be fair, the J issue wasn't sloppy coding AFAIK, I think it was just nvim default? – nmjcman101 – 2017-01-14T23:12:38.510

Yeah, that's true. But the duplicate operator definitely was sloppy. Thankfully this new version is much simpler. – James – 2017-01-14T23:13:26.303

3

Charcoal, 20 bytes

NλG↑λ←×⁶λ↓λ# DM×⁴λ← 

The code ends with a space. Try it online!

Explanation

Charcoal is a language specializing in ASCII art. It is also incomplete, buggy, and under-documented. Suffice it to say, this took a fair amount of trial and error before it did what it was supposed to.

  • Nλ inputs a number into λ.
  • is the polygon command, which we'll use here to draw a rectangle. ↑λ←×⁶λ↓λ specifies the border of the polygon: upward λ steps, leftward 6 times λ steps, and downward λ steps. (That's three λ by λ blocks side-by-side.) The bottom edge of the rectangle is inferred. The polygon is then filled with the string # .
  • dumps the current canvas to stdout, resulting in something like this:
 # # # # # # # # #
 # # # # # # # # #
 # # # # # # # # #
  • After the command, the cursor is at the bottom left corner of the canvas. M×⁴λ← moves it leftward by 4 times λ steps (equivalent to two λ by λ blocks).
  • outputs a space there, extending the canvas leftward by the correct amount.
  • At the end of the program, the canvas is (again) sent to stdout:
             # # # # # # # # #
             # # # # # # # # #
             # # # # # # # # #

Put 'em together and you've got a cube net.

DLosc

Posted 2017-01-14T07:37:07.757

Reputation: 21 213

Wow, you really had to struggle back then! (Oblong wasn't added until several weeks later.) – Neil – 2017-08-18T16:25:35.467

2

Python 2, 68 71 65 bytes

-6 with thanks to @sagiksp

def f(i,c=1):
 print(' '*i*4,'')[c>i]+'# '*i*3
 if i*2>c:f(i,c+1)

Try it online!

In the absence of finding a way to beat @xnor I'll post my recursive function simply as an alternative approach. For f(5) prints

                    # # # # # # # # # # # # # # # 
                    # # # # # # # # # # # # # # # 
                    # # # # # # # # # # # # # # # 
                    # # # # # # # # # # # # # # # 
                    # # # # # # # # # # # # # # # 
# # # # # # # # # # # # # # # 
# # # # # # # # # # # # # # # 
# # # # # # # # # # # # # # # 
# # # # # # # # # # # # # # # 
# # # # # # # # # # # # # # # 

This pattern was chosen simply because it can be split into two parts unlike all of the others.

ElPedro

Posted 2017-01-14T07:37:07.757

Reputation: 5 301

2Where are the spaces? – dkudriavtsev – 2017-01-14T17:57:22.173

1Without the spaces in the output, this isn't valid. – Mego – 2017-01-14T18:15:12.400

My mistake +3 to add the spaces. Updated. – ElPedro – 2017-01-14T18:41:42.800

1Actually why do you even need j? You can redefine the entire thing in terms of i and save ~6 bytes! – sagiksp – 2017-02-02T06:20:17.337

@sagiksp - Thanks. Updated using your suggestion. – ElPedro – 2017-02-02T07:47:04.300

2

Bash / Unix utilities, 72 69 68 66 bytes

b()(yes `dc<<<2o4d$n^$1^3/p`|tr 01 ' #'|head -$n);n=$1;b 1;b 4;b 1

Try it online!

This works by using the fact that [4^k / 3], when written in base 2, is 10101010...01, with k 1's. (The square brackets here denote the floor function.)

Mitchell Spector

Posted 2017-01-14T07:37:07.757

Reputation: 3 392

2

Pyke, 16 bytes

uAD,sXF**"# 

Try it here!

Equivalent to

1 4 1]3AD,sXF**"# 

Because of unprintables

This uses a couple of tricks to lower the byte-count:

  • It uses some unprintables to represent the list [1, 4, 1]
  • XF automatically dumps the output to the stack
  • The string "# at the end gets swapped with the last *, meaning that the closing " is not required. This happens implicitly when the last token is a string.


u                -      [1, 4, 1]
     AD          -     apply(*, ^, input)
       ,         -    zip(^)
        s        -   sum(^)
          F**"#  -  for i in ^:
           *     -    ^ * input
            *    -   ^ * v
             "#  -    "# "
         X       - splat(^)

Blue

Posted 2017-01-14T07:37:07.757

Reputation: 26 661

2

PHP, 64 62 bytes

Saved 2 bytes thanks to Christoph.

while($a="282"[$i++/$s=$argv[1]]*$s)echo str_pad("
",$a,"# ");

Prints a net like this:

# #
# #
# # # # # # # #
# # # # # # # #
# #
# #

(with a leading newline)

user63956

Posted 2017-01-14T07:37:07.757

Reputation: 1 571

1while($a="282"[$i++/$s=$argv[1]]*$s)echo str_pad("\n",$a,"# "); saves 2 bytes. – Christoph – 2017-02-02T10:30:25.963

1

Batch, 111 bytes

@set s=
@set i=@for /l %%i in (1,1,%1)do @
%i%call set s=%%s%% #
%i%echo%s%
%i%echo%s%%s%%s%%s%
%i%echo%s%

Neil

Posted 2017-01-14T07:37:07.757

Reputation: 95 035

1

QBIC, 52 67 40 bytes

Complete re-write:

:[a*3|G=G+@#`][a*2|G=G+@ `][a|?G][a|?_fG

This now uses this pattern:

###--
--###

Where the -are filled with spaces.

:        Read 'a' from the command line        > Assume 3
[a*3|    Create 3 segments times 'a' filling   > 3*3 = 9
G=G+@#`] Define A$ to be '#' and add this to G > G = "#########" 
[a*2|    Create 2 segments times 'a' spacer
G=G+@ `] Define B$ to be ' ' and add this to G > G = "#########       " 
[a|      FOR d == 1; d <= a; d++
?G]      Display G$:
            "#########       " 
            "#########       " 
            "#########       " 
[a|      FOR e == 1; e <= a; e++
?_fG     Display G$ in reverse (_f...|):
            "      #########" 
            "      #########" 
            "      #########" 
         (For loop and function call to Flip impicitly closed by QBIC)

steenbergh

Posted 2017-01-14T07:37:07.757

Reputation: 7 772

This answer is invalid, per this comment by OP. – Erik the Outgolfer – 2017-01-16T07:47:53.623

@EriktheOutgolfer Updated. – steenbergh – 2017-01-16T08:48:11.747

2Appropriate language name for the challenge! – FlipTack – 2017-01-25T21:40:53.357

1

Pushy, 32 29 28 bytes

Prints the cube net left-justified. This was hard to golf...

&V:`# `;{:";N^:4:";T'.;TD^:"

Try it online!

FlipTack

Posted 2017-01-14T07:37:07.757

Reputation: 13 242

1

Retina, 39 37 bytes

This is my first time using Retina, I'm still trying to understand how to do things.

.+
$*#
#
# 
\`# 
$_¶
G`.
)*%`^
$_$_$_

(with two trailing spaces after the 4th and 5th lines)

Thanks to Martin Ender for golfing 2 bytes!

Try it online!

Leo

Posted 2017-01-14T07:37:07.757

Reputation: 8 482

@MartinEnder Thank you, I had not noticed that requirement, now it should be correct. Do you have any suggestion to how I should try to golf this? – Leo – 2017-01-16T10:08:45.047

Not having a lot of brilliant ideas but https://tio.run/nexus/retina#@6@nzaWipcwFhApcMQlAQiX@0DYu9wQ9Lk0t1YQ4IBcE//83AgA saves two bytes. You can avoid the trailing linefeeds by wrapping everything in a group which has its output flag (and since the group is the last thing the program, the output flag defaults to being non-silent). The other byte avoids the fourth $_ at the bottom by switching some things around after removing the empty line. https://tio.run/nexus/retina#@6@nzaWipcwFhApcMQlAQiX@0DYuzRgt1QQ9FS4FlXgQPLTt/38jAA is the same byte count but a bit uglier.

– Martin Ender – 2017-01-16T10:17:55.723

@MartinEnder Thank you for the tips, and thank you for this language too, it's really nice! – Leo – 2017-01-16T13:04:52.843

Thank you for the kind words. :) There's a chatroom for it if you have any questions or want to discuss things. It's currently rather quiet, but I try to keep it unfrozen in case people have questions (and you should be able to ping me in there any time).

– Martin Ender – 2017-01-16T13:25:40.200

1

Pip, 28 17 16 bytes

15 bytes of code, +1 for -n flag.

"# "Xa*_RLaM141

Takes the size as a command-line argument. Try it online!

Explanation

                 a is 1st cmdline arg
       _         Build a lambda function
     a*          (a) times argument
"# "X            Repeat string "# " that many times
        RLa      Wrap in a list and repeat list (a) times
           M141  Map that function to the characters of 141
                 Autoprint (-n flag separating list items with newlines)

The following isn't exactly how the data gets modified, but it gives the basic idea (for a=2):

141

[1;4;1]

[2;8;2]

["# # ";"# # # # # # # # ";"# # "]

[["# # ";"# # "];["# # # # # # # # ";"# # # # # # # # "];["# # ";"# # "]]

# # 
# # 
# # # # # # # # 
# # # # # # # # 
# # 
# # 

DLosc

Posted 2017-01-14T07:37:07.757

Reputation: 21 213

0

05AB1E, 13 bytes

D141S×S*„# ×»

Try it online!

Explanation

Example input n=2

D              # duplicate input
               # STACK: 2, 2
 141S          # push the list [1,4,1]
               # STACK: 2, 2, [1,4,1]
     ×         # repeat each item in the list input_no times
               # STACK: 2, [11, 44, 11]
      S        # split into list of digits
               # STACK: 2, [1, 1, 4, 4, 1, 1]
       *       # multiply each digit with input
               # STACK: [2, 2, 8, 8, 2, 2]
        „# ×   # repeat the string "# " for each item in the list
               # STACK: ['# # ','# # ','# # # # # # # # ','# # # # # # # # ','# # ','# # ']
            »  # join by newlines
               # OUTPUT: # # 
                         # # 
                         # # # # # # # # 
                         # # # # # # # # 
                         # # 
                         # # 

Emigna

Posted 2017-01-14T07:37:07.757

Reputation: 50 798

0

SmileBASIC, 57 50 bytes

INPUT S
E$=("#"*S*3+CHR$(10))*S?E$SCROLL-S*2,-1?E$

Explained:

INPUT SIZE
PART$=("#"*SIZE*3+CHR$(10))*S 'generate half of the pattern
PRINT PART$ 'print half the pattern
SCROLL SIZE*-2,-1 'scroll the text 2 squares right (and 1 character down)
PRINT PART$ 'print half the pattern again

After the first PRINT (size=2, @ is the cursor position):

######
######

@ 

After the SCROLL:

    ######
    ######
@

After the second PRINT:

    ######
    ######
######
######
@

12Me21

Posted 2017-01-14T07:37:07.757

Reputation: 6 110

In this case you can skip the spaces – dkudriavtsev – 2017-02-02T20:17:40.660

0

C#, 152 bytes

n=>{var m="";foreach(int c in new[]{1,4,1})for(int i=0,j;i++<n;){for(j=0;j++<c;)m+=new System.Text.StringBuilder().Insert(0,"# ",n);m+="\n";}return m;};

TheLethalCoder

Posted 2017-01-14T07:37:07.757

Reputation: 6 930

0

Common Lisp, 83 81 79 bytes

(lambda(x)(format t"~v@{~v@{# ~}~:*~%~}~v@{~vt~0@*~v{# ~}~%~}"x(* x 3)(* x 2)))

Usage:

(funcall #'(lambda(x)(format t"~v@{~v@{# ~}~:*~%~}~v@{~vt~0@*~v{# ~}~%~}"x(* x 3)(* x 2)))2)

Output:

# # # # # #
# # # # # #
    # # 
    # # 
    # # 
    # #       
    # # 
    # #           

How does it work?

in format there is control string (inside "") and arguments after it
certain commands in string can use arguments (for example ~a displays argument)
~v{~} - takes argument and does commends inside {~} number of times 
                                      (number is given by argument)
       we can write text in loop body - it'll get displayed. Even if
       in loop body there are none commends to use arguments loop itself                 
       will consume one argument (it doesn't matter what it'll be -
       it doesn't seem to affect output)
~% - newline
~n* - jump n arguments forward (relative)
~n:* - jump n arguments backwards (relative)
~n@* - jump to argument n (global, counting from 0)

~v@{~v{# ~}~%~1@*~} <--- we make x rowns, 3x columns of string "# ". 
                         ~1@* is used during looping, it also means we end on argument 1. 
                         (second argument: (* x 3))
~v@{~vt~0@*~v{# ~}~%~} <--- we now make 3x rows, x columns of "(spaces)# "
                         ~vt - is used to move to accurate column. 
                         Here it takes argument (* x 2) - this is 
                         minimal number of columns to display. It uses
                         space as default character for missing characters
                         (when string inside <~> is shorter than min 
                         number of columns). I use it to make (* x 2) spaces, 
                         by giving it no text.
      ~0@* <--- after making spaces we have no new arguments, we go back to
                argument number zero - it is used to determine number of columns in our block

Ideas for improvement are welcomed.

user65167

Posted 2017-01-14T07:37:07.757

Reputation: