Skip to main content
added 83 characters in body
Source Link
fireflame241
  • 16.3k
  • 2
  • 29
  • 72

Write a proper quine containing at least one newline/linefeed whose every unfurling is either itself a proper quine or outputs the original quine. Your answer can mix and match outputting itself and outputting the original quine.

Unfurlings

Unfurlings consist of:

  1. Appending spaces to make the input a rectangle.
  2. Taking all lines above the bottom one and rotating them a quarter-turn clockwise about the lower-right corner so that the right edge is on the same level as the bottom edge.
  3. Repeat step (2) until the string is a single line to find all unfurlings.

For example, the first unfurling of

GFE
HID
ABC

is

   HG
   IF
ABCDE

and the rest are

   HG
   IF
ABCDE

     IH
ABCDEFG

       I
ABCDEFGH

ABCDEFGHI

This process is automated with this program adapted from Emigna's answer here,where each step of unfurling in the output is delimited by a dashed line.

Example

For example, if you have a program

K
AB

(no trailing spaces)

then it must be a proper quine and print itself('K\nAB', where \n represents a linefeed/newline). According to the output of the unfurling program, we see that the next step in unfurling is

  K
AB 

(note trailing space)

This must either print itself(' K\nAB ') or the original program ('K\nAB'). The next step in the unfurling is

AB K

This must either print itself ('AB K'), or the original program('K\nAB').

The byte-count of this program is 4 (K, \n, A, B).

Score

This is , so the shortest answer in bytes wins. Standard loopholes apply, as usual.

Write a proper quine containing at least one newline/linefeed whose every unfurling is either itself a proper quine or outputs the original quine.

Unfurlings

Unfurlings consist of:

  1. Appending spaces to make the input a rectangle.
  2. Taking all lines above the bottom one and rotating them a quarter-turn clockwise about the lower-right corner so that the right edge is on the same level as the bottom edge.
  3. Repeat step (2) until the string is a single line to find all unfurlings.

For example, the first unfurling of

GFE
HID
ABC

is

   HG
   IF
ABCDE

and the rest are

   HG
   IF
ABCDE

     IH
ABCDEFG

       I
ABCDEFGH

ABCDEFGHI

This process is automated with this program adapted from Emigna's answer here,where each step of unfurling in the output is delimited by a dashed line.

Example

For example, if you have a program

K
AB

(no trailing spaces)

then it must be a proper quine and print itself('K\nAB', where \n represents a linefeed/newline). According to the output of the unfurling program, we see that the next step in unfurling is

  K
AB 

(note trailing space)

This must either print itself(' K\nAB ') or the original program ('K\nAB'). The next step in the unfurling is

AB K

This must either print itself ('AB K'), or the original program('K\nAB').

The byte-count of this program is 4 (K, \n, A, B).

Score

This is , so the shortest answer in bytes wins. Standard loopholes apply, as usual.

Write a proper quine containing at least one newline/linefeed whose every unfurling is either itself a proper quine or outputs the original quine. Your answer can mix and match outputting itself and outputting the original quine.

Unfurlings

Unfurlings consist of:

  1. Appending spaces to make the input a rectangle.
  2. Taking all lines above the bottom one and rotating them a quarter-turn clockwise about the lower-right corner so that the right edge is on the same level as the bottom edge.
  3. Repeat step (2) until the string is a single line to find all unfurlings.

For example, the first unfurling of

GFE
HID
ABC

is

   HG
   IF
ABCDE

and the rest are

   HG
   IF
ABCDE

     IH
ABCDEFG

       I
ABCDEFGH

ABCDEFGHI

This process is automated with this program adapted from Emigna's answer here,where each step of unfurling in the output is delimited by a dashed line.

Example

For example, if you have a program

K
AB

(no trailing spaces)

then it must be a proper quine and print itself('K\nAB', where \n represents a linefeed/newline). According to the output of the unfurling program, we see that the next step in unfurling is

  K
AB 

(note trailing space)

This must either print itself(' K\nAB ') or the original program ('K\nAB'). The next step in the unfurling is

AB K

This must either print itself ('AB K'), or the original program('K\nAB').

