Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now
59

Google, 11 9 8 6 bytes -3 bytes thanks to 12Me21. -2 bytes thanks to Deckerz. 6=wrds Try it online! Just in case Google changes something in the future, this is how it looks like now:


41

Poetic, 400 bytes Type fourhundred chars? I say, I think I have an angle. I say "Gosh, could I just go create some poem? Clearly it comes a long way, writing stuff I say." I compose the entire written poem, and someone reads a tiny, tiny portion. "Surely, it all is garbage," cried a big fat crybaby. Would HE frankly notice how many long, tedious hours I ...


29

brainfuck, 40 bytes +[+++++>++<]>.+++++++++.+++.++.+++++.+++ Try it online! The last three characters don't actually do anything useful, but it's easier to output forty than thirty seven. The ascii code for f is 102, which is 2/5 of 255, found by the initial loop. After that, all the characters in the output just happen to be in ascending ...


26

MathGolf, 2 bytes Well, MathGolf has a string compression library that seems to compress "two" to 1 byte. You need a command to decompress this. ╩_ Try it online!


15

Google Translate (3 bytes) 一 Try it online! It's the Chinese character for "one" (matching the number of characters in the source code), though the score's due to the character itself being 3 bytes. Google Translate (3 bytes) tre Try it online! It's Italian for "three".


14

PHP, 4 bytes four Try it online! PHP, 9 bytes <?= nine; Try it online!


14

