Skip to main content
golfed a byte
Source Link
ETHproductions
  • 50.1k
  • 6
  • 94
  • 240

Japt, 1010 9 bytes

Found a better way :-)

"+Q ²"+Q ²Q+2ç"Q+2ç

Outputs +Q ²"+Q ²""Q+2çQ+2ç. Test it online!Test it online!

Explanation

"+Q ²"+QQ+2ç"Q+2ç ²   // Implicit: Q = quotation mark
"+Q ²"   "Q+2ç    // Take this string.     +Q ²Q+2ç
      +Q     // AppendRepeat ait quotetwice.       +Q ²"Q+2çQ+2ç
 Q+        ²   // DoublePrepend thea resultquote.    +Q ²"+Q ²""Q+2çQ+2ç
             // Implicit: output result of last expression

A trivial modification ofCould also be Qi2ç"Qi2ç, which prints Qi2çQi2ç". This one is closer to the standard Japt quine:

"iQ ²"iQ ²

I've been playing aroundBut I do not believe there is any easy way to wedge the quotation mark in the middle of the string for 10 minutes but haven't found anything shorter..a 9-byte quine.

Japt, 10 bytes

"+Q ²"+Q ²

Outputs +Q ²"+Q ²". Test it online!

Explanation

"+Q ²"+Q ²   // Implicit: Q = quotation mark
"+Q ²"       // Take this string.     +Q ²
      +Q     // Append a quote.       +Q ²"
         ²   // Double the result.    +Q ²"+Q ²"
             // Implicit: output result of last expression

A trivial modification of the standard Japt quine:

"iQ ²"iQ ²

I've been playing around for 10 minutes but haven't found anything shorter...

Japt, 10 9 bytes

Found a better way :-)

Q+2ç"Q+2ç

Outputs "Q+2çQ+2ç. Test it online!

Explanation

Q+2ç"Q+2ç    // Implicit: Q = quotation mark
    "Q+2ç    // Take this string.     Q+2ç
           // Repeat it twice.      Q+2çQ+2ç
Q+           // Prepend a quote.      "Q+2çQ+2ç
             // Implicit: output result of last expression

Could also be Qi2ç"Qi2ç, which prints Qi2çQi2ç". This one is closer to the standard Japt quine:

"iQ ²"iQ ²

But I do not believe there is any easy way to wedge the quotation mark in the middle of the string for a 9-byte quine.

Source Link
ETHproductions
  • 50.1k
  • 6
  • 94
  • 240

Japt, 10 bytes

"+Q ²"+Q ²

Outputs +Q ²"+Q ²". Test it online!

Explanation

"+Q ²"+Q ²   // Implicit: Q = quotation mark
"+Q ²"       // Take this string.     +Q ²
      +Q     // Append a quote.       +Q ²"
         ²   // Double the result.    +Q ²"+Q ²"
             // Implicit: output result of last expression

A trivial modification of the standard Japt quine:

"iQ ²"iQ ²

I've been playing around for 10 minutes but haven't found anything shorter...