92 votes

Unfolding the Hexagony source code

Hexagony, 271 bytes I present to you, the first 3% of a Hexagony self-interpreter... ...
Martin Ender's user avatar
57 votes

Triangular Lattice Points close to the Origin

Python 2, 43 bytes f=lambda n,a=1:n*n<a/3or n*n/a*6-f(n,a+a%3) Try it online! This is black magic. Offering 250 rep for a written-up proof. See Lynn's ...
xnor's user avatar
  • 144k
46 votes

Snowman Bowling

Snowman 1.0.2, 157 bytes ...
Doorknob's user avatar
  • 71.4k
41 votes

Could you make me a hexagon please?

Hexagony + Bash Coreutils, 0+3+8 = 11 Bytes Includes +3 for -g flag and +8 for |tr . \* non-standard invocation (see this meta ...
Riley's user avatar
  • 11.7k
38 votes

Hexagonal maze time!

Hexagony, 2437 bytes The long-awaited program is here: ...
boboquack's user avatar
  • 2,309
34 votes

Triangular Lattice Points close to the Origin

Haskell, 48 bytes f n=1+6*sum[(mod(i+1)3-1)*div(n^2)i|i<-[1..n^2]] Try it online! Uses xnor's "black magic" formula: $$f(n)=1+6\sum_{a=0}^\infty \...
Lynn's user avatar
  • 68.1k
32 votes
Accepted

Program the Cup-Stacking Robot

Python 2, 64,515 ...
Ell's user avatar
  • 7,677
30 votes

Triangular Lattice Points close to the Origin

Wolfram Language (Mathematica), 53 51 50 bytes -1 byte thanks to @miles Sum[Boole[x(x+y)+y^2<=#^2],{x,-2#,2#},{y,-2#,2#}]& Try it online! How? Instead of ...
JungHwan Min's user avatar
  • 13.8k
24 votes

Sticky polyhexes

Haskell, 320…236 230 bytes ...
Delfad0r's user avatar
  • 6,236
23 votes
Accepted

A spiral sequence

JavaScript (ES6),  267 .. 206  199 bytes Returns an array containing the \$N\$ first terms of the sequence. ...
Arnauld's user avatar
  • 189k
20 votes

Could you make me a hexagon please?

Python 2, 61 bytes i=n=input() while~-n+i:i-=1;j=abs(i);print' '*j+'* '*(2*n+~j) Prints a trailing space at the end of each line. Thanks to Erik the Outgolfer ...
xnor's user avatar
  • 144k
20 votes

Counting creatures on a hexagonal tiling

JavaScript (Node.js),  578 ... 433  431 bytes ...
Arnauld's user avatar
  • 189k
19 votes
Accepted

Hexagonal maze time!

Python 2, 291 bytes ...
Ell's user avatar
  • 7,677
19 votes

HexaGolf: Wordagons

Python 2, 83 bytes s=input() l=len(s) while 1:l-=1;y=abs(l);print' '*y+' '.join(s[:y:-1]+s[y]*y+s[y:]) Prints the wordagon and then crashes (which only prints to ...
Lynn's user avatar
  • 68.1k
19 votes

Stack the rocks

Ruby, 124 117 112 110 bytes ...
Level River St's user avatar
18 votes

Unfolding the Hexagony source code

CJam, 56 52 50 48 bytes My first thought was, "hey I already have code for this!" But then I couldn't be bothered to pull the necessary pieces together from the Ruby code, especially because they ...
Martin Ender's user avatar
18 votes

HexaRegex: A Tribute to Martin Ender

Retina, 744 bytes Sorry folks, no Hexagony this time... Byte count assumes ISO 8859-1 encoding. ...
Martin Ender's user avatar
16 votes
Accepted

Cut a triangle into equal-sized parts!

JavaScript (ES7),  367 362 359  357 bytes Saved 1 byte thanks to @Shaggy Expects (n)(m). ...
Arnauld's user avatar
  • 189k
15 votes

Hexplosive ASCII-art challenge

JavaScript (ES6), 118 117 bytes ...
Neil's user avatar
  • 166k
15 votes

Could you make me a hexagon please?

Hexagony, 91 87 86 bytes ?{2'*=&~}=&}='P0</0P}|@..;>;'.\};0Q/..\&(<>"-_"&}=\?_&\/8.=-\<><;{M/.(.(/.-{><.{&'/_.\ ...
DELETE_ME's user avatar
  • 17.2k
14 votes

HexaGolf: Rotatagons

Python 2, 160 158 156 148 124 bytes Prepare to be amazed! The resulting text is drawn on a canvas... by a Turtle! :D ...
mbomb007's user avatar
  • 23.3k
13 votes
Accepted

Unfolding the Hexagony source code

Pyth, 57 54 50 49 48 46 V+UJfgh*6sUTlK-zd1_UtJ+*d-JNjd:.[K\.^TJZ=+Z+JN Test Suite Prints a leading space on each line. This version requires a proof that 10^n >...
FryAmTheEggman's user avatar
13 votes
Accepted

Triangular Ulam spiral

CJam, 49 42 bytes Lri{)mp0S?}%{1$,)/(a@Wf%z+\L*}h;eeSff*W%N* Input as a single integer in STDIN. Output as an ASCII grid with ...
Martin Ender's user avatar
13 votes

HexaRegex: A Tribute to Martin Ender

Python 3, 990 943 770 709 bytes First answer, yay! EDIT: Golfed adjacency list making. I now use a slightly different formula EDIT 2: Removed unnecessary fluff, golfed a lot more. EDIT 3: ...
Blue's user avatar
  • 2,026
13 votes

Could you make me a hexagon please?

JavaScript (ES6), 77 81 84 @Upvoters: don't miss the answer by @ETHproductions, that is 76 bytes Edit Revised after change in spec, trailing space allowed Just for the hat ... hey! No hat? ...
edc65's user avatar
  • 32k
13 votes

Halting Problem for Simplified Hexagony

APL (Dyalog Unicode), 616 bytesSBCS ...
Bubbler's user avatar
  • 73.8k
12 votes

Motion on a hexagonal grid

Retina, 353 339 178 175 150 130 129 117 bytes R 5$*r T`aq\we\ds`so`r.+ )`r(.*) $1 ^ : a sq e wd +`(.+)q w$1 +`(.+)d s$1 +`sw (.*)(\1w?): $0$2 +`sw|ws w+ -$0 \w 1 ...
Martin Ender's user avatar
12 votes

Could you make me a hexagon please?

JavaScript (ES6), 77 76 bytes g=(n,s=` *`+' *'.repeat(n*2-2),c=s,q=c.replace('*',''))=>--n?g(n,q+s+q,q):s I told myself I wouldn't sleep until I had set a new ...
ETHproductions's user avatar
12 votes

Totally random Catan number distributions

JavaScript (ES6), 162 bytes ...
Arnauld's user avatar
  • 189k
11 votes
Accepted

Hexplosive ASCII-art challenge

MATL, 39 37 bytes 4*3-:!G:+o~YRtP*!tPw4LY)vtI5&lZ+47+*c Try it online! Or verify all test cases. Explanation I get to use convolution again! Consider input <...
Luis Mendo's user avatar
  • 104k

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