CSS, 30 bytes body::after{content:'thirty';} CSS (Google Chrome only), 26 bytes This should be saved in an empty file between <style> and </style> tag, doesn't work on FireFox or Stack Exchange's code snippets. Tested on Windows Chrome 77. :after{content:'twenty six


13

Python 3, 15 bytes exit("fifteen") ...prints to STDERR. Try it online! (see the "debug" panel)


12

JavaScript (Node.js),  122 120 106  103 bytes Recursively builds the output character by character. The coordinates are 0-indexed. (w,h,x,y)=>(s=new Date%9023,g=X=>Y<h?Buffer([X-w?(x-X|y-Y?s+1:s%96)%95+32:13])+g(X<w?X+1:!++Y):'')(Y=0) Try it online! How? Problem To generate the haystack and the needle, we could either: generate a ...


12

COW, 800 bytes MoO!! MoO MoO!! MoO MoO MoO!! MoO MoO MoO MoO!! MoO MoO MoO MoO MoO!! MoO MoO MoO MoO MoO MoO!! MoO MoO MoO MoO MoO MoO MoO!! MoO MoO MoO MoO MMM MoO MoO MoO!! MoO MoO MoO MoO MoO MoO MoO MoO MoO!! MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!! MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!! MoO MoO MoO MoO Moo MoO MoO MoO MoO Moo MOo MOo!! Moo MoO ...


11

Wolfram Alpha, 6 bytes Apparently Wolfram Alpha isn't a language according to our meta, but we have a Google entry in this challenge and part of the argument against Wolfram Alpha is "What's preventing me from solving something in google". spell6 Try it Note that this returns a single result, unlike most Wolfram Alpha "queries".


10

JavaScript (ES6),  172 171  169 bytes The output is 0-indexed. a=>a.map((_,i)=>(D=m=>+m||m.reduce((s,[v],i)=>s+(i&1?-v:v)*D(m.map(([,...r])=>r).filter(_=>i--)),0))(a.map((v,y)=>a.map((_,x)=>x-i?x-~-Math.abs(y%(2*x)-x):v)))&&(j=i))|j Try it online! How? This is essentially an implementation of Cramer's rule, ...


10

Emoji, 18 bytes ⛽eighteen🚘➡ Try it online! Emoji, 8 chars ⛽eight🚘➡ Try it online!


10

Malbolge, 40 bytes (CB%#9]~}5:3Wyw/4-Qrqq.'&Jkj(h~%|Bd.-==;


10

Perl 6, 8 bytes π- τ/* Try it online! Output in radians. Simple function in WhateverCode notation which computes \$π-τ/n\$. \$τ\$ is the constant tau equaling \$2π\$.


9

Julia, 61 49 71 bytes p>q=rand()<.5 ? (p<q-1 ? (while gcd(p+=1,q)!=1 end;p>q) : 1>q+1) : p//q In un-golfed form, this reads function f(p,q) # define the function if rand() < 0.5 # flip a coin. if p < (q - 1) # if the coin gives heads, check if p < (q - 1) ...


9

Python 2, 42 bytes lambda s:(s.split("1"+len(s)/2*"0")*2)[:2] Try it online! The inverse is: def F(a,b): return a+"1"+len(a+b)*"0"+b A tempting idea for the inverse is to encode the pair of input strings by putting some separator string in between them. That way, we can extract the pair by splitting on this separator. The issue is that the separator ...


9

Labyrinth, 10 bytes 84.69.78.@ Try it online! How? - initially the main stack contains infinite zeros [0,0,0,...] 8 - multiply the top of the stack by ten and add eight [8,0,0,...] 4 - multiply the top of the stack by ten and add four [84,0,0,...] . - pop, mod 256, print character T 6 - multiply the top of the stack by ten ...


8

APL (Dyalog Unicode), 27 bytes i⊃⍸1=∘.(>×∨)⍨⍳2+i←1+⍣{?2}¯1 Try it online! Thanks to @ngn for this function. Since this is not strictly my answer, I'll keep the older answer below this one. Uses ⎕IO←0. The function returns a pair in the form denominator numerator. How: i⊃⍸1=∘.(>×∨)⍨⍳2+i←1+⍣{?2}¯1 ⍝ Dfn ¯1 ⍝ Literal -1 ...


8

JavaScript (ES6),  105  104 bytes Takes input as an array of 3 strings. Returns an array of digit characters. a=>a.map(s=>s.match(/.../g).map(([a,b,c],n)=>'3789465021'[(o[n]=~~o[n]+[++a|7*++b^44*++c])%13]),o=[])[2] Try it online! How? Finding a concise way to process the input A common trick to turn an input string into an identifier ...


7

Brainf***, 90 bytes +[+[>>+<+<-]>]>[>+>+>+>+>+>+<<<<<<-]>.>-----.>.>---------.>++++++.>+++++++++++.<+><><><><> Try it online!


6

Jelly, 14 13 bytes p/⁼€ịØṖẊ¤s⁸Ḣ¤ Try it online! -1 byte thanks to Unrelated String Returns a list of lines. The last line in the Footer section displays it as a square. Takes input as [w, h] and [y, x], where x and y are 0-indexed. How it works p/⁼€ịØṖẊ¤s⁸Ḣ¤ - Main link. Takes [w, h] on the left and [y, x] on the right p/ - Reduce Cartesian ...


7

Python 3,262 236 209 196 179 114 93 92 97 bytes def f(n): m=k=1;s='' while n:m*=k*k;k+=1;n-=m%k while k:s=chr(~-k%26+97)+s;k=~-k//26 return s Try it online! Fixed a bug mentioned by @benrg about getting a wrong output for the input 123. Thanks to: - @AdmBorkBork for help me getting started and save a few bytes - @Sriotchilism O'Zaic for saving me 6 ...


6

SOGL V0.12, 3 bytes Well, SOGL has a string compression library that seems to compress "three" to 3 bytes. @0‘ Try it Here!


5

PowerShell v6, 102 96 bytes param($x,$y,$a,$b)$j,$k=' '..'~'|random -C 2 -join((,$j*$x+++' ')*$y|%{"$_$k"[$i++-eq$b*$x+$a]}) Try it online! This answer, thanks to mazzy, uses the character range feature added in v6 to save several bytes over the more flexible answer below. PowerShell, 119..105 102 bytes -16 bytes thanks to mazzy -1 byte thanks to ...


5

Jelly, 11 bytes QŒṬƤSḂịØṖẊ¤ A monadic Link accepting a list of lists, [[height, width], [row, column]] (1-indexed), which yields a list of lists of characters. Try it online! (The footer calls the link and joins with newlines.) How? QŒṬƤSḂịØṖẊ¤ - Link: [[h, w], [r, c]] Q - de-duplicate (i.e. [[h, w]] if [r, c] == [h, w] else [[h, w], [r, c]]) ...


5

Python 2, 93 bytes lambda n:[[.5+abs((n+j-i*(-1)**(i+j))%(2*n)-n+.5)for j in range(n)]for i in range(2*n+(n>2))] Try it online! Outputs a list of lists of integer-valued floats. The map (i,j) -> j-i*(-1)**(i+j) is very similar to multiplication in the dihedral group. This isn't a coincidence. If we let \$a\$ represent swapping every other element ...


5

JavaScript (ES6),  196 ... 185  182 bytes Takes input as a binary matrix. Returns a Boolean value. f=m=>!/1/.test(m)||m.some((r,y)=>r.some((v,x)=>v&&[0,1,2,3].some(d=>([X,V]=(g=d=>[v=x+--d%2,R=m[y+--d%2]||0,R[v]])(d))[2]&g(d+1&3)[2]&&(r[x]=V[X]=R[r[x]=V[X]=R[v]=0,o=f(m),v]=1)&o))) Try it online! This ...


5

JavaScript, 16 10 bytes -6 each from Night2's suggestion in the comments Try it online! (alert doesn't work in TIO, so I'm using print) alert`ten` Javascript, 26 20 bytes Try it online! console.log`twenty`;


5

Keg, 3 bytes -1 from Jono2906 for reminding me the string compression 2 can play the 3 byte game! ‘0⅀ TIO Old answer, 4 bytes You can't get shorter than 4. (Without using string compression of course.) 4 is the smallest English word that is the same length as the number it represents. Just some good old-fashioned Ascii/auto-pushing Keg golfing! four ...


Only top voted, non community-wiki answers of a minimum length are eligible