3k views

Score 1, 35 generations Sorry, but I guess I wrecked the challenge. I brute-forced all meaningful one-dot additions by hand, and found no other answer that wins against this. Raw ASCII format OOO ...

16k views

APL (Dyalog Unicode), $\approx (10 \uparrow)^{625} 10.024549 \gg 10 \uparrow \uparrow 626$ bytes ⎕UCS(13⌿*⌿2+|⊃⎕RL⊣⎕RL←⍪⍨1)⊤≢⍬⍬⍬... The exact byte count is  \text{byte count before zilde} + \...

3k views

APL (Dyalog Unicode), 39 bytes +/⊢{∨/⍺⍵<⍵0:0⋄⍺=0:1⋄+/∊∇¨/⍺(⍵*2)-⊂⍳⍺}¨⍳ Try it online! A tacit function containing an inner dfn to use recursion. Does not use floating point numbers at all. How it ...

4k views

APL (Dyalog Unicode), 5 3 bytes ⍳⊥× Try it online! Adám gave me an inspiration to golf this further. How it works ⍳⊥× Monadic train. Input: n, the length of array A. × v: Signum, which always ...

1k views

APL (Dyalog Unicode), 18 bytes +/∧/¨1<×\¨.5+,⍳⎕/2 Try it online! A full program. Fails to compute the answer for $k>15$ due to system limitations (rank of intermediate array). How it works ...

1k views

54 Bytes ------[>+++<--]>[->----[-[->+<]<[->+<]>>]<]>>>>>>>>>>. 119 x 252 = 29988. Straightforward nested loop. I used this tool to ...

6k views

APL (Dyalog Unicode), 15 14 bytes (⍎⍞~'⎕⍎⍣⌶?{')⎕ Try it online! A full program that takes two inputs (an array of numbers in APL syntax, and then a line of APL code) from STDIN and prints the ...

2k views

