Skip to main content
Share Your Experience: Take the 2024 Developer Survey
154 votes

Write Moby Dick, approximately

///, 2*1 + 1020874 = 1020876 Prints a space.
daniero's user avatar
  • 18.6k
141 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 ...
Anders Kaseorg's user avatar
110 votes

Write Moby Dick, approximately

Perl, 2·70525 + 326508 = 467558 Predictor ...
A. Rex's user avatar
  • 2,599
103 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. ...
Arnauld's user avatar
  • 193k
79 votes

Write Moby Dick, approximately

Python 3, 2·267 + 510193 = 510727 Predictor ...
Anders Kaseorg's user avatar
57 votes

Write Moby Dick, approximately

Python 3, 2*279+592920=593478 2*250 + 592467 = 592967 2 * 271 + 592084 = 592626 2 * 278 + 592059 = 592615 2 * 285 + 586660 = 587230 2 * 320 + 585161 = 585801 2 * 339 + 585050 = 585728 ...
Michael Homer's user avatar
49 votes

Paint Starry Night, objectively, in 1kB of code

Python 2, 4749.88 1018 bytes Everybody has probably forgotten about this problem by now, except me.... This problem interested me far too much, especially as it quickly became apparent that approaches ...
Strawdog's user avatar
  • 691
30 votes

Paint Starry Night, objectively, in 1kB of code

Starry, 11428.1894502 10904.3079277 10874.1307958 Starry might not be the best language to do this however it is certainly the most fitting. You can Try It online however it seems that the output is ...
Wheat Wizard's user avatar
  • 98.8k
27 votes

Reverse Zip Bomb

FFmpeg -crf 0 -preset ultrafast -tune film -vf format=yuv444p, score 198.7425 Input is a 65535 × 1 PBM file: ...
Dingus's user avatar
  • 11.2k
26 votes
Accepted

Converting "0xUsernames"

05AB1E, 4 bytes D1ìH Explanation ...
Osable's user avatar
  • 1,338
25 votes

Write Moby Dick, approximately

C++, score: 2*132 + 865821 = 866085 Thanks to @Quentin for saving 217 bytes! ...
Steadybox's user avatar
  • 16.5k
23 votes

Reverse Zip Bomb

JPEG (4:4:4 Chroma subsampling), ~1584.35 Asking Redwolf about what the input file type for a PNG is, we hear that it's Any file you can get an implementation of a PNG converting program to accept. ...
Ethan Chapman's user avatar
22 votes

Write Moby Dick, approximately

Python, 2*516 + 521122 = 522154 Algorithm: Yet another python submission, this algorithm calculates the most likely next letter looking at sequences of length 1,...,l. The sum of probabilities is ...
user2699's user avatar
  • 648
20 votes

Write Moby Dick, approximately

C++, 2·62829 + 318786 = 444444 To run this program, you need this file here, which must be named C. The program uses the same combination of Markov models as in ...
A. Rex's user avatar
  • 2,599
19 votes

Converting "0xUsernames"

JavaScript (ES6), 15 bytes s=>'0x1'+s-0||s How it works '0x1'+s converts the input into a literal hexadecimal string with ...
ETHproductions's user avatar
18 votes

Send a cosmic call

GIF, 27386 bytes Here are the pages of the original transmission sliced into individual GIF frames, it turned out not to be as small as 1 PNG of all of them :(
innovati's user avatar
  • 281
17 votes
Accepted

Palindrome Compression

JavaScript (ES6), 3.143 (81 bytes saved, 664 byte program) ...
ETHproductions's user avatar
17 votes

Golf a golf chart

x86-16 machine code, 47 42 bytes ...
640KB's user avatar
  • 11.9k
16 votes

Paint Starry Night, objectively, in 1kB of code

Python 2 (no built-in compression), score 4497.730 This uses the same manually-decoded 16-color image approach as my previous answer, but this time I actually applied a gradient-descent optimization ...
nneonneo's user avatar
  • 12.3k
16 votes

Simple State Sales Tax Calculator

Mathematica, 112 103 77 76 66 bytes Mathematica has a builtin for everything ...
JungHwan Min's user avatar
  • 13.8k
16 votes

Somewhere On The Tube ...But On Which Lines?

ES6, Node.js / Chrome, 989 977 931 892 889 887 bytes ...
Arnauld's user avatar
  • 193k
16 votes
Accepted

Somewhere On The Tube ...But On Which Lines?

Mathematica 8+, 266 bytes ...
hftf's user avatar
  • 466
16 votes

Write Moby Dick, approximately

sh+bzip2, 2*364106 = 728212 2*381249 + 0 = 762498 dd if=$0 bs=1 skip=49|bunzip2&exec cat>/dev/null followed by the bzip2-compressed whale2.txt with the ...
Joshua's user avatar
  • 3,454
16 votes

What's my TIO uniqueness?

JavaScript (Node.js),  819  779 bytes Returns 0 for undefined TIO uniqueness. ...
Arnauld's user avatar
  • 193k
15 votes

.-...--..---.-...--..... the red-nosed reindeer

Python 3, 356, 302, 299 bytes ...
steviestickman's user avatar
15 votes

Reverse Zip Bomb

BSD Compress, 1.4746 Unlike gzip, compress doesn't check whether it would be cheaper to store an uncompressed block, so its worst case performance is much worse ...
water_ghosts's user avatar
  • 1,596
13 votes

Write Moby Dick, approximately

Python 3, 879766 F=[[0]*123for _ in range(123)] P=32 def f(C):global P;C=ord(C);F[P][C]+=1;P=C;return chr(max(enumerate(F[C]),key=lambda x:x[1])[0]) Try it ...
DELETE_ME's user avatar
  • 17.3k
13 votes

Write Moby Dick, approximately

C#, 378*2 + 569279 = 570035 ...
Charlie's user avatar
  • 12.9k
13 votes
Accepted

Bracket Expansion!

Gema, 17 characters [#]?=@repeat{?;#} Sample run: ...
manatwork's user avatar
  • 20.2k

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