Hot answers tagged

194 votes

Print the last, middle and first character of your code

JavaScript, 9 7 bytes N=>a=-N Outputs: NaN Try it online!
user avatar
  • 7,608
144 votes

Make an error quine!

Windows Command Prompt & was unexpected at this time.
user avatar
131 votes
Accepted

Make an error quine!

Ed (1 byte) All the other solutions thus far are long and ugly. I suppose that is because of the nature of most error messages. But a good error message is elegant in its simplicity. For that, look ...
user avatar
  • 2,031
125 votes

Golf you a quine for great good!

Hexagony, side-length 17 16, 816 705 bytes ...
user avatar
108 votes

Print a Negative of your Code

Perl, 7×7 (42 non-spaces) for$i( 1..56 ) {$_= $i %8? $i% 7? $":7 : $/;1; print} Output: ...
user avatar
  • 19.6k
105 votes
Accepted

Program that creates larger versions of itself (quine-variant)

GS2 (8636bd8e), 0 bytes This prints a single newline, which prints two newlines, which prints three newlines, et cetera. Try it online!
user avatar
  • 206k
86 votes

Make an error quine!

CoffeeScript, syntactically valid As tested on their website using Chrome or Firefox. ReferenceError: defined is not defined You can replace ...
user avatar
77 votes

Golf you a quine for great good!

Brain-Flak, 9.8e580 1.3e562 9.3e516 12818 11024 4452 4332 4240 4200 4180 3852 3656 3616 3540 2485 + 3 = 2488 bytes Now fits in the observable universe! ...
user avatar
  • 84.4k
77 votes

Golf you a quine for great good!

Hexagony, side length 11, 314 bytes ...
user avatar
  • 16.8k
77 votes

Print a Negative of your Code

CJam, 4X4 (12 10 non-spaces) 6, SS + * 4/ N* Output: 0 1 2 3 4 5 Previous version with 12 non-spaces: ...
user avatar
  • 26.4k
71 votes

Golf you a quine for great good!

Prelude, 5157 4514 2348 1761 1537 664 569 535 423 241 214 184 178 175 169 148 142 136 133 bytes Thanks to Sp3000 for saving 3 bytes. This is rather long... (okay, it's still long ... at least it's ...
user avatar
66 votes

A "cheating" quine

Zsh, 4 bytes <$0 The Z shell has feline functionalities built in. The fourth character is a linefeed. Try it online! The code does not depend in any way on ...
user avatar
  • 206k
65 votes

Make an error quine!

Windows .EXE, 248 bytes ...
user avatar
  • 13.2k
63 votes

Write a Quine in Plain English

><>, 25 words + (22 + 11 + 11) extra = 57 49 Oh god, my brain. ...
user avatar
  • 60.9k
55 votes

Write a program that sees the New Year in itself

awk, 4 bytes The structure of an awk program is pattern { action }. If pattern evaluates to true, { action } is performed. If { action } is omitted, the default is ...
user avatar
53 votes

Make an error quine!

Python Spyder Well, a rather trivial solution for the Spyder IDE is to raise a SyntaxError. Code and identical output: ...
user avatar
  • 5,517
51 votes

Print a Negative of your Code

Marbelous - 16x16 ....@0..@1.... @3..0A08..@2 .. /\--....>1 ..Hp ..@2..\\ =0@3.. ss..// --\\\\.. @0/\ @1/\Hp..!! :s #the-cake-is 2020#a-pie/lie Test ...
user avatar
  • 9,165
50 votes

A "cheating" quine

Bash, 6 bytes cat $0 Basically.
user avatar
  • 11.1k
49 votes

Golf you a quine for great good!

Vim, 11 bytes q"iq"qP<Esc>hqP iq"qP<Esc>: Manually insert a duplicate of the text that has to be outside the ...
user avatar
  • 2,611
48 votes

Golf you a quine for great good!

Javascript ES6 - 21 bytes $=_=>`$=${$};$()`;$() I call this quine "The Bling Quine." Sometimes, you gotta golf in style.
user avatar
46 votes

Make an error quine!

><> - 25 Bytes something smells fishy... In Fish, any bad instruction outputs the error: "something smells fishy...". Since s is not a valid command, it ...
user avatar
  • 2,215
46 votes

Stack Exchange Vote Counter

jQuery + JavaScript, 85 bytes $.get("//api.stackexchange.com/posts/82610?site=codegolf",d=>alert(d.items[0].score)) ...
user avatar
  • 2,104
45 votes

Golf you a quine for great good!

Cubix, 20 bytes 3434Qu$v@!<"OOw\o;/" Almost got the \o/... Net: ...
user avatar
  • 4,743
45 votes

Golf you a quine for great good!

Hexagony, side length 15 14 13 12, 616 533 456 383 bytes After several days of careful golfing, rearranging loops and starting over, I've finally managed to get it down to a side 12 hexagon. ...
user avatar
  • 45.6k
42 votes

Radiation Hardened Quine

Befunge-98, 884, n = 14, score ≈ 2.636 ...
user avatar
41 votes

Make an error quine!

Chicken Error on line 1: expected 'chicken'
user avatar
  • 206k
40 votes

Make an error quine!

Whitespace First I thought this is clearly impossible. But actually it is trivial as well. -.- Fail: Input.hs:108: Non-exhaustive patterns in function parseNum' ...
user avatar
  • 5,517
40 votes

Fastest Mini-Flak Quine

Mini-Flak, 6851113 cycles The program (literally) I know most people aren't likely expecting a Mini-Flak quine to be using unprintable characters and even multi-byte characters (making the encoding ...
user avatar
40 votes
Accepted

Mutually Exclusive Quines

><>, Score: 41+41 = 82 Edit: both contained a 3. Fixed 'd3*}>a!o-!<<8:5@lI55>@z:5ll55>>q:>|q::|, and ...
user avatar
  • 45.6k

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