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>
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
Everyone here: see https://codegolf.stackexchange.com/questions/187674/print-the-previous-answer-in-reverse-with-a-catch-pt-2
– Geza Kerecsenyi – 2019-07-04T19:36:51.427