Print the previous answer in reverse - with a catch

1

Your challenge is very simple: output the previous answer, in reverse.

However, as with this similarly-titled question, there's a catch: in this case, you can only use characters from the answer before the last. For example:

Let's say the first answer looks like this:

1 - Python

print('hi!')

And the second answer looks like this: (see 'Chaining' section for more info)

2 - Javascript

console.log(")'!ih'(tnirp")

Now, it would be my job to write the third answer: a program to output the text )"print('hi!')"(gol.elosnoc, while only using the characters p, r, i, n, t, (, ', h, i, ! and ). I can choose whatever language I like to complete this task.

Chaining

The first answer can output any text: but it must output something. The second answer should simply output the first answer in reverse, using any characters you like. The further rules about restricted characters, as described above, come into play from the third answer onwards.

Scoring

Your score is \$\frac{l_{n}}{l_{n-1}} + l_{n-2}\$, where \$l_x\$ represents the length of the \$x\$th answer, and \$n\$ is the position your answer is at in the chain. (all lengths are in bytes; if your answer is no. 1 or no. 2 then miss out \$l_{n-1}\$ and/or \$l_{n-2}\$ where necessary.

Best (lowest) score by August 1st wins.

Formatting

Please format your post like this:

[Answer Number] - [language]

    [code]
    (preferably a TIO link)

SCORE: [Submission Score]

(notes, explanations, whatever you want)

Everything in square brackets is a required argument to fill in; everything in normal brackets is an optional argument; everything not in brackets is there to make the snippet work.

Rules

  • All characters, etc. are case sensitive.
  • Preceeding/trailing whitespace is allowed, within reason (I'm looking at you, Whitespace).
  • Every submission must be a unique language.
  • You must wait at least 1 hour before submitting a new answer if you have just posted.
  • You may NOT submit two answers in a row, you must wait for TWO more submissions before posting a new answer.
  • Of course, standard loopholes are disallowed.
  • Please make sure to triple check that your answer is valid. ~This is especially important, because someone may start writing their answer based on yours, so if it's wrong you can't really edit it any more... and the whole chain breaks down.~ Also, you can't edit answers for continuity purposes.
  • Standard I/O methods are allowed.

Answer list/used languages

$.ajax({
  type: "GET",
  url: "https://api.stackexchange.com/2.2/questions/187667/answers?site=codegolf&filter=withbody&sort=creation&order=asc",
  success: function(data) {
    for (var i = 0; i < data.items.length; i++) {
      var temp = document.createElement('p');

      temp.innerHTML = data.items[i].body.split("\n")[0];

      try {
        temp.innerHTML += " - <i>Score: " +
          data.items[i].body
          .split("SCORE")[1]
          .split("\n")[0]
          .split(":")[1]
          .trim() +
          "</i>";
      } catch (TypeError) {
        temp.innerHTML += " (no score)";
      } finally {
        $('#list').append('<li><a href="/a/' + data.items[i].answer_id + '">' + temp.innerText || temp.textContent + '</a>');
      }
    }
  }
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<base href="https://codegolf.stackexchange.com">
<ul id="list"></ul>

Geza Kerecsenyi

Posted 2019-07-04T14:48:28.590

Reputation: 1 892

Question was closed 2019-07-07T16:11:40.800

1What's the winning criterion? – pppery – 2019-07-04T15:06:17.207

Do different versions of a language count as unique (is every version a unique language)? – Benjamin Urquhart – 2019-07-04T15:43:52.587

@GezaKerecsenyi Pretty sure you should + the score of the previous answer to mine, or nobody will ever beat 1.64 – Expired Data – 2019-07-04T15:55:50.263

4I like the challenge, but don't understand the scoring rule. As is, the score of answer $n$ will almost always be higher (hence worse) than the score of answer $n-2$. It is almost certain that answer 2 will be the winner. – Robin Ryder – 2019-07-04T16:11:56.433

While the character limitation seems interesting, It looks like it's quickly going to devolve into extremely esoteric languages. – DaveMongoose – 2019-07-04T16:23:28.067

@RobinRyder That's the point of the challenge... sort of Kolmogorov-complexity-y. – Geza Kerecsenyi – 2019-07-04T16:25:59.853

6What @RobinRyder is trying to point out is not the nature of the challenge, but how it is scored. Right now, if I were post an answer to this challenge, it would have a score of at least 57 (the score of the first answer), even if it were (somehow) a zero-byte program. The fourth answer would have a score of at least 1.12 (the score of the second answer), even if it were (somehow) a zero-byte program. The fifth answer would have a score of at least the score of the third answer, and so on, meaning that no answer with a lower score than the second answer is possible. – pppery – 2019-07-04T17:05:24.507

This was the point I was trying to make earlier too. Mine should at least have the previous answer added too (and the first answer should be non-competing/infinite score) – Expired Data – 2019-07-04T17:08:02.990

4I think this needs more work before continuing: both the character limitations and the scoring. With regards to the former, if someone uses an esolang that only needs 2 characters, that effectively will restrict all future alternate answers to that language. – Nick Kennedy – 2019-07-04T17:08:08.767

1@NickKennedy "Every submission must be a unique language.", that wouldn't restrict all answers to that language, it would make the challenge nearly impossible (one could write an answer in Lenguage at any point, which would make the challenge even harder to answer) – pppery – 2019-07-04T17:12:48.337

@pppery yes sorry, missed that. I saw the ‘I can use whatever language I like’ and took that literally. – Nick Kennedy – 2019-07-04T17:27:39.213

I suggest copying this to the Sandbox, and reposting it once you have had enough feedback there to fine-tune this challenge, which should be fun once properly set up! – Robin Ryder – 2019-07-04T19:23:41.077

Answers

2

3 - Python 2

419/64+57 -> SCORE: 63.546875

This is one masterpiece of hackery. Edited to comply with rule 1. chr uses lowercase h, not uppercase. Will edit when I have time to find a substitute.

This is assuming the first answer is Python 3

e=ord
o=e("o")
a=e("a")
n=e("\n")
t=e(")")
b=e("(")
i=e("i")
W=e(" ")
p=o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+a+n+n
o=chr
H=o(W+t)
d=o(p+n)
p=o(p)
l=o(a+e(",")+n+n+n)
r=o(i+t+t)
c=o(b+b+b+n+W)
print(o(b+W+n)+r+l+p+")c("+p+p+c+d+p+H+p+""""!" + b + " ," + a = c"""+p+H+p+""""dlroW" = b"""+p+p+""""olleH" = a"""+p)

TIO

Benjamin Urquhart

Posted 2019-07-04T14:48:28.590

Reputation: 1 262

0

1 - Python

a = "Hello"
b = "World"

c = a + ", " + b + "!"

print(c)

Try it online!

SCORE: 57

First answer.

Geza Kerecsenyi

Posted 2019-07-04T14:48:28.590

Reputation: 1 892

0

2. 05AB1E

“a = "Hello"““b = "World"“I“c = a + ", " + b + "!"“I“…¢““(c)“«»R

Try it online!


64/57 + 0 = 1.12

SCORE: 1.12

Expired Data

Posted 2019-07-04T14:48:28.590

Reputation: 3 129

1@Downvoter why? – Expired Data – 2019-07-04T15:36:23.453

I know this is improper, but would you mind deleting this answer? I want to update my first answer to make it a bit more complex (to avoid answers getting too short too quickly). Sorry about this, let me know if you don't want to. – Geza Kerecsenyi – 2019-07-04T16:27:30.720

or maybe edit your answer to print my edited version? Apologies about this. – Geza Kerecsenyi – 2019-07-04T16:38:24.070

2@GezaKerecsenyi There you go, I still think it will be very hard. Probably a better challenge would be to NOT be able to use the characters from 2 languages ago. But that's a different challenge altogether – Expired Data – 2019-07-04T17:02:49.323

1I agree with @ExpiredData. That option seems much more reasonable. – Mr. Xcoder – 2019-07-04T17:04:11.117

1Using only the language set from 2 answers ago makes this an almost impossible challenge: How is the 3rd answer supposed to output «,,, and ¢ using only abcHelo, Wrd!+"=pint? There's only one mathematical operation available (addition). (I.e. I also agree with Expired Data) – Draco18s no longer trusts SE – 2019-07-04T17:12:58.750

@Draco18s I totally agree, but that's not really my problem – Expired Data – 2019-07-04T17:13:34.897

@ExpiredData While true, I was addressing the challenge author. – Draco18s no longer trusts SE – 2019-07-04T20:46:52.883

2

@Draco18s challenge complete

– Benjamin Urquhart – 2019-07-06T02:34:32.057