# This is my pillow

...will you help me immortalize it?

I've had this pillow a few years now, and apparently it's time to get rid of it. Can you please write a function or program, that I can bring with me and use to recreate this pillow whenever I want to reminisce a bit.

It must work with no input arguments.

The output should look exactly like this (trailing newlines and spaces are OK).

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////

This is code golf, so the shortest code in bytes win!

• I'm somewhat disappointed that the pattern isn't a little more complex, to represent the different line thicknesses of the pillow. Nov 6 '16 at 11:29
• @Sparr I tried, but I didn't manage to make it look good using only ASCII characters. Figured this was close enough :) Nov 6 '16 at 11:37
• I'd have just added spaces Nov 6 '16 at 20:37
• 'apparently' :P Nov 7 '16 at 19:01
• Now you can buy a blank pillow and print the winner snippet on it. Nov 7 '16 at 19:46

## Vim, 44 27 bytes

EDIT Lot of bytes won thanks to @DrMcMoylex:

5i\<esc>5a/<esc>0y$5PY4P5x$pY3PyGPP

I'm not sure that really fits the rules of this site but I thought that was fun to try it:

i\<esc>59.:s;\v(.{5})\1;\1/////;g<CR>Y4P5x$pY3PyGPP Which can be decomposed like this: i\<esc> Insert a \ 59. Repeat 59 time the insertion :s;\v(.{5})\1;\1/////;g<CR> Match 5 characters followed by the same 5 characters And replace them by these 5 characters followed by 5 / Y4P Copy the line and repeat it 4 times 5x$p                          On the current line delete 5 characters and put them
at the end of the line
Y3P                           Copy the line and repeat it 3 times
yG                            Copy all the lines
PP                            Repeat them 2 times
• Oh hey statox, welcome to the site! This totally fits the rules. I golf mostly in vim. Just so you know, you could do 5i/<esc>5a\<esc>0y$5P at the start to save 9 bytes. Nov 7 '16 at 20:16 • Hey DrMcMoylex (new name? :-) ) glad to see you here and that my answer fits. Also thanks for your hint, I'll edit my answer Nov 7 '16 at 22:27 • Haha, yeah I temporarily changed my name because of this challenge, lol. I'll change it back in 30 days Nov 7 '16 at 22:36 ## Brainfuck, 168 bytes ++++++[>++++++++<-]>-<+++++++++[>>++++++++++<<-]>>++<<+++++[>>>++<<<-]>>>>+++[>++++[>++++++[<<<<<.....>.....>>>>-]<<<.>>-]++++[>++++++[<<<<.....<.....>>>>>-]<<<.>>-]<-] # PHP, 142 124 bytes <?=str_replace(['#','-'],['/////','\\\\\\\\\\'],wordwrap(str_repeat(str_repeat("#-",24).str_repeat("-#",24), 4),12,"\n",1)); Previous version: <?for($i=1;$i<4;$i++)echo wordwrap(str_repeat("/////\\\\\\\\\\",24),60,"\n",1)."\n".wordwrap(str_repeat("\\\\\\\\\\/////",24),60,"\n",1)."\n";

Output:

C:\PHP\>php this-is-my-pillow.php
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////

# SOML, 20 bytes (non-competing)

