73
\$\begingroup\$

Challenge

I need help building a brick wall! Throw together some code for me using no input and produce the following output wall shown below:

_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__

Now, this wall is exactly 10 characters high and 70 characters wide.

As stated above, no inputs, only code. Least amount of bytes, we have to efficiently build this brick wall. Obviously, this program has to function to get the wall built..? or it obviously won't build itself! Good luck!


Winner

The winner goes to Marinus using the APL language, requiring a whole 12 bytes! https://codegolf.stackexchange.com/a/99028/61857


Thank you everyone for participating!

\$\endgroup\$
  • 2
    \$\begingroup\$ Related, Related, \$\endgroup\$ – FlipTack Nov 8 '16 at 18:42
  • 8
    \$\begingroup\$ Also Related. (odd that this should come up today, haha) \$\endgroup\$ – Conor O'Brien Nov 8 '16 at 18:43
  • 1
    \$\begingroup\$ That's OK. I'll let you know when I have a working interpreter. I'm working on it right now, actually :) \$\endgroup\$ – ETHproductions Nov 10 '16 at 14:20
  • 2
    \$\begingroup\$ Related! \$\endgroup\$ – RudolfJelin Nov 10 '16 at 17:49
  • 29
    \$\begingroup\$ For bonus points, make Mexico pay for it. \$\endgroup\$ – Dawood ibn Kareem Nov 11 '16 at 8:26

86 Answers 86

46
\$\begingroup\$

APL, 12 bytes

10 70⍴'_|__'

Output:

      10 70⍴'_|__'
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
\$\endgroup\$
  • 1
    \$\begingroup\$ I just noticed this answer as I put my J answer. they're basically the same haha \$\endgroup\$ – Conor O'Brien Nov 8 '16 at 18:22
  • 2
    \$\begingroup\$ This outputs something else in addition to the ascii wall. Is this allowed? \$\endgroup\$ – Buffer Over Read Nov 9 '16 at 16:11
  • \$\begingroup\$ when using tryapl.org, I got the wall output. what have you received @TheBitByte? \$\endgroup\$ – FivePixels Nov 10 '16 at 14:34
  • 4
    \$\begingroup\$ @Dylan He's probably confused, since the answerer included the program in the output without knowing the REPL nature of APL. \$\endgroup\$ – Conor O'Brien Nov 10 '16 at 19:49
6
\$\begingroup\$

Perl, 47 34 29 bytes

$_="_|__"x175;say for/.{70}/g
\$\endgroup\$
  • \$\begingroup\$ You can golf it down to 29 : say for("_|__"x175)=~/.{70}/g \$\endgroup\$ – Dada Nov 8 '16 at 18:22
  • \$\begingroup\$ For some reason, that used to produce no output every time I tried it, but I found another solution in as many bytes. Thank you though! \$\endgroup\$ – Gabriel Benamy Nov 8 '16 at 18:39
  • \$\begingroup\$ Well, the code I suggested does produce a valid output... Maybe you forgot the parenthesis around "_|__"x175 or something like that? \$\endgroup\$ – Dada Nov 8 '16 at 18:47
  • \$\begingroup\$ I think that's what it is. I figured parentheses had to go somewhere, I just couldn't figure out where, lol \$\endgroup\$ – Gabriel Benamy Nov 8 '16 at 18:48
  • \$\begingroup\$ Huhu, hard to remember the precedence of every operator (=~ has a higher precedence than x)! \$\endgroup\$ – Dada Nov 8 '16 at 18:50
5
\$\begingroup\$

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!

