# Golf you a quine for great good!

Using your language of choice, golf a quine.

A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output.

No cheating -- that means that you can't just read the source file and print it. Also, in many languages, an empty file is also a quine: that isn't considered a legit quine either.

No error quines -- there is already a separate challenge for error quines.

Points for:

• Smallest code (in bytes)
• Most obfuscated/obscure solution
• Using esoteric/obscure languages
• Successfully using languages that are difficult to golf in

The following Stack Snippet can be used to get a quick view of the current score in each language, and thus to know which languages have existing answers and what sort of target you have to beat:

var QUESTION_ID=69;
var OVERRIDE_USER=98;

getAnswers();var SCORE_REG=(function(){var headerTag=String.raw h\d
var score=String.raw \-?\d+\.?\d*
var normalText=String.raw [^\n<>]*
var strikethrough=String.raw <s>${normalText}</s>|<strike>${normalText}</strike>|<del>${normalText}</del> var noDigitText=String.raw [^\n\d<>]* var htmlTag=String.raw <[^\n<>]+> return new RegExp(String.raw <${headerTag}>+String.raw \s*([^\n,]*[^\s,]),.*?+String.raw (${score})+String.raw (?=+String.raw ${noDigitText}+String.raw (?:(?:${strikethrough}|${htmlTag})${noDigitText})*+String.raw </${headerTag}>+String.raw ))})();var OVERRIDE_REG=/^Override\s*header:\s*/i;function getAuthorName(a){return a.owner.display_name}
body='<h1>'+c.body.replace(OVERRIDE_REG,'')+'</h1>'});var match=body.match(SCORE_REG);if(match)
if(languages.hasOwnProperty(lang))
langs.push(languages[lang]);langs.sort(function(a,b){if(a.uniq>b.uniq)return 1;if(a.uniq<b.uniq)return-1;return 0});for(var i=0;i<langs.length;++i)
{var language=jQuery("#language-template").html();var lang=langs[i];language=language.replace("{{LANGUAGE}}",lang.lang).replace("{{NAME}}",lang.user).replace("{{SIZE}}",lang.size).replace("{{LINK}}",lang.link);language=jQuery(language);jQuery("#languages").append(language)}}
body{text-align:left!important}#answer-list{padding:10px;float:left}#language-list{padding:10px;float:left}table thead{font-weight:700}table td{padding:5px}
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/codegolf/primary.css?v=f52df912b654"> <div id="language-list"> <h2>Winners by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr></thead> <tbody id="languages"> </tbody> </table> </div><div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr></thead> <tbody id="answers"> </tbody> </table> </div><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td><a href="{{LINK}}">{{SIZE}}</a></td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td><a href="{{LINK}}">{{SIZE}}</a></td></tr></tbody> </table> 

• Do you not mean, "Golf you a quine for greater good!"? – Mateen Ulhaq May 3 '11 at 2:49
• @muntoo it's a play on "Learn you a Haskell for Great Good". – Rafe Kettler May 3 '11 at 2:52

# DipDup, 6 bytes

[_:]_:


Try it online!

### Explanation

[_:]        push this list
_       duplicate
:      cons


# Gol><>, 6 5 bytes

sP#H"


Try it online!

Credit to Jo King.

### How it works

sP#H"

s      +16
P     +1
#    Reverse direction
P     +1
s      +16
"  Start string literal
sP#H"  Push H, #, P, s and end string literal
H   Print everything on the stack from the top, and halt
The printed chars are s, P, #, H, 34 (")


## Previous solution, 6 bytes

"r2ssH


Try it online!

### How it works

