11
\$\begingroup\$

The challenge here is simple, and not at all about byte-count. Your job is to output the first 50 characters of the previous quine's source code, concatenated with the first 50 characters of yours starting with the 50 characters I've placed below:

abcdefghijklmnopqrstuvwxyzACDEFGHIJKLMNOPQRSTUVWXY

So, lets take an example here, if you were to answer in 05AB1E, a solution to simply output the first 50 bytes would be:

ži50£

Which would mean you'd need to output:

abcdefghijklmnopqrstuvwxyzACDEFGHIJKLMNOPQRSTUVWXYži50£

If your program is shorter, simply use the first x < 50 characters. If your program is longer only concatenate the first 50 characters, ending on the 50th character. The next person will then have to output the first 50 characters of your quine concatenated with their own code.

Your code can be any size, but you should only output the first 50 characters of your code concatenated to the end of the first 50-bytes of the previous answer's code.


Restrictions:

This uses the definition of a proper quine, and, in addition to this, the following things:

  • Comments are disallowed, entirely.
  • PAY ATTENTION TO THIS SECTION, IT MAY EVOLVE IF ABUSIVE LOOPHOLES ARISE

How to Post a Chained-Answer:

  1. Post a placeholder:
    • Mention your answer number and the language you'll use.
  2. Sort-by-date, if you notice someone else posted a placeholder 1 millisecond before you:
    • Delete yours, wait for the next opportunity, sorry.
  3. If you've secured the next spot, PLEASE ANSWER WITHIN 6 HOURS:
    • If you can't answer, remove your reserved space.
  4. IF the space has been hogged for more than 6 hours.
    • Vote to delete reserved space, I'll handle it.

Your Post Format:

#[Answer #]:[Character Count] Characters, [Language Used]

{TIO MARKDOWN}

{LINE_SEPARATOR="---"}

{ADDITIONAL EXPLANATION OR INFORMATION}

Some specific notes (Important for Ease-of-Competition):

  • If the person before you has included newlines or non-ASCII characters in their source, you may STRIP them. This means that x="a\nb" becomes ab, where x[0]=a;x[1]=b;.
    • You must state the mutation you've applied to the previous source.
  • All characters are counted as a single character, despite code-pages or language encoding. Please do not use byte-count, use character-count.

The accepted answer will be the 50th answer, just because; I mean, it's SE afterall.

\$\endgroup\$
20
  • 1
    \$\begingroup\$ Why are comments banned? Also, instead of redefining bytes to characters, why not just use characters? \$\endgroup\$ Jul 30, 2017 at 0:44
  • \$\begingroup\$ @CalculatorFeline I think you could do some pretty lame and uninteresting loopholes using comments, but that's just me. Reserve the first spot and prove me wrong with a comment and I'll lift the ban. \$\endgroup\$ Jul 30, 2017 at 0:45
  • 5
    \$\begingroup\$ The linked meta post defining proper quines contains no mention of not having defunct code. \$\endgroup\$ Jul 30, 2017 at 1:18
  • 1
    \$\begingroup\$ How are you defining comment? Comment is not a very well defined term. \$\endgroup\$
    – Wheat Wizard
    Aug 1, 2017 at 4:42
  • 2
    \$\begingroup\$ You also seem to interchange the terms character and byte, which is a bit confusing. I'm not really sure if its the first 50 characters or bytes. \$\endgroup\$
    – Wheat Wizard
    Aug 1, 2017 at 4:45

12 Answers 12

7
\$\begingroup\$

1: 96 Characters, Haskell

abcdefghijklmnopqrstuvwxyzACDEFGHIJKLMNOPQRSTUVWXY:z=['`'..'z']++'A':['C'..'Y']
main=putStr$z++z

Try it online!


I was feeling silly, and saw nothing forbidding the first entry starting with the exact same 50 characters as the initial string.

  • ['`'..'z']++'A':['C'..'Y'] is an expression evaluating to the string of those characters, with a ` prepended.
  • The result is pattern matched on, making the variable abcdefghijklmnopqrstuvwxyzACDEFGHIJKLMNOPQRSTUVWXY equal to '`', and z equal to the 50 characters.
  • main=putStr$z+z then does the actual output.
