Write an irreducible proper quine, i.e. a program that prints its own source code, which can't be reduced by removing characters to a shorter program with the same constraints.

Eg. the python quine:


can be reduced to the quine


thus it is not irreducible, although the program below is.

Standard Loopholes apply, this and this in particular.
The longest answer wins.

  • \$\begingroup\$ Sandbox \$\endgroup\$
    – math scat
    Commented Dec 12, 2023 at 12:42

6 Answers 6


Vyxal, \$10↑↑256.654\$ bytes


The exponentiation tower part of the byte count is the result of evaluating k⟇Cƒe, which is equal to reducing the character codes of each character in the vyxal codepage by **.

The number is too large to compute, but an expression can be found here.

Replace the ... with k⟇Cƒe followed by \$955^{411^{172^{...}}}\ - \text{chr}(x)\$ s for x in W:k⟇Cƒeε\‹*k⟇Cƒe$+∑$C∑+.

The idea here is this base quine:

87 58 51 50 67 106 36 67 8721 43W:32Cj$C∑+

It's been modified to have the numbers be replaced with decrementing that big power tower each time.


Removing any character from k⟇Cƒe fails to push a number, and starts performing unexpected behaviour. Removing any of the s fails to decrement the number adequately.

  • \$\begingroup\$ In up arrow notation, the number in the link is 10↑↑256.654 \$\endgroup\$ Commented Mar 26 at 2:22

Mathematica, at least 10↑↑1,048,580.82 bytes


Where ⍰ is U+10FFFF, the biggest Unicode character recognized by Mathematica

Try a smaller version of it online!

Where the number is FromDigits[ToCharacterCode["Print[Everything inside the print]"], Nest[Hyperfactorial,$OutputSizeLimit,$OutputSizeLimit]]]. The key here is that the "→" is character code 62754. The ⍰ means the base of the number can't drop below 1114111. I believe Hyperfactorial to be the fastest growing function. $OutputSizeLimit is the largest built-in integer constant that I could find under 1114111, at 1048576 (2↑20).

I went through a few iterations, first using Nest[...,11,9] then Nest[...,4,11], but any constant less than 1114111 would fit, so $OutputSizeLimit is the biggest. There might be some constant in the Astronomical or Element data that fits between 1048576 and 1114111, but $OutputSizeLimit is pretty close.

Ω(Log10[Hyperfactorial[x]]) is x, where Ω is lower bound notation. It's really closer to x2, but compared to the power of logarithms, they may as well be the same. This means that Hyperfactorial of 1114111 nested x times is at minimum (10)↑↑(x+1).

Edit, change a to a very high unicode character. One letter variable are hard to remove, so it should be irreducible. Updated $JavaAddSizeLimit to $OutputSizeLimit to fit as such.


Jelly, 80841 bytes


Try it online!

A full program that is a quine.

The above is actually a list of lists of zeros with the following lengths: [7806, 59, 8318, 7816, 7884, 59, 8318, 118, 32]. These are then converted to Unicode code points which encode the following: Ṿ;⁾ẈỌ;⁾v

This is then called with the original list of lists of zeros as its argument. This code unevals the list and appends two two character strings that consist of the bit outside of the list. Note the space at the end of the program (and the last 32 byte member of the list) is needed because of nesting two-character strings within the main string. ( would terminate the string.)


Charcoal, 7200285678457 bytes


... represents 7200285678438 ´s. No online link for obvious reasons. Explanation:


Assign 3600142839219 ´s to the variable. (´ is Charcoal's quote character, so it needs to be doubled to quote itself.)


Output the literal string .


Output two copies of the 3600142839219 ´s.


Convert 3600142839219 to base 5 using a custom character set, so instead of resulting in 432441043031323334 you get θ´≔θθ⍘Lθ´L´⍘´≔´´´θ.


Python, 10↑↑4.6290 bytes

def a(b,c):
 while b:
 return d[::-1]
def e(b):return b<<b

Where ⍰ is U+3134A (201546), the biggest single-variable character in python, found with

for i in range(0x10FFFF, 1, -1):
    except SyntaxError:

Where the number of 'a's length is converted from decimal, to a list of numbers in base e(201546). If you remove the e(), then you can't output the ⍰.

= 10^(201546*2^201546)^151
= 10^(201546^151*2^201546^151)
~ 10^^4.462896
  • \$\begingroup\$ Can you remove the int( ) call? \$\endgroup\$ Commented Apr 2 at 17:11
  • \$\begingroup\$ @noodleman Yes! I can since every number is an integer, the mod function will only ever return integers, making the int() call redundant. Updated. \$\endgroup\$ Commented Apr 2 at 22:49

Java 7, 172 bytes

class M{public static void main(String[]a){String s="class M{public static void main(String[]a){String s=%c%s%1$c;System.out.printf(s,34,s);}}";System.out.printf(s,34,s);}}

Takes advantage of the Java version to make things as long as possible.
In Java 8+ you can shorten class M{public static void main to interface M{static void main; in Java 10+ you can shorten String s= to var s=; and in Java 5 and 6 you can shorten class M{public static void main(String[]a){ to enum M{M;{ by abusing a bug.

Try it online. (This TIO uses Java 8, but in Java 7 it's irreducible.)


class M{                 // Class
  public static void main(String[]a){
                         //  Mandatory main method
    String s=            //   String `s`, containing:
      "class M{public static void main(String[]a){String s=%c%s%1$c;System.out.printf(s,34,s);}}";
                         //   the source code, where the `""` are replace with `%c%s%1$c`
    System.out.printf(s, //   Print String `s` with formatting:
      34,                //    Where the `%c` and `%1$c` are replaced with `"` (codepoint 34)
      s);}}              //    and `%s` is replaced with String `s`

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.