The byte-count of this program is 4 (K, \n, A, B).

Score

This is , so the shortest answer in bytes wins. Standard loopholes apply, as usual.

Tweeted twitter.com/StackCodeGolf/status/900109175270801408
self-contained
Source Link
fireflame241
  • 16.3k
  • 2
  • 29
  • 72

Write a proper quine containing at least one newline/linefeed whose every unfurling is either itself a proper quine or outputs the original quine.

Unfurlings

Unfurlings should be calculated by plugging the source codeconsist of your quine as input:

  1. Appending spaces to make the input a rectangle.
  2. Taking all lines above the bottom one and rotating them a quarter-turn clockwise about the lower-right corner so that the right edge is on the same level as the bottom edge.
  3. Repeat step (2) until the string is a single line to find all unfurlings.

For example, the first unfurling of

GFE
HID
ABC

is

   HG
   IF
ABCDE

and the rest are

   HG
   IF
ABCDE

     IH
ABCDEFG

       I
ABCDEFGH

ABCDEFGHI

This process is automated with this program adapted from Emigna's answer here.

Each,where each step of unfurling in the output is delimited by a dashed line.

Example

For example, if you have a program

K
AB

(no trailing spaces)

then it must be a proper quine and print itself('K\nAB', where \n represents a linefeed/newline). According to the output of the unfurling program, we see that the next step in unfurling is

  K
AB 

(note trailing space)

This must either print itself(' K\nAB ') or the original program ('K\nAB'). The next step in the unfurling is

AB K

This must either print itself ('AB K'), or the original program('K\nAB').

The byte-count of this program is 4 (K, \n, A, B).

Score

This is , so the shortest answer in bytes wins. Standard loopholes apply, as usual.

Write a proper quine containing at least one newline/linefeed whose every unfurling is either itself a proper quine or outputs the original quine.

Unfurlings

Unfurlings should be calculated by plugging the source code of your quine as input of this program adapted from Emigna's answer here.

Each step of unfurling in the output is delimited by a dashed line.

Example

For example, if you have a program

K
AB

(no trailing spaces)

then it must be a proper quine and print itself('K\nAB', where \n represents a linefeed/newline). According to the output of the unfurling program, we see that the next step in unfurling is

  K
AB 

(note trailing space)

This must either print itself(' K\nAB ') or the original program ('K\nAB'). The next step in the unfurling is

AB K

This must either print itself ('AB K'), or the original program('K\nAB').

The byte-count of this program is 4 (K, \n, A, B).

Score

This is , so the shortest answer in bytes wins. Standard loopholes apply, as usual.

Write a proper quine containing at least one newline/linefeed whose every unfurling is either itself a proper quine or outputs the original quine.

Unfurlings

Unfurlings consist of:

  1. Appending spaces to make the input a rectangle.
  2. Taking all lines above the bottom one and rotating them a quarter-turn clockwise about the lower-right corner so that the right edge is on the same level as the bottom edge.
  3. Repeat step (2) until the string is a single line to find all unfurlings.

For example, the first unfurling of

GFE
HID
ABC

is

   HG
   IF
ABCDE

and the rest are

   HG
   IF
ABCDE

     IH
ABCDEFG

       I
ABCDEFGH

ABCDEFGHI

This process is automated with this program adapted from Emigna's answer here,where each step of unfurling in the output is delimited by a dashed line.

Example

For example, if you have a program

K
AB

(no trailing spaces)

then it must be a proper quine and print itself('K\nAB', where \n represents a linefeed/newline). According to the output of the unfurling program, we see that the next step in unfurling is

  K
AB 

(note trailing space)

This must either print itself(' K\nAB ') or the original program ('K\nAB'). The next step in the unfurling is

AB K

This must either print itself ('AB K'), or the original program('K\nAB').

The byte-count of this program is 4 (K, \n, A, B).

Score

This is , so the shortest answer in bytes wins. Standard loopholes apply, as usual.

edited tags
Link
Mr. Xcoder
  • 42.5k
  • 9
  • 81
  • 214
Source Link
fireflame241
  • 16.3k
  • 2
  • 29
  • 72
Loading