K (ngn/k), 37 35 bytes {x#x(,/{(4=6!x*4<x)(-6!)\2*x}')\,1} Try it online! How it works "n is even and (n-1)/3 is an integer" is equivalent to "n is 4 mod 6". Avoiding the ...

528 views

Polyglot, 0 bytes This is a list of languages where an empty program gives an error. C/C++/Objective-C: Any compiler will complain not having a main, and emit a link error. C (gcc), C (tcc), C (...

1k views

J, 42 bytes v(+}.<.}:)&.>/@{.[:</.(2#v=._1+1#.$){.!._] Try it online! How it works v(+}.<.}:)&.>/@{.[:</.(2#v=._1+1#.$){.!._] v=._1+1#.\$ ...

4k views

35 Lines f= 0[ c= '\ c\ o\ n\ s\ t\ r\ u\ c\ t\ o\ r' ][ c]  r\ e\ t\ u\ r\ n\ '\ b\ a\ r\ b\ a\ r\ i\ a\ n'  Try it online! Uses the fact that 0 is a number, the constructor of 0 is Number, and ...

2k views

Jelly, 6 bytes R×\⁸¡Ṫ Try it online! APL (Dyalog Unicode), 10 bytes {⊃⌽×\⍣⍵⍳⍵} Try it online! The main trick is to observe how the computation of x!y progresses as y increases. 1!0=1 2!0=2 ...

1k views

J, 23 bytes ~:/I.@,~4|[:-/1#;._1@,] Try it online! Takes a boolean vector where 0 represents r and 1 represents s, and returns the result in the same encoding. How it works Imagine evaluating the ...

9k views

Labyrinth, score 35, 180 bytes 6 54.@ 7 55.@ 8 312.@ 9 313.@ 0 !@ - 45.@ = 1341.@ y 121.@ u 1141.@ i 2153.@ o 111.@ p 112.@ [ 1115.@ ] 2141.@ h 2152.@ j 2154.@ k 1131.@ l 1132.@ ; 315.@ ' 551.@ \ 4444....

2k views

J, 25 bytes (%-.)~/@(10^#&>)#.10#.&>] Try it online! Takes a boxed 2-item vector containing the digit vectors of $x$ and $y$, and returns a rational number. The digits must be given ...

552 views

Jelly, 6 bytes R⁵*%i1 Try it online! Basically compute 10**[1..n] % n and get the 1-based index of 1.

897 views

APL (Dyalog Unicode), 193 bytes {G←{⍵⊃⍨⊃⍋(+/' '=,)¨⍵} G{s←,30-⍳,⍨61 G,⊢∘⊂⌺30 30⊢((≢a)/⍪' '~⍨,x)@(B∘.+a)⊢''⍴⍨(⍴b)+⊃⌈/a←(⊢-⌊/)(⊃+/)¨s×⊂⍵}¨o/⍨(⍱/X∊⍨+/,-/)¨o←,∘.,⍨⊂¨∪{⍵/⍨0<2⊥¨×⍵}(,B∘.-⍸b<(1∊⊢)⌺3 3⊢...

2k views

APL (Dyalog Unicode), 3 bytes -≡⍉ Try it online! This is exactly an APLcart entry on "antisymmetric". Basically it checks if the input's negative - matches ≡ the input's transpose ⍉.

3k views

APL (Dyalog Unicode), 8 bytes ∧/⍲⌿2∨/⎕ Try it online! Takes input from stdin as a 2-row boolean matrix, where 1 is a wall and 0 is a space. Prints 1 for true, 0 for false (which are the only truthy/...

2k views

BoomBot function boom(them) { throw 1; } If the opponent is run first and calls this without try..catch, this bot automatically wins 3 points. Zero points in any other case.

921 views

APL(Dyalog Unicode), 26 bytes SBCS ⊢{z~∊(⊢,+)\⍺*⍨z←⍳!⍵}!×2*×⍨ Try it on APLgolf! This only works theoretically in multiple ways. The upper bound used (factorial of c = n! * 2^(n^2)is way too high to ...

955 views

18 bytes (flip.).(.).((.).) Try it online! Since your function has no argument repetition and no argument deletion, it essentially becomes a BC calculus golf (in Haskell terms, a golf using just B=(....

3k views

J, 7 bytes -:/:@/: Try it online! Ninja'd by hyper-neutrino :( Takes zero-based input. Applying Grade Up twice to a vector gives a "ranking" of each element, so that 0 is the smallest, 1 is ...

1k views

K (ngn/k), 45 32 bytes {+/b*1+(q!'x)+-2!q*<q:2/=#b:2\x} Try it online! Golfing ideas thanks to @ngn and @coltim The OEIS page contains a curious PARI program: a(n)=if(n==0,0,m=logint(n,2);r=n%2^m;...

2k views

APL (Dyalog Extended), 3 bytes ×¯⍸ Try it online! A tacit function. Banning only the exact built-in actually gives APL a massive advantage! How it works ×¯⍸ ⍸ ⍝ Takes a vector v and gives another ...

6k views

APL (Dyalog Unicode), 2x2 bytes *0 +1 Try it online! *0 computes e^0, and +1 computes complex conjugate of 1. *0 has Unicode codepoint 42 and 48, and +1 has 43 and 49, so the two are different by ...

3k views

Hexagony, Klein (101) and ??? xx={puts/} gets87!@xx=p main\ >9.*5,6v This prints 7 in Hexagony, 8 in Klein (101), and 9 in ???. The 9 does not work if a newline is added at the end of the ...

2k views

APL (Dyalog Unicode), 38 bytes 1+{⍵,⊃⍸|⊃×/×(⌽⍳≢⍵)(⊢×+×-)⍵-⊂⍳3×≢⍵}⍣⎕⊢⍬ Try it online! Kinda port of tsh's JS and Python answers. They actually need some explanation of why it works, rather than how. ...

2k views