| Bytes | Lang | Time | Link |
|---|---|---|---|
| 044 | Raku Perl 6 rakudo | 250415T204521Z | xrs |
| 015 | Vyxal 3 | 250411T103127Z | Themooni |
| 031 | Bash | 250408T162221Z | roblogic |
| 012 | Japt R | 250408T134546Z | Shaggy |
| 067 | AWK | 250407T192352Z | xrs |
| 021 | Pushy | 161117T211735Z | FlipTack |
| 010 | Vyxal j | 220602T235339Z | naffetS |
| 010 | Canvas | 210516T001849Z | hakr14 |
| 043 | /// | 210515T235000Z | nph |
| 011 | 05AB1E | 201124T223750Z | Makonede |
| 013 | Jelly | 201124T214608Z | Unrelate |
| 058 | C gcc | 171118T182524Z | gastropn |
| 045 | JavaScript Node.js | 180601T113400Z | Muhammad |
| 022 | Vim | 161109T192519Z | 永劫回帰 |
| 070 | Common Lisp | 180601T105649Z | ASCII-on |
| 076 | Tcl | 180601T104345Z | ASCII-on |
| 083 | Prolog SWI | 180530T051757Z | ASCII-on |
| 011 | Charcoal | 180530T050910Z | ASCII-on |
| 087 | Charm | 180525T094937Z | LyricLy |
| 141 | Brainfuck | 180525T094024Z | The rand |
| 015 | Japt R | 180525T073959Z | Bubbler |
| 069 | Symbolic Python | 171203T180513Z | FlipTack |
| 010 | SOGL V0.12 | 170920T221338Z | dzaima |
| 019 | Vim | 161109T155147Z | karpfen |
| 040 | Python 3 | 161122T165232Z | Juntos |
| 056 | PHP | 161117T203059Z | Xesau |
| 044 | Python 2 | 161108T182656Z | Kade |
| 020 | Retina | 161108T205922Z | mbomb007 |
| 062 | R | 161115T184554Z | runr |
| 046 | Python 2 | 161114T142728Z | NeRoboto |
| 054 | Python 3 | 161114T030139Z | Jimmy Jo |
| 041 | Python 3 | 161113T174443Z | vpzomtrr |
| 036 | bash 36 Byte | 161113T113911Z | Baba |
| 095 | MySQL | 161113T020935Z | Wahooka |
| 171 | Brainfuck | 161108T183327Z | Mitchell |
| 028 | BBC BASIC | 161108T181719Z | Level Ri |
| 044 | Python 3.5.2 | 161112T180305Z | MinteZ |
| 042 | Befunge93 | 161112T012828Z | James Ho |
| 035 | bash | 161112T004315Z | rjmunro |
| 054 | Lua | 161111T221737Z | Blab |
| 071 | FurryScript | 161111T220323Z | acrolith |
| 099 | Kotlin | 161111T174532Z | F. Georg |
| 061 | C | 161111T172431Z | david.we |
| 232 | Javascript | 161110T134502Z | KYL3R |
| 059 | sh via base64 and pigz | 161110T235141Z | rjmunro |
| 043 | Python 3 | 161110T060751Z | Michael- |
| 068 | SAS | 161110T130630Z | user3490 |
| 095 | C | 161108T194905Z | cleblanc |
| 106 | Java 8 + Guava | 161108T193502Z | Xanderha |
| 119 | Java 8 | 161110T130054Z | Xanderha |
| 096 | C# | 161108T183712Z | ave |
| 037 | jq | 161110T134554Z | manatwor |
| 045 | Gema | 161110T132009Z | manatwor |
| 110 | Clojure | 161109T232121Z | Carcigen |
| 069 | Swift 3 | 161109T222514Z | Otá |
| 128 | Java 8 | 161109T222354Z | user1893 |
| 030 | Ruby | 161109T182431Z | anna328p |
| 046 | PHP | 161109T133910Z | Mario |
| 042 | Ruby | 161109T161212Z | bfontain |
| 034 | BASH | 161109T123517Z | cardeol |
| 115 | Java 7 | 161109T135136Z | Kevin Cr |
| 159 | Racket | 161109T140827Z | rnso |
| 078 | R | 161109T134149Z | cps1 |
| 226 | Trumpscript | 161108T203555Z | Blue |
| 040 | Bash | 161109T110225Z | rjmunro |
| 090 | Batch | 161109T104555Z | Neil |
| 041 | PHP | 161108T181258Z | manatwor |
| 015 | MATL | 161108T204525Z | Sanchise |
| 022 | Pyth | 161108T190752Z | ElPedro |
| 047 | Haskell | 161109T045610Z | Angs |
| 038 | GolfSharp | 161109T003033Z | downrep_ |
| 048 | JavaScript ES6 | 161108T230314Z | ETHprodu |
| 018 | V | 161108T203516Z | Jordan |
| 072 | Lithp | 161108T224815Z | Andrakis |
| 030 | Ruby | 161108T183738Z | Level Ri |
| 037 | Perl | 161108T215154Z | Denis Ib |
| 030 | PowerShell v2+ | 161108T185905Z | AdmBorkB |
| 016 | V | 161108T181217Z | DJMcMayh |
| 012 | Pyke | 161108T204236Z | Blue |
| 045 | Javascript REPL | 161108T193646Z | Juan |
| 051 | /// | 161108T194724Z | acrolith |
| 045 | WinDbg | 161108T194410Z | milk |
| 016 | SOML | 161108T185937Z | dzaima |
| 037 | Python 2 | 161108T182816Z | xnor |
| 017 | Jolf | 161108T185809Z | Conor O& |
| 015 | CJam | 161108T184414Z | Luis Men |
| 016 | MATL | 161108T184126Z | Luis Men |
| 048 | Python 2 | 161108T183059Z | ElPedro |
| 029 | Perl | 161108T181030Z | Gabriel |
| 063 | Befunge98 | 161108T182828Z | Brian Gr |
| 013 | 05AB1E | 161108T181537Z | Adnan |
| 012 | J | 161108T182204Z | Conor O& |
| 012 | Pyth | 161108T182109Z | Adnan |
| 031 | Perl | 161108T181728Z | Dada |
| 014 | Jelly | 161108T181434Z | Jonathan |
| 012 | APL | 161108T181135Z | marinus |
Vyxal 3, 15 bytes
"_|__"①70;ÞRƛ“,
"_|__"①70;ÞRƛ“,
"_|__" # literal string "_|__"
①70; # [10,70]
ÞR # reshape the string into previous dimensions
ƛ“, # for each sublist, join on nothing then print with newline
💎
Created with the help of Luminespire.
<script type="vyxal3">
¶,
"_|__"①70;ÞRƛ“,
</script>
<script>
args=[]
</script>
<script src="https://themoonisacheese.github.io/snippeterpreter/snippet.js" type="module"/>
AWK, 67 bytes
END{for(;i++<17;b=b"___|")a=a"_|__";for(;j++<5;)print a"_|\n"b"__"}
END{for(;i++<17; # build wall width
b=b"___|")a=a"_|__"; # string concat
for(;j++<5;) # wall height
print a"_|\n"b"__"} # print with missing end chars
Pushy, 21 bytes
`_|__`17:4d;T:vv"^^{{
Really wish I could golf it more, will have another go later. It works like so:
`_|__` % Push the brick string to the stack
17:4d; % Copy 17 times
T: % 10 times do:
vv"^^ % Print without the last two characters
{{ % Shift the string left twice
Seeing as there's no online interpreter as of yet, here's what it looks like:
$ pushy brickwall.pshy
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
Vyxal j, 10 bytes
‛_|ǏǏ⁺J*₀/
How?
‛_|ǏǏ⁺J*₀/
‛_| # Push string "_|"
ǏǏ # Append its first character twice, yielding "_|__"
⁺J* # Repeat it 175 times
₀/ # Split into ten equal parts
05AB1E, 11 bytes
…_|_ĆƵм×Tä»
ä # split...
… # three char string...
_|_ # literal...
Ć # concatenated with its first character...
× # repeated...
м # numeric literal...
Ƶ # converted from base 255 to decimal plus 101...
× # times...
ä # into...
T # 10...
ä # equal pieces...
» # by newlines
# implicit output
Jelly, 13 bytes
70:þ⁵“_|__”ṁY
The dyad given to þ doesn't matter so long as it outputs a scalar, so I chose : solely for aesthetic purposes.
þ Take the rangifying outer product
: by integer division
70 of 70
⁵ and 10,
“_|__”ṁ mold "_|__" like it,
Y and join on newlines.
C (gcc), 61 58 bytes
-3 bytes thanks to ceilingcat.
f(i){for(i=700;i--;i%70|!i||puts(""))printf(L"__|_"+i%4);}
JavaScript (Node.js), 45 bytes
_=>`_|__`.repeat(175).match(/.{70}/g).join`
`
Explanation :
_ => // lambda function (argument passed to save a byte)
`_|__` // simple enough
.repeat(175) // repeat the above mentioned shape 175 times
.match(/.{70}/g) // simple regexp to match a shape 70 (something :) ) long
.join`\n` // and join them on a new line
Simple enough.
Alternate version :
JavaScript (Node.js), 714 bytes
_=>`_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__`
No explanation required. Simple hard coded.
Vim, 26 22 strokes
Assume the q register to be empty (if not type qqq)
175i_|__<esc>0qq70li<enter><esc>q8@q
Common Lisp, 70 bytes
(dotimes(i 700)(format t"~[|~:;_~]~[
~:;~]"(mod(1- i)4)(mod(1+ i)70)))
Tcl, 84 78 77 76 bytes
time {append a [expr [incr i]%4-2?"_":"|"];if $i%70<1 {puts $a;unset a}} 700
Prolog (SWI), 83 bytes
?-between(0,699,I),(1 is I mod 4->write("|");write("_")),69 is I mod 70,nl,1=0;1=1.
Charm, 87 bytes
f := " ___| " 18 repeat
s := substring pstring newline
[ f 2 72 s f 0 70 s ] 5 repeat i
Charm's repeat makes this kind of thing easy, but its syntax prevents very good scores regardless.
Explanation:
f := " ___| " 18 repeat " function to push 18 bricks " pop
s := substring pstring newline " we need to get a substring before printing it with a newline at two different points during the program, so we save bytes defining a function for it " pop
[ f 2 72 s f 0 70 s ] 5 repeat i " now we apply our functions, getting two slightly different substrings of the bricks from the f function and printing them, repeating this 5 times "
Brainfuck, 141 bytes
+++++[>+++++[>>++++>+++++<<<-]>++>-<<<-]>>>>->+++++[<<.>.>>++++++++[>++>++<<-]>+>+<[<<<<...>.>>>-]<<<<<.>>>>>>[<<<<<...>.>>>>-]<<<<<..<.>>>-]
My first brainfuck answer !
There is a more aerial and commented version :
+++++[>+++++[>>++++>+++++<<<-]>++>-<<<-]>>>>-> value storage
+++++[ doing this ↓ 5 times
<<.>.> first "_|"
>++++++++[>++>++<<-]>+>+< storing 17 two times
[<<<<...>.>>>-] first 17 "|___" batch
<<<<<.>>>>>> new line
[<<<<<...>.>>>>-] second 17 "|___" batch
<<<<<..<.>>>- last "__" and new line
]
Japt -R, 15 bytes
AÆ70î"_|__"éX*2
Unpacked & How it works
Ao@70î"_|__"éX*2
Ao@ range(10).map(X=>...)
70î Repeat the following string to length 70...
"_|__"éX*2 This string rotated X*2 chars to the right.
`-R` joins the resulting array with newline
Implicit output
Symbolic Python, 69 bytes
Outputs as a list of lines.
_=-~(_==_)
__=-~_*-~_*_
_=[('_|__'*__)[:-_],('___|'*__)[:-_]]*-~(_*_)
Alternatively, for 16 more bytes, we can print the wall:
_=-~(_==_)
__=-~_*-~_*_
_=(('_|__'*__)[:-_]+"""
"""+('___|'*__)[:-_]+"""
""")*-~(_*_)
SOGL V0.12, 10 bytes
Ωo³‘'╥*'4n
Explanation:
Ωo³‘ push "_|__"
'╥* multiply the string 175 times
'4n split into lines of length 70
Vim, 30 24 19 keystrokes
18a___|<esc>YP2x}h.yk4P
Thanks to DrMcMoylex and nmjcman101 for saving valuable keystrokes!
Python 3, 40 bytes
p="_|__"*17
print((p+"_|\n__"+p+"\n")*5)
PHP, 56 bytes
Although I know it can be done smaller using wordwrap or string splits, I prefer more hacky solutions.
for($i=0;$i<700;$i++){echo($i%70?'':'
').'_|___'[$i%4];}
Python 2, 46 44 Bytes
Just using string multiplication to build the string, and slicing to get the right bits :)
k='_|__'*18
print'\n'.join([k[:70],k[2:]]*5)
thanks to Antony Hatchkins for saving two bytes :)
R, 62 bytes
Don't have the rep to comment, so posting as an answer: @user3297046's answer can be golfed-down to 62 bytes:
cat(gsub('(.{70})','\\1
',paste(rep('_|__',175),collapse='')))
which results in
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
Python 2, 46 bytes
import textwrap as t;print t.fill('_|__'*175)
I was going to do an exec loop similar to @xnor's one alternate solution but he/she got to it before me. I guess I'll just have to let Python do the dirty work for me.
Python 3, 54 bytes
for i in range(10):print(('_|__'*175)[70*i:70*(i+1)])
I know this is longer than other Python 3 solutions, so I post because it is a different approach.
Python 3 - 41 chars
s="_|__"*17
print((s+"_|\n__"+s+"\n")*5)
bash 36 Byte
printf '_|__%.0s' {1..175}|fold -w70
OUtput:
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
MySQL, 196 123 118 95 bytes
First wall was backwards, removed procedure.
set @x:=repeat('_|__',99);select left(repeat(concat(left(@x,70),'\n',mid(@x,3,70),'\n'),9),709)
Brainfuck, 171 bytes
+++++[>+++++++++++++++++++<-]+++++++[>>++++++++++++++++++<<-]>>--<<++[>>>+++++<<<-]+++++[>.>.>>+++++++++++++++++[<<<...>.>>-]<.>+++++++++++++++++[<<<...>.>>-]<<<..>>.<<<-]
Brainfuck is fun, here is my submission.
Here is the output:
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
Here is a link to try it
BBC BASIC, 28 bytes
Tokenised filesize 23 bytes.
WIDTH70P.STRING$(175,"_|__")
WIDTH70 would normally be followed by a newline. It sets the field width to 70. Then we just print 175 copies of the string, which wrap around.
Python 3.5.2, 44 bytes
exec("print('_|__'*18);print('___|'*18);"*5)
This is my first attempted golf, so feel free to leave a suggestion!
bash, 35 bytes
printf '\e[8;;70t_|__%.0s' {1..175}
Must be run in graphical terminal as it sets the size of the window.
Lua, 54 bytes
w=("_|__"):rep(17)print((w.."_|\n__"..w.."\n"):rep(5))
No fancy splits for Lua, but it does have an easy repeat.
FurryScript, 71 bytes
A[ <_|> 17 REP +<___|> +BR +<__> 17 REP +<_|__> +BR ]
<<A><A><A><A><A>>
Explanation:
A[ ... ] {{ Subroutine called A }}
<_|> {{ Push string "_|" }}
17 REP {{ Repeat next command 17 times: }}
+<___|> {{ Concatenate "___|" }}
+BR {{ Concatenate newline }}
+<__> {{ Concatenate "__" }}
17 REP {{ Repeat next command 17 times: }}
+<_|__> {{ Concatenate "_|__" }}
+BR {{ Concatenate newline }}
<<A><A><A><A><A>> {{ Template; result of A, 5 times }}
Kotlin, 99 bytes
fun main(a:Array<String>){"_|__".repeat(999).split(Regex("(?<=\\G.{70})")).take(10).map(::println)}
Regex taken from here. First ever golf, done in 10 minutes, probably improvable..
C, 61 bytes
TCC Version
main(i){for(;i+699;)printf("\n%c"+(--i%70||!i),"___|"[i&3]);}
GCC Version
main(i){for(;i+699;)printf("\n%c"+(i%70||!i),"___|"[--i&3]);}
Javascript, 232 bytes
brick = ["_","_","_","|"];
brickIndex = 2;
output = "";
for(var y=0;y<10;y++){
for(var x=0;x<70;x++){
brickIndex = brickIndex % 4;
output += brick[brickIndex++];
}
output += "\n";
}
console.log(output)
sh (via base64 and pigz) 59 bytes
echo eNqLr4mPpxxzgQjKMRc5mkZdM+oaAG7xGAs=|base64 -D|pigz -d
Python 3, 43
print(("_|__"*17+"_|\n"+"__|_"*17+"_\n")*5)
Fixed to be more Trump-like.
SAS, 68
option linesize=70;data;length w$700;w=repeat('_|__',174);put w;run;
The 174 is not a typo - in SAS the repeat function rather pedantically returns the original string plus n repeats.
C, 131 115 113 103 97 95 Bytes
i,j;main(){for(;i<10;puts(i++&1?"|__":"|"))for(j=0;j<18-(i&1);printf(&"|___"[j++?0:i&1?1:3]));}
Time to start golfing this...
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
Java 8 + Guava, 81 106 bytes
25 bytes for import: com.google.common.base.*;
Lambda that takes no input and returns the required wall.
()->String.join("\n",Splitter.fixedLength(70).split(Strings.repeat("_|__",175)));
Same as many other solutions. Takes a repeating string of "_|__" 175 times, splits it into lengths of 70, then joins them on newline.
Java 8, 101 119 bytes
18 for the import: java.util.stream.*;
Lambda that returns the wall. We generate an infinite Stream of brick pieces ('_|__'), limit it to 175, and collect them into a string. We then use replaceAll to swap in a newline every 70 characters.
()->Stream.generate(()->"_|__").limit(175).collect(Collectors.joining()).replaceAll("(.{70})","$1\n")
C#, 106 102 101 118 107 106 100 96 bytes
Thanks shebang for saving 2 bytes and pointing out a mistake, Yodle for saving 6 bytes and Link Ng for saving 4 bytes.
var a="";int i;for(;i++<175;)a+="_|__";for(i=0;i<10;)Console.Write(a.Substring(i++*10,70)+"\n");
You can test it directly on http://csharppad.com/.
jq, 37 characters
(33 characters code + 4 characters command line options)
range(10)|.*2|("_|__"*70)[.:.+70]
range(10)|("_|__"*70)[.*2:.*2+70]
range(0;20;2)|("_|__"*70)[.:.+70]
Sample run:
bash-4.3$ jq -nr 'range(10)|.*2|("_|__"*70)[.:.+70]'
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
On-line test code 1, code 2 and code 3 (Passing -r through URL is not supported – check Raw Output yourself.)
Gema, 45 characters
\A=@subst{<U70>=\$1\\n;@repeat{175;_|__}}@end
Sample run:
bash-4.3$ gema '\A=@subst{<U70>=\$1\\n;@repeat{175;_|__}}@end'
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
Clojure, 117 110 bytes
(fn[](println(apply str(map #(str(apply str %)"\n")(partition 70(subs(apply str(repeat 175 "_|__"))0 700))))))
Basically creates a long string of "_|__"s 700 characters long, cuts it every 70 characters, then joins them with newline.
Managed to get rid of the calls to join!
Ungolfed:
(defn build-wall []
(println
(apply str
(map #(str (apply str %) "\n")
(partition 70
(subs (apply str
(repeat 175 "_|__"))
0 700))))))
Swift 3, 69 bytes
(3...702).map{print($0%4<1 ?"|":"_",terminator:($0-2)%70<1 ?"\n":"")}
Output after compiling and running:
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
Try online here (In this tool it run as script so it will produce a warning due the map result is unused.
Java 8, 128
This code directly calculates each character and has no imports or dependencies.
Golfed:
()->{String s="";for(int x,y=0;y<10;++y){for(x=0;x<70;++x)s+=((y%2<1&(x+3)%4<1)|(y%2>0&(x+1)%4<1))?"|":"_";s+="\n";}return s;}
Ungolfed:
() -> {
String s = "";
for (int x, y = 0; y < 10; ++y) {
for (x = 0; x < 70; ++x)
s += ((y % 2 < 1 & (x + 3) % 4 < 1) | (y % 2 > 0 & (x + 1) % 4 < 1)) ? "|" : "_";
s += "\n";
}
return s;
}
Ruby, 30 bytes
puts ('_|__'*175).scan /.{70}/
Output:
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
PHP, 46 bytes
<?=wordwrap(str_repeat('_|__',175),70,"\n",1);
Output:
C:\PHP>php build-me-a-brick-wall.php
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
Ruby, 89 80 77 76 72 53 47 42 Bytes
puts (%w[___]*176*?|)[2..-1].scan(/.{70}/)
Demo:
>> puts (%w[___]*176*?|)[2..-1].scan(/.{70}/)
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
Update: I didn’t see there’s already an answer with 30 bytes.
BASH, 91,34 bytes
printf _\|__%.0s {1..175}|fold -70
Java 7, 136 124 120 115 bytes
String c(){String r,x=r="";int i=999,q=0;for(;i-->0;x+="_|__");for(;i++<10;r+=x.substring(q,q+=70)+"\n");return r;}
Ungolfed & test code:
class M{
static String c(){
String r,
x = r = "";
int i = 999,
q = 0;
for(; i-- > 0; x += "___|");
for(; i++ < 10; r+= x.substring(q, q+=70) + "\n");
return r;
}
public static void main(String[] a){
System.out.println(c());
}
}
Output:
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
Racket 159 bytes
(let p((n 2)(x 0)(t 0)(d display))(when(> x 69)(d"\n")(set! x 0))(cond[(> t 699)
(d"\n")][(> n 2)(d"|")(p 0(+ 1 x)(+ 1 t)d)][(d"_")(p(+ 1 n)(+ 1 x)(+ 1 t)d)]))
Ungolfed:
(define (f)
(let loop ((n 2) (x 0) (t 0) (d display))
(when (> x 69) (d "\n")
(set! x 0))
(cond
[(> t 699) (d "\n")]
[(> n 2) (d "|")
(loop 0 (+ 1 x) (+ 1 t) d)]
[else (d "_")
(loop (+ 1 n) (+ 1 x) (+ 1 t) d)]
)))
Testing:
(f)
Output:
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
R, 78 bytes
strwrap(gsub('(.{70})','\\1 ',paste(rep('___|',175),collapse='')),70)
How?
x=paste(rep('___|',175),collapse='') #Creates string on 1 line
y=gsub('(.{70})','\\1 ',x) #Adds spaces every 70 characters
z=strwrap(y,70) #Creates a new line every space
z #Print the finished product
Trumpscript, 303 285 244 231 226 bytes
make i 1000005-1000000
as long as,i;:
make i,i - fact;
say "_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|"
say "___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__"!
America is great
I would like to say this is one of the most verbose languages where almost everything fails to compile into a working program.
Apparently whether - works instead of minus is completely up to the interpreter and sometimes works. This time it did so I'm putting it in as golfed.
Abuses the fact Trumpscript is written in Python and therefore fact when used as an integer is one.
Golfing tips welcome.
Bash, 44, 41, 40 bytes
printf _\|__%.0s {1..175}|egrep -o .{70}
The printf makes a single line 700 characters long, the egrep matches it 70 characters at a time.
Batch, 90 bytes
@set s=_________________
@for /l %%i in (1,1,5)do @echo _^|%s:_=___^|%&echo __%s:_=_^|__%
|s cause problems if I want to use them as contents of the variable so it's easiest to stick with them as replace strings.
PHP, 44 42 41 characters
<?=chunk_split(str_pad(_,700,"|___"),70);
(Just because had no chance to use chunk_split() ever before.)
Thanks to:
- user59178 for suggesting to use
str_pad()(-1 character)
Sample run:
bash-4.3$ php <<< '<?=chunk_split(str_pad(_,700,"|___"),70);'
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
MATL, 15 bytes
'_|__'700:)70e!
Of course, you can Try it online! Explanation:
'_|__' % Put a brick on the stack
700 % 700 times
:) % Makes a happy mason...
70e! % Secret freemason code
OK, actually, it works as follows:
'_|__' % Put the first bit of the string on the stack
700: % Put 1, 2, ..., 700 on the stack as array
) % Index into the string, modularly. Result: '_|___|__ ... __'
70e % Reshape into 70 rows (and consequently, 10 columns)
! % Transpose to get the desired output.
Pyth, 24 23 22 bytes
VT:*175"_|__"J*70N+70J
OK, I'm still learning. Any hints gratefully received :)
Edit
Saved a byte by moving the assignment of J to first use
Haskell, 56 47 bytes
unlines$[1..5]>>take 70.cycle<$>["_|__","___|"]
GolfSharp, 38 bytes
c(r(175).s(n=>"_|__").j().S(70).j(N));
JavaScript (ES6), 48 bytes
f=(n=350)=>n?(n%35?'_':`
_`)+"|_"[n%2]+f(n-1):""
Because recursion.
V, 18 bytes
-1 byte thanks to DJMcMayhem.
175i_|__<Esc>Ó.û70}/°ò
Here it is with unprintable characters in xxd format:
0000000: 3137 3569 5f7c 5f5f 1bd3 2efb 3730 7d2f 175i_|__....70}/
0000010: b0f2 ..
Lithp, 72 bytes
#::((print (replace (repeat "_|__" 175) (regex "(.{70})" "g") "$1\n"))))
Sample usage:
% wall.lithp
(
(def x #::((print (replace (repeat "_|__" 175) (regex "(.{70})" "g") "$1\n"))))
(x)
)
Output:
$ ./run.js wall.lithp
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
Ruby, 30 bytes
Thanks to manatwork for this solution
puts ("_|__"*175).scan /.{70}/
Ruby, 39 bytes
10.times{|i|puts ("_|__"*18)[i%2*2,70]}
Perl, 37 bytes
print$_.$/x!(++$i%35)for('_|',__)x175
Ungolfed:
my $i = 0;
print($_, "\n" x !(++$i % 35)) for ('_|', '__') x 175;
PowerShell v2+, 34 30 bytes
'_|__'*175-split"(.{70})"-ne''
Stupid regex matching algorithm requiring the -ne'' ... wastes five bytes!
'_|__'*175-split"(.{70})"-ne''
'_|__'*175 # Repeat this string 175 times
-split" " # Split on this regex pattern:
.{70} # Match any character 70 times
( ) # Encapsulated in parens so we keep the regex results
-ne'' # But don't select the empty strings
# Output with newlines via Write-Output is implicit
Saved 4 bytes thanks to Conor!
V, 24, 16 bytes
175i_|__ò70|lé
Try it online!
This contains <esc> characters (0x1B) so here is a hexdump:
0000000: 3137 3569 5f7c 5f5f 1bf2 3730 7c6c e90a 175i_|__..70|l..
8 bytes indirectly saved thanks to Jordan!
Pyke, 12 bytes
w�"_|__"*TfX
where � is the literal byte 163.
Try it here! (w� replaced with literal)
Javascript REPL, 45 bytes
"_|__".repeat(175).match(/.{70}/g).join("\n")
///, 51 bytes
If a trailing newline is allowed:
/e/aaaa//a/_|__//b/eeeea_|//c/__eeeea//d/b
c
/ddddd
WinDbg, 45 bytes
f2000000 L2bc 5f 7c 5f 5f;da/c46 2000000 L2bc
How it works:
f 2000000 L2bc 5f 7c 5f 5f; *Repeat the pattern _|__ (5F 7C 5F 5F) to fill 2BC (700) bytes
*starting at 2000000
da /c46 2000000 L2bc *Show 2BC (700) ASCII chars starting from 2000000 in lines
*of length 0x46 (70)
Output:
0:000> f2000000 L2bc 5f 7c 5f 5f;da/c46 2000000 L2bc
Filled 0x2bc bytes
02000000 "_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|"
02000046 "___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__"
0200008c "_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|"
020000d2 "___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__"
02000118 "_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|"
0200015e "___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__"
020001a4 "_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|"
020001ea "___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__"
02000230 "_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|"
02000276 "___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__"
SOML, 16 bytes
_|__”’ø*L{:jjp»»
explanation:
_|__” push "_|__"
’ø push 18
* repeat the "_|__" 18 times
L{ repeat 10 times:
: duplicate the sting
jj pop the last 2 letters off
p output it
»» put the last 2 characters at the start
Python 2, 37 bytes
s="_|__"*17;print(s+"_|\n__%s\n"%s)*5
Decomposes two rows as 17 copies of _|__, plus another copy interrupted by a newline, plus 17 more copies, plus another newline.
Longer alternatives:
print"%s_|\n__%s\n"%(2*("_|__"*17,))*5
s="_|__"*17;print"%s_|\n__%%s\n"%s%s*5
for i in[0,2]*5:print("_|__"*18)[i:i+70]
print("_|__"*17+"_|\n"+"___|"*17+"__\n")*5
for s in["_|__","___|"]*5:print(s*18)[:70]
s="_|__"*99;exec"print s[:70];s=s[2:];"*10
print("%s"*70+"\n")*10%(175*tuple("_|__"))
Jolf, 17 bytes
RZc*"_|__"Τ755@FS
Explanation
RZc*"_|__"Τ755@FS
*"_|__" repeat this string:
Τ755 7*5*5 = 175 times
Zc @F chop into groups of 70 (F's charcode)
R S join by newlines
CJam, 15 bytes
"_|__"175*70/N*
Port of Adnan's 05AB1E answer.
"_|__" e# Push this string
175* e# Repeat 175 times
70/ e# Split in pieces of size 70
N* e# Join by newlines
MATL, 16 bytes
'___|'10:E!70:+)
'___|' % Push this string
10:E! % Push [2; 4; 6; ...; 20] (10×1 column vector)
70: % Push [1, 2, 3, ..., 70] (1×70 row vector)
+ % Add. Gives a 10×70 matrix of all pairwise additions
) % Index (modular, 1-based) into the string
Python 2, 50 48 bytes
for b in range(10):print('_|__'*175)[b*70:][:70]
2 saved with thanks to @xnor but also thanks to @Shebang for the suggestion :)
Perl, 47 34 29 bytes
$_="_|__"x175;say for/.{70}/g
05AB1E, 13 bytes
Code:
"_|__"175×Tä»
Explanation:
"_|__" # For the string "_|__"
175× # Repeat that 175 times
Tä # Split into 10 even pieces
» # And join them by newlines
Uses the CP-1252 encoding. Try it online!
J, 12 bytes
10 70$'_|__'
Shapes the string on the right into a 10 by 70 shape. Simple!
Pyth, 12 bytes
Code:
jcT*175"_|__
Explanation:
"_|__ # For the string "_|__"
*175 # Repeat it 175 times
cT # Chop into 10 equal pieces
j # Join them by newlines
Perl, 31 bytes
say+($@="_|__"x17,"_|
__$@
")x5
You'll need -E flag to run it :
perl -E 'say+($@="_|__"x17,"_|
__$@
")x5'
Jelly, 14 bytes
“_|__”ṁ700s70Y
How?
“_|__”ṁ700s70Y - Main link: no arguments
“_|__” - literal ['_','|','_','_']
ṁ700 - mould like something 700 long
s70 - split into chunks of length 70
Y - join with line feeds
APL, 12 bytes
10 70⍴'_|__'
Output:
10 70⍴'_|__'
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__