1193
votes
Accepted
Build a working game of Tetris in Conway's Game of Life
This began as a quest but ended as an odyssey.
Quest for Tetris Processor, 2,940,928 x 10,295,296
The pattern file, in all its glory, can be found here, viewable in-browser here.
This project is the ...
Community wiki
1162
votes
Accepted
Build a digital clock in Conway's Game of Life
11,520 generations per clock count / 10,016 x 6,796 box / 244,596 pop count
There you go... Was fun.
Well, the design is certainly not optimal. Neither from the bounding box standpoint (those 7-...
832
votes
Build a working game of Tetris in Conway's Game of Life
Part 2: OTCA Metapixel and VarLife
OTCA Metapixel
(Source)
The OTCA Metapixel is a construct in Conway's Game of Life that can be used to simulate any Life-like cellular automata. As the LifeWiki (...
797
votes
Build a working game of Tetris in Conway's Game of Life
Part 3: Hardware
With our knowledge of logic gates and the general structure of the processor, we can start designing all the components of the computer.
Demultiplexer
A demultiplexer, or demux, is ...
756
votes
Build a working game of Tetris in Conway's Game of Life
Part 4: QFTASM and Cogol
Architecture Overview
In short, our computer has a 16-bit asynchronous RISC Harvard architecture. When building a processor by hand, a RISC (reduced instruction set computer)...
710
votes
Build a working game of Tetris in Conway's Game of Life
Part 6: The Newer Compiler to QFTASM
Although Cogol is sufficient for a rudimentary Tetris implementation, it is too simple and too low-level for general-purpose programming at an easily readable ...
500
votes
Build a Compiler Bomb
C, (14 + 15) = 29 byte source, 17,179,875,837 (16 GB) byte executable
Thanks to @viraptor for 6 bytes off.
Thanks to @hvd for 2 bytes off and executable size x4.
This defines the ...
349
votes
Accepted
225
votes
Build a Compiler Bomb
Python 3, 13 byte source, 9,057,900,463 byte (8.5GiB) .pyc-file
(1<<19**8,)*2
Edit: Changed the code to the version above after I realized the rules say ...
221
votes
Build a Compiler Bomb
C#, about 1 min to compile, 28MB output binary:
class X<A,B,C,D,E>{class Y:X<Y,Y,Y,Y,Y>{Y.Y.Y.Y.Y.Y.Y.Y.Y y;}}
Adding more Y's will increase the size ...
206
votes
What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?
Retina, score 1
The empty program counts the number of matches of the empty regex in the input (which is the empty string). That's exactly 1 match, so it prints ...
171
votes
Accepted
When was this language released?
A Brief History of 2D Programming Languages: 16 (+2) years
...
157
votes
How high can you count?
JavaScript (ES7), score 17, 176 bytes
They said it couldn't be done, so I did it :D (thanks to a lot of help from @FullDecent)
...
156
votes
153
votes
The Versatile Integer Printer
15 languages, 68 66 65 bytes / 15^3 = 0.019...
Retina, Starry, Prelude, ETA, Axo, Labyrinth, Hexagony, Foo, Brian & Chuck, Gol><>, evil, Whitespace, Fission, ><> and GolfScript.
After a ...
144
votes
Build a Compiler Bomb
If an output of more than 4GB is achieved (perhaps if somebody finds a turing complete preprocessor), the competition will be for the smallest source which produces a file of at least that size (it's ...
140
votes
Paint Starry Night, objectively, in 1kB of code
Pyth (no built-in compression), score 4695.07 4656.03 4444.82
Pyth’s only image-related functionality is a builtin to write a matrix of RGB triples as an image file. So the crazy idea here is to ...
140
votes
Determine your language's version
Python 3.0 and Python 2, score 6
(12 bytes, 2 versions)
print(3/2*2)
Try it Online:
Python 2
Python 3
Relies on the fact that Python 3+ uses float division by ...
124
votes
Paint Starry Night, objectively, in 1kB of code
Mathematica, score 14125.71333
"a.png"~Export~ConstantImage[{28,34,41}/95,{386,320}]
Saves this image:
to a.png.
122
votes
Without using numbers, get the highest salary you can. But don't exaggerate!
bash, $127127
x;echo \$$?$?
Try it online!
Since the x command doesn't exist, it errors and sets the exit code to ...
119
votes
When was this language released?
15 years, Python
Versions: 0.9.1, 2.0.0, 2.2.0, 2.2.2, 2.5.0, 2.5.1, 3.0.0, 3.1.0, 3.1.3, 3.2.1, 3.3.0, 3.3.3, 3.4.0, 3.5.0 and 3.6.0a4. Versions not linked can be found on the downloads page.
The ...
112
votes
Paint Starry Night, objectively, in 1kB of code
Java, 7399.80678201
This reminded me of a project I had in my numerical computations class a few semesters back, which was to draw a silhouette of Mount Everest using polynomial interpolation. That ...
109
votes
105
votes
Accepted
Build a Markdown bomb
Blockquotes, 137,469/256 = 536.99
6,908 characters, 511 new lines, 130,050 spaces
Markdown sure handles nested block-quotes oddly. Each > character gets turned ...
102
votes
Write Moby Dick, approximately
Node.js, 2*224 + 524279 = 524727
Please refer to the change log at the end of this post for score updates.
A function taking and returning a byte.
...
100
votes
Accepted
96
votes
Fewest (distinct) characters for Turing Completeness
Haskell, 4 chars
()=;
With ()= we are able to define S, K and I. The definitions must be separated by either ...
95
votes
Paint Starry Night, objectively, in 1kB of code
Python3.4+, 4697.26
I used the same method as in my ImageMagick answer, but with the following parameters:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
code-challenge × 899math × 74
restricted-source × 71
string × 70
optimization × 60
source-layout × 48
number × 46
quine × 42
polyglot × 38
compression × 38
kolmogorov-complexity × 36
game × 33
sequence × 31
test-battery × 31
code-golf × 30
busy-beaver × 29
code-generation × 27
primes × 26
ascii-art × 24
cops-and-robbers × 24
combinatorics × 21
graphical-output × 21
fastest-code × 21
sorting × 19
geometry × 17