"r2ssH  Push the string "r2ssH" to stack, "r" being at the bottom
"       Close the literal
r      Reverse the stack
2ss   Push 34 (")
H  Print all content of the stack from top to bottom as chars, and halt


There were a couple of alternatives to consider:

• S" prints the string right away (instead of pushing to stack), but then it gets harder to handle ".
• " is an alternative way to push 34 to the stack, but the string literal also treats " as escaped " which is not desirable.
• An interesting 8 byter using S" – Jo King Nov 28 '18 at 0:34

# MATL, 12 bytes

'&DtU'
&DtU



(the code has a trailing newline).

Try it online!

### Explanation

'&DtU'    % Push this string
&D        % String representation (adds quote marks)
t         % Duplicate
U         % Evaluate (removes quote marks)
% Implicitly display each string followed by a newline

• I take it that it would not be shorter to do &D after t, avoiding U? – ETHproductions Oct 23 '16 at 2:56
• @ETHproductions Not sure if I understand your suggestion correctly. I think &D needs to be after t because the second part of the displayed output needs to be without quotes – Luis Mendo Oct 23 '16 at 3:00
• I mean that unevaling the string &D and then re-evaling U seems a little redundant. It's probably not shorter any other way, though, as you would likely need to use stack manipulation. – ETHproductions Oct 23 '16 at 3:03
• @ETHproductions Oh, now I see what you mean: this, right? (w is swap). As you say, it's not shorter unfortunately – Luis Mendo Oct 23 '16 at 3:08
• Yeah, that's what I meant, and that's what I figured – ETHproductions Oct 23 '16 at 3:09

# Noether, 30 bytes

"~a34BPaP34BPaP"~a34BPaP34BPaP


Try it online!

Basically, this works by pushing the string and storing it in the variable a, printing quotation marks (34B where B pushes the character with ASCII code 34) then printing a twice.

• @OMᗺ That's only the Python/tio.run interpreter (which has a few bugs) . On the JS interpreter, there is no newline. – Beta Decay Aug 11 '18 at 13:59
• Alright, that's the one on TIO so I tried with that sorry! Nvm, in that case. – ბიმო Aug 11 '18 at 14:01

# J, 27 bytes

echo(,quote)'echo(,quote)'



Try it online!

It's surprising that there's no proper J quine submission yet.

### How it works

echo(,quote)'echo(,quote)'
'echo(,quote)'  The string s
quote                 Wrap s with single quotes
,                      Concat s to the above; (f g)x is equal to x f g x
echo                        Explicitly print the result


echo is needed because the result of a non-REPL line is not printed.

# Flobnar, 94 bytes

	9	f;	/*+{ ;{?06	0/9^[]={o)	*4_;=	9);];36
:
g<
0+,|!<|@17
10:_\^>|p*
+5<>
:*<  ^ <47!!!


Try it online!

There's some debate over whether the get instruction counts as reading the source code, but in this case, I'm not using it to read the executed code, but a data array on the first line (except for specifically reusing just the 9 character).

This reads and prints the data section, then reads and prints each character incremented by one to represent the code section.

### Explanation:

.
..
.....<|@..   Start at the @ going left
..........   We use the | to evaluate the code beyond it and come back here
.....
.............

:
g<
0+,|!<....   Print the character on the first line at position n plus 0
.0........   Then go down from the |
.....
.............

.9
.
..
...|!.....
..:_......   If n > 5*9 then go left at the _ and return !n
.5<.
.*<..........

.
..
...|!<....   Else go right and increment n
1.._\^....   And loop again
+...>
:............

.
..           Once we've ended the loop we come back to the original | going down
.....<|.17   And we put a 1 at the (1,4) position and repeat the main code again
.1....>|p*   This time adding 1 to each character
.....
.....^ <47...


# Runic Enchantments, 7 6 bytes

"'<~@>


Try it online!

Huh, a multiple pointer quine actually works pretty well.

## Explanation:

"'<~@>
<  >   Start pointers going left and right
"'<      Left pointer pushes " to their stack
@    And terminate the IP, printing the stack (")
>   Right pointer wraps around
"        Start string literal
'<~@>   Push as string
"        End string literal
'<~     Push the < character, but pop it
@    Terminate the IP, printing the stack ('<~@>)
End the program as there are no IPs left


Edit: I realised you can replicate this with only one pointer

'<~@|"


Try it online!

• Ha, didn't even see prior to posting this and you already beat me. Very clever use of the multiple IP feature. – Draco18s no longer trusts SE Oct 1 '18 at 18:22

# Symbolic Python, 30 bytes

_="_='_='+_+';__(_)'";__(_)



Try it online!

Yet another eval quine. The lack of being able to do %r in Symbolic Python is made up for Python 2's backticks, which are an alias for the repr function.

### Explanation:

_="                   ";       # Assign the string to the _ variable
__(_)  # Eval the string
_=                          # Assign to the _ variable
'_='                      # The initial _=
+_                  # The Python representation of the string
+';__(_)'         # And the final evaling part
# Implicitly output the contents of _


An alternative that doesn't use the rather long eval function comes to 31 bytes, but I actually like it more.

_=';_="_="+_+_';_="_="+_+_



Try it online!

# Gol><>, 87 6 bytes

"r2ssH


Hopefully this is not a previously used quine, I was messing around for another challenge having to do with quines, and I ended up creating this!

2nd program (the most recent), 7 bytes

":P}rH!


Courtesy of JoKing, who knocked an entire byte off the original!

1st program (the original), 8 bytes

":P&r&H!


I know this isn't the smallest, but it is my first quine in Gol><> (I did it entirely on my own!). Link to the interpreter in the title!

Try it online!

Code Breakdown

":P&r&H!


First, the " command collects all of the chars and rewraps around the program

Then the : command doubles the last symbol in the program, the !

Then this is incremented, and saved by the register

The stack is then reversed and the value is put back

Then the entire stack is outputted as characters and then the program halts

• you can use } to rotate the stack instead of &, Try it online! – Jo King Feb 5 '19 at 23:41
• @JoKing wow, that cuts one byte off, thanks, is it okay if I put that as the answer (with credit to you of course) – KrystosTheOverlord Feb 5 '19 at 23:53
• of course you can. PPCG is a lot about cooperative answers rather than competition and it's nice to help new users figure out shortcuts in their chosen language(s) – Jo King Feb 5 '19 at 23:58
• @JoKing Thanks, credits are also to you! Are you a Gol><> coder, if you have any experience, do you have tips, I really like it! – KrystosTheOverlord Feb 6 '19 at 0:16
• there's not really much Gol><> specific advice, but I would recommend getting familiar with its parent language, ><>, first. – Jo King Feb 6 '19 at 4:36

# Attache, 695753 41 bytes

Printf[s:="Printf[s:=%s,Repr@s]",Repr@s]



Try it online! Surprised I didn't think of this sooner.

Print!Format[x:="Print!Format[x:=%s,Repr!x]",Repr!x]



In the end, the standard quine framework was most efficient :( . The 57-byter below is significantly more interesting.

Try it online!

BUT I found a cooler one, also for 53 bytes!

Print!Join[q:=["Print!Join[q:=", ",Repr!q]"],Repr!q]



Try it online!

## 57 bytes

Print!Format<~_,Repr!_~>["Print!Format<~_,Repr!_~>[%s]"]



This uses sneaky curried functions with blanks. When a function is called using f<~...~> syntax, it denotes a curried function. _1 represents the first curried argument, _2 the second, etc. _ is an alias for _1, so this saves us some bytes without duplicating our string.

Try it online!

## 69 bytes

Save["Save[%c%s%c]Print[Format[_,34,_,34]]"]Print[Format[_,34,_,34]]



Try it online! The trailing newline is significant.

## Explanation

Save updates the abstract variable _ with the string

"Save[%c%s%c]Print[Format[_,34,_,34]]"


Then, this string is formatted with the arguments _, 34, _, and 34. This prints the string, the character 34 (a quote), and then those two again, which is the program.

# Fueue, 411391381 376 bytes

(5(2(7(1(8(0(0(4(0(2(5(2(4(9(9(0(4(9(0(2(4(2(8(2(1(6(9(0(6(2(9(5(9(5(9(0(1(1(4(0(3(2(3(1(3(1(9(1(8(1(1(1(0(1(4(0(1(2(3(1(3(1(7(1(6(1(9(0(4(9(9(5(8(2(4(9(9(0(4(9(4(9(1(6(9(0(4(9(1(0(1(6(4(9(9(5(4(9(9(0(4(9(4(9(1(6(9(0(4(9(6(2(9(5(9(0(3(1(3(1(4(9(1(1(0(2(6(1(3(1(3(1(0(2(4(2(9(0(4(9(6(2(1(6(4(9(1(6[10(:91(H49~)~48<]):[[)+$7--32+*$5--10)~[<~)~~])~!]~[~)~~])~:[)--~+40--48)~:]~]



Try it online!

Basic idea (outdated):

(7(1(9(5(1(1(8(0...                  Data.
[9!(91[+(H~)]57<33]                  Begin the second pass and end the program on second pass.
):[                                  Duplicate and evaluate the block.
[)+$7--32+*$5--10)~[<~)~~])~!]   On the second pass, print b*10+a+32 for each two digits a, b.
)()[~)~~]~:~<                    Copy a digit and evaluate the next line between copies.
[)----40+--~)48~:~~]             Print "("+digit and duplicate and evaluate the whole block on the next digit.
]


# Golunar, 951 bytes (394.25 bytes as an integer value)

19370043316195921194914466480856680152267470323963447024756684537596068724128114478400203537500358028693578705195025299449504112473728653294217406768139954805008550643064305270958743186186490023003785512463398359429631224818444304976679217098389450981926661910005004089131207223929032173888419619738722341444212432611576207643452266161684471788295034889655803444137372629364500165719019777515305922257911642994836581634099155833200157295629218533465854143898419293035289733581625252699105530843807023973345521520887128012736565874423200184723012755626596238647926406709693583878890472621210970350861368171259284533764490596207310864352873729240842719608391238098412446205860013948766486129442046252306334230243913196704614648889659870117069927719874852423159076941049170045933025772364248625729725500550726133134993128102614696728457139079375133324957922066270555810085574853273966267981675757808791933974619299446035844180580831907739236954600685575


Golunar is the decimal representation of the number of zeros that a Unary code would need. It translates to this brainfuck code:

->+>+>+>>>>>>>>>>>>+>+>>>+>+>+>+>+>>>>>>+>>>+>>>+>>>+>>>+>>>+>>+>>>>+>+>>+>>>+>>>+>>>+>>>+>>>+>>>+>>>+>+>>>>>>>+>+>+>+>>>+>>>>+>+>+>>>+>+>+>>+>>+>>>+>+>+>+>+>+>>>>>+>+>+>>>+>+>+>>>>>>>>+>+>>>>>+>>+>>>+>>>+>+>>+>+>+>>+>>+>>>+>+>>>+>+>>+>+>+>+>>+>>>+>+>+>>>>>+>+>+>>>+>+>+>>>>>>>>+>+>>>>>>>+>+>+>+>>>+>>>>+>>+>+>+>+>+>>>>>>+>>+>>>>+>+>>>>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>>+>>>>+>>>+>>>>>>+>+>+>+>>>>>>+>>>+>>+>+>+>+>+>>>+>+>+>>>+>>>+>+>>+>+>>+>+>>+>+>>+>+>>+>+>>+>+>>+>+>>>>>>+>+>+>+>>+>>>>+>>>+>>>>>>+>+>+>+>>+>>>>+>>>+>>>>>>+>+>+>+>>+>>>>+>>>+>>>>>>+>+>+>+>>+>>>>+>>>+>>>>>>+>+>+>>>+>+>>>+>+>+>>>+>+>>+>+>+>>+>>+>>>+>+>>>+>+>>+>+>>+>>>+>>>>>>+>>>+>>>>>>+>>>+>>+>+>+>>>>>+>+>+>+>>>>>>+>>>>>>+>>+>+>+>>+>>+>>>+>>>+>+>+>+>>>>+>+>+>+>>+>>>+>>>+>+>+>>>>>+>+>>>>>>>+>+>+>+>+>>+>>>+>+>+>+>>>>+>+>>+>>>>>>+>>>+>>>>>>+>>+>+>+>>>>>+>+>>+>>>>>>>>>+>+>>+>+>>+>+[[>>+[>]+>++>+[<]<-]>>[>]<<-[<]<<+]+>+>-[>]++>++>++[[-<+]-<[-<[>++<-[>++<-[>++<-[>++<-[>--------<<[-]++>-[>++<-]]]]]]>[<+>-]+<<]>>[>>]<[>]<-[[-<+]-<<+>[>>]<[>]]<+]<[<<]>>[+++++++[<++++++>-]<.>>>]


Try it online!

I couldn't find an online Golunar interpreter, but you can use this Golunar to brainfuck converter to get the brainfuck code and then execute it.

This code is inspired by a brainfuck quine of Eric Bosman and Daniel B Cristofani. First it reads a list of bits that represent the bit-codes of the code part, then it builds up a list of bits that represent the ">" and "+" characters needed to print the first list. Those lists are merged and hold the binary value of the Golunar code. In the last step, the decimal value of the binary number are computed and printed.

[
tape: [decimal digits], value start marker/VS(-1)(starting cell), [input bits], between binary marker/BB(0), [binary output data]

input bits are 0 or 1, output bits are in reversed order and have the values 1(used) or 2(used and set)
input must be given in reversed order

decimal digits consist of two cells per value (value, digit used marker(DU)(1))

bit values:
> 000
< 001
+ 010
- 011
. 100
, 101
[ 110
] 111

]

-                       set VS

set input bits
>+>+>+>>>>>>>>>>>>+>+>>>+>+>+>+>+>>>>>>+>>>+>>>+>>>+>>>+>>>+>>+>>>>+>+>>+>>>+>>>+>>>+>>>+>>>+>>>+>>>
+>+>>>>>>>+>+>+>+>>>+>>>>+>+>+>>>+>+>+>>+>>+>>>+>+>+>+>+>+>>>>>+>+>+>>>+>+>+>>>>>>>>+>+>>>>>+>>+>>>+
>>>+>+>>+>+>+>>+>>+>>>+>+>>>+>+>>+>+>+>+>>+>>>+>+>+>>>>>+>+>+>>>+>+>+>>>>>>>>+>+>>>>>>>+>+>+>+>>>+>>
>>+>>+>+>+>+>+>>>>>>+>>+>>>>+>+>>>>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>>+>>>>+>>>+>>>>>>+>+>+>+>
>>>>>+>>>+>>+>+>+>+>+>>>+>+>+>>>+>>>+>+>>+>+>>+>+>>+>+>>+>+>>+>+>>+>+>>+>+>>>>>>+>+>+>+>>+>>>>+>>>+>
>>>>>+>+>+>+>>+>>>>+>>>+>>>>>>+>+>+>+>>+>>>>+>>>+>>>>>>+>+>+>+>>+>>>>+>>>+>>>>>>+>+>+>>>+>+>>>+>+>+>
>>+>+>>+>+>+>>+>>+>>>+>+>>>+>+>>+>+>>+>>>+>>>>>>+>>>+>>>>>>+>>>+>>+>+>+>>>>>+>+>+>+>>>>>>+>>>>>>+>>+
>+>+>>+>>+>>>+>>>+>+>+>+>>>>+>+>+>+>>+>>>+>>>+>+>+>>>>>+>+>>>>>>>+>+>+>+>+>>+>>>+>+>+>+>>>>+>+>>+>>>
>>>+>>>+>>>>>>+>>+>+>+>>>>>+>+>>+>>>>>>>>>+>+>>+>+>>+>

list rebuilding loop: append bits for "greater than" and plus symbols to the right of input data
+[                      for each input bit
[                     while bit is greater than 0
>>+                 copy bit to out data
[>]+>++>+           append bits for plus (used markers plus 010)
[<]<-               decrement in value
]
>>[>]<<-              change most right character from plus to gt (010 to 000)
<<+                   repeat if not on VS
]
+>+>-                   prepare binary to decimal routine: set VS DU and first 1

[>]++>++>+              append bits for minus (011)

binary to decimal loop: use "double and add algorithm" to calculate the digits of the decimal value
+[                      if not on VS then
[-<+]-                restore current bit value and go to VS
<                     go to first DU
[                 digit doubling loop
-<                  remove DU and go to corresponding digit
[
>++<-             decrement current value and add 2 to temp value four times
[
>++<-
[
>++<-
[
>++<-
[                   if value was greater than 4 then
>---- ----        subtract 8 from temp
<<[-]++           set next digit temp = 2 (DU plus 1)
>-                decrement current digit
[>++<-]           set temp = remaining value * 2
]
]
]
]
]
>[<+>-]             set current digit = temp
+                   set DU
<<                  go to next digit
]                 end of digit doubling loop
>>[>>]<[>]<           go to current bit
-[                    if bit is 2 (used plus 1)
[-<+]-              delete bit and go to VS
<<+                 increment least significant digit
>[>>]<[>]           go to current bit
]
<+                    if not on VS then repeat
]                   end of binary to decimal loop

<[<<]>                  go to most significant digit
>[                  printing loop: for each DU print corresponding value
+++++++[<++++++>-]<.  add 48 to value (ASCII 0) and print
>>>                   go to next DU
]


# Perl 5, 35 bytes

main=putStrLn$"s="++show s++s  ## Bash, 67/51 chars f () { printf "%s\n${!1} $1" "$(local -f ${!1})" } f FUNCNAME  And 51 chars: trap -- 'printf "%s\n:" "$(trap -p DEBUG)"' DEBUG
:


# Zozotez Lisp: 73

((\ (x) (c x (c (c (" ") (c x))))) (" (\ (x) (c x (c (c (" ") (c x)))))))


This requires one of the REPLs. For one bootstrap expression quine I need it to print: 81

((\ (x) (p (c x (c (c (" ") (c x)))))) (" (\ (x) (p (c x (c (c (" ") (c x))))))))


# Extended BrainFuck: 68

This uses mostly Brainfuck code except for the store string procedure.

>~"~!<<.[<]>.>+.-<[.>]<[<]>>+.->[.>]"<<.[<]>.>+.-<[.>]<[<]>>+.->[.>]


A 94 byte version that uses more EBF features:

{c|"{q$q.$p(-)}:q:p$q 34+$p|'{c|'&q&c&q|'}'(-)&c"}{q$q.$p(-)}:q:p$q 34+$p|'{c|'&q&c&q|'}'(-)&c


# Node.js REPL (22)

console.log(RegExp.$1)  • ...this abuses the fact that (I guess) the Node REPL internally executes a regex on the received line? I want to upvote because of the cleverness, but on the other hand I don't want to since it relies on extracting its own source code as a string... – FireFly Aug 22 '14 at 15:38 • You need to specify the Node version this works in, because running in 7.5.0, this prints a single newline. – Patrick Roberts Jul 16 '17 at 5:21 MATLAB, 95 characters There might be shorter ones, but I'm happy that it works at all. function d=g();d='gvodujpo!e>h)*<e>(<e>\e)2;29*.2-e-e)29;foe*.2^<';d=[d(1:18)-1,d,d(18:end)-1];  Cleaner approach, exact same length: function d=g();d='function d=g();d=[d(1:17),39,d,39,d(15:end)];';d=[d(1:17),39,d,39,d(15:end)];  ## Burlesque - 1 byte Technically, this is a quine: 1  Technically, this is also a quine: {1 2 3}  Pretty much any literal is a quine. This is also a quine which doesn't use a simple literal: ,#Q2 SH ~- ",#Q" \/ .+ sh  The comma is not necessary if you launch burlesque in no-stdin mode. # AppleScript, 2 Bytes 1  It's a little cheaty, but it is following the restrictions of a quine. If we don't count the trailing newline, then this solution becomes 1 byte - 1. Whenever AppleScript has a final executed line of code, it prints the result of the last operation (whatever it is) to the command line. text  Any class name has the same effect. # DUP, 51 bytes 0"0.[34,0[$;$][,1+]#]$!%%!"0.[34,0[$;$][,1+]#]$!%%!  Try it here. Well, DUP quines are possible, just really, really, long. I'll have to golf some more. # Python 2 and 3 - 32 bytes s='s=%r;print(s%%s)';print(s%s)  # reticular, 9 bytes "'34'coo;  This captures the string '34'coo;, then wraps around. After that, the number 34 is pushed the stack, converted to a character with c, finally being outputted with o. The next o outputs the captured string, and ; terminates the program. Other quines: "'34'c~O; "6@P2*c~O;  # Jelly, 6 bytes There are two proper and payload capable "built-in" quines of 6-bytes: “ØV”ṘV - takes no input “ØV” - make the string “ØV” Ṙ - print and yield left (prints “ØV”, yields “ØV”) V - eval Jelly code (the code ØV yields the string “ṘV”) - implicit return of the string “ṘV”, so the final output is “ØV”ṘV  and “Øv”Ṙv - as above, except: v evals with an input, which in this case is empty; and Øv yields “Ṙv”  A payload may be placed directly after the leading open quote in either. ## Straw, 10 bytes (non-competing) (:%>>):%>>  # Y, 2 bytes Try it here! Up  This is two commands. U is a capture link, and begins quoting the code, and has a U at the beginning of the result. It wraps around, since there is no matching U, and captures the string Up. Then, p prints it, and we are done. # PowerShell, 41 37 Bytes: function q{"function q{$function:q};q"};q

filter q{"filter q{$function:q};q"};q  Thanks to TimmyD for saving 4 bytes • What interpreter / compiler does this work in? In this interpreter, this submission doesn't work (it outputs function q{End: { "function q{$function:q};q" }};q). – Loovjo Oct 6 '16 at 18:00
• @Loovjo Most online PowerShell interpreters use an open-source PoSH that's roughly equivalent to PowerShell v0.5 and lacking many features. The above works fine in an actual install on Windows. – AdmBorkBork Oct 7 '16 at 13:08
• At least in v4 on Windows 8.1, you can shave a few bytes using filter as follows -- filter q{"filter q{$function:q};q"};q for 37. – AdmBorkBork Oct 7 '16 at 13:09 • $MyInvocation.MyCommand.ScriptBlock is 2 bytes shorter but almost definitely cheating? – colsw Feb 22 '17 at 22:38