228 votes

Output with the same length as the code

C (modern Linux), 19 bytes main(){puts('s');} When compiled and run, this prints: Segmentation fault
MD XF's user avatar
  • 13.8k
205 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 ...
Martin Ender's user avatar
201 votes

Print the last, middle and first character of your code

JavaScript, 9 7 bytes N=>a=-N Outputs: NaN Try it online!
Oliver's user avatar
  • 7,852
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 ...
Doorknob's user avatar
  • 71.4k
95 votes

Output with the same length as the code

Excel, 11 bytes Norwegian language version: =SMÅ(13^9) English language version (12 bytes): =LOWER(17^9) Generates n-...
pajonk's user avatar
  • 15.7k
76 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

Pyth, 10 T First attempt at using Pyth. Having had the question clarified, it seems 10 will be the smallest number. In Pyth the letter T starts off as the number ...
Tom Carpenter's user avatar
75 votes

Without using numbers, get the highest salary you can. But don't exaggerate!

Java 8, $131,199.00 (15 bytes) v->"$"+'e'*'ԓ' Try it online. Explanation: ...
Kevin Cruijssen's user avatar
73 votes

Am I being run backwards?

Python 3, no comments or string literals, 106 bytes x=quit y=x.__class__ y.__add__=print y.__pos__=x x+x++x+x x=__sop__.y tnirp=__dda__.y __ssalc__.x=y tixe=x I've ...
user2357112's user avatar
  • 1,660
68 votes

Output with the same length as the code

Bash (builtins only), 8 bytes {e,,}cho Prints cho cho and a newline.
Anders Kaseorg's user avatar
67 votes

Eww, those bytes are gross

Japt -P, score: 255 (2 bytes) ff f => filter, second f => everything but 'f' Try ...
Luis felipe De jesus Munoz's user avatar
67 votes

Create a program that prints the number of characters it has, in words

Poetic, 400 bytes ...
JosiahRyanW's user avatar
  • 4,201
62 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

bc, 10 A Luckily, bc prints the result of the last expression by default. A is interpreted ...
Digital Trauma's user avatar
62 votes

Output with the same length as the code

Labyrinth, 4 bytes !!>@ Try it online! Prints 0000 Explanation ...
Martin Ender's user avatar
59 votes

Output your Score!

JavaScript, 19 bytes Octal was invented to serve two purposes: setting file permissions in Linux answering this challenge alert(023+' bytes') Try it ...
Arnauld's user avatar
  • 191k
51 votes

Without using numbers, get the highest salary you can. But don't exaggerate!

CJam, (5 bytes) $294204.018... '$PB# Try it online! Explanation: I derived it from Dennis' answer, but looked for combinations of numbers which would yield a ...
maxb's user avatar
  • 6,837
50 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

Fishing, score 7,958,661,109,946,400,884,391,936 1,208,925,819,614,629,174,706,176 Is this the highest non-trivial-looking score ever in a minimization challenge? (Even though it has been golfed by 84....
Arcturus's user avatar
  • 7,347
48 votes

Without using numbers, get the highest salary you can. But don't exaggerate!

CJam, 5 bytes, $262'144 '$YI# Try it online! How it works ...
Dennis's user avatar
  • 210k
44 votes

Output with the same length as the code

Retina, 2 bytes no Try it online! Prints 0 and a linefeed. There are a lot of 2-byte solutions, but I believe this is ...
Martin Ender's user avatar
42 votes

Without using numbers, get the highest salary you can. But don't exaggerate!

R, 20 bytes, $103540.9 T=pi+pi;cat("$",T^T) Try it online! The max for 20 bytes is ...
Giuseppe's user avatar
  • 28.4k
40 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

MATLAB, 1,000,000,000 (109) Also works with Octave disp(1e9) Never going to beat the esolangs, but just for fun, this is the smallest MATLAB/Octave will be able to ...
Tom Carpenter's user avatar
38 votes

Output your Score!

Perl 5, 16 bytes There are many other ways to get 16 but this one is mine say afpbytes^PPP Try it online!
Ton Hospel's user avatar
  • 14.8k
38 votes

Eww, those bytes are gross

Python 2, score 249, 1732 bytes ...
Lynn's user avatar
  • 68.2k
38 votes

Create a program that prints the number of characters it has, in words

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'...
Nat's user avatar
  • 749
37 votes

Output with the same length as the code

Mathematica, 2 bytes 4! factorial 24
ZaMoC's user avatar
  • 24.8k
36 votes

Output your Score!

7, 23 characters, 9 bytes 54340045141332401057403 Try it online! This is a fairly hard challenge in a language that consists entirely of digits, but I managed ...
35 votes

Create a program that prints the number of characters it has, in words

brainfuck, 40 bytes +[+++++>++<]>.+++++++++.+++.++.+++++.+++ Try it online! The last three characters don't actually do anything useful, but it's ...
Level River St's user avatar
35 votes

Internal Truth Machine

Python 3, 29 bytes or~print(0) while 1:print(1) A full program, which if prefixed with 0 will print ...
Jonathan Allan's user avatar
34 votes

Without using numbers, get the highest salary you can. But don't exaggerate!

GS2, (5 bytes) $292,929 •$☺↔A A full program (shown here using code-page 437). (Maximum achievable salary @ 5 bytes is $299069.75) Try it online! Builds upon ...
Jonathan Allan's user avatar
34 votes

Source Code Byte Frequency

JavaScript (ES6), 40 bytes All used characters appear exactly twice. Therefore, this returns either 0 or 2/40 = 0.05. ...
Arnauld's user avatar
  • 191k
33 votes

Source Code Byte Frequency

Retina 0.8.2, 1 byte 1 Try it online! Link includes... test cases? But there's not much to test really. The program counts the number of ...
Neil's user avatar
  • 169k

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