\$\endgroup\$
1
  • \$\begingroup\$ I love how this challenge started with the a-zA-Z and now it's basically not the alphabet anymore. Good call on the 1st program. \$\endgroup\$ Mar 19, 2018 at 17:27
5
\$\begingroup\$

5:76 characters, Emojicode

🏁🍇🍦a🔤s=:'"alert(eval(c="''abcdefghijklmnopqrstuvwxyzACD🔤😀🍪a🔤🏁🍇🍦a❌🔤🔤🔪a 0 45🍪🍉

Try it online!


Explanation:

🏁🍇		👴 start
  🍦 a 🔤...🔤	👴 define variable a as that string
  😀    	👴 print:
    🍪		👴 combine those strings:
      a		👴 a, and:
      🔤🏁🍇🍦a❌🔤🔤	👴 string literal. the ❌🔤 works like \"
      🔪a 0 45	👴 between indexes 0 and 45 of a
    🍪
🍉		👴 end
\$\endgroup\$
8
  • 1
    \$\begingroup\$ The alphabet is slowly disappearing :O. \$\endgroup\$ Aug 1, 2017 at 13:42
  • \$\begingroup\$ Formatting hint: Use <pre><code> and </code></pre>, then you can use &#9; for tabs, which align as intended even with variable-width characters like emoji. BTW, I was thinking on how to make a quine in Emojicode and then I scrolled down... \$\endgroup\$
    – Maya
    Sep 4, 2017 at 13:41
  • \$\begingroup\$ @NieDzejkob good idea, thanks. \$\endgroup\$
    – betseg
    Sep 4, 2017 at 14:22
  • \$\begingroup\$ @betseg it's slightly off in a few places for me, but more readable anyway. Glad you liked it \$\endgroup\$
    – Maya
    Sep 4, 2017 at 14:30
  • \$\begingroup\$ @NieDzejkob a few? with my font only the string literal's command is off because it's long, where else on your end? \$\endgroup\$
    – betseg
    Sep 4, 2017 at 14:33
4
\$\begingroup\$

2:119 Characters, Javascript

alert(eval(c="'abcdefghijklmnopqrstuvwxyzACDEFGHIJKLMNOPQRSTUVWXY'+`alert(eval(c=${JSON.stringify(c).substr(0,37)}`"))

Try It Online(uses console.log instead of alert to output)

Based on this JS quine.

Old version(reads source code):

f=_=>`abcdefghijklmnopqrstuvwxyzACDEFGHIJKLMNOPQRSTUVWXYf=${(f+"").substr(0,48)}`;alert(f())

Based on this JS quine

\$\endgroup\$
3
  • \$\begingroup\$ This is not a proper quine as the function references itself. \$\endgroup\$
    – Shaggy
    Jul 30, 2017 at 18:40
  • \$\begingroup\$ @Shaggy I added a valid one \$\endgroup\$ Jul 30, 2017 at 20:13
  • 1
    \$\begingroup\$ @Shaggy Self-referential functions are valid by our definition. \$\endgroup\$
    – ATaco
    Jul 30, 2017 at 23:44
3
\$\begingroup\$

8: 70 characters, Stax

