7
\$\begingroup\$

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 cannot 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, without 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/187674/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].match(/(?<!h)[+-]?(\d+(\.\d+)?)/g).slice(-1)[0].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>

\$\endgroup\$
7
  • 2
    \$\begingroup\$ Are we not allowed to use the same code points (for non-ASCII aligned code pages) or characters? What do you mean by "miss out"? \$\endgroup\$
    – MilkyWay90
    Commented Jul 4, 2019 at 17:50
  • 1
    \$\begingroup\$ @ExpiredData It says all lengths are in bytes \$\endgroup\$
    – MilkyWay90
    Commented Jul 4, 2019 at 18:41
  • 3
    \$\begingroup\$ isn't the score always going to be majorly based on the answer two before yours, no matter the length of your own? \$\endgroup\$
    – Jo King
    Commented Jul 4, 2019 at 22:03
  • 1
    \$\begingroup\$ @JoKing Your own length primarily influences the score 2 ahead of you (and vice versa). The immediately adjacent answers are almost irrelevant. [whatever] / [literally irrelevant] - [mega huge] = [ridiculously low score] no matter how you look at it. \$\endgroup\$ Commented Jul 4, 2019 at 23:26
  • 1
    \$\begingroup\$ Thus, given that there must be at least two answers between each of your answers, you want your code to be as short as possible, to lower the score of the the answer two after yours, which must be a competitor. \$\endgroup\$ Commented Jul 5, 2019 at 0:24

7 Answers 7

2
\$\begingroup\$

1 - 05AB1E

"Hello, World!"

SCORE: \$\frac{15}{1} - 0 = 15\$

Try it online!

\$\endgroup\$
2
  • 1
    \$\begingroup\$ The score for this would be \$\frac{15}{1}-0=15\$ - @MilkyWay90 see my response to your comment on the question. \$\endgroup\$ Commented Jul 4, 2019 at 19:35
  • 1
    \$\begingroup\$ Why use 05AB1E in the first answer :( Now we can't use it anymore. PS: Too late now, but you could have removed the trailing ". Trailing ", , , , , , etc. are all implicitly when it's at the end of the program. :) \$\endgroup\$ Commented Jul 5, 2019 at 6:14
1
\$\begingroup\$

7-str

`DwJRK…E•EDo†LZ–w<SK…T>>Q<Sv‡D<J<I<G<>•‡GMMK•<ʇ̃?ό‰—íɁ͉ð̈́‰’ñÇùÿȫ<w<…><>_RQRRMKSQKKRKMRRNMLKQKRITK‡w•„‡GPK•<LSRL[J[b•ULXQLNaJ\\Z•NLQ˜“Lj<`D-D-o;

Score: \$\frac{187}{171}-212 = -210.906432748538\$

Note that the code contains many unprintable characters.

The big string between the `s is the reversed code of the Stax answer encoded by adding 26 (I brute-forced this number) to each codepoint. The str code then undoes this by subtracting 26 from the string before outputting it (You can subtract integers from strings, which does math on each codepoint, in this language)

Try it online!

\$\endgroup\$
1
\$\begingroup\$

5. Runic Enchantments

")(esre"1´18k+"er.'"$7´884k$8´216k$7´690k$8´318k$8´220k$3´80k$1´87k$9´5k$7´814k$1´64k$1´61k$8´220k$1´18k$3´91k:$$7´776k$8´220k$8´310k$4´28k$3´04k$2´09k$1´69k$7´693k$1´61k$8´220k$"'tnirp"@

Try it online!

Encodes the Jelly portion as number literals. Its disgusting. Also, answer #7 will have a super low score. Which is also disgusting. Next.

SCORE: 212÷77-25 = -22.246753247

\$\endgroup\$
1
\$\begingroup\$

6 - Stax

"P2y~724{@BB0G427>u2;{HA0A2uu892"{16-mj{]m1:/8171234883181179138878E$"$k"]\"ȑåß­×xo̪Öo³ȧÓ}oβ%˩ɭ"{133-m{$"-"/"0"*m\9"7$$:k19"]|@2lU*+{+k180]*

Run and debug online

Score: 171 ÷ 212 - 77 = -76.19

My first Stax answer. I’m sure it could be golfed better, but each byte is only worth \$\frac{1}{212}\$ points.

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

2 - Japt

`"HÁM, Wld!"`w

Try it - Note the unprintable (codepoint 142) between the W and the l.

SCORE: 15÷15-0=1


Everything between the backticks is simply the source of the first solution compressed with Shoco. The backticks decompress it and the w reverses the result.

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

4 - Groovy

print'“¡ḍ©ÑİƬ⁶“ṠƇƇv“¡¤Ẇ_»ż“⁾Ḋ‘Ọ'.reverse()

Try it online!

SCORE = 77/25 - 15 = -11.92

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

3 - Jelly

“¡ḍ©ÑİƬ⁶“ṠƇƇv“¡¤Ẇ_»ż“⁾Ḋ‘Ọ

Try it online!

SCORE: 25 ÷ 15 - 15 = -13.33

No unprintable characters. Verification that no characters from 1 used.

\$\endgroup\$
6
  • \$\begingroup\$ @Shaggy Was just about to say that lol \$\endgroup\$
    – MilkyWay90
    Commented Jul 4, 2019 at 18:24
  • \$\begingroup\$ I'd recommend deleting your post while you're fixing the problem and undelete it and edit it once you've fixed it \$\endgroup\$
    – MilkyWay90
    Commented Jul 4, 2019 at 18:29
  • \$\begingroup\$ @MilkyWay90 should be fixed now. Sorry \$\endgroup\$ Commented Jul 4, 2019 at 18:36
  • \$\begingroup\$ @NickKennedy Okay, thanks. Now I can gett to work on my answer \$\endgroup\$
    – MilkyWay90
    Commented Jul 4, 2019 at 18:36
  • \$\begingroup\$ @ExpiredData I think it’s the length rather than score, though I did think it was that too at one point! \$\endgroup\$ Commented Jul 4, 2019 at 18:45

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