#Bash/GolfScript, 72 bytes, score 26/72 = 8/9 (~0.888...)
Bash/GolfScript, 72 bytes, score 26/72 = 8/9 (~0.888...)
.~0 ()
{
declare "-f" @* ".~0" " ()
"+@n.;
echo '.~0;'
}
.~0;
Contains a single trailing space on the first two lines.
Try it online in Bash.
Try it online in GolfScript.
Simply modification of @jimmy23013's answer for the "Write a Polyquine" challenge. The modification that was done was removing the trailing space after the third line, and changing \n"+@n.;
to \n "+@n;
.
Bash will print lines 1 and 2 like this:
.~0 () <- Trailing space
{ <- Trailing space
And GolfScript will print lines 1 and 2 like this:
.~0 () <- No trailing space
{ <- Both leading and trailing space
Here the base program, Bash output, and GolfScript outputs respectively with the new-lines replaced with \n
:
.~0 () \n{ \n declare "-f" @* ".~0" " ()\n "+@n.;\n echo '.~0;'\n}\n.~0;
.~0 () \n{ \n declare "-f" @* ".~0" " ()\n "+@n.;\n echo '.~0;'\n}\n.~0;
.~0 ()\n { \n declare "-f" @* ".~0" " ()\n "+@n.;\n echo '.~0;'\n}\n.~0;
^^^ Note the difference here