"v->{String t=`"⛽as=:'\`"alert(eval(c=\`"''abcdefghijk"c'".`"R34|S50(+

Run and debug online

Explanation

"..."c'".`"R34|S50(+
"..."                   The string from last output
     c'".`"R            Escape all double quotes
            34|S        Surround with double quotes
                50(     Take the first 50 characters
                   +    Append to the string from last output
                        Implicit output
\$\endgroup\$
2
\$\begingroup\$

3:56 Characters, SOGL

"alert(eval(c="'abcdefghijklmnopqrstuvwxyzACDEFGHIJ”1#Οj

Try it Here!

Explanation:

"...”      push the first 50 bytes of the previous answer
     1#Ο   wrap a quote around with that
        j  take the last letter off, as my answer has one more byte for the starting quote.

The Javascript answer had a quote in it, so I had to add a starting quote, but as this isn't code-golf, it doesn't matter.

\$\endgroup\$
0
2
\$\begingroup\$

4:81 characters, J

s=:'"alert(eval(c="''abcdefghijklmnopqrstuvwxyzACDEFGHI'
echo s,50{.'s=:',quote s

Try it online!


\$\endgroup\$
2
\$\begingroup\$

7: 137 characters, Java 8

v->{String t="⛽as=:'\"alert(eval(c=\"''abcdefghijklmnopqrstuvwxyzA";return t+("v->{String t=\""+t.replace("\"","\\\"")).substring(0,50);}

Try it online.

Explanation:

v->{        // Method with empty unused parameter and String return-type
  String t="⛽as=:'\"alert(eval(c=\"''abcdefghijklmnopqrstuvwxyzA";
            //  String containing the first 50 characters of the previous answer
  return t  //  Return those first 50 characters
   +"v->{String t=\""+t.replace("\"","\\\"")).substring(0,50);}
            //  Concatted with the first 50 characters of my answer
            //  with correct escape-slashes
\$\endgroup\$
5
  • \$\begingroup\$ Aha! I figured Emoji killed this challenge for good. Nice one. \$\endgroup\$ Mar 19, 2018 at 13:38
  • \$\begingroup\$ @MagicOctopusUrn I only now notice your rule about "If the person before you has included newlines or non-ASCII characters in their source, you may STRIP them.", so an answer could get rid of the Emojis if they want. For my answer it doesn't matter either way, since we are counting in characters instead of bytes anyway. \$\endgroup\$ Mar 19, 2018 at 13:52
  • \$\begingroup\$ That and it's not about the amount of characters honestly, and yes I forgot about that rule (moreoverly forgot about the challenge in general). \$\endgroup\$ Mar 19, 2018 at 17:23
  • \$\begingroup\$ Honestly, come to think of it, this really isn't a quine challenge at all is it? \$\endgroup\$ Mar 19, 2018 at 17:25
  • \$\begingroup\$ @MagicOctopusUrn It kinda is. You basically get the first 50 characters of your quine. In Java quines are usually formed by putting the unformatted source code in a String, and then correctly format/escape the double-quotes and slashes. Just the basic quine lambda-function in Java 8 is already 88 bytes however (Try it online), so in Java this challenge is much shorter without using a full quine. I can imagine quine is the best approach in most languages, though. \$\endgroup\$ Mar 19, 2018 at 17:55
1
\$\begingroup\$

6: 70 characters, Emoji

⛽as=:'"alert(eval(c="''abcdefghijklmnopqrstuvwxyzAC🚘👥💬⛽💬🔀👫💬0💬📥💬-1💬📥✂👫➡

Try it online!

It seems that it is impossible to make it not output the trailing newline. If that's not OK then I'll remove the answer.

Explanation:

⛽ ... 🚘	String literal
👥		Duplicate
💬⛽💬		Push ⛽ as a string
🔀		Swap the top two strings. Stack: [long literal] "⛽" [long literal]
👫		Concatenate.
💬0💬📥💬-1💬📥✂	Remove the last character
👫		Concatenate.
➡		Print.
\$\endgroup\$
5
  • \$\begingroup\$ Shouldn't it be ⛽🏁🍇🍦a🔤s=:'"alert(eval(c="''abcdefghijklmnopqrstuvwx🚘👥💬⛽💬🔀👫💬0💬📥💬-1💬📥✂👫➡ instead? betseg's Emojicode answer doesn't start with as=:'"alert(eval(c="''abcdefghijklmnopqrstuvwxyzAC but with 🏁🍇🍦a🔤s=:'"alert(eval(c="''abcdefghijklmnopqrstuvwx instead. \$\endgroup\$ Mar 19, 2018 at 12:56
  • \$\begingroup\$ @KevinCruijssen If the person before you has included newlines or non-ASCII characters in their source, you may STRIP them. \$\endgroup\$
    – Maya
    Mar 19, 2018 at 13:44
  • \$\begingroup\$ Ah, I missed that rule.. In that case I'll update my answer. \$\endgroup\$ Mar 19, 2018 at 13:47
  • \$\begingroup\$ Out of curiosity, why did you strip them? To make it easier for future answers? Because your code runs perfectly without stripping the Emojis of the previous answer: Try it here. \$\endgroup\$ Mar 19, 2018 at 14:02
  • \$\begingroup\$ @KevinCruijssen It was half a year ago. I don't remember. \$\endgroup\$
    – Maya
    Mar 19, 2018 at 14:03
1
\$\begingroup\$

12: 202 characters, Ruby

puts "21ipdgmtwkkke7ynvzpcnlzt7kl".to_i(36).to_s(7).gsub('0','>').gsub('1','+').gsub('2','-').gsub('3','<').gsub('4','[').gsub('5','.').gsub('6',']')+'puts "21ipdgmtwkkke7ynvzpcnlzt7kl".to_i(36).to_s(7'

Try it online!


Encodes the first fifty characters of the previous answer in base seven

  • 0: >
  • 1: +
  • 2: -
  • 3: <
  • 4: [
  • 5: .
  • 6: ]

Then converts it to base 36 to get "21ipdgmtwkkke7ynvzpcnlzt7kl"

\$\endgroup\$
0
\$\begingroup\$

9: 55 characters, Jelly

“"v->{String t=`"as=:'\`"alert(eval(c=\`"''abcdefg”;”“;

Try it online!


I removed the non-ASCII character from the the output since that is allowed and Jelly was ignoring it.

Explanation

This begins with the string literal of the first 50 characters (minus ) of the previous answer then appends the character to it with ;”“ then appends the original string literal to the end again with the final ;. Since a character was removed the first 50 characters of my source code are the 49 from the previous answer with a in front which allows this program to be so short. (Yes I realize this is not but why not golf it if you can?)

\$\endgroup\$
0
\$\begingroup\$

10:116 Characters, Python 3

print('''“"v->{String t=`"as=:'\`"alert(eval(c=\`"''abcdefgprint(\'\'\'“"v->{String t=`"as=:'\`"alert(eval(c=\`"''')

Simply prints a string consisting of the first 50 characters of answer 9, followed by the first 50 characters of its own source. No quine-like cleverness is needed, becuase the escaped quotes (\'\'\') appear after the 50th character and hence don't need to be reproduced in the output.

This method will work in virtually any language - you'd just have to escape any quote characters that appear in the previous answer. Accordingly, I don't think there is much challenge in this challenge.

\$\endgroup\$
0
\$\begingroup\$

11: 723 Characters, Brainf***

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

Stripped unprintable character. Almost completely generated by Brainfuck Text Generator. Might as well be lazy, right?

TIO

Print [print('''"v->{String t=`"as=:'\`"alert(eval(c=\`"] +[------->++<]>++.++.---------.+++++.++++++.+[--->+<]>+.-...-----------.++++++.[----->++<]>++.--[++>---<]>-.---[-->+++<]>-.[->++<]>-.[--->++<]>+.[--->+<]>+++.--.---------.+++++.-------.-[--->+<]>--.---[->++++<]>.[-->+<]>+++.+++[-->+++<]>.[->+++<]>++.+[--->+<]>.--[--->+<]>--.+[-->+<]>+++.---.-[--->++<]>+.+[------>+<]>.++++.[->+++<]>++.+[--->+<]>.+++++++++++.-------.+++++++++++++.++.+[--->+<]>+.+[--->+<]>++.[--->+<]>-.[->+++<]>-.+++++++++++.[--->+<]>++++.+[--->+<]>.[--->++<]>-----.+[-->+++<]>-.++++.[->+++<]>++.
Clear all cells to left until first empty cell [[-]<]
Print [+[------->++<]>++.++.---------.+++++.++++++.+[--->] ++[------>+<]>.++[->++<]>+.-[-->+<]>.......---[-->+++<]>-.+[--->++<]>+..+[----->+<]>.++[-->+++<]>.[--->++<]>.+[--->++<]>+..+++.---..+++.-.........+.---.....+++.---......+++.---.++[->++<]>+.-[-->+<]>...---[-->+++<]>-.
\$\endgroup\$
2
  • \$\begingroup\$ You seem to print the 2nd through 51st characters of your Brainfuck answer instead of first 50 (it's missing the first >): Try it online. Also, you might want to drop the character, since your Brainfuck answer is currently outputting it as unprintable ``. \$\endgroup\$ Mar 20, 2018 at 12:39
  • \$\begingroup\$ The > at the beginning seems to have been an accidental addition, and I dropped the character. Based on other answers, I think that means I only need to print first 49 characters. \$\endgroup\$ Mar 21, 2018 at 2:41

Your Answer

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

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