\$\endgroup\$
  • \$\begingroup\$ 19 bytes: v.tryitonline.net/… I couldn't figure out how to use the .\{-} shortcut mentioned in the V docs, though. \$\endgroup\$ – Jordan Nov 8 '16 at 19:52
  • \$\begingroup\$ @Jordan Wow, very nice! The \{-} shortcut wouldn't work anyway, since you can't change the number inside. However, you could set the high bit on the \{ to get this instead. Feel free to post that as an answer. \$\endgroup\$ – DJMcMayhem Nov 8 '16 at 20:31
  • \$\begingroup\$ Ah, that makes sense. Posted here: codegolf.stackexchange.com/a/99070/11261 \$\endgroup\$ – Jordan Nov 8 '16 at 20:35
  • \$\begingroup\$ Damn I still need to grok this language: 25 bytes \$\endgroup\$ – statox Nov 9 '16 at 13:12
7
\$\begingroup\$

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);'
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
\$\endgroup\$
  • \$\begingroup\$ bytes, not character count. \$\endgroup\$ – FivePixels Nov 8 '16 at 19:40
  • 2
    \$\begingroup\$ Same. I use no multibyte characters. \$\endgroup\$ – manatwork Nov 8 '16 at 19:41
  • 9
    \$\begingroup\$ Crossed out 44 is still regular 44 ;( \$\endgroup\$ – pajonk Nov 8 '16 at 20:05
  • 2
    \$\begingroup\$ @pajonk, Fixed with PPCG - Crossed Out 44 user style on my machine: i.stack.imgur.com/czn5h.png \$\endgroup\$ – manatwork Nov 8 '16 at 20:26
  • \$\begingroup\$ You can save a byte by using str_pad instead of str_repeat, largely because _ is treated as a constant with value _. \$\endgroup\$ – user59178 Nov 9 '16 at 9:21
3
\$\begingroup\$

Jelly, 14 bytes

“_|__”ṁ700s70Y

TryItOnline!

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
\$\endgroup\$
  • 1
    \$\begingroup\$ By definition, Jelly cannot be longer than J. \$\endgroup\$ – Adám Nov 8 '16 at 20:34
  • \$\begingroup\$ I did something similar without the peculiar : “_|__”ẋ175œs⁵Y (14 bytes) \$\endgroup\$ – Erik the Outgolfer Nov 13 '16 at 11:34
8
\$\begingroup\$

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!

\$\endgroup\$
18
\$\begingroup\$

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.

\$\endgroup\$
  • 2
    \$\begingroup\$ Best (ab)use of WIDTH that I have seen :) \$\endgroup\$ – ElPedro Nov 8 '16 at 18:46
  • \$\begingroup\$ This should have "23 bytes" in the header then. \$\endgroup\$ – Adám Nov 8 '16 at 20:33
  • \$\begingroup\$ @Adám Only if the tokenized version is posted as the answer. \$\endgroup\$ – ErikE Nov 14 '16 at 7:38
5
\$\begingroup\$

Perl, 31 bytes

say+($@="_|__"x17,"_|
__$@
")x5

You'll need -E flag to run it :

perl -E 'say+($@="_|__"x17,"_|
__$@
")x5'
\$\endgroup\$
  • \$\begingroup\$ Thought of a slightly different approach for 29 bytes: say for("_|__"x175)=~/.{70}/g :). I do like the trick you employed there though! \$\endgroup\$ – Dom Hastings Nov 9 '16 at 12:23
  • \$\begingroup\$ @DomHastings huhu, I wrote the exact same code in the comments of Gabriel Benamy's answer! \$\endgroup\$ – Dada Nov 9 '16 at 15:11
  • \$\begingroup\$ D'oh! Didn't see that one! Also then saw it's been used a lot in other answers.. Oh well! \$\endgroup\$ – Dom Hastings Nov 9 '16 at 15:13
  • \$\begingroup\$ @DomHastings Yea, I didn't thought of it at first, and it was already in Gabriel's answer, so that's why I didn't update my answer after ;) \$\endgroup\$ – Dada Nov 9 '16 at 15:22
10
\$\begingroup\$

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

Try it here.

\$\endgroup\$
20
\$\begingroup\$

J, 12 bytes

10 70$'_|__'

Shapes the string on the right into a 10 by 70 shape. Simple!

\$\endgroup\$
5
\$\begingroup\$

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 :)

\$\endgroup\$
  • \$\begingroup\$ Could be 2 bytes less: print'\n'.join([k[:70],k[2:]]*5) \$\endgroup\$ – Antony Hatchkins Nov 14 '16 at 7:24
  • \$\begingroup\$ @AntonyHatchkins Thanks! \$\endgroup\$ – Kade Nov 16 '16 at 13:43