/5* \5*+6*6{4{t}5{«

Explanation:

/                    push "/", stack: ["/"]
5*                  repeat it 5 times ["/////"]
\                push "\" ["/////","\"]
5*              repeat it 5 times ["/////","\\\\\"]
6*           repeat the string 6 times (it gets long here)
6{         6 times repeat following code
4{t}     output 4 times
5{«  put the 1st 5 chars at the end of the string

oops, forgot that I added the "t" function later today so non-competing

# CJam, 24 23 bytes

"/\\"5e*6*]4*N*_W%]3*N*

ONLINE

Thanks 8478 (Martin Ender) for -1.

Explanation:

"/\\"5e*6*]4*N*_W%]3*N* Code
"/\\"                   Push "/\\"
5                  Push 5
e*                Repeat each
6               Push 6
*              Repeat
]             Wrap stack from [ to ToS in array
4            Push 4
*           Repeat
N          Push N = "\n"
*         Join
_        Duplicate
W       Push W = -1
%      Take every nth item
]     Wrap stack from [ to ToS in array
3    Push 3
*   Repeat
N  Push N = "\n"
* Join

# Vitsy, 28 26 bytes

This can be golfed a bit.

'\/'6\[4\[c\[4\[DO]r]aO]r]

Try it online!

# Pyth, 24 bytes

Jj*4[*6+*5\/*5\\;j*3[J_J

Try it!

Explanation:

Jj*4[*6+*5\/*5\\;j*3[J_J
4                     4
6                  6
5               5
\/             "/"
*                Repeat
5           5
\\         "\\"
*            Repeat
+                 Concatenate
*                   Repeat
[                    List
*                      Repeat
j                       Join
J                        Assign copy to J
;        Close argument list
3     3
J   J
J J
_  Reverse
[    List
*      Repeat
j       Join
• That explanation was painful to write... wish there was some way to use <something>5"/\\" instead of +*5\/*5\\. Nov 6 '16 at 18:09
• sC*5]"/\\" There is, but it's a byte longer. Nov 6 '16 at 18:21
• I see I still have a fair bit to learn. I've only posted 2 Pyth answers but I hope I'm getting there. Any suggestions/comments as to how I could improve how I did it? Gratefully received if so :) Nov 6 '16 at 18:51

## PowerShell v2+, 44 bytes

,(,('/////\\\\\'*6)*4+,('\\\\\/////'*6)*4)*3

Abuses the crap outta the default Write-Output behavior to put a newline between elements.

### Explanation

I'm also trying out a new explanation format, rather than the long prose I traditionally write.

,(,('/////\\\\\'*6)*4+,('\\\\\/////'*6)*4)*3
'/////\\\\\'*6                            # Repeat this string 6 times
,(              )*4                         # Repeat it into an array of four elements
+                        # Array concatenate with
,('\\\\\/////'*6)*4)    # The same with the slashes the other way
,(                                       )*3  # Repeat it into an array of three elements
# (i.e., 24 total strings)

## MATLAB, 58 44 bytes

Thanks to @Stewie Griffin for saving a bunch of bytes ;)

[repmat(kron(['/\';'\/'],ones(4,5)),3,6),'']

Old version:

p=@()char(47+45*kron(ones(3,6),kron([0 1;1 0],ones(4,5))))

# Perl, 51 50 bytes

Perl 5.10.0+:

perl -E 'say+((@_=("/"x5,"\\"x5)x6,$/)x4,(pop@_,@_,$/)x4)x3'

Perl before 5.10.0 (52 bytes):

perl -e 'print+((@_=("/"x5,"\\"x5)x6,$/)x4,(pop@_,@_,$/)x4)x3'

Ungolfed:

say(
(
(
@_ = ('/' x 5, '\\' x 5) x 6,
$/, # new line symbol ) x 4, ( pop(@_), @_,$/,
) x 4,
) x 3
);

Thanx to @DomHastings for 1 byte.

• Didn't think to use an array to store the slashes, nice! You can save 1 byte dropping the outermost () and prepend +: perl -E 'say+((@_=('/'x5,'\\'x5)x6,$/)x4,(pop@_,@_,$/)x4)x3' Nov 7 '16 at 12:45

## C#, 126 Bytes

var s="";var c="/";for(int a=0;a<24;){for(int b=0;b<60;)s+=b++%5>0?c:c=="/"?c=@"\":c="/";s+="\n";c=a++%3>1?c=="/"?@"\":"/":c;}

string s is output. It could be 3 byte less, when it is infinite.

## Ungolfed

var s = "";
var c = "/";
for (int a = 0; a < 24;)
{
for (int b = 0; b < 60;)//write line
{
s += b++ % 5 > 0 ? c : c == "/" ? c = @"\" : c = "/";//Change  /to \ and vice versa after five times
}
s += "\n";

c = a++ % 3 > 1 ? c == "/"? c = @"\" : c = "/" :c; //Change  /to \ and vice versa after three lines
}
• Can save at least two bytes with b%5>0 and c=a%3>1... I'm not sure because I'm on my phone but you may be able to store c as a char instead of a string and save a few bytes using implicit int to char conversions. Also do you really need all the c= in the last line ? I think it can be c=a%3>1?c=="/"?"\\":"/“:c; I see why you do it in the inner loop due to assigning to c and appending to s at the same time but you can probably refactor that a bit for byte savings as well Nov 6 '16 at 19:48
• Maybe also take the post increments out of the loop and add them into into the assignments... Ie s+=b++%5... and c=a++%3... save another two bytes Nov 6 '16 at 19:52
• Thank you, I complete forgot these c= in last line. Implicit int to char conversions does not work, because char is 16bit and written number is 32bit int, so there is only cast avaiable. Nov 6 '16 at 20:52

# GameMaker Language, 104 bytes

You should make sure that uninitialized variables don't throw an error. This setting is in the main page of Preferences. Otherwise, add e='' to the beginning of the program.

a="/////"b="\\\\\"d=b+a+b+a+b+a+b c=a+d d+=a for(i=0;i<24;i++)if i mod 8>3e+=d else e+=c e+="#" return e

P.S. Yes, each part of the for loop needs an expression. So I can't for(i=0;i<24;) and have i++ later.

Output

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
• Are there missing newlines?
– user58632
Nov 6 '16 at 14:42

# Befunge-98, 76 bytes

'/\::2%0!\4c*/2%0!-> #0 #\ #\' $#\_\3k:4k,1+:c%0!> #0 #, #a_:cad+*\!#@_ TryItOnline! String processing/generation can be difficult with only a stack available... A couple bytes may be able to be shaved off here or there, but I beat brainfuck, so I'm happy. ## Explanation Push '/' on the stack Swap top two (at the beginning, zero will now be on top). Call top = iterator = n Calculate (n % 2 == 0) != ((n / 48) % 2 == 0) If true, swap top two, replace '/' with '\', swap again Swap top two (so that we now have the character to print on top, followed by n) Duplicate the char 4 times, and print 5 times Increment n If n % 12 == 0, print a newline character If !(288 > n), end, else repeat # Pyth, 49484037 34 bytes J60K*24+*5\/*5\\V24:*3+K_K*JN+J*JN OK, I'm just learning Pyth so this is a direct port of my Python answer. Still a lot of golfing to do but it works so I am posting it anyway. Any hints gratefully received :) 1 byte saved with thanks to @Flp.Tkc -8 by working out how to do it with a variable -3 by moving the *24 to the assignment of K -3 by getting rid of the quotes • I've never tried pyth apart from looking at the docs once or twice, but I think you can replace FN24 with V24 Nov 6 '16 at 12:37 • Nice. Just tested and it works. Will check the docs on that. Nov 6 '16 at 12:39 # Julia, 56 bytes a="////\\\\\\\\"^6*"\n";print((a^4*a[[48:-1:1,49]]^4)^3) # C++ 138 void P(){int i,j,k,l;for(i=0;i<3;i++)for(j=0;j<8;j++)for(k=0;k<12;k++)for(l=0;l<5;l++)cout<<((j/4)?(k%2)?'/':'\\':(k%2)?'\\':'/')<<'\n';} Ungolfed #include<conio.h> #include<iostream> using namespace std; void P() { int i,j,k,l; for(i=0;i<3;i++) for(j=0;j<8;j++) for(k=0;k<12;k++) for(l=0;l<5;l++) cout<<((j/4)?(k%2)?'/':'\\':(k%2)?'\\':'/')<<'\n'; } int main() { P(); _getch(); return 0; } • Why braces on the second for loop? Nov 6 '16 at 20:56 • edited @pinkfloydx33 Nov 9 '16 at 22:38 # Lithp, 166 characters Line split for readability. #::((def x #S,N::(invoke S repeat N))(var A (x "/" 5))(var B (x "\\" 5)) (var C (+ (x (+ A B) 6) (nl)))(var D (+ (x (+ B A) 6) (nl))) (print (x (+ (x C 4) (x D 4)) 5))) Sample usage: % pillow.lithp ( (def f #::((def x #S,N::(invoke S repeat N))(var A (x "/" 5))(var B (x "\\" 5))(var C (+ (x (+ A B) 6) (nl)))(var D (+ (x (+ B A) 6) (nl)))(print (x (+ (x C 4) (x D 4)) 5)))) (f) ) Run with: ./run.js pillow.lithp This is a fairly simple solution that repeats characters. There is no standalone repeat function yet, so invoke is used to call "string".repeat(N) and adds a bit to the count. ## Ruby, 83 + 14 = 97 bytes puts Zlib.inflate Base64.decode64"eNrTB4EYECCdxTVENSP4pLOGqubhE8+j8Twaz6PxDAA3Pofw" Add 14 bytes for -rzlib and -rbase64 flags. # R, 72 bytes write(matrix(c(x<-rep(rep(c('/','\\'),e=5),24),rev(x)),24,60),'',60,,'') builds a matrix of appropriate characters and writes it to stdout. Try it online! # T-SQL, 113 bytes DECLARE @ INT=0L:IF @%8<4PRINT REPLICATE('/////\\\\\',6)ELSE PRINT REPLICATE('\\\\\/////',6)SET @+=1IF @<24GOTO L Formatted: DECLARE @ INT=0 L: IF @%8<4 PRINT REPLICATE('/////\\\\\',6) ELSE PRINT REPLICATE('\\\\\/////',6) SET @+=1 IF @<24 GOTO L Using both string literals seems to be the shortest option, trying to REPLICATE(REPLICATE('/',5)+REPLICATE('\',5) is way longer, as is using additional variables. # SOGL V0.12, 11 bytes └5*5∙╬¡6*3∙ Try it Here! Explanation: └ push "/" 5* repeat 5 times 5∙ repeat vertically 5 times ╬¡ quad-palindromize with 0 overlap and mirroring characters 6* multiply 6 times horizontally 3∙ multiply 3 times vertically # Jstx, 21 bytes ♣/►\:►/;1BO♠/♦/!41o16 Not the shortest solution but I wanted to try this interesting challenge. Explanation ♣ # Push literal 5 / # Enter an iteration block over the first stack value. ►\ # Push literal \ : # Push the sum of the second and first stack values. ►/ # Push literal / ; # Push the difference of the second and first stack values. 1 # End an iteration block. B # Push five copies of the first stack value. O # Collapse all stack values into a string, then Push that string. ♠ # Push literal 6 / # Enter an iteration block over the first stack value. ♦ # Push literal 4 / # Enter an iteration block over the first stack value. ! # Push a copy of the first stack value. 4 # Print the first stack value, then a newline. 1 # End an iteration block. o # Push the first stack value with characters in reverse order. 1 # End an iteration block. 6 # Ends program execution. Try it online! ## Pip -n, 24 bytes (RF('/X6.'\X6)X24)X3<>72 Quad reflect is a bit weird in pip, so this answer uses normal reflect. The -n flag joins lists with newlines. Try it online! # x86-16 machine code, IBM PC DOS, 40 bytes Binary: 00000000: b85c 2fb1 18b3 0cf6 c103 7502 86e0 ba05 .\/.......u..... 00000010: 00cd 294a 75fb 86e0 4b75 f350 b00d cd29 ..)Ju...Ku.P...) 00000020: b00a cd29 58e2 dec3 ...)X... Listing: B8 2F5C MOV AX, '/\' ; the two chars B1 18 MOV CL, 24 ; CX = row counter ROW: B3 0C MOV BL, 12 ; BX = pattern counter F6 C1 03 TEST CL, 3 ; have displayed 4 lines of same direction? 75 02 JNZ DIR ; if not, continue with same 86 E0 XCHG AH, AL ; otherwise, swap the chars DIR: BA 0005 MOV DX, 5 ; DX = char counter PATT: CD 29 INT 29H ; write char to console 4A DEC DX ; have displayed 5 of the same? 75 FB JNZ PATT ; if not, keep writing 86 E0 XCHG AH, AL ; otherwise, swap the chars 4B DEC BX ; have displayed 12 patterns on a line? 75 F3 JNZ DIR ; if not, keep writing patterns 50 PUSH AX ; otherwise, save the chars and write a newline B0 0D MOV AL, 0DH ; CR char CD 29 INT 29H ; write to console B0 0A MOV AL, 0AH ; LF char CD 29 INT 29H ; write to console 58 POP AX ; restore original chars E2 DE LOOP ROW ; loop until written 24 lines written C3 RET ; return to DOS A standalone PC DOS executable COM program. Output to console: # MAWP, 88 bytes 3[4[6[5[68W1A;1A]%4[68W2A2W;1A]%1A]%52W;1A]4[6[5[68W2A2W;1A]%4[68W1A;1A]%1A]%52W;1A]%1A] Try it! Raise the max executions to at least 15000 to test it :D Oh, and be ready to wait for quite some time for it to finish. # MAWP 2.0, 61 bytes 3[4[6["/////\\\\\":1-]10;1-]4[6["\\\\\/////":1-]10;1-]1-] Try it! ## Batch, 132 bytes @set s=/////\\\\\ @set s=%s%%s%%s%%s%%s%%s% @set s=%s% %s:~5%///// @for %%s in (%s% %s% %s%)do @for /l %%i in (1,1,4)do @echo %%s Works by building up the two types of row, then looping through six rows four times per row. ## Racket 156 bytes (define g #t)(for((k 24))(for((i 12))(for((j 5))(display(if g "/""\\")))(set! g(if g #f #t))) (when(= 0(modulo(add1 k)4))(set! g(if g #f #t)))(displayln"")) Ungolfed: (define(f) (define g #t) (for ((k 24)) (for ((i 12)) (for ((j 5)) (display (if g "/" "\\"))) (set! g (if g #f #t))) (when (= 0 (modulo (add1 k) 4)) (set! g (if g #f #t))) (displayln ""))) Testing: (f) Output: /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ /////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\ \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// \\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\///// # Swift 3, 100 99 97 bytes var a="/////",b="\\\\\\\\\\",c="" (1...144).map{c+=a+b+($0%6<1 ?"\n":"")
\$0%24<1 ?swap(&a,&b):()}

Could save 1 byte if Swift print function did not add a newline by default.

Edit 1:

Saved 1 byte by changing the if to ternary

if(i%24<1){swap(&a,&b)} -> i%24<1 ?swap(&a,&b):()

Edit 2:

Changed from for to map over the CountableClosedRange

# Java 7, 148 bytes

String c(){String r,z,y=z=r="",p="/////\\\\\\\\\\",q="\\\\\\\\\\/////";int i=0;for(;i++<6;y+=p,z+=q);for(i=0;i<24;r+=(i++%8<4?y:z)+"\n");}return r;}

Ungolfed & test code:

Try it here.

class M{
static String c() {
String r, z, y = z = r = "",
p = "/////\\\\\\\\\\",
q = "\\\\\\\\\\/////";
int i = 0;
for(; i++ < 6; y += p, z += q);
for(i = 0; i < 24; r += (i++%8 < 4 ? y : z)+"\n");
return r;
}

public static void main(String[] a){
System.out.println(c());
}
}

Output:

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////
\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////

## GolfSharp, 59 bytes

r(0,1440).s(n=>n%10<5^n%480<240?"\\":"/").j().S(60).j("\n")