Print the previous answer in reverse - with a catch (pt. 2)

5

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

Had to write some custom JS (not my strong point), so it may be a bit dodgy. If you stick strictly to the formatting guidelines, it should be fine.

$.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>

Geza Kerecsenyi

Posted 2019-07-04T17:47:02.990

Reputation: 1 892

2Are we not allowed to use the same code points (for non-ASCII aligned code pages) or characters? What do you mean by "miss out"? – MilkyWay90 – 2019-07-04T17:50:02.093

Is it length in bytes or chars, it doesn't clearly state in rules – Expired Data – 2019-07-04T18:38:14.140

1@ExpiredData It says all lengths are in bytes – MilkyWay90 – 2019-07-04T18:41:26.310

@MilkyWay90 by "miss out", I mean assume as if their part of the equation didn't exist. Don't replace them with values, but for instance assume that, since $l_{n−1}$ isn't defined, the fraction cannot be formed. – Geza Kerecsenyi – 2019-07-04T19:34:58.673

2isn't the score always going to be majorly based on the answer two before yours, no matter the length of your own? – Jo King – 2019-07-04T22:03:21.110

1@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. – Draco18s no longer trusts SE – 2019-07-04T23:26:51.240

1Thus, 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. – pppery – 2019-07-05T00:24:06.460

Answers

1

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!

pppery

Posted 2019-07-04T17:47:02.990

Reputation: 3 987

2

1 - 05AB1E

"Hello, World!"

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

Try it online!

MilkyWay90

Posted 2019-07-04T17:47:02.990

Reputation: 2 264

1The score for this would be $\frac{15}{1}-0=15$ - @MilkyWay90 see my response to your comment on the question. – Geza Kerecsenyi – 2019-07-04T19:35:01.477

1Why 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. :) – Kevin Cruijssen – 2019-07-05T06:14:44.637

1

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

Draco18s no longer trusts SE

Posted 2019-07-04T17:47:02.990

Reputation: 3 053

1

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.

Nick Kennedy

Posted 2019-07-04T17:47:02.990

Reputation: 11 829

0

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.

Shaggy

Posted 2019-07-04T17:47:02.990

Reputation: 24 623

0

3 - Jelly

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

Try it online!

SCORE: 25 ÷ 15 - 15 = -13.33

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

Nick Kennedy

Posted 2019-07-04T17:47:02.990

Reputation: 11 829

@Shaggy Was just about to say that lol – MilkyWay90 – 2019-07-04T18:24:19.190

I'd recommend deleting your post while you're fixing the problem and undelete it and edit it once you've fixed it – MilkyWay90 – 2019-07-04T18:29:51.653

@MilkyWay90 should be fixed now. Sorry – Nick Kennedy – 2019-07-04T18:36:04.053

@NickKennedy Okay, thanks. Now I can gett to work on my answer – MilkyWay90 – 2019-07-04T18:36:27.500

@ExpiredData I think it’s the length rather than score, though I did think it was that too at one point! – Nick Kennedy – 2019-07-04T18:45:59.447

Time to restart the bruteforcer yet again – MilkyWay90 – 2019-07-04T18:54:59.980

0

4 - Groovy

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

Try it online!

SCORE = 77/25 - 15 = -11.92

Expired Data

Posted 2019-07-04T17:47:02.990

Reputation: 3 129