10
\$\begingroup\$

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("_|__"))
\$\endgroup\$
  • \$\begingroup\$ Your last alternative is shorter as print(("%s"*70+"\n")*10%(175*(*"_|__",))) in Python 3. \$\endgroup\$ – mbomb007 Nov 8 '16 at 20:49
2
\$\begingroup\$

Befunge-98, 63 bytes

'_\:3+4%0`!> #0 #\ #|' $ #\_\,1+:7a*%0`!> #0 #, #a_:7aa**\`!#@_

TryItOnline!

\$\endgroup\$
1
\$\begingroup\$

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 :)

\$\endgroup\$
  • 1
    \$\begingroup\$ b*70+70 -> -~b*70 saves a byte :) \$\endgroup\$ – Kade Nov 8 '16 at 18:33
  • 2
    \$\begingroup\$ Or [b*70:][:70]. \$\endgroup\$ – xnor Nov 8 '16 at 18:34
  • \$\begingroup\$ Thanks @xnor. Didn't know you could do that. may well go back and trim a couple off some of my other recent answers :) \$\endgroup\$ – ElPedro Nov 8 '16 at 18:41
17
\$\begingroup\$

Brainfuck, 171 bytes

+++++[>+++++++++++++++++++<-]+++++++[>>++++++++++++++++++<<-]>>--<<++[>>>+++++<<<-]+++++[>.>.>>+++++++++++++++++[<<<...>.>>-]<.>+++++++++++++++++[<<<...>.>>-]<<<..>>.<<<-]

Brainfuck is fun, here is my submission.

Here is the output:

_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__

Here is a link to try it

https://repl.it/EW2Z/0

\$\endgroup\$
1
\$\begingroup\$

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/.

\$\endgroup\$
  • 1
    \$\begingroup\$ Change the a%2==0 to a%2<1 to save a byte :) \$\endgroup\$ – Kade Nov 8 '16 at 18:39
  • \$\begingroup\$ Also, you can remove the a++ in the for definition and change a%2 to a++%2! \$\endgroup\$ – Kade Nov 8 '16 at 18:41
  • \$\begingroup\$ You can save 4 bytes by declaring i outside the loop, incrementing i within the condition i<175, and using i in the second loop instead of a new integer b. \$\endgroup\$ – Yodle Nov 8 '16 at 19:45
  • \$\begingroup\$ @Yodle I could save 6 bytes by doing so (and not 4), thanks! \$\endgroup\$ – Ave Nov 8 '16 at 19:48
  • \$\begingroup\$ Ahh I guess they have a default value of 0 :P. In VS it won't let you declare local variables without initializing them, so the =0 made it only 4 for me. \$\endgroup\$ – Yodle Nov 8 '16 at 19:50
2
\$\begingroup\$

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]}
\$\endgroup\$
  • 2
    \$\begingroup\$ The generate-all-then-split approach is shorter here too: puts ("_|__"*175).scan /.{70}/. \$\endgroup\$ – manatwork Nov 8 '16 at 19:15
  • \$\begingroup\$ @manatwork thanks a lot! I rarely think of using scan as I´m not that comfortable with regexes. You know you could have posted that as your own answer... \$\endgroup\$ – Level River St Nov 8 '16 at 22:27
3
\$\begingroup\$

MATL, 16 bytes

'___|'10:E!70:+)

Try it online!

'___|'   % 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
\$\endgroup\$
3
\$\begingroup\$

CJam, 15 bytes

"_|__"175*70/N*

Try it online!

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
\$\endgroup\$
1
\$\begingroup\$

Jolf, 17 bytes

RZc*"_|__"Τ755@FS

Try it here!

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
\$\endgroup\$
4
\$\begingroup\$

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!

\$\endgroup\$
  • \$\begingroup\$ Would .{70} be any shorter for teh regex? \$\endgroup\$ – Conor O'Brien Nov 8 '16 at 21:00
  • \$\begingroup\$ split works like that in other languages - you always get the unmatched portions whether you want them or not. Some languages have a match operator that can be used to return an array of only matching results, but I don't see a PowerShell equivalent for that. \$\endgroup\$ – Neil Nov 9 '16 at 10:23
  • \$\begingroup\$ @Neil Performing 'abc'-split'(.)' will return ('','a','','b','','c',''). There's nothing unmatched, but due to how the algorithm processes through the input string, you get empty strings back. See here. \$\endgroup\$ – AdmBorkBork Nov 9 '16 at 13:33
  • \$\begingroup\$ Yes, and I'm saying you shouldn't be surprised by that result, because that's what split's supposed to do. \$\endgroup\$ – Neil Nov 9 '16 at 14:01
  • \$\begingroup\$ @Neil Surprised? No, not really. Doesn't mean I have to be happy about it, though. :D \$\endgroup\$ – AdmBorkBork Nov 9 '16 at 14:08
1
\$\begingroup\$

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
\$\endgroup\$
1
\$\begingroup\$

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

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
3
\$\begingroup\$

Javascript REPL, 45 bytes

"_|__".repeat(175).match(/.{70}/g).join("\n")
\$\endgroup\$
  • 1
    \$\begingroup\$ Welcome to PPCG! This should be marked as "JavaScript REPL" or similar, as this doesn't print anything at all outside of an interactive console environment. \$\endgroup\$ – Martin Ender Nov 8 '16 at 19:41
  • 1
    \$\begingroup\$ Isn't this 45 bytes? \$\endgroup\$ – acrolith Nov 8 '16 at 19:50
  • \$\begingroup\$ @daHugLenny you are right, I counted \n as a single byte \$\endgroup\$ – Juan Tonina Nov 8 '16 at 20:02
  • \$\begingroup\$ where is the console.log ? \$\endgroup\$ – cardeol Nov 9 '16 at 12:49
  • 1
    \$\begingroup\$ As long as you are using ES6 (I think it is) you can use template strings, so join("\n") becomes join<backtick><literal newline><backtick> \$\endgroup\$ – Stephen Jul 24 '17 at 17:17
16
\$\begingroup\$

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  "___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__"
\$\endgroup\$
2
\$\begingroup\$

///, 51 bytes

If a trailing newline is allowed:

/e/aaaa//a/_|__//b/eeeea_|//c/__eeeea//d/b
c
/ddddd

Try it online!

\$\endgroup\$
4
\$\begingroup\$

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...

_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
_|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|__
\$\endgroup\$
5
\$\begingroup\$

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                                     ..

Try it online!

\$\endgroup\$
  • \$\begingroup\$ Nice, I am no longer the only person who has used V! Now I'm going to have to see if I can take the lead back, haha \$\endgroup\$ – DJMcMayhem Nov 8 '16 at 20:39
191
\$\begingroup\$

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.

\$\endgroup\$
  • 48
    \$\begingroup\$ I take it Trumpscript doesn't allow numbers less than 1,000,000? ;-) \$\endgroup\$ – ETHproductions Nov 8 '16 at 20:45
  • 3
    \$\begingroup\$ you are correct. \$\endgroup\$ – Blue Nov 8 '16 at 20:52
  • 2
    \$\begingroup\$ Can you use i is 1000005-1000000 and i is i-fact? (Just taken a look at the readme of Trumpscript.) \$\endgroup\$ – AlexRacer Nov 8 '16 at 22:31
  • 19
    \$\begingroup\$ I'm surprised it allows you to use 1000000. Documentation states All numbers must be strictly greater than 1 million. The small stuff is inconsequential to us.. \$\endgroup\$ – Mad Physicist Nov 10 '16 at 20:41
  • 9
    \$\begingroup\$ Fact and lies (and other truth/false constants) have a random, time based chance to flip flop (be reversed) during tokenization (see tokenizer.py, search flip_flop) may be why it seemed to not work with minus, when really it had to do with fact at that point in time \$\endgroup\$ – pinkfloydx33 Nov 12 '16 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.