303
\$\begingroup\$

This is an challenge in which each answer builds on the previous answer. I recommend sorting the thread by "oldest" in order to be sure about the order in which the posts are made.

Note: This has become quite a long-lasting challenge, and posting new answers is fairly difficult. As such, there's now a chat room available for this challenge, in case you want advice on a particular part of a potential answer, have ideas for languages that could be added, or the like. Feel free to drop in if you have anything to ask or say!

The task

The nth program to be submitted must run in n different languages; specifically, all the languages added in previous programs to be submitted, plus one more. The program must output 1 when run in the first language used in answers to this question, 2 when run in the second language, and so on. For example, the first answer could print 1 when run in Python 3, and the second answer could output 1 when run in Python 3 and 2 when run in JavaScript; in this case, the third answer would have to output 1 when run in Python 3, 2 when run in JavaScript, and 3 when run in some other language.

Additional rules

  • Your program must run without erroring out or crashing. Warnings (and other stderr output) are acceptable, but the program must exit normally (e.g. by running off the end of the program, or via a command such as exit that performs normal program termination).

  • The output must be only the integer, but trailing newlines are OK. Other unavoidable stdout output is also allowed. Examples: interpreter name and version in Befunge-93, space after printed string in Zephyr. Some languages provide two methods of printing – with and without trailing space; in this case method without trailing space must be used.

  • Each answer must be no more than 20% or 20 bytes (whichever is larger) longer than the previous answer. (This is to prevent the use of languages like Lenguage spamming up the thread, and to encourage at least a minor amount of golfing.)

  • Using different versions of the same language is allowed (although obviously they'll have to print different numbers, so you'll need to fit a version check into the polyglot). However, you may not use a language feature that returns the language's version number. Repeating the exact same language is, obviously, impossible (as the program would have to deterministically print one of two different numbers).

  • Tricks like excessive comment abuse, despite being banned in some polyglot competitions, are just fine here.

  • You don't have to use the previous answers as a guide to writing your own (you can rewrite the whole program if you like, as long as it complies with the spec); however, basing your answer mostly on a previous answer is allowed and probably the easiest way to make a solution.

  • You cannot submit two answers in a row. Let someone else post in between. This rule applies until victory condition is met.

  • As this challenge requires other competitors to post in the same languages you are, you can only use languages with a free implementation (much as though this were a contest).

  • In the case where a language has more than one interpreter, you can pick any interpreter for any given language so long as all programs which are meant to run successfully in that language do so in that interpreter. (In other words, if a program works in more than one interpreter, future posts can pick either of those interpreters, rather than a post "locking in" a particular choice of interpreter for a language.)

  • If some interpreter gets updated and the program no longer works in the newer version then new answers can either stick to the old version or fix the program to work in the new version.

  • This challenge now uses the new PPCG rules about language choice: you can use a language, or a language interpreter, even if it's newer than the question. However, you may not use a language/interpreter that's newer than the question if a) the language was designed for the purpose of polyglotting or b) the language was inspired by this question. (So newly designed practical programming languages are almost certainly going to be OK, as are unrelated esolangs, but things like A Pear Tree, which was inspired by this question, are banned.) Note that this doesn't change the validity of languages designed for polyglotting that are older than this question.

  • Note that the victory condition (see below) is designed so that breaking the chain (i.e. making it impossible for anyone else to answer after you via the use of a language that is hard to polyglot with further languages) will disqualify you from winning. The aim is to keep going as long as we can, and if you want to win, you'll have to respect that.

Answer format

As all the answers depend on each other, having a consistent answer format is going to be helpful. I recommend formatting your answer something like this (this is an example for the second link in the chain):

2. JavaScript, 40 bytes

(program goes here)

This program prints 1 in Python 3, and 2 in JavaScript.

(if you want to explain the program, the polyglotting techniques, etc., place them here)

Victory condition

Once there have been no new answers for 14 days, the winner will be whoever posted the second newest answer, i.e. the largest polyglot that's been proven not to have broken the chain. Extending the chain after that is still very welcome, though!

The winner is Chance, see answer 194 (TemplAt).

Language list

// This snippet is based on the snippet from hello world thread https://codegolf.stackexchange.com/questions/55422/hello-world
// It was tested only in Google Chrome

// https://stackoverflow.com/a/4673436
if (!String.prototype.format) {
  String.prototype.format = function() {
    var args = arguments;
    return this.replace(/{(\d+)}/g, (match, number) => (typeof args[number] != 'undefined' ? args[number] : match) );
  };
}

var QUESTION_ID = 102370; // from the question url
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";

function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

var answers = [], answer_page = 1;

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      if (data.has_more) { $('#status').text($('#status').text() + '.'); getAnswers(); }
      else process();
    },
    // [Documentation](http://api.jquery.com/jquery.ajax/) states that `error` handler is not called for cross-domain JSONP requests, 
    // but it works here, probably because api.stackexchange.com and codegolf.stackexchange.com are on the same domain.
    error:  function (a,b,c) { 
      $('#status').text( "Failed to load answers: " + b + " " + c );
      console.log( b + " " + c );
    },
  });
}

getAnswers();

// https://stackoverflow.com/questions/6290442/html-input-type-text-onchange-event-not-working/39834997#39834997
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event
const input = document.querySelector('input');
input.addEventListener('input', onSearchInput);

function onSearchInput(e)
{
    var table = document.getElementsByTagName("table")[0];
    var str = e.srcElement.value.toLowerCase();
    var num_results = 0;

    if(str == "") // optimization for empty input
    {
        // show all rows
        for(var i = 1, row; row = table.rows[i]; i++)
        {
            row.className = "";
            num_results++;
        }
    }
    else
    {
        for(var i = 1, row; row = table.rows[i]; i++)
        {
            var hidden = row.innerText.toLowerCase().indexOf(str) == -1;
            if(!hidden) num_results++;
            row.className = hidden ? "hidden" : "";
        }
    }
    document.getElementById("results").innerText = "Results: " + num_results;
}


/* Function ParseHeader() extracts answer number, language name and size of polyglot from answer header.
   Argument: `header` - answer header string without markup, eg. "1. Python 3 (8 bytes)" or "59. Tcl, 1324 bytes".
   Retval:  object, eg. {num: 1, language: "Python 3", size: 8} or 
            null if header has wrong format
  
   There are two formats of header, new one with comma and old one with parens.
   Parsing new format only with regexp is hard because:
   - language name may contain commas,                                 eg. "51. Assembly (x64, Linux, AS), 1086 bytes"
   - there may be several sizes, of which the last one should be used, eg. "210. Haskell without MonomorphismRestriction, 10035 9977 bytes"

   There are only several answers with old format header: 1-5, 7, 12-17, 21. All of them have single size and don't have parens in language name,
   so they can be parsed with simple regexp.
   
   Algorithm: Find commas. If there are no commas parse it as old format. Otherwise parse it as new format.
   New format parsing: Let everything after last comma be `sizes`. Check if `sizes` ends with the word "bytes". If not, set size to 0.
   Take the word before "bytes" and convert it to number. Parse the rest of the header (before last comma) with regexp.
*/
function ParseHeader(header)
{
  var a = header.split(',');
  if(a.length > 1) // current format: Number "." Language "," Size+ "bytes"
  {
    // filter(s=>s) removes empty strings from array (handle multiple consecutive spaces)
    var sizes = a[a.length-1].split(" ").filter(s=>s); // " 123 100  bytes " -> ["123", "100", "bytes"]
    var size;
    if(sizes.length < 2 || sizes[sizes.length-1] != "bytes") size = 0;
    else size = +sizes[sizes.length-2];

    a.splice(a.length-1,1); // remove last element
    var match = a.join(',').match(/(\d*)\.(.*)/);
    if (!match) return null;
    return{
            num: +match[1],
            language: match[2].trim(),
            size: size,
          };
  }
  else // old format: Number "." Language "(" Size "bytes" ")"
  {
    var format = /(\d*)\.([^(]*)\((\d*)\s*bytes\)/;
    var match = header.match(format);
    if (!match) return null;
    return{
            num: +match[1],
            language: match[2].trim(),
            size: +match[3]
          };
  }
}

// 1533246057 (number of seconds since UTC 00:00 1 Jan 1970) -> "Aug 2 '18"
// other useful Date functions: toUTCString, getUTCDate, getUTCMonth, getUTCFullYear
function FormatDate(n)
{
  var date = new Date(n*1000); // takes milliseconds
  var md = date.toLocaleDateString("en-US", {timeZone:"UTC", day:"numeric", month:"short"});
  var y  = date.toLocaleDateString("en-US", {timeZone:"UTC", year:"2-digit"});
  return md + " '" + y;
}


var processed = []; // processed answers, it's called `valid` in original snippet

function ProcessAnswer(a)
{
  var body = a.body, header;

  //
  // Extract header from answer body.
  // Try find <h1> header (markdown #). If not found try find <h2> (markdown ##).
  // Extracted header contains only text, all markup is stripped.
  // For 99 language markup is later readded to language name because markup is essential for it.
  //
  var el = document.createElement('html'); // dummy element used for finding header
  el.innerHTML = body;
  var headers = el.getElementsByTagName('h1');
  if(headers.length != 0) header = headers[0].innerText;
  else {
    headers = el.getElementsByTagName('h2');
    if(headers.length != 0) header = headers[0].innerText;
    else { console.log(body); return; } // error: <h1> and <h2> not found
  }

  var info = ParseHeader(header)
  if(!info) { console.log(body); return; } // error: unrecognised header format

  if(info.num == 99 && info.language == "99") info.language = "<i>99</i>";

  processed.push({
    num:         info.num,
    language:    info.language,
    size:        info.size,
    answer_link:   a.share_link,
    user:          a.owner.display_name,
    user_link:     a.owner.link,         // `undefined` if user was deleted
    creation_date: a.creation_date,      // unix epoch (number of seconds since UTC 00:00 1 Jan 1970)
  });
}

function process()
{
  $('#status').remove();

  answers.forEach(ProcessAnswer); // answers -> processed
  
  processed.sort( (a,b)=>(a.num-b.num) ); // sort by answer number, ascending

  processed.forEach(function (a) {
    
    var date = FormatDate(a.creation_date);

    var user = a.user_link ? ('<a href="'+a.user_link+'">'+a.user+'</a>') : a.user; // redundant code, currently the only deleted user is ais523
    if(user == "user62131") user = '<a href="https://chat.stackexchange.com/users/246227/ais523">ais523</a>';

    var style = (a.num == 194) ? "background: #ccf" : ""; // 194 is winner answer

    var row = "<tr style='{0}'><td>{1}</td> <td><a href='{2}'>{3}</a></td> <td>{4}</td> <td>{5}</td> <td>{6}</td></tr>"
              .format(style, a.num, a.answer_link, a.language, a.size, user, date);

    $('#answers').append( row );
  });
}
a {text-decoration:none}
a:visited {color:#00e}

table, td, th { border: 1px solid black; }
td, th { padding-left: 5px; padding-right: 5px; white-space: nowrap; }
tr:hover { background-color: #ff9; }
td:first-child  { text-align:center; } /* # */
td:nth-child(4) { font-style:italic; } /* author */
td:nth-child(5) { text-align:right;  } /* date */

p { margin: 8px 0px }
.hidden { display: none } /* search hides rows */
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<p>
  <span>Search: </span><input autofocus> &nbsp;<span id="results"></span>
</p>
<table class="answer-list">
  <thead>
    <tr><th>#</th> <th>Language</th> <th>Size (bytes)</th> <th>Author</th> <th>Date</th></tr>
  </thead>
  <tbody id="answers">
  
  </tbody>
</table>
<div id="status">Loading answers...</div>

\$\endgroup\$
28
  • 4
    \$\begingroup\$ For people who can see deleted posts: the Sandbox post was here. \$\endgroup\$
    – user62131
    Dec 6, 2016 at 19:00
  • 6
    \$\begingroup\$ There's no need to copy the previous program, although of course you can use it as a guide; redoing the program from scratch is likely to take longer! There's no need to permalink to answers; sorting by oldest will show all the answers in order already. \$\endgroup\$
    – user62131
    Dec 6, 2016 at 19:44
  • 4
    \$\begingroup\$ @ais523 I think what was meant was that should new answers contain try it links with the new code? \$\endgroup\$
    – Blue
    Dec 6, 2016 at 19:45
  • 7
    \$\begingroup\$ I think we need a script that takes a hex dump of the code and automatically runs it in all the languages... \$\endgroup\$
    – mbomb007
    Dec 7, 2016 at 20:05
  • 5
    \$\begingroup\$ This is the Versatile integer printer posted as a different type of challenge. (Inspiration?) The final answer (currently) would score 0.0127, only beaten by Sp3000's 30 language submission... :) \$\endgroup\$ Dec 17, 2016 at 12:11

451 Answers 451

1 2
3
4 5
16
11
\$\begingroup\$

185. Makefile, 9888 9260 bytes

#16  "?63(o+?50;+'51;'  # #@ " /*"r"{\D-v e-'[fa5.q]PkPPX)\( 9 '#CO"14"^ 92                                       7 222222222222222222222222                                                             ##*/
#/*1&7//```"`    [>.>.]       )[-'][(7  >77*,68*,@'_         7 )(22)S / \iiipsddpsdoh#####(#######??   #### ##  ######     ####         ###### # ####  #######     ####         ###### # ####  #######  a5# \7aa*+42@n; 7 999993 1 7 3 1 8 1 1 55 EEEEEδΘΔΔΔΘΔΘλa k zzzzkf kf k zzzzzd kf k zzzzza kf bfz coding=utf8 p''53'S^'                                                                                                          ! 1>?7ДOq#t#>2/Wr#t#t#q#68#r#t#t#68#q#63#r#t#t#6v#>#</Wr#6}#y/===Wr#7ЯOq#>J7Д/Wr#y<Wr#>5/Wr#t#t#6y#>-=/Wr#6|#>6/Wr122! 1退
#>x#z#111#y#y#y#_#0111118&1&  111/"78"oo@        xxxxxxxxxxxx        /112\     ##### #######   # #    ##### h#115#  o#    ##### ####  ###   #### #  # #####  #    ##### ####  ###   #### #  # #####  #    #
# 36!@`D  e ++++++::@                 L               R.----._      x-----x ########8=,_## ### ###### ######## #### ##### ####### ##### ###    # # #### ### ##### ####### ##### ###    # # #### ### ##### #
#comment -[af] xxxxxxxxxxxx\#184O@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # ##########  ### ## #####  ## #### ## # #####  ## ##### ####   ##### ## # ##  ## ####  ## ##### ####   ##### ## # ##  ## ####
#~==RtRtRtMbMbMbPSPSPS                                                       # ????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!                                                           
#[#[]]QhQhQhQrQrQrHnHnHnbqbqbqLzLzLzQtQtQtTcTcTcRQRQRQ                       #
#<<<#++R++  ++++++++++++++++++++++++++++++++++++++++++U+++.._+++++++._       #
############################################################################## 4O6O@
 #-]+-}}[.^x+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]}--<^>++[+++++[>+++++++<-]>._ ++++._+++._^<]+-+<[<<._>>>-]^>[<+++++[>++++++++++<-]>@@+.---@._+>][[
#{  
#=  
#*  
#cs  
#2""/*  
#9999 9 9
#9 999 99 9999 9
#9  
# 9 9999
#`<`(+?+?0l0v01k1kMoOMoOMoOMoOMOOx0l0ix0jor0h0h1d111 0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11yxMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOotMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i000x1k1x0vx0v0l11110000011100^_)\
[ "`e```.1'.0'.6''i]56pq\{}26q",'_\['];#/s\\/;print 24; exit}}__END__/
###<$+@+-@@@@=>+<@@@=>+<?#>;?\:-._++._++++._#/<?\>3-++._6+---2._#</++++++++++++++++++++++++++++++++++++++++++++++++._++._++++++.>!\
'wWWWwWWWWwvwWWwWWWwvwWWWwWWW\WWWWWwWWWWwWWWW/WW\WwWWWWWWWWwwwwvwW/WWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWW ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO MU ([])  ({}<(((((()()())){}{})){}{})>)(({})){}{(<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)  (<><()>){({}[()])}{  #((((((\';  a=$(printf \\x00);b=$(echo -n $a|wc -c);case $b[1] in 1*)echo 54;;4*)echo 78;;8*)echo 166;;*1*)echo 50;;*)echo 58;;esac;exit;#)';  print((1/2and 9or 13<<65>>65or 68)-(0and eval('\'ppp\'.bytes.class==Array and 4or(\'_\'[0]==95and-91or-93)'))^1<<65>>62) #wWWs {}#(prin 45)(bye) 46(8+9+9+9+9+=!) </>* * * * *[[3+4*7*@]]xxxxxxxxxx
###;{a=1}={a:null};console.log a&&39||180;\
__DATA__=""""  
#p  \
__END__
set pr'[puts 59][exit]\'':;@echo 185 #';set pr'-';pr 89;exit#ss
ifdef x 
#  
#  
#:1*23!/5x%6E0  !|*****[[[828+*+@+*99]]]*****|!
#  
[mxf]-main=-[165]- ###jxf*#p 173#*
p now 70 dollar off!
p has been selling out worldwide!
#PLACET,2<- #2FAC,2SUB#1<- #52FAC,2SUB#2<- #32FACREADOUT,2PLEASEGIVEUPFACs>>>
seeeemPaeue_ewuuweeee_eeeeeeCisajjapp_ppppxf⠆⠄⡒⡆⡘😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀  
👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡→  
밠밠따빠빠맣박다맣받다맣희맣희うんたんたんたんたんうんうんうんうんうんたんうんうんうんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんたんたんうんうんうんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうん  
😊♈💖  
😇♈♈  
😊♉♈  
😇♈♈  +------+
😇♈♉  |/0110@| 
😇♈💜 |/0011 | 
😊♉♈  |/0010 | 
😊📢♈ |/0011 | 
😈♈💜 |/0001 | 
😊📢♈ |/$0011| 
😇♉💞 +------+ 
😊📢♉⠀⢃⠛⠋  
#-49,A,-1                              #
#-5,A,-1                               #
#6,A,-1                                #
1<<<< ! !
2<<<!<   !
1+``  +!!
1=  *
53  +
1>  *
51  +
#
1+  *     x+x   x  x
49 x+  xx+xxx+  x+x + x B+ ===+
x= xx x  x===  x x >8 xxx +++= +
x+  +x + x,_8=>+ xB  x+x
x==+R _*=x==  x +x==+> x x    +
 x +R"12"+8=Dx B=xD +  + xxx+
`+ x`=>8=x>  x+~ x  x +x+B+
x  +====+x>~+B+= x x + x
xD~+x 8=++>8x +=   x+    +,_   +
15 + x   x  + +  xx   +  ?   ?@  %"18"_     !
1  + x   + x ++  xx   + ?@    ?
1 \+* x    +  +  x    +   +   *
1   ! x  +x   +       + ?  !  ?
1    ! x xx --... ...--  ? @ ?
x +   ++ xx  ++ ++     +
 +xxxxx  +     +
  
#  +
+ *   +
#  + *
  ***************************************<>***********+
  +  +$$$
  <>"3"O._+ rk:start | print: "69" rk:end e$P+++++*D*+++1++1E!s
   +   + *
$'main' *****+
 -+3o4o# +
   ++       +
 * *
  +*****
#       +
 (printout t 164 )
(exit )  
#cepp  
MsgBox (0,"",169     )
#cs  
Yo::=~147
::=  
You can see an x here.<<<<
  
>{-<<<<<  
> 176
>> Output 1
>SET x TO 120. [0]{472454523665721469465830106052219449897}   @,-1,:*b5<>␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋
>X x. PPQ-}
>x--/2  
> =157;y=146--/2 
>main=print y{-ss s
  
\begin{code}  
{-x   ␉␉␉␉ 
␉
 ␉  



-}
open import IO;main = run(putStr"159" )
\end{code}
ppppppppppppp
out &49 &1
out &56 &1
out &50 &1

Take Northern Line to Tooting Bec
Take Northern Line to Charing Cross
Take Northern Line to Charing Cross
Take Northern Line to Bank
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Embankment
Take Bakerloo Line to Embankment
7 UP
Take Northern Line to Mornington Crescent
7 RIGHT
7 RIGHT
7 TEACH
6 BOND
6 BOND
6 BOND
5 RIGHT
5 LEFT
5 RIGHT
7 BOND
7 TEACH
5 TEACH
6 YELL
5 TEACH
6 YELL
6 YELL
set ! 57,,...,,.,,..,,,,,,..,,,.$^
set ! 51.                         #e.0,1,_ye{--}besizeString tnd xfmain=los1''gem x=4721en nd ogola=1$0C0 cod/|puts_e25y $"3"cl91/2 <5>6#"5"8=2860ay =+ codefn( );#6and [9]=x 3 8[]p#s
More 91 of this
How much is it
red down one blue up red down one blue up red up one red right two blue up sss
baa baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeeeeet bleeeeeeeeeeeeet bleeeeeeeeeet baaaa bleet bleeeeeeeeeet bleeet bleeeeeeeeeet
wwWWWwWWWWWwWWWWWWWwWWWWWWWWppppp
When this program starts:
There is a scribe called x
x is to write 179

*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1""//*
#include<stdio.h>
#define  x(a) #a
#define u8 "38\0 "//"
char*x="24 10 31 1"
"a c #FFC0FF""B c #0000C0""d c #58007B""e c #0C8302"
"h c #E60001""i c #CAFFFF""j c #280000""k c #CA0000""l c #CA007F""n c #330001 ""q c #E60000"
"o c #FF8000""t c #FF00BC""u c #008080"
"A c #0040C0""E c #808000""F c #00C040""G c #008000 ""R c #800000"
"H c #0000AA""I c #00AA00""J c #55FFFF""K c #AAAAAA"
"r c red""g c green""b c blue""c c cyan""m c magenta""y c #FFFF00""x c black""_ c #FFFFFF"
"HHHahtdegggggggyrggggggc"
"IHHaixuEFbGGbggbryAEGRgc"
"JJHajyurbgbgggggggb____o"
"IJHakmyyyyyyyyyyyyyyyyye"
"I__almyyyyyyyyyyyyyyyyye"
"K__anmyyyyyyyyyyyyyy_y_e"
"HH_aqggyyyyyyyyg____m_Je"
"JH_axxxxxxxxxxxxxxxxxxxx"
"K__aaaam___bbbbbBm_bbBab"
"K__________bbbbb___bbxbb";//"
int f(char*a,char*b ){puts(a?"124":sizeof(0,u8)-5?u8"67":*u8""?"37":x(0'0  "'\"")[9]?"75":'??-'&1? "79":"77");}main(){f(x,x=0);}//<*/
#1""/*/
 
>import Text.Heredoc--WWWWWWWWWWWWWW<<W
>instance Num B where fromInteger _=B 170;negate _=B$x#x
>data B=B{u::Integer};g=[here|here<-"W>W"] --WWWWWWWWWW570rt Unc27<<[w|]
>x=1;y#a=128;x#a=174
>main=print$last$172:[u$[-1]!!0|g<"Z>"] --}
 
 console.log 178;
 
#1""/*/
#if 0
#endif//*
/*/
p=sizeof(" (\");print'(''72'')';end!");main(){puts('??-'&1?"101":"92" );return 0;}
#if 0
#endif//*
print 61
#}
disp 49
#{
}{}<>        K yya+-        &  g+$
 /._++.._#<!._++.-.>@ A=AgRA;       AC
#   /
 \?     -/!+++++++++++++++++++++++++++++++++++++++++++++++++<>^+++++<\>+++.-.
endif
#<<<#/<+>/>>>\
"""#";  print(85)
#<   ~#class C{function:Main(a:String[])~Nil{83->Print();}}#+</.---.>/
#endcOmment
#nocOmment outtext("155")
#ce pS9^7^8^MUOUOF @0:8:8      \    @,,1'1'<> @125iRE
#p|o51~nJ;#:p'34'3             \=# print(size([[1] [3]][1,:])[1]==2?158+4:17)#>say 27#>>say 170-3#]#print(47 )#]#echo 21#>/#print(171)#s-#print 175#s
#8M`|  <esc>dggi2<esc>//       $}<}}<}>}[<< }<<<<<}<<}<<<<}</<<}}}<}}<}}<}    }<}}<}}<}}}<}}<<<<<<<<<<<}}}<}}<}}<}}<}}<}}<}}}<<<<<<<<<<}]~-<~-<~-<<<~-<<COprint("65")#`=>ass^_^_#
#9'>+/' 25        pppppppeeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n*n*n*ee*s<* 5>1  e*///\)Q222999686#

Try it online!

Explanation

Makefile supports line comment continuation with \, but not \\ (like Tcl, unlike gnuplot). Retina does not accept single trailing \ on odd lines, so before make code every line that is not started with # should be odd and preceded with # ... \ line. With this file structure makefile, gnuplot and Tcl end up in one place.

Starting make code: x:;@echo 185.

To polyglot gnuplot and make single-quoted string is used. From gnuplot docs: "In single-quoted strings, backslashes are just ordinary characters. To get a single-quote (ascii 39) in a single-quoted string, it must be doubled." Also I found out that pr can be used instead of print in gnuplot. So gnuplot code set pr'...';set pr'-';pr 89;exit plus make code x y:;@echo 185 gives (space after 185 is important):

set pr'\'':;@echo 185 #';set pr'-';pr 89;exit

Add Tcl:

set pr'[puts 59][exit]\'':;@echo 185 #';set pr'-';pr 89;exit

The rest of polyglot is hidden from make with ifdef x ... endif.

To simplify comment ending at lines 231-233 I used Ruby __END__ instead of =begin ... =end.

Test driver: make -f polyglot.poly does not work because for some reason make tries to compile polyglot.poly.c created by /opt/brainfuck/* transpilers, so make -f polyglot.mk is used instead.

Alphuck

Alphuck interpreter has a bug in TrivialBrainfuckSubstitution.cxx line 108: '.' should be ','. Further assuming that polyglot works with fixed interpreter. brainfuck.exe from the repo does not work, interpreter should be built from sources. Command line: bfc.exe -nobanner -l alphuck polyglot.poly. Polyglot file must have some extension, otherwise it is not recognised as code.

Batch file to run alphuck:

@echo off
copy %1 tmp.x > nul
bfc.exe -nobanner -l alphuck tmp.x
tmp.exe < nul
del tmp.x tmp.exe

Refactorings

This answer has 4 sets of changes:

  • clean-up at the end of longest line
  • 1L_AOI/Wierd/LNUSP polyglot with cockfuck, Fission, Cardinal and Morse
  • Archway/Archway2/PATH/YABALL polyglot
  • moved Minkolang, Rails, rk-lang and CSL into 2L

Other changes:

Replaced Thutu __DATA__ with __END__. Didn't replace Perl 5 __DATA__ to prevent __END__ becoming Incident token.

Nhohnhehr is back out of LNUSP, reduced one size. Additional column of spaces to the left is for 1L_AOI, spaces to the right are for Retina.

1L_AOI/Wierd/LNUSP

<!-- tabs code from https://codepen.io/oknoblich/pen/tfjFl -->

<style>
p {background-color:lightblue;display:inline}
y {background-color:yellow}
c {background-color:cyan}
m {background-color:rgb(255,123,255)}
t {background-color:lightgreen}
._ {position:relative} /* make '_' visible */

/* https://css-tricks.com/snippets/css/prevent-superscripts-and-subscripts-from-affecting-line-height/ */
sup {
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
}
</style>


<main>

  <input id="tab1" type="radio" name="tabs" checked>
  <label for="tab1">1L_AOI</label>

  <input id="tab2" type="radio" name="tabs">
  <label for="tab2">+Wierd</label>

  <input id="tab3" type="radio" name="tabs">
  <label for="tab3">+LNUSP</label>

  <input id="tab4" type="radio" name="tabs">
  <label for="tab4">+Fission+Cardinal+Morse</label>

  <input id="tab5" type="radio" name="tabs">
  <label for="tab5">+cockfuck</label>

  <input id="tab6" type="radio" name="tabs">
  <label for="tab6">final&#x200A;<sup>*</sup></label>

  <section id="_1L_AOI">
<pre>


 +    +





 +         +
         +   +   +  +    +    +
                          +++  +
 +  +  +       +      + 
   +            +   +         +
   +     +          +  +    +
 +            +       + + +
   +    +   + +      +  
   +    ++    +     +    +     +
   +        + +       +
   +     +   ++       +
   +       +  +       +
         +    +       +

  +   ++     ++ ++     +
         +     +
</pre>
  </section>

  <section id="Wierd">
<pre>
<p>x</p>
<p>x</p>
<p>x</p>+    +  
<p>x</p>
<p>x</p>
<p>x</p>
<p>x</p>
<p>x</p>
<p>x</p>+  <p>x</p>     <p>x+x</p>   <p>x</p>  <p>x</p>
<p>x</p>  <p>xx</p>  <p>xx+xxx+</p>  <p>x+x</p> <p>+</p> <p>x</p>  <p>+</p>    +
<p>x</p>  <p>xx</p> <p>x</p>  <p>x</p>     <p>x</p> <p>x</p>    <p>xxx</p> <p>+</p>++  +
<p>x</p>+  <p>+x</p> + <p>x</p>     <p>+</p> <p>x</p>   <p>x</p>+<p>x</p>
<p>x</p>  <p>+</p>     <p>x</p>    <p>x</p> +<p>x</p>  <p>+</p>  <p>x</p> <p>x</p>    +
 <p>x</p> <p>+</p>     <p>+</p>   <p>x</p>   <p>x</p>  <p>+</p>  <p>+</p> <p>xxx+</p>
 <p>+</p> <p>x</p>     <p>x</p>   <p>x</p>+  <p>x</p>  <p>x</p> +<p>x</p><p>+</p> +
<p>x</p>  <p>+</p>    +<p>x</p>  <p>+</p> +  <p>x</p> <p>x</p> + <p>x</p>
<p>x</p>  +<p>x</p>   +<p>+</p>  <p>x</p> +    <p>x</p>+    +     +
<p>x</p>  + <p>x</p>   <p>x</p>  <p>+</p> +  <p>xx</p>   +
<p>x</p>  + <p>x</p>   <p>+</p> <p>x</p> ++  <p>xx</p>   +
<p>x</p>  +  <p>x</p>    <p>+</p>  +  <p>x</p>    +
<p>x</p>     <p>x</p>  <p>+x</p>   +       +
<p>x</p>      <p>x</p> <p>xx</p>
<p>x</p> +   +<p>+</p> <p>xx</p>  ++ ++     +
 <p>xxxxxx</p>  <p>+</p>     +
</pre>
  </section>

  <section id="LNUSP">
<pre>
<y>1</y>     <y>!</y> <y>!</y>
<y>2</y>   <y>!</y>    <y>!</y>
<y>1</y>+    +<y>!!</y>
<y>1</y>   <y>*</y>
<y>53</y>  <y>+</y>
<y>1</y>   <y>*</y>
<y>51</y>  <y>+</y>
x
<y>1</y>+  <y>*</y>     x+x   x  x
<y>49</y> x<y>+</y>  xx+xxx+  x+x + x  +    +
x  xx x  x     x x    xxx +++  +
x+  +x + x     + x   x+x
x  +     x    x +x  +  x x    +
 x +     +   x   x  +  + xxx+
 + x     x   x+  x  x +x+ +
x  +    +x  + +  x x + x
x  +x   ++  x +    x+    +     +
<y>15</y> + x   x  + +  xx   +  <y>?</y>   <y>?@</y>             <y>!</y>
<y>1</y>  + x   + x ++  xx   + <y>?@</y>    <y>?</y>
<y>1</y>  +<y>*</y> x    +  +  x    +   <y>+</y>   <y>*</y>
<y>1</y>   <y>!</y> x  +x   +       + <y>?</y>  <y>!</y>  <y>?</y>
<y>1</y>    <y>!</y> x xx              <y>?</y> <y>@</y> <y>?</y>
x +   ++ xx  ++ ++     +
 xxxxxx  +     +
</pre>
  </section>

  <section id="FissionCardinalMorse">
<pre>
1     ! !
2   !    !
1+    +!!
1   *
53  +
1   *
51  +
x
1+  *     x+x   x  x
49 x+  xx+xxx+  x+x + x  +    +
x  xx x  x     x x    xxx +++  +
x+  +x + x     + x   x+x
x  +<y class=_>R _*</y> x    x +x  +  x x    +
 x +<y>R"12"</y>+   x   x  +  + xxx+
 + x     x   x+  x  x +x+ +
x  +    +x  + +  x x + x
x  +x   ++  x +    x+    +     +
15 + x   x  + +  xx   +  ?   ?<c>@  %"18"</c>      !
1  + x   + x ++  xx   + ?@    ?
1  +* x    +  +  x    +   +   *
1   ! x  +x   +       + ?  !  ?
1    ! x xx <m>--... ...--</m>  ? @ ?
x +   ++ xx  ++ ++     +
 xxxxxx  +     +
</pre>
  </section>

  <section id="cockfuck">
<pre>
1<t><<<<</t> ! !
2<t><<<</t>!<t><</t>   !
1+<t>`</t><y>`</y>  +!!
1<y>=</y>  *
53  +
1<y>></y>  *
51  +
x
1+  *     x+x   x  x
49 x+  xx+xxx+  x+x + x <y>B</y>+ <y>===</y>+
x<y>=</y> xx x  x<y>===</y>  x x <y>>8</y> xxx +++<y>=</y> +
x+  +x + x<y>,<t class=_>_</t>8=></y>+ x<y>B</y>  x+x
x<y>==</y>+R _*<y>=</y>x<y>==</y>  x +x<y>==</y>+<y>></y> x x    +
 x +R"12"+<y>8=D</y>x <y>B=</y>x<y>D</y> +  + xxx+
<t>`</t>+ x<y>`=>8=</y>x<y>></y>  x+<y>~</y> x  x +x+<y>B</y>+
x  +<y>====</y>+x<y>>~</y>+<y>B</y>+<y>=</y> x x + x
x<y>D~</y>+x <y>8=</y>++<y>>8</y>x +=   x+    +<y>,<t>_</t></y>   +
15 + x   x  + +  xx   +  ?   ?@  %"18"      !
1  + x   + x ++  xx   + ?@    ?
1  +* x    +  +  x    +   +   *
1   ! x  +x   +       + ?  !  ?
1    ! x xx --... ...--  ? @ ?
x +   ++ xx  ++ ++     +
 xxxxxx  +     +
</pre>
  </section>

  <section id="final">
<pre>
1<<<< ! !
2<<&lt;!<   !
1+``  +!!
1=  *
53  +
1>  *
51  +
<y>#</y>
1+  *     x+x   x  x
49 x+  xx+xxx+  x+x + x B+ ===+
x= xx x  x===  x x >8 xxx +++= +
x+  +x + x,_8=>+ xB  x+x
x==+R _*=x==  x +x==+> x x    +
 x +R"12"+8=Dx B=xD +  + xxx+
`+ x`=>8=x>  x+~ x  x +x+B+
x  +====+x>~+B+= x x + x
xD~+x 8=++>8x +=   x+    +,_   +
15 + x   x  + +  xx   +  ?   ?@  %"18"<y>_</y>     !
1  + x   + x ++  xx   + ?@    ?
1 <y>\</y>+* x    +  +  x    +   +   *
1   ! x  +x   +       + ?  !  ?
1    ! x xx --... ...--  ? @ ?
x +   ++ xx  ++ ++     +
 <y>+</y>xxxxx  +     +
</pre>
<br><sup>*</sup>&#x200A;with changes for SILOS (<code>#</code>), DOBELA (<code>_</code>), Retina (<code>\</code>) and 2L (<code>+</code>)
  </section>
    
</main>


<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font: 14px/1 'Open Sans', sans-serif;
  color: #555;
  background: #eee;
}

main {
  min-width: 320px;
  max-width: 830px;
  padding: 30px;
  margin: 0 auto;
  background: #fff;
}

section {
  display: none;
  padding: 20px 0 0;
  border-top: 1px solid #ddd;
}

input {
  display: none;
}

label {
  display: inline-block;
  margin: 0 0 -1px;
  padding: 15px 25px;
  font-weight: 600;
  text-align: center;
  color: #bbb;
  border: 1px solid transparent;
}

label:hover {
  color: #888;
  cursor: pointer;
}

input:checked + label {
  color: #555;
  border: 1px solid #ddd;
  border-top: 2px solid orange;
  border-bottom: 1px solid #fff;
}

#tab1:checked ~ #_1L_AOI,
#tab2:checked ~ #Wierd,
#tab3:checked ~ #LNUSP,
#tab4:checked ~ #FissionCardinalMorse,
#tab5:checked ~ #cockfuck,
#tab6:checked ~ #final {
  display: block;
}
</style>

Archways/PATH/YABALL

<!-- tabs code from https://codepen.io/oknoblich/pen/tfjFl -->

<style>
r {font-weight:bold;color:red}
b {font-weight:bold;color:blue}
g {font-weight:bold;color:green}
y {background-color:lightblue}

/* https://css-tricks.com/snippets/css/prevent-superscripts-and-subscripts-from-affecting-line-height/ */
sup {
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
}
</style>


<main>
  
  <input id="tab1" type="radio" name="tabs" checked>
  <label for="tab1">Archway (74)</label>
    
  <input id="tab2" type="radio" name="tabs">
  <label for="tab2">Archway2 (98)</label>
    
  <input id="tab3" type="radio" name="tabs">
  <label for="tab3">PATH (133)</label>
    
  <input id="tab4" type="radio" name="tabs">
  <label for="tab4">YABALL<sup>*</sup> (132)</label>
    
  <input id="tab5" type="radio" name="tabs">
  <label for="tab5">ADJUST<sup> *</sup> (113)</label>
    
  <section id="Archway">
<pre>
}{}<>        K yya+-        &  g+$
 /._++.._#&lt;!._++.-.>@ A=AgRA;       AC
#   /
 \?     -<y><b>/</b>!<r>+++++++++++++++++++++++++++++++++++++++++++++++++</r><g><></g>^<r>+++++<</r><b>\</b></y>>+++.-.
endif    <y> </y>                                                           <y> </y>
#<<<#<y><b>/</b><r><+></r><b>/</b></y>>>>\                                                       <y> </y>
"""#"<y>;</y>  print(85)                                                    <y> </y>
#<   <y>~</y>#class C{function:Main(a:String[])~Nil{83->Print();}}#+&lt;<y><b>/</b><r>.---.></r><b>/</b></y>
#endc<y>O</y>mment                                                   <y> </y>
#nocO<y>m</y>ment outtext("155")                                     <y> </y>
#ce p<y>S</y>9^7^8^MUOUOF @0:8:8      \    @,,1'1'<> @125iRE         <y> </y>
#p|o5<y>1</y>~nJ;#:p'34'3             \=# print(size([[1] [3]][1,:])[<y>1</y>]==2?158+4:17)#>say ...
#8M`|<y> </y> &lt;esc>dggi2&lt;esc>//       $}<}}<}>}[<< }<<<<<}<<}<<<<}&lt;/<<y><</y>}}}<}}<}}<}    }<}}<...
<y>#9'<r>>+<r><b>/</b></y>' 25        pppppppeeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n<y>*</y>n*n*ee*s<* 5>1  e*//...

</pre>
  </section>

  <section id="Archway2">
<pre>
}{}<>        K yya+-        &  g+$
 /._++.._#&lt;!._++.-.>@ A=AgRA;       AC
#   <b>/</b>
 \? <y>    <r>-</r><g>/</g>!<r>+++++++++++++++++++++++++++++++++++++++++++++++++</r><g><></g>^<r>+++++</r><g><\></g><r>+++.-.</r>         </y>
endi<y>f</y>
#<<<<y>#</y>/<+>/>>>\
"""#<y>"</y>;  print(85)
#<  <y> </y>~#class C{function:Main(a:String[])~Nil{83->Print();}}#+&lt;/.---.>/
#end<y>c</y>Omment
#noc<y>O</y>mment outtext("155")
#ce <y>p</y>S9^7^8^MUOUOF @0:8:8      \    @,,1'1'<> @125iRE
#p|o<y>5</y>1~nJ;#:p'34'3             \=# print(size([[1] [3]][1,:])[1]==2?158+4:17)#>say ...
#8M`<y>|</y>  &lt;esc>dggi2&lt;esc>//       $}<}}<}>}[<< }<<<<<}<<}<<<<}&lt;/<<}}}<}}<}}<}    }<}}<...
<y>#9'<r>>+<r></y><b>/</b>' 25        pppppppeeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n*n*n*ee*s<* 5>1  e*//...

</pre>
  </section>

  <section id="PATH">
<pre>
}{}<>        K yya+-        &  g+$
 <y><b>/</b><r>.</r>_<r>++..</r>_<b>#</b></y>&lt;!._++.-.>@ A=AgRA;       AC
#<y> </y>  /
 <y><b>\</b>?     <r>-</r><g>/!</g><r>+++++++++++++++++++++++++++++++++++++++++++++++++</r><b><</b></y>>^+++++<\>+++.-.
endif                                                       <y> </y>
#<<<#/<+>/>>>\                                              <y> </y>
"""#";  print(85)                                           <y> </y>
#<   ~#class C{function:Main(a:String[])~Nil{83->Print();}}#<y><r>+</r></y>&lt;/.---.>/
#endcOmment                                                 <y> </y>
#nocOmment outtext("155")                                   <y> </y>
#ce pS9^7^8^MUOUOF @0:8:8      \    @,,1'1'<> @125iRE       <y> </y>
#p|o51~nJ;#:p'34'3             \=# print(size([[1] [3]][1,:]<y>)</y>[1]==2?158+4:17)#>say ...
#8M`|  &lt;esc>dggi2&lt;esc>//       <y><b>$</b><g>}<}}<}>}</g>[<g><< }<<<<<}<<}<<<<}&lt;</g><b>/</b></y><<}}}<}}<}}<}    }<}}<...
#9'>+/' 25        pppppppeeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n*n*n*ee*s<* 5>1  e*//...

</pre>
  </section>

  <section id="YABALL">
<pre>
}{}<>        K yya+-        &  g+$
 /._++.._#&lt;<b>!</b><y><r>.</r>_<r>++.-.></r><b>@</b></y> A=AgRA;       AC
#   /                                                         <y>                        </y>
<y> \<b>?</b></y>     -/<b>!</b><y><r>+++++++++++++++++++++++++++++++++++++++++++++++++</r><g><></g><b>^</b></y>+++++<\>+++.-.
endif
#<<<#/<+>/>>>\
"""#";  print(85)
#<   ~#class C{function:Main(a:String[])~Nil{83->Print();}}#+&lt;/.---.>/
#endcOmment
#nocOmment outtext("155")
#ce pS<g>9</g>^7^8^MUOUOF @0:8:8      \    @,,1'1'<> @125iRE
#p|o51~nJ;#:p'34'3             \=# print(size([[1] [3]][1,:])[1]==2?158+4:17)#>say ...
#8M`|  &lt;esc>dggi2&lt;esc>//       $}<}}<}>}[<< }<<<<<}<<}<<<<}&lt;/<<}}}<}}<}}<}    }<}}<...
#<b>9</b>'>+/' 25        pppppppeeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n*n*n*ee*s<* 5>1  e*//...

</pre>
<sup>*</sup>only normal mode path is shown
  </section>

  <section id="ADJUST">
<pre>
}{}<>        <y><b>K</b></y> <y><r>yya+-</r></y>        <y><b>&</b></y>  <y><r>g+$</r></y>
 /._++.._#&lt;!<y><g>.</g></y>_++.-.>@ <y><r>A=A</r><b>gRA;</b></y>       <y><r>A</r><b>C</b></y>
#   /
 \?     -/!+++++++++++++++++++++++++++++++++++++++++++++++++<>^+++++<\>+++.-.
endif
#<<<#/<+>/>>>\
"""#";  print(85)
#<   ~<y><b>#</b></y>class C{function:Main(a:String[])~Nil{83->Print();}}#+&lt;/.---.>/
#endc<y><g>O</g></y>mment
#noc<y><g>O</g></y>mment outtext("155")
#ce<y> </y>pS9^7^8^MUOUOF @0:8:8      \    @,,1'1'<> @125iRE
#p|o51~nJ;#:p'34'3             \=# print(size([[1] [3]][1,:])[1]==2?158+4:17)#>say ...
#<y><g>8</g></y>M`|  &lt;esc>dggi2&lt;esc>//       $}<}}<}>}[<< }<<<<<}<<}<<<<}&lt;/<<}}}<}}<}}<}    }<}}<...
<y><g>#</g></y>9'>+/' 25        pppppppeeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n*n*n*ee*s<* 5>1  e*//...

</pre>
<sup>*</sup>ADJUST code unchanged
  </section>
    
</main>


<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font: 14px/1 'Open Sans', sans-serif;
  color: #555;
  background: #eee;
}

main {
  min-width: 320px;
  max-width: 830px;
  padding: 30px;
  margin: 0 auto;
  background: #fff;
}

section {
  display: none;
  padding: 20px 0 0;
  border-top: 1px solid #ddd;
}

input {
  display: none;
}

label {
  display: inline-block;
  margin: 0 0 -1px;
  padding: 15px 25px;
  font-weight: 600;
  text-align: center;
  color: #bbb;
  border: 1px solid transparent;
}

label:hover {
  color: #888;
  cursor: pointer;
}

input:checked + label {
  color: #555;
  border: 1px solid #ddd;
  border-top: 2px solid orange;
  border-bottom: 1px solid #fff;
}

#tab1:checked ~ #Archway,
#tab2:checked ~ #Archway2,
#tab3:checked ~ #PATH,
#tab4:checked ~ #YABALL,
#tab5:checked ~ #ADJUST {
  display: block;
}
</style>

Press "Run code snippet", then "Full page".

\$\endgroup\$
11
\$\begingroup\$

69. rk-lang, 1750 1748 1737 1734 1733 1744 1738 bytes

#16  "(}o+?23!@)-("//*\Dv;'[af2.q]PkPPX'#CO)"14";n4
#/*0|7//```"`   [-'v][!(>77*,;68*,@;'1,@10␉␉11)(22)S␉␉(1 P''53'S^'q
#>␉
# 36!@␉`
#
#_>++++.>++++++::@-----x-.+?
#`<`
#<]}} +<[<.>>-]>[
#{
#x}
#
#=x<R+++++[D>+++++++59xL+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---4O6O@.>][
#x%+>+=ttt Z_*.
#D>xU/-<+++L
#R+.----\).>]|
#[#[(?2?20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_00)
[ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/
#
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.
#
'((( p\';a=a;case $argv[1]+${a:u} in *1*)echo 50;;*A )echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f 2")and 9or 13<<(65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{}) ){}{})>){(<{}(({}){})>)}{}({}())wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWW li ha '#}#( prin 45)(bye)46(8+9+9+9+9+=!)((("'3)3)3)"'
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39
""""
=begin
<>{nd
#sseeeemPaeueewuuweeeeeeeeeeCis:ajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/*
#define u8 "38\0"
#define p sizeof'p'-1?u8"67":"37"
#include<stdio.h>
main ( ){puts( p);}/*
print 61
#}
disp 49;
#{
}<>
$'main'3
#-3o4o#$$$
#<T>"3"O.s
=end
"""#"
#}
#sx|o51~nJ;#:p'34'3\=#print(17)#>27.say#]#print (47)#]#echo 21# xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi fwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm 
# s 8␛dggi2␛`|$// '' 25  16*///~-<~-<~-<<<~-XCOprint("65")#s^_^_222999 "69" e rk:start | int os = 69 print: "69"& os rk:end |6#

VIP score (Versatile Integer Printer): .005308 (to improve, next entry should be no more than 1820 bytes)

rk-lang (Ryan Klingler Language -_-) was a terrible language I wrote when I was 13. However, due to the generally awful syntax, it's more or less perfect for this challenge.

Numbers

This program prints 69 in rk-lang, 68 in Python, 67 in C11, 66 in Surface, 65 in ALGOL 68, 64 in Agony, 63 in Brian & Chuck, 62 in Grass, 61 in S.I.L.O.S, 60 in Moorhens 2.0, 59 in Tcl, 58 in Ksh, 57 in Wise, 56 in dc, 55 in Brain-Flak Classic, 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainfuck, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

Verification

Try it online!

  • Reng can be tested to output 19 here.
  • Modular SNUSP can be tested to output 31 here.
  • Incident tested to output 33 via manual balancing of tokens.
  • Deadfish~ was tested to output 48 by WheatWizard.
  • Moorhens 2.0 was tested to output 60 by WheatWizard.
  • Surface can be tested to output 66 using this interpreter.

Explanation

I appended this line: # p rk:start | int y = 69 print: y & s rk:end | 6#

rk-lang ignores everything before rk:start and everything after rk:end. It is completely space-delimited. It ignores anything it doesn't care about.

rk-lang

I started out with this code to print 69:

rk:start int y = 69 print: y rk:end

ALGOL-68

To make this work with ALGOL-68, I had to add ALGOL-68 comments around it. So it looked like this:

# rk:start int y = 69 print: y rk:end #

Wise

To make it work in Wise: Wise recognizes ~-!|^&[]?:. My code uses :. A | or & before any other characters Wise cares about will cancel that out.

# rk:start | int y = 69 print: y | rk:end | #

SMBF

To make it work in SMBF: SMBF recognizes ><+-.,[] and, based on the rest of the code, prints the second-to-last character in the file. Therefore, the second-to-last character in the file must be 6 so that it prints properly:

# rk:start | int y = 69 print: y | rk:end | 6#

Alphuck

To make it work in Alphuck: Alphuck recognizes aceijojps. p and s are jumps. Since there is an s in rk:start, I had to add a p before that to get the jump to cancel out. Since there was a p in print:, I had to add an s after it to cancel that out. Since rk-lang conveniently ignores these if put in the "wrong" syntax, I can just stick them pretty much anywhere.

# p rk:start | int y = 69 print: y | s rk:end | 6#

Incident

To make it work in Incident, I had to make sure no extra characters were tokenized/detokenized. This was pretty simple - I just had to swap one of the |'s to an &. So the code looks like this:

# p rk:start | int y = 69 print: y & s rk:end | 6#

On top of that, I added one character earlier on in the line. It looked like this:

# sss8ggi2|$// ''25  16*///~-<~-<~-<<<~-XCOprint("65")#s^_^_2229996#

I simply added a space before the 2 near the end to prevent Incident from tokenizing it:

# sss8ggi2|$// ''25  16*///~-<~-<~-<<<~-XCOprint("65")#s^_^_ 2229996#

Fixing

It broke because we realized the interpreter automatically prints a space after it prints an integer. This was what the rk code needed to look like:

rk:start print: "69" rk:end

Adding that to the code messed up Alphuck and Incident. So I added random stuff here and there to balance Alphuck jumps and Incident tokens out:

"69" e rk:start | int os = 69 print: "69"& os rk:end |6#

The extra "69" at the start detokenized "6. The e detokenized e<space>. The os was necessary for Alphuck jumps. Switching "69" & to "69"& detokenized 9".

Golfing

Saved two bytes - changed my code to #p rk:start | int y = 69 print: y & s rk:end |6# by removing two spaces. I forgot that the languages who required these characters are not space-delimited, as rk-lang is.

Saved 11 bytes thanks to SnoringFrog:

So I took advantage of the s's we could add to RK to cut out some alphuck filler. Then I found out that os could replace the ax that Moorhens was using. I moved the detokenization of <space>2 to earlier in the line so that it also helps with Prelude padding (and then removed a space from several lines up to also then detokenize '<space>).

Knocked off three bytes thanks to a suggestion by Chance to remove # #.

Saved a byte thanks to WheatWizard pointing out an unnecessary space.

\$\endgroup\$
2
  • \$\begingroup\$ # # could also be dropped. this just drops out of Algol's comment, then immediately initiates another one. It could instead just be one large comment. Well done! \$\endgroup\$
    – Chance
    Jun 5, 2017 at 22:52
  • \$\begingroup\$ Does the space between | and 6 need to be there? I can't see why it might and removing it doesn't break anything on TIO. \$\endgroup\$
    – Wheat Wizard
    Jun 6, 2017 at 14:48
11
\$\begingroup\$

346. Janet, 15638 bytes

# 6 "($11k_rv+'50;+'51;5 5 %$\--$[0=@$a a tqx\"  /*4DvehfbIg/\"" 3 4//*{{'F*Pi^26qx}318qkp16[.qx]"8=,k] PPX~_~)"xvyq"\(2#    CO|"14"   #:9 {?63#k9 # a aa5k x##  k zzzzkf kf k zzzzzd kf k zzzzza kf bfz    "'" #\\
# 1"7"//['][']     ````      [>.>.?]~~)[aatxy iiipsddpsdoh (22)S ## &rem     / \     <!--      mxf          a5   >2.8.7.@_    ;    xAegguEayiuFtMZWWWWWWWWWUUUUUzR                   ]++(--[                :_a5# 202ø!},{P_<Ám/e!<ÁmOe!<É}M<ÁmS15%!!%BB44,222%!!%BBPZPYAAA4D,5P[5?4-0!<½!!22<2/!]ss1]'[kkX"204".â'_PPQss>3Ā~>1Ā~>7Ā~v 7 999993 1 7 3 1 8 1 1 55                                         #z#1111#y#y#y#_#        {! 1>?7ДOq#t#>2/Wr#t#t#q#68#r#t#t#68#q#63#r#t#t#6v#>#</Wr#6}#y/===Wr#7ЯOq#>J7Д/Wr#y<Wr#>5/Wr#t#t#6y#>-=/Wr#6|#>6/Wr122! 1退           coding=utf8         @ [[[["472"?]]]]******<
# if-0//        nthteo 18&1& nthieo nthneo anet\#184  O@  R[+++]._----.^   p/112\11&if -%*==-* (echo 335&exit)else goto e& WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW#WWWWWWWWWWWWWWWWWWWW;WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWR
#6!@`D>>if 3>3*>++++++ \        / 78"oo@" , `'[]'[]`L ;     >"082",,,@_    x-----x         ##### #######     #### ##  ######     ####         ###### # ####  #######     ####         ###### # ####  #######    #EEEEEδΘΔΔΔΘΔΘλ
# endif/*   v 1 >>>>@::c>>">r"{\>>>>> @ 0:8:8/_}\(* [>]R 10G|'53'S  1 1 1  \) >>>>>>>#####>#######>>>#>#>>>>#####>>#>>>#>>>#>>>>#####>####>>###>>>####>#  # #####  #    ##### ####  ###   #### #  # #####  #    #
#comment -[v>]-main=-[165]-   ### >>>>>>>>9 [@,,,"279"]>252O>"01",,@_  h$s o# 326 ########>>>>##>###>######>########>####>#####>#######>#####>###>>>>#>#>####>###>#####>#######>#####>###>>>>#>#>####>###>#####>#>>>>>>>>>
#[[/]e]    >>>>>>>> @!:!8:6:2/_ >>>>>>>>>>>>>>>>>>>>>>>>>> ;>>>>>>>>>>>>>>>>> eeePs#v##########  ### ## #####  ## #### ## # #####  ## ##### ####   ##### ## # ##  ## ####  ## ##### ####   ##### ## # ##  ## ####
#-e                                                                                #  ????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????! :1*23/5%6E2                                               
#11 cbbbzcba aaabaca1tauaxayatbubxbtcuc11                                          #
#~[! R++++++] +++++++++\++++++++++++++++++++++++++++++++++U.._+++++++._+++o+++o--ox#
####################################################################################>121 *1220*1211k*1220 2 2 2 11
 #{{{{]~*[~* -[>+<-----]>-._+++++._+._@]+-}}[._+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]}++<^>--[^>[+[>+^-----]>.-._+++._>]<[+[>+<-----]>--._++++._+++._<] ]+-+<[<=oC<=oC<._>>>>-]^>[<-[>+<-----]>-'4o'6o@@+.---@._+>$] )++$--![+++[>+++++++<-]>+._+++++.._>](  {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{{ {{ <<>> }<}>}[<}}<<}<<<<<}<<}<<<<}<<<}}}<}}<}}<}}<}}<}}<}}}<}}<<<<<<<<<<<}}}<}}<}}<}}<}}<}}<}}}<<<<<<<<<<}] [328]  >>\[/>\/\>>>>>>>]>\[./>>\/\./\/>>>\./]  [[[
#* *#p 173#*
#`⟪`⟪\⟫9999 9 9e:
#{  
#/*9 999 99 9999  nMn MMMMMMMnnMnnnMnMMMMMMMnMMnnnnnMM>nMnMnnMnMnnnn   //`. :-print(186). end_of_file. `MnM   @,,, "286"_+1y2 #<"67",,@_␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋'''␌`297'print quit`sssMMMMMMMMnnMnMnnnMnMMM M''';201-1|>print;exit 0␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋
#|9 e: 
#cs 9 9999
#<<<#-->
#><meta http-equiv=X-UA-Compatible content=IE=99><!-- e$P+++++*D*+++1++1E!sss
#bqbqbqLzLzLz TcTcTcRqRqRq TzTzTzRtRtRt MbMbMbTqTqTqAbAbAbTmTmTmBqBqBqMtMtMtUgUgUg\␍331;"${print+191}$x";exit;#?>\␍print(f'𒁁'=='-'and 241or 1);'''ss';@'
#= $1$10l0c01b1b0l0i 0r 0h0h1d1 1_1 0e 0y0y 0mo1d0y0e0e001d0i0f 0g 0n0n1 10mo0n0t_0t0mo0f0t0g0g0f0h0r0r0i0001b10c 0c0l1111000001_1 100|_\
[ ' "`e```.1.0.6i]56pq["``\/*]298 .quit._[`\']put 294 bye!\` #s['];#/\\/;print 24;exit}}__END__/
###\MoOMoOMoOMoOMOOmoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOomoomoOOOM  e>+@+-@@@@=>+<@@@=>+<?#>;?\:-._++._++++._#/<?\>3-++._6+---2._#/++++++++++++++++++++++++++++++++++++++++++++++++._++._++++++.>!\
'w(WWW;wW;WW;Ww;v;;wW;Ww;WW;Ww;vw;W_;WW;wW;WW;WW;WW;Ww;WW;WW;w;WW;WWWWWw;;;WWWWWWWWwwwwvwWWWwWWWWwvwWWwW\WWwvwWWwWWWwvwW/Ww\WWW ho ho ho ho // ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi hi MU ) ([])({}<(((((()()())){}{})){}{})>)(({})){}{(<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>) (<><()>){({}[()])}{  #(((()()()()())()())(()()())(()()())(()()())(()()())(()()())(()()())(()()())(()()())(()()())(()()())) ((((((((\'; a=$(printf \\x00);b=$(echo -n $a|wc -c);case $b[1]¢ in 1?)echo 54;;1* )echo 242;;4* )echo 78;;8* )echo $((9999999999999999999>0?166:244));;0?1??)echo 50;;0* )echo 282;;* )echo 58;;esac;exit;#{IO.puts 295#';  print (0and eval('":"&&(defined?A)&&290||(defined?pp)&&190||(defined?__dir__)&&13||"_"[0]==95&&108||109+1')or(None and(-1 %2>0and 9or 247)                                                                      or 5<<64>>64or 68));                   exit; "$'#{print(187);exit}'$/"; #    wWWsssss {}#(prin 45)(bye){{{}#}#}#(prin 199)(bye)) 46(8+9+9+9+9+=!) >* * * * *[[[[3+4*7*@] ] ] ]xxxxxxxxxxxxxxxxxxxxxx
###;{e=1}={e:null};console.log e&&39||180;\
__DATA__="""  
#"  \
__END__
set pr'[puts 59][exit]\'':;@echo 185 #';set pr'-';pr 89;exit
ifdef ss 
1     ! !
2   !    !
9      !!
2#
#  
#  
#dddd d b ggggg g iii i llllll l dddd ddddd cc ggggg g ooooooo dddd d ooooooo iii iiiii ooooooo eeeeeeeeee
#PLACET,2<- #2FAC,2SUB#1<- #52FAC,2SUB#2<- #32FACREADOUT,2PLEASEGIVEUPFACs wwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWw W
jrzaeeaeuee_wuuwq jii_iullluiiiogr se_eeepaeeeeeeeeee;eeecisajjarpppppp ⠆⠄⡒⡆⡘😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀
👋🔢🌚🌝🌝🌚🌚🌚🌚🌚🐸🐸🐸🐸🐸🐸😂😂😂😂😂😂😂🌚🔥😂😂😂😂😂😂😂💯💩🐸🔥😂💞💩💞😂😂😂😂💞🔥🌚▲▲▲²²²²▲¡▼¡▲▲¡⎚¿⁵228¦ₔ₁₉₃2♦10♦10♦10♥☰䷩䷏䷏䷨䷏䷩䷩䷩䷩䷩䷩䷩䷩䷩䷩䷩䷩䷩⚎ֱֲֵֶֶֶֶַַַָָ  
밠밠따빠빠맣박다맣받다맣희맣희吾有一數曰二百八十一書之うんたんたんたんたんうんうんうんうんうんたんうんうんうんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんたんたんうんうんうんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうん  
😊♈💖  ↨↑1↑↑↑↑↑↑↑↑↨21↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑↨↨↑2↨↑1↑↑↑↨↨0↑0↕→
😇♈♈  
😊♉♈  
😇♈♈  
😇♈♉  
😇♈💜  
😊♉♈  
😊📢♈  #e:>*****[[[[828+*+@+*99] ] ] ]*****<
😈♈💜  
😊📢♈  
😇♉💞  
😊📢♉🐸⠀⢃⠛⠋  
#-49,A,-1                              #
#-5,A,-1                               #
#6,A,-1                                #
#X  
#+------+XX   X       XXX
_|/0110@| X X  XXXXXXXXX X
_|/00011| X X   XXXXXXX
_|/1001 | X
_|/1001 | 
_|/1000 | 
_|/$001 | 
#+------+  [``]````
#+    +
1   *xxxxxxx
53 x+       x x     xxx
1  x*  xxxx  xx   xx x  x
x  x  x  x  x x  x  x  xx
 +xx xxxxxxx +x xxxxxxx  xxxx
x  x   x      x   x
51  +xx        xxx
#  
1   *     x``   x  x
49 #+  xx+x=>+  x+x + x B+ ===+
#  =x x  x===  x x >8 xxx +++= +
#+  +x + x,_8=>+ xB  x+x
# =+R _*=x==  x +===+> x x    +
 x +R"12"+8=Dx B=xD +  + xxx+
#+ ``=>8=x>  x+~ x  x +x+B+
#  +====+x>~+B+= x x + x
#D~+x 8=++>8x +=   x+    +,_   +
15 + x   x  + +  xx   +  ?   ?@  %"18"_     !
1  + x   + x ++  xx   + ?@    ?
1 \+* x    +  +  x    +   +   *
1   ! x  +x   +       + ?  !  ?
1    ! x xx --... ...--  ? @ ?
x +   ++ xx  ++ ++     +
 +xxxxx  +     +
  
#= +
+ *   +
#= + *
#=**************************************************+
  +  +$$$
#>"3"O._   +// rk:start | print: "69" rk:end       +
   + ; + *
$'main' *****+ %++ %++ @@* %-- @@* %++ %++ @@*
 -+3o4o#  +
  <++"269">o+
^* *
 #+*****|
.x= #   +
,,  .=#
 #+ OOO       =#
 #^=
+`` 231 =#
#  #uuu#
,,..,.,,,,..,.,.,,..,,.,,,...,,.,,..,,,,,,..,,,.$
  
write 224;bye; 
  
 console.log 178;
  
~~~x  
main:Int  
main =248 
~~~  
literally, print 249
(print 164  (exit    ) )
 ( *)
begin write         ('288'    )end.(*)
print 61
  
#<<<##>  
         print(85)
#<<<##>CO COMMENTp]] 
execute_process(COMMAND echo 296)#[[
  
T:251  
E:0  
#+IDRIS: main:IO      (    );main=print 291
#ppW<#require"stdio"Stdio:write     (293  )#>
#ceppp  ;  ;   ; ;
MsgBox (0,"",169   )
#cs  
You can see an x here.<<  
  
>{-<<<<<  
> 176
>> Output 1
>SET x TO 120.
>X x.   ;-}
>l=length$show"\0";main=print$[0,0,0,233,0,146,157]!!l{-
  
\begin{code}  
{- ;  ␉␉␉␉ 
␉
 ␉  



-}
open import IO;main = run (putStr"159" )
\end{code}
ppppppppppp  ;
# {{{ {{{ {{{ {{
#!ZZt >>END-IF
#xxxh  program-id.h.procedure
#xxxg  diVision.display 230.
#}}}f >>IF 2>2
#}}}e
#xxxd
#xx}c
#}}}b
#x}xa
#n::=~147
2k::~322
::=
*/
#if!1
#endif*/*/*/*/;say 338/*
#1""/*
333
quit

:e
 if -%~0==- echo 341&exit
set/ax=2222222222
 if -%x%==- echo 330&exit
 if %x% gtr 0 echo 337&exit
echo 336
exit

#!rubyperl
; print 0&&339||340
__END__

#}}} }put$343 {{{
















































































































































































































































































#-->
<p>301</p>
<a>304</a>
<b>305</b>
<i>309</i>
<u>310</u>
 
<script type="text/tiscript">self.html="<p>302"</script>
<script>d=document;d.innerHTML="<p>344";onload=function  (){
g=window
e=g.external
d.body.style.color='000'
d.body.innerHTML=e===null?334:[ ].pop?
257+[10,,,0,,,18,2,!e?77:d.clear?5:58,d.compatible?50:g.XMLHttpRequest?49:d.nodeType?8:55][[""+[].pop][0].length-!!d.head-!d.fonts-28]:d.dir==''?312-1:308}
</script>
 
<style>
head+body,text{display:none}
:,a,i{color:fff}*{+color:fff}
a{-color:000}-a,b{color:000;-color:fff}
: u,-i{color:000}
:after{content:"258";[;content:"276";]}
@media all\0{
:after{content:"260";color:#fff\ 
}:root:before{content:"316";color:fff}
:before{content:"314"}}
@media \0 all{:after{content:"266"}}
@media x{:before{content:"345"}:after{color:#fff
}}</style>

<attache>Print[194]Exit[]</attache>
 
#^^aa>>[0]{472454523665721469465830106052219449897} ()
#aa->=323
22-23-31-13-13-31-13-13-31-13-13-31-13-13-31-12-12-23-31-13-13-31-13-13-31-13-13-31-13-13-31-21-22-21-12-32
Take Northern Line to Tooting Bec
Take Northern Line to Charing Cross
Take Northern Line to Charing Cross
Take Northern Line to Bank
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Hammersmith
Take District Line to Upminster
Take District Line to Embankment
Take Bakerloo Line to Embankment
7 UP
Take Northern Line to Mornington Crescent
7 RIGHT
7 RIGHT
7 TEACH
6 BOND
6 BOND
6 BOND
5 RIGHT
5 LEFT
5 RIGHT
7 BOND
7 TEACH
5 TEACH
6 YELL
5 TEACH
6 YELL
6 YELL
4OURfuorfuor
FOU4
FOU4
FOU4fuor
FOU4four
4444fuor
FOU4
FOU4four
4444
4OUR
4OUR
4444
 ; ;
set ! 57
set ! 51
out &49 &1
out &56 &1
out &50 &1
When this program starts:
There is a scribe called x
x is to write 179

p now 70 dollar off!
p has been selling out worldwide!
More 91 of this
How much is it
red down one blue up red down one blue up red up one red right two blue up
baa baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeeeeet bleeeeeeeeeeeeet bleeeeeeeeeet baaaa bleet bleeeeeeeeeet bleeet bleeeeeeeeeet
#
""Hata@#8;[;s]p>0::&&1Pr"93"sgeEx Cr Uithary,8"t."F ._#giogrl6154op>a>std[]!![ ]?42e>805在u92g=1\'\0C0ML5:
 
*/
 
#1""
#if!1
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1""//*:
#include<stdio.h>
#define z(a) #a
#define u "e"//"
const char*i="25 10 37 1""a c #FFC0FF""B c #0000C0""d c #58007B""e c #0C8302""o c #FF8000""t c #FF00BC""u c #008080""h c #E60001""i c #CAFFFF""f c #280000""k c #CA0000""l c #CA007F""n c #330001""q c #E60000""A c #0040C0""E c #808000""F c #00C040""G c #008000""R c #800000""H c #0000AA""I c #00AA00""C c #55FFFF""K c #AAAAAA""r c red""g c green""b c blue""c c cyan""m c magenta""y c #FFFF00""x c black""_ c #FFFFFF""V c #000502"": c #010001""@ c #090909""2 c #000002""3 c #000003""4 c #000004""HHHVahtdegggggggyrggggggc""IHH3aixuEFbGGbggbryAEGRgc""CCH:afyurbgbgggggggb____o""ICH2akmyyyyyyyyyyyyyyyyye""I__:almyyyyyyyyyyyyyyyyye""K__4anmyyyyyyyyyyyyyy_y_e""HH_:aqggyyyyyyyyg____m_Ce""CH_@axxxxxxxxxxxxxxxxxxxx""K___aaaam___bbbbbBm_bbBab""K___________bbbbb___bbxbb";//"
typedef int known,macro;int x=!  '(',y[60];macro m(){0;}int f(int a,...){y[x=0]=x=72;printf("\x25i",!m?195:!a?124+x:sizeof' '-1? (1&*z (N)?234:"\??-"[1]?218:67^*u""):*u""?37:z (0'0  0'0 )[7]?75:"\??-"[1]?77+a/2:77);}__attribute__((weak))int main(){known y;int i;f(x,x=sizeof y);x=1;return 0;}__attribute__((destructor))int g(){x?0:puts("198");}//())*/
#1""/*/
<<<<<<<<<<WQTkTTX
 
 
>import Prelude;import GHC.IO;import Data.Functor.Const;import Data.String;import Text.Heredoc;import Control.Exception;import Language.Haskell.TH;import Text.Show.Functions;instance Monoid a=>Monad (Const a)where _>>=_=mempty
>instance K Float;instance IsString Integer where{fromString _=0};b=x#x
>i_= -1`mod`2+c;data B=B Int;_=B b;e=error"#";f?n=  unsafePerformIO$ catch (f e)$ \ErrorCall{}->r n;instance Num(a->b);instance Num();instance Show(Q a)where{show _=""};f= (^);q _=r$ (d.B)?4;d(B _)=r$0`f`f 2 64;class(Show a,Floating a)=>K a where{k::a->String;k _=show$ (id::a->a)pi};c=l (- x )`mod`4;g=[here|here<-""]--[|]
>--W
>x=0;y#a=subtract 0b1206;x#a=174;h a=a^x;r=pure;l a=length$ show a;forall=0;z|(∀)<-5=forall;b1206|let _._=x;negate _=3=206+[40,58,0,57,55,26,16,3,4,-78,0,1,8,5,6,12-1]!!(l("  ",0x0.1,1e1,(0`id`),k(0::Float ),toEnum 0::Num a=>Enum a=>a )+2*l  (do a<-Const[1];pure a,h pi,h(0::Real a=>a))- 3*(l$(pure$TupE[]::ExpQ))-(-q?6+70+z));(!)=seq
>;
>main|let p!_=0=print$ sum[last$ 172:[[b,0,170,303]!!i_|g<">"],0!61]--} 
 
#1 ""/*/
#if!1
#endif//*
/*/
#if!1
p_;
select 192;
.exit
382-9/5*50
quit
#endif
p=sizeof("   (\");print'(''72'')';end !" );main(){puts('??-'&1?"101":"92" );return 0;}
#if 0
#endif/*
#}
disp 49
#{
}{}<>
 /._++.._# !._++.-.>@
#:  /
 \?     -/!  +++++++++++++++++++++++++++++++++++++++++++++++++<>^+++++<\>+++.-.
rebol[ ]prin either Value? 'disarm[223][270];red[ ]prin 221;  + #.---.>/
#s{  /<+>/   K yya+-        &  g+$
endif#                A=AgRA;       AC
# {\
""";'"#{'#'}'}'
#@[[[["272"?]] #]]******<
#<<<##>␍'@#'''
#ce:  ~#class C{function:Main(a:String[])~Nil{83->Print();}}#$/````(print 346)9
#endcomment K`250
#nocomment outtext("155" )
#/`psZ283MIOnDrFe @,,,"284_"># 01-:2/_;:@,,,"285"_!k1"923"3k,# @#_+1y2"982"2k,# @#;# k-'1:,,@_  pS9^7^8^MUOUOF
#\!|!o51   ;        ~nJQ  p'34'  \=#x=4;print(1>>-1<2 ? 17 : Inf16-0|>sizeof>2 ? 162 : √4x<8 ? 201 : 225+2>>1*2 )#p⟫try {EVAL 'say 「27」;exit'};say 237#⟫say 167#{{p{{}}}}say 235#]#print(47)#]#echo 21#>/123nnn; :/aa*7+42@n;/#print(171)#s-#print 175#s|#print(208)#sCOMMENTprint("65" )#ERi521@<? ? ?342;![[["172"?]]]]* * * * * *<es9#
#8M`|  <esc>dggi2<esc>// :~- <~-< ~-<<<~-! `=> #
#1//  >>END-IF*>>>9#
# '>+/*' 25  >[};}]+pppppeee^ee*n\               \! 99              \*n*n*e*s*s*s*ee*n*n*n*e*sss*e*n*n*n*ee*js"(*)//dd"        <e 5>1  */// **/*/*/*/*/*/*/--\)∙226p|_|_X222999612#

Try it online!diff

Janet has # line comments, double-quoted strings and strings delimited by any number of backticks.

Line 66: [``]```` closes ``-delimited string and a tuple opened on line 23 and opens ````-delimited string.

Line 610: ````(print 346)9 (9 is for YABALL).

\$\endgroup\$
2
  • 5
    \$\begingroup\$ I cannot believe this challenge is still going, 346 languages in a single polyglot is an incredible achievement on its own, and especially considering some of the insane langs in here \$\endgroup\$
    – des54321
    Apr 16, 2022 at 18:39
  • \$\begingroup\$ This is insane. Congrats for actually managing to do this! \$\endgroup\$
    – Qaziquza
    Apr 17, 2022 at 6:56
10
\$\begingroup\$

25. Pip, 220 bytes

#v`16/"<"6/b.q@"(::):::  (22)S#;n4"14"
#>3N6@15o|> ^*ttt*~++~~~%
#=~nJ<R"12";
#[
#|
print((eval("1\x2f2")and 9 or 13)-(0and+4)^1<<65>>62)#@46(8+9+9+9+9+=!)=#print(17)#3]#echo 21#===2|/=1/24=x=9+/
#8␛dggi2␛` |1|6//1''19+6

represents a literal ESC character, as per previous submissions.

This program prints 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng (test here), 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in Vim/V, and 1 in Python 3.

The 1|6 is used by both Retina and Japt and the // serves to comment out the end of the code so that Japt doesn't output anything else. I feel like 26 should be fairly 'easy' to sneak into the end since SMBF needs a trailing 6, so anything that will output the last item in the code (being 26) should be at an advantage... Perhaps 05ab1e? Good luck!

\$\endgroup\$
4
  • 1
    \$\begingroup\$ I had a look at 05AB1E. It almost works very easily; the main issues are Hexagony (this one's easily solvable), Pip, and Japt. (The problem is that Pip comments start with two spaces, and Japt doesn't like that at all, because a space is the equivalent of a closing parenthesis; this causes Japt to add opening parentheses to the start of the program to balance, leading to a syntax error because the closing parentheses are commented out.) 05AB1E next still seems like a good idea – it'll output 26 for almost any program ending 26 – but maybe you'll have to move the Pip earlier. \$\endgroup\$
    – user62131
    Dec 14, 2016 at 15:35
  • \$\begingroup\$ Followup: $// works as a comment marker in Japt that's happy to see spaces later on the line. I might have another try in a bit, but if someone else wants to get there first, go for it; testing a program in 26 different languages is exhausting. (Also, it's too late to edit my previous comment, but I should have said "almost any program ending "26".) \$\endgroup\$
    – user62131
    Dec 14, 2016 at 15:44
  • \$\begingroup\$ @ais523 Agree about tiring testing, such hard work! What's annoying is finding a problem in Japt and having to re-test the others! I did really enjoy this challenge though. I wonder if there's a record for the smallest polyglot with most languages... \$\endgroup\$ Dec 14, 2016 at 15:45
  • \$\begingroup\$ The problem is precisely that // is a comment marker in Japt, but Japt doesn't know it's a comment marker, so it tries to balance parentheses in it and ends up making things worse. $// avoids that problem by telling it not to parse the stuff until the next dollar. \$\endgroup\$
    – user62131
    Dec 14, 2016 at 15:46
10
\$\begingroup\$

26. 05AB1E, 224 bytes

#v`16/"<"6/b.q@"(::):::  (22)S#;n4"14"
#>3N6@15o|> ^*ttt*~++~~~%
#=~nJ<R"12";
#[
#|
print((eval("1\x2f2")and 9 or 13)-(0and+4)^1<<65>>62)#@46(8+9+9+9+9+=!)=#print(17)#3]#echo 21#===2|/=1/24=x=9+/
#8␛dggi2␛` |1|6//1"'"'--1+26

represents a literal ESC character, which you likely know by now if you're here, but I'm reminding you just in case.

This program prints 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng (test here), 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in Vim/V, and 1 in Python 3.

I wish I could explain this a bit, but I mostly just stumbled through this blindly. Never heard of/used 05AB1E or Pip, and never used Pyth (which gave me the most trouble).

05AB1E saw most of the program as an unclosed string (from ")and 9 onwards), so that needed to be closed. Pip and Pyth didn't cooperate with the extra double quote initially, which turned into trial and error of single/double quote placement until they complied.

The exact math used for Pip was mostly arbitrary, as long as it resulted in 25, so toying with that got me a plain 26 at the end for 05AB1E while still calculating the 25 needed for Pip.

\$\endgroup\$
1
  • \$\begingroup\$ You should probably note that you need to pipe in empty input for this to work (e.g. < /dev/null), otherwise the interpreter hangs waiting for input \$\endgroup\$
    – Sp3000
    Dec 17, 2016 at 8:53
10
\$\begingroup\$

46. Cubix, 946 bytes

#  5"16" 3//v\(@;# # \D'[af2.q]'# "14"<;n4
#/*`3 gkggZ">[77*,;68* ,@;'1,q)  ␉␉␉␉(22)PSPP( 
#yx␉;36!@
#`<` ␉
#=
#<]+<[.>-]>[
#{#z}# (prin 45 ) (bye)<
###xR+++++[D>+++++++ndL+++<-][PLEASE,2<-#2PLEASE,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2DOGIVE]>+.---.>][
#Rx%>~~~+ +~*ttt*.x
#D>xU/-<+++L)
#R+.----.>]|
#[yxyx0l0v01k1k0l0ix0jx0h0h1(d111x0eeU0bx0b0o1d0b0ee0ee00m1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10vx0v0l11111100(^_))46(8+9+9+9+9+=!)
#|
print((eval("1\x2f2")and(9)or(13))-(0and 4)^1<<(65)>>(62))or'(\{(\{})(\{}[()])}\{}\{}\{})'#1111|=/=1/24=x=9[<$+@+-@@@@=>+<@@@=>+<?#>+.--.]/
__DATA__=1#//
#.\."12"__*
###;console.log 39
""""#//
=begin //
#seemeePaeueewuuweeeeeeeeeeCisajjapppp/*/
#define␉z sizeof'c'-1?"38":"37"
#include<stdio.h>
main(   )/*/
#()`#`\'*/{puts(z);}/*'``
$'main'//
#-3o4o#$$$
<>"3"O.<>//
=end #//
"""#"#//
#>27.say# /7Jn~49c53c'43'p;|
#8␛dggi2␛`␉|1|6$//''25  =#print(17)#zsss!]#echo 21#^_^_*///$/*23!@4O6O@Z222999"26

is a literal tab, a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it.

Try it online!

VIP score (Versatile Integer Printer): .009718 (to improve, next entry should be no more than 1008 bytes; 953 or less beats the top VIP score)

Rundown

This program prints 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainf***, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

Verification

Most of the languages are tested by the test driver shown above. You can test Reng here and Modular SNUSP here; they output 19 and 31 respectively, as required. Incident is checked by keeping the tokens balanced as described in previous answers.

Minor golfing:

I cleaned up a few characters here and there. I'd detail what, but that was several days ago and in the interim I've had to pull two all-nighters, so I barely remember. I do know that I managed to get rid of one of alphuck's ps loops in the first half, so the alphuck/evil line now begins with a single s. Overall, I golfed down to 939 bytes (and I've saved my TIO link for the golfed version of #45 if someone wants to see it).

Cubix:

@Chance has mentioned this language a lot, and after discovering that Octave wasn't going to cooperate and not having any other ideas, I decided to go ahead and add this. I wanted to use pretty much anything else, as this is going to be a beast to maintain, but I was out of ideas. (I did notice that we have a 46 in the code already though. Not sure if there's a way to leverage that. If someone thinks of one, I'm more than happy to delete this answer and use Cubix later).

Cubix/Hexagony interplay is going to be a mess, so I'm hoping that the way I intertwined them doesn't make that any worse.

For following Cubix, you'll want this interpreter. The Cubix code itself is fairly simple, the pointer wanders around the code until it hits the / in the middle of the Hexagony capsule. Fortunately, Hexagony's output command ! is a skip instruction in Cubix, so we avoid the terminating @ and enter the reals Cubix code 4O6O@, which just pushes the digits we need, outputs them, and exits.

Hexagony:

We're back to the left-to-right capsule, which automatically saves us two characters, with an added $/. The / is the mirror Cubix needs (> would also work here for Cubix, but Perl and Hexagony wouldn't like it) and the $ lets Hexagony jump over it. One of the filler z's is now gone as well.

Incident:

Cubix's output detokenized O. I remedied this by capitalizing one of alphuck's c's in the evil line. Evil ignores capital letters, but c was performing a useless action for us. This created a token with two C's from Incident (conveniently almost exactly where the now detokenized O's are) to rebalance things.

SNUSP scare:

In trying to have Cubix dodge a minefield of o and >+<, I rearranged various characters in the SNUSP line (though I didn't know that's what I was editing at the time). I checked the driver for each change and nothing ever complained (which was worrisome, but I just ran with it). As I was typing this up, I checked Modular SNUSP and it failed ("so that's what that line's for!"). Thankfully, other edits meant I could restore the line to what it was before without breaking anything. Close call.

Tips for the future:

We still have a filler z on the last line. Also, the #z on line 7 (PicoLisp line) can be exchanged for a single letter Japt command (I used Q for a bit). You can't remove both though, or z will become a token. But, two of the z's in C/C++ can be changed to any other character. All of these things combined could be useful for generating tokens and for letting you slip in just a few characters without Hexagony and Cubix blowing up.

\$\endgroup\$
12
  • 1
    \$\begingroup\$ May I recommend using Glypho at some point. It might be nice because it is mostly character agnostic. \$\endgroup\$
    – Wheat Wizard
    Mar 10, 2017 at 3:09
  • \$\begingroup\$ @WheatWizard Thanks for the suggestion! We're definitely starting to run low on ideas. Glypho looks workable as long as the aaba instruction doesn't error on an empty stack since this also happens to be Trigger's character agnostic jump code in line 2. If it does error, working an instruction into line one will be a difficult. Maybe a ~5 language solve just for that instruction. Not necessarily impossible though. \$\endgroup\$
    – Chance
    Mar 10, 2017 at 14:51
  • \$\begingroup\$ Awesome :-) Any idea what's wrong with Japt? \$\endgroup\$ Mar 10, 2017 at 18:22
  • 1
    \$\begingroup\$ @RobertFraser But Python'll blow up because it'll only recognise ASCII characters, unless specified with another encoding, which will cause more problems down the line. \$\endgroup\$
    – clismique
    Mar 11, 2017 at 4:50
  • 1
    \$\begingroup\$ It works now \o/ \$\endgroup\$ Mar 11, 2017 at 16:52
10
\$\begingroup\$

58. Ksh, 1288 bytes

#16  "(}23!@)(" 3//*v\D;'[af2.qc]PkPPX'#)"14";n4
#/*0|7//`"`   ['][!(>77*,;68*,@;'1,@1␉0␉␉11)(22)S␉( 1P''53'S^'q
#>␉
# 36!@␉`
#
#
#`<`
#<]+<[.>-]>[
#{
#z}
#
#=x<R+++++[D>+++++++  L+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>+.-- -. >][4O6O@
#x%+>+=ttt Z_*.
#D>xU/-<+++L
#R+.----\).>]|
#[#[(}2}20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k10vx0v0l111111^_00)
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.|
#
[ ']56pq[' ];#//
'(((p\';a=a;case $argv[1]+${a:u} in *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f2")and 9 or 13)-(0and 4)^1<<(65)>>62)or"'x"or'{}{}{}{}({}<(((((()()())){}{})){}{})>)\{(<{}(({}){})>)}{}({}())'#}#(prin 45)(bye)46(8+9+9+9+9+=!)|/=1/24=x/
__DATA__=1#"'x"//
#.;R"12"'
###;console.log 39
""""#//
=begin //
#sseeeemPaeueewuuweeeeeeeeeeCisajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/*
#define p sizeof'p'-1?"38":"37"
#include<stdio.h>
main ( )/*/
#*/{puts(p);}/*
#
/*
<>{//
#}
disp 49#//
#{
}<>//
$'main'//
#-3o4o#$$$
#<R>"3"O.
=end #//
"""#"#//
#}
#s|o51~nJ;#:p'34'\=#print (17)#>27.say#]#print(47)#]#echo 21#
#sss8␛dggi2␛`|$//''25  16*///~-<~-<~-<<<~-^_^_X222999"26

Try it online!

is a literal tab, a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it.

VIP score (Versatile Integer Printer): .006601 (to improve, next entry should be no more than 1355 bytes)

Rundown

This program prints 58 in Ksh, 57 in Wise, 56 in dc, 55 in Brain-Flak Classic, 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainfuck, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

Verification

Most of the languages are tested by the test driver shown above.

  • Reng can be tested to output 19 here.

  • Modular SNUSP can be tested to output 31 here.

  • Incident was verified to test 33 by @ais523.

  • Deadfish~ can be tested to output 48 using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, but and prints a number of >> prompts to standard output, which are an unavoidable consequence of running any Deadfish~ program.

Explanation

@ais523 mentioned in his dc post that his answer used the same technique that Lua typically uses in polyglots, and that Lua doesn’t have # comments. I had looked into Lua a while ago and gave up on it because I didn’t know this trick of declaring a literal list from the scripting languages perspective. Last I looked at Lua, I learned that its interpreter would skip the first line if it started with a #. So I looked into creating hole in line two to put Lua.

I succeeded in this endeavor, and pasted the dc line into line 2; thinking Lua and dc would ultimately both live there. Then I noticed something with Japt.

I had recently started paying attention to the JavaScript that was transpiled by Japt, as seen in this utility. Until @WheatWizard’s Japt explanation, I hadn’t been thinking of Japt as a transpiler, mostly because I don’t really know JavaScript any better than I do any other language in this polyglot; which is to say that only really know its basic syntax. So when I glanced at the JavaScript Transpolation it only registered in my front brain as an even bigger symbol-salad than the polyglot itself.

This transpolation revelation lead me to 2 epiphanies. First, Japt transpiles comments – which clarified a LOT of the behavior I had seen. I’ll come back to this in the Japt section. Second, and more importantly, when I pasted dc into line 2 (or more specifically, when I pasted ['] into line 2), the majority of the polyglot got cut from the end of the JavaScript transpolation.

This told me that it might be possible to get Japt to stop giving us so many headaches when we use curly braces. (I have danced around Japt and curly braces in at least 3 previous answers.) And that in turn meant that Ksh could be differentiated from Zsh using the upper case variable expansion I played with in my Zsh answer.

Ksh

The variable expansion ${a:u} returns A in Zsh and a in both Ksh and Bash. Our existing shell script, when run in Ksh, returned the same answer as Zsh, so thanks to @whearwizard’s golf suggestion, we concatenated our existing case select argument $argv[1] with ${a:u}, and created a third case which looks for A to differentiate Zsh and Ksh. (On my own I would have nested cases which is more verbose.)

We also have to assign the a variable with the a value, which is what’s happening at the beginning of this Bash/Ksh/Zsh polyglot.

;a=a;case $argv[1]+${a:u} in *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;

And the preceding string '(p(\' gets another ( to balance out the ) in the 3rd case definition.

That’s the easy part. Now how did we include it?

Japt

I confirmed @ais523’s assertion that that there is a parser bug in that unmatched [’s will cause Japt not to parse the anything after the [. And according to @ETHproductions, this bug has possibly existed since he wrote the parser (late 2015 – early 2016). So, this “feature” is in bounds for this polyglot. So, how do we exploit it?

For starters the bracket has to be closed for other languages, but hidden from being closed for Japt. The technique that I stumbled into solved this right off the bat, uses ' to take the next character as a string so ['] opens the bracket, takes ] as a string which is never transpiled to JavaScript.

Pip needed the backtic based string still, and that got moved to line 4 (more on that later). I believe Japt also still sees the backtic string, and considers every ] therein to be part of the string and not a closing bracket. So, the only rule we have to follow is to not put 2 closing brackets between ['] and the start of this string on line 4. Not a big cost.

Next, Japt’s existing answer (1|6$) has lived on the last line of the polyglot for as long as I remember, but now that we’re not transpiling past line 2, we need to move this. Currently, line 1 is dominated by C’s preprocessor directive syntax, not to mention all the 2D languages that have to traverse the space. All these competing needs mean that Japt must conclude on line 2 and line 2 must start with #/* in order to remain hidden from the scripters and to initiate C/C++ block comment. So that’s where we begin.

# tells Japt to take the ascii value of the next character: /. This instruction breaks up the block comment syntax which gets passed to JavaScript as 47*. Since, 47 is prime and therefore not easily multiplied by some fractional x to arrive at 7, I chose to multiply by zero and then add in the 7. I pulled the same trick as found at in the prior answer to sum 0 and 7 like so: #/*0|7.

From here, it would be preferable to immediately go into our parsing error to hide the rest of the polyglot, but #/*0|7 ['] transpiles to 47*0|7,, and that comma make for an unexpected end of input error (if you run this as stand-alone), so we obfuscate the transpolation with a Javascript comment. Remember, this still means that the ['] is parsed and transpiled, but Javascript will choose not to act on it come run time, because it is in fact a comment.

So, #/*0|7//['] gives us everything we need to answer with Japt and effectively kill it. But as always the devil’s in the details.

Pyth

Pyth is another language that attempts to parse the whole polyglot, even though we tell it to quit in line 1. For Pyth we hide the bulk of the polyglot in the double quote that starts on line 2 which we only occasionally dip out of for things like Python’s multi-line string decleration. Pyth didn’t like to parse the Japt bracket solution, so the " had to go before the brackets. But the brackets can’t exist from within a string from Japt’s perspective if we want to bug the parser. So, for Pyth, we add `"` which Japt sees a single character, backtic string, and Pyth sees a long double quote string.

Pip

Pip similarly did not like the bracket attack, but Pip like Japt recognizes the backtic as a string declaration, so we had to go a different route. Currently line 1 is obscured form Pip by way of a double space, line comment immediately following the 16, so we just do the same here prior to the Japt brackets then enter the backtic string as soon as Labrynth would allow.

Underload/Trigger/Prelude/Whitespace/Whirl/Incident

With all the space being taken up by Pip/Pyth/Japt on line 2, and the rigid requirements of the the Befunges to align their line 2 code with their line 1 code paths, some stuff had to move out of the beginning of line 2. Trigger got moved to the end of the Pyth string in line 1 where the Pyth quit statement resides. Underload got moved for the same reason, landing back near its previous home, towards the end of line 2.

The 0 thrown into the beginning of line 2 caused one of Whirl’s IPs to spin CCW instead of CW. So I had to correct the spin and position later in line 2 with an extra 10111. The order of these instructions remains, but the characters are not consecutively placed any longer because of Prelude and Incident. (you could maybe save a byte by refactoring the whirl/Incident/cow line, but ain't nobody got time for that.)

Incident didn’t like the Whirl fix because it caused 10 and 01 to become tokenized and then overlap with some business tokens on the incident line causing the lot of them to de-tokenize, so the whirl insert had to get chopped up. Also, Underload’s move caused some parenthetic reshuffling for Prelude.

All of these needs plus the flexibility of Whitespace caused line 2 to shake out to look like this:

#/*0|7//`"`['][!(>77*,;68*,@;'1,@1␉0␉␉11)(22)S␉(1 P''53'S^'q

Brain-Flak/Classic & C/++ & Octave

Finally, with all the curly brace requirements of Japt removed, I looked back through the history for all the Japt appeasing moves that have taken place and undid them.

The Bran-Flak business string now looks like this:{}{}{}{}({}<(((((()()())){}{})){}{})>)\{(<{}(({}){})>)}{}({}()) requiring only a single backslash to appease only Thutu.

The C/C++ “puts” line now looks much more reasonable like this #*/{puts(p);}/*.

And finally, the Octave+(Brain-Flak's stack-shell-game) looks like this:

<>{//
#}
disp 49#//
#{
}<>//

Oh, I also took the @ out of line 1. I never knew why I needed it, and it seems I don't today. /shrug.

Test Driver Changes

I added a few more special outputs for displaying an easier to read version of Brain-Flak, Whirl and BF/SMBF code. Enjoy.

I may have made a couple other tweaks to the driver/polyglot that I'll only remember come Monday, so I'll probably add a little more later. But this is all I got for today.

Thanks and good luck.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Very, very cool. It's awesome to see how far this has come already and imagine where it will go in the future :-) I find it impressive that changing the structure of the Japt code allowed for so much reduction in size. If it helps any, you can use a semicolon to safely separate the return value from the un-parsed array: 7;['] <whatever> transpiles to just 7; which returns 7 when evaluated. \$\endgroup\$ Apr 29, 2017 at 0:29
  • \$\begingroup\$ Please use <code> tags instead of ` for #/*0|7//`"`['][!(>77*,;68*,@;'1,@1␉0␉␉11)(22)S␉(1 P''53'S^'q \$\endgroup\$ Apr 29, 2017 at 1:26
  • \$\begingroup\$ @ETHproductions I actually tried ; in that spot, but had some kind of problem. Don't remember what it was now though. I might poke at it again a bit later. \$\endgroup\$
    – Chance
    Apr 29, 2017 at 2:09
  • 1
    \$\begingroup\$ Btw I don't know if you want to golf this anymore but I am next to certain the # at the end of the second to last line is unnecessary. \$\endgroup\$
    – Wheat Wizard
    Apr 29, 2017 at 4:06
  • \$\begingroup\$ @WheatWizard You're totally right! I'll leave it for the next post. I kinda don't like to make golfing edits after posting an answer. I'm always feel like I'm creating version issues for someone else. \$\endgroup\$
    – Chance
    Apr 29, 2017 at 4:32
10
\$\begingroup\$

59. Tcl, 1324 bytes

#16  "(}23!@)(" 3//*v\D;'[af2.qc]PkPPX'#)"14";n4
#/*0|7//`"`   ['][!(>77*,;68*,@;'1,@1␉0␉␉11)(22)S␉(1 P''53'S^'q
#>␉
# 36!@␉`
#
#
#`<`
#<]+<[.>-]>[
#{
#z}
#
#=x<R+++++[D>+++++++  L+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>+.-- -. >][4O6O@
#x%+>+=ttt Z_*.
#D>xU/-<+++L
#R+.----\).>]|
#[#[(}2}20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k10vx0v0l111111^_00)
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.|
#
[ "]56p26q[puts 59][exit]" ,'\[' ];#//
'(((p\';a=a;case $argv[1]+${a:u} in *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f2")and 9 or 13)-(0and 4)^1<<(65)>>62)or"'x"or'{}{}{}{}({}<(((((()()())){}{})){}{})>)\{(<{}(( {}){})>)}{}({}())'#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("'3)3)3)"|/=1/24=x'/
__DATA__=1#"'x"//
#.;R"12"'
###;console.log +39
""""#//
=begin //
#sseeeemPaeueewuuweeeeeeeeeeCisajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/*
#define p sizeof'p'-1?"38":"37"
#include<stdio.h>
main ( )/*/
#*/{puts(p);}/* 
#
/*
<>{//
#}
disp 49#//
#{
}<>//
$'main'//
#-3o4o#$$$
#<R>"3"O.
=end #//
"""#"#//
#}
#s|o51~nJ;#:p'34'\=#print (17)#>27.say#]#print(47)#]#echo 21#
#sss8␛dggi2␛`|$//''25  16*///~-<~-<~-<<<~-^_^_X2229996

is a literal tab, a literal ESC character; Stack Exchange would mangle the program otherwise. Note also that the line #*/{puts(p);}/* has a trailing space. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it.

Try them online!

VIP score (Versatile Integer Printer): .006446 (to improve, next entry should be no more than 1392 bytes)

Rundown

This program prints 59 in Tcl, 58 in Ksh, 57 in Wise, 56 in dc, 55 in Brain-Flak Classic, 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainfuck, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

Verification

Most of the languages are tested by the test driver shown above.

  • Reng can be tested to output 19 here.

  • Modular SNUSP can be tested to output 31 here.

  • Incident was tested to output 33 on my own computer, locally, using the official interpreter.

  • Deadfish~ can be tested to output 48 on my own computer, locally, using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, but and prints a number of >> prompts to standard output, which are an unavoidable consequence of running any Deadfish~ program.

Explanation

Tcl

Tcl is a language designed for embedding scripts into larger programs. This means that there are a lot of different dialects of Tcl with different commands; however, this particular program restrains itself to "portable" Tcl, running no commands other than ones with a common meaning on every platform. (The interpreter I used for testing is tclsh, which seems to interprets unknown commands as shell commands, although it isn't documented to do so.)

In this particular program, we mostly care about its bizarre parsing rules:

  • If a token starts with #, it's a comment that lasts to a newline (thus #…\n is a comment, but x#…\n isn't;
  • Most tokens are whitespace-delimited;
  • If a token starts with { or ", it instead ends at the matching " or };
  • […] substitutes the result of a command into a token (like $(…) in bash), even if it's "…"-quoted (but not if it's {…}-quoted).

The program is thus almost very simple; all we have to do is create a "…" string literal that most languages will ignore, and drop some Tcl code in square brackets into the middle of it. In this case, that's [puts 59;exit]. However, there are some problems with this method, each of which caused a clash with a different language. As such, they'll be discussed below.

dc

Polyglotting Tcl and dc is fairly difficult, because both of them complain upon seeing an invalid command, and very few commands are valid in both. We can't start a Tcl string literal with { or " because dc will complain about both. As such, we have to start with dc code.

One possibility is to just write the dc commands outright. We can actually almost pull this off directly:

c56pq="[puts 59;exit]";

This is a valid command in the shells and in most of the scripting languages, meaning that it's almost a very simple problem to our solution. However, it isn't valid Perl (variable names in Perl start with punctuation marks, normally $), and I couldn't find a way to make it valid Perl without breaking a lot more. So that was something of a dead end.

The other alternative is to hide code from dc using square brackets to quote it, along these lines:

[ "[puts 59;exit]" ,']56pq[' ];#//

That approach seems more promising, and doesn't conflict with any of the scripting languages. (Note the space after the second "; that's for Tcl, which requires whitespace between tokens.) The shells complain, but it's a warning rather than an error (they keep executing), so we can live with this for now.

Brain-Flak Classic

There are no changes to the Brain-Flak Classic code in this polyglot. However, it's mostly relevant because of what it prevents us from doing: it doesn't let us nest square brackets, […[…]…], without producing unwanted output.

As such, our dc/Tcl polyglot is going to have to work without nesting brackets, meaning that our double-quoted string literal is going to have to contain an ] before the first [ (as it's inside square brackets itself). Perhaps surprisingly, Tcl is just fine with this; it treats [ specially, but ] isn't special except to match a [. Of course, that means we're going to have to somehow add an extra [ to the program in a way Tcl couldn't see, so that brackets stayed matched after we added an extra closing ] for Tcl (to replace the ] it couldn't see). I tried a ton of approaches for this, most of which ended up breaking some language or another (at one point I even managed to break Nim, of all things).

Eventually, I realised that you could make use of Tcl's weird comment syntax to hide a [ from Tcl but not anything else, so I added an extra couple of lines to the program for that purpose (as Tcl comments end at newlines). It was complex, though (placement is very hard, as Tcl panics upon seeing """", leaving only a small window where it could be placed, but you can fit it in just before the """" line by using single quotes to hide the whole thing from Python). Eventually, I came across the (apparently undocumented?) fact that \[ also hides the opening square bracket from Tcl, which made things much easier.

Pyth

Adding double quotes to the program is inevitably going to cause trouble with Pyth, which hides much of the program inside them (although less of the program than you might expect). The basic issue here is that Pyth, despite being a golfing language, has a distinction between expressions and statements (which is inherited from the fact that it compiles to Python); place a statement inside an expression and the program won't compile. #, which is all over the place in this program (and many copies of which actually run in Pyth) is a statement, typically meaning "loop until an exception occurs" (it's overloaded and can also mean other things, but that's the most common meaning). It uses prefix syntax and single-character commands, so apparently innocent things like our puts can end up opening a lot of nesting levels, which all have to be closed before the next #-that's-parsed is seen. However, until the next statement that's parsed, we can happily expose fairly large chunks of the program to the Pyth parser; most things are expressions, after all.

The first change we need to make to our Tcl code, which is necessarily exposed to Pyth with this way of doing things, is to remove the semicolon (which I haven't been able to figure out the exact parsing rules of, but it's statement-like and normally crashes the parser if it appears in the wrong place). We can do that via using two substitutions rather than one, [puts 59][exit] rather than [puts 59;exit].

The second change we need to make the polyglot work again in Pyth is to end the expression before the next statement occurs. As a prefix language, most of the time we can escape one nesting level via adding a literal (such as a number, or a string); that's how prefix languages work. It turns out that there are plenty of Pyth literals in the parsed area, so many of the levels close themselves naturally.

However, Pyth also has some variable-arity commands, which will consume arbitrarily many literals, and thus need to be closed explicitly. The command to do this is ), which is unfortunately one of the hardest characters to fit into the polyglot (especially as ( is a variable-arity command in its own right). Still, I perservered with this approach, adding ")3)3)" (i.e. dropping out of the Pyth string literal, cleaning up our expression, and going back into the literal), and Pyth started working. Of course, that broke a lot of other languages, and I'll be discussing those later.

I made heavy use of this Pyth debugger while working on the program; check the "Debug on?" box, and you'll see the Python that the program transpiles to. This is very helpful in knowing whether a syntax error is in the original Pyth or the output Python, and getting clues in how to fix it (e.g. if a Python statement has been placed in the middle of an expression, you know you'll need to escape some of the expression's nesting levels).

05AB1E

There are two languages which hide most of the code in strings. One of them was Pyth, but the other is 05AB1E.

Luckily, 05AB1E is much better-behaved than Pyth, and will happily tolerate almost any character in parsed code. The character that causes the problems is the q in the dc code, which prints the top of the stack and exits the program, meaning it never reaches the 26 at the end of the program.

Well, this seems more like an opportunity than a problem, given that 05AB1E's accidental new behaviour is very close to the behaviour we'd actually want. A quick change of 56pq to 56p26q and we have a clean dc/05AB1E parallel-code (i.e. all commands executed in both) polyglot that halts the parser for the rest of the code, and dc and 05AB1E naturally end up in the same place (but for different reasons). This also means that the 05AB1E code at the end of the polyglot could safely be removed, simplifying it a bit. (This may open up new opportunities for anything that cares about the end of the program.)

Underload

I added a lot of closing parentheses to the program to keep Pyth happy. Obviously, Underload likes its parentheses matched. This was a trivial fix; just add some opening parentheses just before the double quote before the Pyth code, and Pyth won't be able to see them but Underload will.

Prelude

Of course, all this addition of parentheses is something that can easily course major problems with Prelude. This is what determined where I added the Pyth/Underload code: just before the Thutu, at the end of the longest line of the program (just after the Prelude runs). Because it's on such a long line, the new parentheses don't vertically align with anything; and the )(…) acts as a Prelude comment (for exactly the same reason that ][…] acts as a comment in brainfuck/SMBF).

bash/zsh/ksh

The Pyth/Underload addition adds a double quote to the program, in a section of the code which uses double quotes to hide code from the shells. This is easier to fix than it seems; just add '3 just after the opening double quote (the extra 3 is to close the nesting level that the ' opens in Pyth), and ' near the end of the Thutu code, meaning that we can actually end the parse in these languages a line earlier than we previously were. Some proportion of the "'x" on the line afterwards can likely now be golfed off (perhaps even the whole thing!), but I don't really want to mess about more with this now that it's working.

Incident

I needed to detokenise three tokens to balance the code. Coffeescript's 39 became +39 to break up 3, a space was dropped into the Brain-Flak to break up ({}, and a trailing space was added to the C (specifically, #*/{puts(p);}/* ) to break up the token consisting of /* and a newline.

Future prospects

The end of the code is now much more open than it previously was. I don't know which languages care about that, but if you can think of one, now is a good opportunity.

Tcl shouldn't cause problems past the first non-# line, as all previous lines are commented out, and the parser exits before parsing any more.

Double quotes are now more usable than they previously were, because both Pyth and 05AB1E have had changes to make them more tolerant of double quotes in the code. (The ((("'3)3)3) can easily be expanded if needed to close more levels of Pyth code, without negatively affecting anything else.) This probably increases the scope for adding more #-comment languages that don't have usable block comments.

\$\endgroup\$
3
  • \$\begingroup\$ I told Chance this but the # at the end of the second to last line is totally unnecessary. I put it in earlier (it was needed then) but it can be removed now. \$\endgroup\$
    – Wheat Wizard
    May 3, 2017 at 18:55
  • \$\begingroup\$ There's likely a lot of unnecessary code here; for example, the #\n#\n is very suspicious. I guess some time, someone's going to go round and golf it all off. (Perhaps while adding a particularly verbose language, to save VIP headroom.) \$\endgroup\$
    – user62131
    May 3, 2017 at 18:57
  • \$\begingroup\$ actually, #\n#\n is for labyrinth. I forgot to document that one in my last Japt refactor. \$\endgroup\$
    – Chance
    May 3, 2017 at 20:27
10
\$\begingroup\$

60. Moorhens 2.0, 1423 bytes

#16  "(}23!@)(" 3//*v\D;'[af2.qc]PkPPX'#)"14";n4
#/*0|7//`"`   ['][!(>77*,;68*,@;'1,@1␉0␉␉11)(22)S␉(1 P''53'S^'q
#>␉
# 36!@␉`
#
#
#`<`
#<]+<[.>-]>[
#{
#z}
#
#=x<R+++++[D>+++++++  L+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>+.-- -. >][4O6O@
#x%+>+=ttt Z_*.
#D>xU/-<+++L
#R+.----\).>]|
#[#[(}2}20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k10vx0v0l111111^_00)
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.|
#
[ "]56p26q[puts 59][exit]" ,'\[' ];#//
'(((p\';a=a;case $argv[1]+${a:u} in *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f2")and 9or 13)-(0and 4)^1<<(65)>>62)or"'x"or'{}{}{}{}({}<(((((()()())){}{})){}{})>)\{(<{}(( {}){})>)}{}({}()) li ha '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("'3)3)3)"|/=1/24=x'/
__DATA__=1#"'x"//
#.;R"12"'
###;console.log +39
""""#//
=begin //
#sseeeemPaeueewuuweeeeeeeeeeCisajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/*
#define p sizeof'p'-1?"38":"37"
#include<stdio.h>
main ( )/*/
#*/{puts(p);}/* 
#
/*
<>{//
#}
disp 49#//
#{
}<>//
$'main'//
#-3o4o#$$$
#<R>"3"O.
=end #//
"""#"#//
#}
#s|o51~nJ;#:p'34'\=#print (17)#>27.say#]#print(47)#]#echo 21# xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi ax
#sss8␛dggi2␛`|$//''25  16*///~-<~-<~-<<<~-^_^_X2229996

Try it Online

VIP score (Versatile Integer Printer): .006587 (to improve, next entry should be no more than 1495 bytes)

Rundown

This program prints 60 in Moorhens 2.0 59 in Tcl, 58 in Ksh, 57 in Wise, 56 in dc, 55 in Brain-Flak Classic, 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainfuck, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

Verification

Most of the languages are tested by the test driver shown above.

  • Reng can be tested to output 19 here.

  • Modular SNUSP can be tested to output 31 here.

  • This has been tested to working Incident by ais523 on the official interpreter

  • Deadfish~ was tested to output 48 on my own computer, locally, using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, but and prints a number of >> prompts to standard output, which are n unavoidable consequence of running any Deadfish~ program.

  • Moorhens 2.0 was tested to output 60 on my own computer using this interpreter.

Moorhens

Moorhens is a bit of strange language I designed a while back. It splits the program up into tokens. Each token consists of an english word surrounded by whitespace. Each token performs one of 11 actions based on its MD5 hash. This TIO program will tell you what command a word evaluates to if you need a quick check (although it won't tell you if that word's actually in Moorhen's dictionary).

Naturally Moorhens found very few tokens in the code to begin with. A troublesome or token was in the python code, but it was removed by deleting the space before it. Other than that Moorhens plays pretty nice with other languages. The current Moorhens code contains 30 xis each incrementing the counter and an ax to play the program in reverse. I had to add a little bit of new code over near the Brain-Flak to prevent it from executing the other tokens hanging around in the code.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ I can confirm this works in Incident. (You didn't specify how you'd tested that.) \$\endgroup\$
    – user62131
    May 3, 2017 at 20:51
10
\$\begingroup\$

75. C++11, 2040 bytes

#16  "}(o+?23!@- "/*\Dv;'[af2.q]PkPPX)\('#CO"14";*/
#/*0|7//```"`  )[-'][(>77*,;68*,@;'1,@1011)(22)S ␉\4n;␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx
#>␉
# 36!@␉`
#
#_>++++.>++++++::@---x---.+?
#`<`
#<]}}+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++qL+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][
#x%+>+=ttt Z_*.ar
#D>xU/-<+++L
#R+.----\).>]|
#[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d@O6O4111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0
[ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<
'((( p\';a=a;case $argv[1]+${a:u} in  *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f 2")and 9or 13<<(65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>){(<{}(({}5){})>)}{}({}() )wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWW li ha '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'#
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39
""""
=begin
<>{
utpb now 70 dollar off!
ai
utpb has been selling out worldwide!
ai fir at fir
#sseeeemPaeueewuuweeeeeeeeeeCis:ajjap*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1"" //*
#define u8 "38\0"
#define p sizeof'p'-1?u8"67":*u8""?"37":"75"
#include<stdio.h> 
main (  )  {puts(p);u8;}//*/
#if 0
#endif//* --... ...--
/*/
print'("72" )';end;
#if 0
#endif//* rk:start | print: "69" rk:end
print 61
#}
disp 49;
#{
}<>
$'main'3
#-3o4o#$$$
#<T>"3"O.</+++++++>/+++<-\>+++.---.
=end
"""#"# xi xi xi xi \++++>/ xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi os
#}
#s|o51~nJ;#:p'34'3\=#print(17)#>27.say#]#print (47) #]#echo 21#fwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M`|$//''         16~-<~-<~-<<<~-COprint("65")#ssss^_^_#
#5 "25"  +/ *///X222999686#

VIP score (Versatile Integer Printer): .004835 (to improve, next entry should be no more than 2122 bytes)

This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11

Verification

Try it online!

Languages that are not on Tio:

  • Reng (#19) online.

  • Deadfish~ (#48) local. Run like this: deadfish.py < polyglot. Prints a bunch of >> lines, but that's an unavoidable consequence of running any Deadfish~ program, so it's okay.

  • Moorhens (#60) local. Use python 2. Note that moorhens.py from master branch doesn't work.

  • Morse (#73) local.

  • Archway (#74) local

Languages that use abstracted interpreters in the test driver:

Other languages:

  • Japt (#7) was updated in Tio to fix the parsing error we've been exploiting, so it must be tested individually online.

  • Surface (#66) local. Tio Surface interpreter is no contest because it was created after challenge was started.

Explanation

This answer is based on Chance's golfed version of #74 (chat, tio).

Adding C++11

I am using a variant of the trick with utf-8 string literals (introduced in C++11) (see also #67 C11).

#define u8 "x" // some non-empty string
puts( *u8"" ? "C++03" : "C++11" );

Incident

Only incident broke as a result. This is because of three u8. Fixed by adding u8; after puts(p);.

\$\endgroup\$
10
\$\begingroup\$

86. Miniflak, 2440 bytes

#16  "}(o+?23!@- "/*\Dv;'[af2.q]PkPPX)\('#CO"14";*/
#/*0|7//```"`  )[-'][(>77*;,68*,@,1',;# l1011)(22)\4nS ␉;␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx
#>␉
# 36!@␉`
#~
#_>++++.>++++++::@---x---.+?
#`<`
#<<<#>>]}}+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++qL+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][
#x%+>+=ttt Z_*.ar4O6O@
#D>xU/-<+++L
#R+.----\).>]|
#[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0
[ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<
'(wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWw((.*.*.*.*.*.*.*.*.*.*819.+.*.+@[5]{}) ) )␉\';';print((eval("1\x2f 2")and 9or 13<< (65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{(x<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW no no no no no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*]*(<\>@*99[?]*]*.*|!)'#
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39
""""
' (<><       (          )> ){ ({}[()] )}{\';       a=$(printf \\x00    );b=${#a};

" }"';           (( ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;; *1*)echo 50;;*)echo 58;;esac;exit;# (((('))))
=begin
utpb now 70 dollar off!
utpb has been selling out worldwide!
#seeeemPaeueewuuweeeeeeeeeeCis:ajjappp*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1"" //*
#include<stdio.h> 
#define ␉l(d)␉#d
#define u8 "38\0\0"
main ( ␉){puts( sizeof (0,u8)-5?u8"67":*u8""?"37":l( 0'0  "'\"")[9]?"75\0":'??-'&1? "79":"77\0");}//*/
#if 0
#endif//* --... ...--
/*/
print'("72")';end;
#if 0␌
#endif//* rk:start | print: "69" rk:end<>5b*:,1-,@
print 61
#}
disp 49;
#{
}{}<>
$'main'3
#-3o4o#$$$
#<T>"3"O.</+++++++>/+++<-\>+++.---.
#<<<#>>>
reg end="";print(85);reg s
=end
;"""#"#yxxxxxxxxxxx\++++>/<~#class P{   function:Main(a:String[] )~Nil{83->Print();} }
#}
#s|o51~nJ;#:p'34'3\=#print(17)#>27.say#]#print (47) #]#echo 21#fwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M`|$//''   16~-<~-<~-<<<~-COprint("65")#sss^_^_#
#5 "25"  +/ *///X222999686#

VIP score (Versatile Integer Printer): .003836 (to improve, next entry should be no more than 2526 bytes)

Rundown

This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14, 78 in dash, 79 in C++17, 80 in Klein 201, 81 in Klein 100, 82 in Brain-Flueue, 83 in Objeck, 84 in Klein 001, 85 in zkl 86 in Miniflak

Verification

Try it Online!

Languages currently not on TIO:

  • Japt, 7 online.

  • Reng, 19 online.

  • Deadfish~, 48 local.

  • Moorhens, 60 local. use moorhens.py from the v2.0-dev branch

  • Morse, 73 local

  • Archway, 74 local

  • Trefunge-98, 76 local. Use -v 98 -d 3 for Trefunge-98.

  • Objeck, 83 local

  • zkl, 85 local

Explanation

Miniflak is a Brain-Flak derivative, where [],<>, and <...> are ignored.

Here was the Brain-Flak code before I started

[][][][]
((([]{})))((()<<()>>)()<<()>>){}{}{}{}({}<(((((()()())){}{})){}{})>)(({})){}{(<(<()>)({})({}<{}>({}){})>)}({}){}({}())
<>{(){
}(((({[]}{}))))
(){(()()[])}
()
}<>
()

Here's what Miniflak sees

((({})))((()())()()){}{}{}{}({}(((((()()())){}{})){}{}))(({})){}{((())({})({}{}({}){}))}({}){}({}())
{(){
}(((({}{}))))
(){(()())}
()
}
()

Miniflak's first problem here is that it can't escape the loop that Classic and Flueue s live in. This is because those two languages use <...> to push the zero used to exit. Since, Miniflak can't see that it never pushes a zero and thus never exits. Miniflak's equivalent operation would be (...)[{}], however [...] prints in Classic so it is to be avoided. Instead we add on {({}[()])}. Since Both of the existing languages have already pushed a zero only Miniflak enters this loop which will decrement until zero. Once Miniflak leaves this loop it will act just like flueue and produce an 82. In order to differentiate the two we add a <()()()()>. Since every other has <...> this does nothing for most the languages, However Miniflak sees this as ()()()() or +4 bringing us up to 86.

The last problem is the block comment. Previously <>{...}<> had been sufficient as a block comment for the flaks, however Miniflak doesn't see <> so it has to be modified to accommodate. The shortest block comment I could come up with that works in all of the languages is

(<><()>){({}[()])}{...}{}<>

So I swapped out the old one for the new one.

Prelude

Prelude took issue with all of the new parens I added to the block comment section. I had to add a lot of new spaces to satisfy prelude.

Other than that all the languages were fine with the addition.

\$\endgroup\$
10
\$\begingroup\$

88. PingPong, 2539 bytes

#16  "?63(o?23!*# #@"/*\DZZCv;'[af2.q]PkPPX)\('#CO"14"; */
#/*0|7//```"`  [>.>.])[-'][(>77*;,68*,@,1',;# l1011)(22)S\4n;␉␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx
#>␉
# 36!@␉`  e++++++::@ 
#~
#
#`<`
#<<<#>>]}}+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++q   L+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][
#x%+>+=ttt Z_*.arxxxxx4O6O@
#D>xU/-<+++L
#R+.----\   \).>]|
#[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO   /"78"oo@0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0
[ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<
'(wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWw  (([5]{}) ) )␉\';';print((eval("1\x2f 2")and 9or 13<< (65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{(x<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW no no no no no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*]*(<*.*\>]xxxxxxxxxxxxxxxx)'#
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39;'(*****************819+*+@[*99[?]*]***|!)';
""""
' (<><         (          )>  ){ ({}[()] )}{\';       a=$(printf \\x00    );b=${#a};

" }"';           ((   ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;; *1*)echo 50;;*)echo 58;;esac;exit;# (((('))))
=begin
utpb now 70 dollar off!
utpb has been selling out worldwide!
#seeeemPaeueewuuweeeeeeeeeeCis:ajjappp*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1"" //*
#include<stdio.h> 
#define ␉x(d)␉#d
#define u8 "38\0\0"
main ( ␉){puts( sizeof (0,u8)-5?u8"67":*u8""?"37":     x( 0'0  "'\"")[9]?"75\0":'??-'&1? "79":"77\0");"eg_0 ' ";}//*/
#if 0
#endif//* --... ...--
/*/
print'("72")';end;
#if 0␌
#endif//* rk:start | print: "69" rk:end<      >5b*:,1-,@
print 61
#}
disp 49;
#{
}{}<>
$'main'3
#-3o4o#$$$
#<T>"3"O.</+++++++>/+++<-\>+++.---.
#<<<#>>>
reg end="";print(85);reg s
=end
;"""#"#yxxxxxxx"78"\++++>/<~#class P{        function:Main(a:String[] )~Nil{83->Print();} }
#}              @:8:8\\
#s|o51~nJ;#:p'34'3   \=#print(17)#>27.say#]# print(47) #]#echo 21#fwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M`|$//''  1$6~-<~-<~-<<<~-COprint ("65")#sss^_^_#
#5 "25"  +/ *///X222999686#

VIP score (Versatile Integer Printer): .003725 (to improve, next entry should be no more than 2626 bytes)

This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14, 78 in dash, 79 in C++17, 80 in Klein 201, 81 in Klein 100, 82 in Brain-Flueue, 83 in Objeck, 84 in Klein 001, 85 in zkl, 86 in Miniflak, 87 in Alice, 88 in PingPong

Verification

Try it Online!

Languages currently not on TIO:

Explanation

Wow, it took 2 full days for me to produce this answer. This challenge can be really challenging.

Adding PingPong

PingPong is another 2D language. It follows the path of haystack - deflects from / on the first line and continues to execute from the last line on the same column. To separate pingpong from other 2d languages I use $ to skip over \. PingPong code is @:8:8\. Second \ is there for retina.

There were two obstacles to adding pingpong on the first line: 1) } terminates current thread (and hence the program as we have only one thread) in pingpong and 2) @ terminates the program.

} was there for brian & chuck. Solved by refactoring brian & chuck.

@ is there for hexagony. Solved by jumping over it with #. To prevent # from changing current ip (0) in hexagony I used *. Second # is there for Algol.

Note that pingpong interpreter returns nonzero exit code, but this is not an error - it just takes the value from the top of the stack (the situation is similar to snusp).

Brian & Chuck

Old brian & chuck was on line 6, mixed with surface. After removing that code I moved surface to line 4. New brian & chuck code:

?63
x>.>.

Brian immediately gives control to Chuck with ?, Chuck then prints 63. [] are there to hide b&c code from bf/smbf. Note that ``` on the second line is not needed for b&c, but removing it breaks pip, which I cannot fix easily, so it stays for now.

><>

Behavior of fish interpreter is ambiguous: when it encounters invalid command it prints error and terminates the program, but returns exit code 0. I am more inclined to treat it as an erroneous termination. So I refactored fish code to terminate cleanly. It was previously intertwined with underload and whitespace. (fish is \4n;, underload is (22)S)

2D languages

2D langs realigned as usual. ZZC on the first line is a filler to align v (tried several letters to satisfy trigger/japt/05AB1E/pyth).
Klein 201 and Klein 100 are moved to line 22 (parens are for underload, quotes are for coffeescript). Klein 001 stays on line 19, but needs right padding.

Incident

Incident gave me a lot of trouble, so here are some tips on fixing incident (see also answer 33):

x1   ...      x1x1 incident code x2      ...      x2x2
                          | 0mo must be in the middle (even_count/2 or (odd_count+1)/2)

some tokens in incident code may accidentally detokenize, incilite to the rescue

Currently:

1:?2 ...skipped... 11:?2 12:?2    13:0l 14:0v ... 41:0mo ... 53:0v 54:0l    55:^_ ...skipped... 80:^_ 81:^_ 
                                  |           incident code            |
                                       note: (81+1)/2==41==0mo

Other langs are fixed as usual.
I added 91 bytes for the code worth 5 bytes. Sorry about that, too tired to golf.

\$\endgroup\$
10
\$\begingroup\$

90. RunR, 2585 bytes

#16  "?63(o?23!*# #@"/*\DZZCv;'[af2.q]PkPPX)\('#CO"14"; */
#/*0|7//```"`  [>.>.])[-'][(>77*;,68*,@,1',;# l1011)(22)S\4n;␉␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx
#>␉
# 36!@␉`  e++++++::@ 
#~
#y
#`<`
#<<<#>>]}}+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++q   L+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][
#x%+>+=ttt Z_*.xxxxxxx4O6O@
#D>xU/-<+++L
#R+.----\   \).>]|
#[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO   /"78"oo@0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0\\
[ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<!\
'(wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWw  (([5]{}) ) )␉\';';print((eval("1\x2f 2")and 9or 13<< (65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{(x<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW no no no no no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*]*(<*.*\>]xxxxxxxxxxxxx)'# \\
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39;'(*****************819+*+@[*99[?]*]***|!)'
#\\
""""#\
' ( <><        (          )>  ){ ({}[()] )}{\';       a=$(printf \\x00    );b=${#a};#\\
" }"';           ((   ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;; *1*)echo 50;;*)echo 58;;esac;exit;# (((('))))#\
=begin
#p
;set print "-";print 89;exit#ss
utpb now 70 dollar off!
utpb has been selling out worldwide!
#seeeemPaeueewuuweeeeeeeeeeCis:ajjappp*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1"" //*
#include<stdio.h> 
#define ␉x(d)␉#d
#define u8 "38\0 "
main (  ){puts( sizeof (0,u8)-5?u8"67":*u8""?"37":     x( 0'0  "'\"")[9]?"75":'??-'&1? "79":"77");"eg5""6 27";}//*/
#if 0
#endif//* --... ...--
/*/
print'("72")';end;
#if 0␌
#endif//* rk:start | print: "69" rk:end<(     >5b*:,1-,@
print 61
#}
disp 49;
#{
}{}<>
$'main'3
#-3o4o#$$$
#<T>"3"O.</+++++++>/+++<-\>+++.---.
#<<<#>>>
reg end="";print(85);reg s
=end
;"""#"#xxxxxxxy"78"\++++>/<~#class P{        function:Main(a:String[] )~Nil{83->Print();} }
#}pS9^7^8^MUOUOF@:8:8\\
#s|)o51~nJ;#:p'34'3  \=#print(17)#>27.say#]# print(47) #]#echo 21#fwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M`|$//''  1$6~-<~-<~-<<<~-COprint ("65")#sss^_^_#
#5 "25"  +/ *///X222999686#

VIP score (Versatile Integer Printer): .003545 (to improve, next entry should be no more than 2671 bytes)

This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14, 78 in dash, 79 in C++17, 80 in Klein 201, 81 in Klein 100, 82 in Brain-Flueue, 83 in Objeck, 84 in Klein 001, 85 in zkl, 86 in Miniflak, 87 in Alice, 88 in PingPong, 89 in gnuplot, 90 in RunR

Verification

Try it Online!

Languages currently not on TIO:

Explanation

Adding RunR

RunR is a 2D language with explicit entrypoint.

Spec clarifications:

  • If there are several S last S is used as entrypoint
  • O treats current number as ascii value and prints it as character (so it is equivalent to printf("%c"), not printf("%d"))
  • arith operators pop value from stack

RunR program: S9^7^8^MUOUOF. S starts program, then we push 9, 7 and 8 to stack. When M (multiplication) is executed we have current number 8 and 8 on top of the stack, so result is 64 as current number. Then we subtract (U) 7 from it and print it with O (64-7 == 57 == '9'). Then subtract 9 and print '0'. F terminates the program.

The program contains S, so I added p before it to fix alphuck.

Underload

To fix Underload, we need to enclose RunR code in parens. But there were no place for parens on line 59, so I placed ( on line 46 and ) on line 60 after #s|.

gnuplot

Added set print "-"; to gnuplot code on line 29. This makes it output to stdout instead of stderr. Fixed alphuck as usual. Updated driver - as it turns out gnuplot is installed on TIO (as a tool, not as a language).

Incident

Added some detokenization at the end of C/C++ code. Prior to that I tried to add it on line 58, but broke Fission.

\$\endgroup\$
10
\$\begingroup\$

93. Set, 2720 bytes

#16  "?63(o?23!*# #@"/*\DZZCv;'[af2.q]PkPPX)\('#CO"14"; */
#/*0|7//```"`  [>.>.])[-'][(>77*;,68*,@,1',;# l1011)(22)S\4n;␉␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx
#>␉
# 36!@␉`  e++++++::@ 
#~
#y
#`<`
#<<<#>>]}}+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++q   L+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][
#x%+>+=ttt Z_*.xxxxxxx4O6O@
#D>xU/-<+++L
#R+.----\   \).>]|
#[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO   /"78"oo@0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0\\
[ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<!\
'(wWWWwWWWWwvwWWwWWWwvwWWWw WWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWw  (([5]{}) ))␉\';';print((eval("1\x2f 2")and 9or 13<< (65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{(x<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW no no no no no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*]*(<*.*\>]xxxxxxxxxxxxx)'# \\
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39;'(*****************819+*+@[*99[?]*]***|!)'
#\\
""""#\
' ( <><        (          )>  ){ ({}[()]  )}{\';      a=$(printf \\x00    );b=${#a};#\\
" }"';           ((   ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;; *1*)echo 50;;*)echo 58;;esac;exit;# (((('))))#\
=begin
#p
;set print "-";print 89;exit#ss
utpb now 70 dollar off!
utpb has been selling out worldwide!
#seeeemPaeueewuuweeeeeeeeeeCis:ajjappppppp
set ! 57
set ! 51
More 91 of thiset of re
How much is it*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1"" //*
#include<stdio.h> 
#define␉ x(d)␉#d
#define u8 "38\0 "
main ( ) {puts( sizeof (0,u8)-5?u8"67":*u8""?"37":     x( 0'0  "'\"")[9]?"75":'??-'&1? "79":"77");"eg5""6 27";}//*/
#if 0
#endif//* --... ...--
/*/
p=sizeof( "(\"           ); print'(''72'')';end!"           ); main( ){puts("92" );return 0;}
#if 0␌
#endif//* rk:start | print: "69" rk:end<(     >5b*:,1-,@
print 61
#}
disp 49;
#{
}{}<>
$'main'3
#-3o4o#$$$
#<T>"3"O.</+++++++>/+++<-\>+++.---.
#<<<#>>>
reg end="";print(85);reg s
=end
;"""#"#xxxxxxxy"78"\++++>/<~#class P{        function:Main(a:String[] )~Nil{83->Print();} }
#}pS9^7^8^MUOUOF@:8:8\\
#s|)o51~nJ;#:p'34'3  \=#print(17)#>27.say#]# print(47) #]#echo 21#fwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M`|$//''  1$6~-<~-<~-<<<~-COprint ("65")#sss^_^_#
#5 "25"  +/ *///X222999686#

VIP score (Versatile Integer Printer): .003381 (to improve, next entry should be no more than 2808 bytes)

Rundown

This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14, 78 in dash, 79 in C++17, 80 in Klein 201, 81 in Klein 100, 82 in Brain-Flueue, 83 in Objeck, 84 in Klein 001, 85 in zkl, 86 in Miniflak, 87 in Alice, 88 in PingPong, 89 in gnuplot, 90 in RunR, 91 in Cood, 92 in C89, 93 in Set

Verification

Try it Online!

Languages currently not on TIO:

Explanation

Set is pretty simple. Here is the program

set ! 57
set ! 51

This prints ASCII 57 and 51, which is 93.

I added this inside of the Cood program because that seemed like the most appropriate place.

Alphuck

Since I added two new ss I had to balance them with ps in Alphuck. I added two ps to the end of the evil line and everything was just peachy.

Incident

Incident tokenized set So I added a et to the Cood to break the new token.

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

54. Zsh, 1207 bytes

#16  "(}23!@)(" 3//*v\D@;'[af2.qc]'#)"14";n4
#/*` PkPPX (22)S"[!(>7 7*,;68*,@;'1,@␉␉␉␉ P''53'S^'q
#>␉
# >36!@␉
#`<`
#<]+<[.>-]>[
#{
#z}
#
#=x<R+++++[D>+++++++EAL+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>+.-- -. >][
#x%+>+=ttt Z_*.
#D>xU/-<+++L
#R+.----\).>]|
#[#[(}2}20l0v0x1k\4O6O@1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k10vx0v0l111111^_)0046(8+9+9+9+9+=!)
### <$+@+-@@@@=>+<@@@=>+<?#d>+.--.|
'p\';if [[ $argv[1] == *"1"* ]];then echo 50;else echo 54;fi;exit;';print((eval("2\x2f5")and(9)or(13))-(0and 4)^1<<(65)>>(62))or"'x"or'({({1})({1}[(0)])}{1}\{1})'#}#(prin 45)(bye)|/=1/24=x/
__DATA__=1#"'x"//
#.;R"12"'
###;console.log 39
""""#//
=begin //
#sseeeemPaeueewuuweeeeeeeeeeCisajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/*
#define p sizeof'p'-1?"38":"37"
#include<stdio.h>
main ( )/*/
#
#"`#"\'*/{puts (p);}/*'"`"
/*
<>{#65}//
#}
disp 49#//
#{
1}<>//
$'main'//
#-3o4o#$$$
#<R>"3"O.
=end #//
"""#"#//
#}
#s|o51~nJ;#:p'34'\=#print (17)#>27.say#]#print(47)#]#echo 21
#sss8␛dggi2␛ `|1|6$//''25  16*///^_^_X222999"26

Try them online!

is a literal tab, a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it.

Want to learn more? Try the polygot chat!

VIP score (Versatile Integer Printer): .007665 (to improve, next entry should be no more than 1275 bytes)

Rundown

This program prints 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainf***, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

Verification

Most of the languages are tested by the test driver shown above.

  • Reng can be tested to output 19 here.

  • Modular SNUSP can be tested to output 31 here.

  • Incident was verified to test 33 via comparing the tokens to a previous execution (EDIT by @ais523: and subsequently confirmed to work by running it locally).

  • Deadfish~ can be tested to output 48 using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, but and prints a number of >> prompts to standard output, which are an unavoidable consequence of running any Deadfish~ program.

Explanation

Zsh

A couple weeks ago, after I spent some time trying to run the polyglot in various languages - just trying to find something that would stick. I pulled up Zsh and found it produced the same answer as Bash.

“That’s cool,” I said aloud to a room full of otherwise productive people, and wondered more silently if it was literally reading the Bash script. So I altered the bash and found Zsh was again mirrored Bash.

So what’s going on here? Zsh and Bash are two closely related shell scripting languages. They’re so close in fact that it was a bit of a chore to find differences. Here’s the resource I found for finding those differences.

The first difference I attempted was a variable expansion that Zsh had but Bash did not. ${foo:u}returns “FOO” in Zsh, but “foo” in Bash. And so a Zsh-Bash polyglot was born.

a=a; if [[ ${a:u} == $a ]];then echo 50;else echo 54;fi;exit;

Only problem, Japt hates me, but more specifically, it hates my use of curly braces. I’d been down the Japt path enough times to know I didn’t want to do it again. So I kept looking. $#argv returned the number of arguments in Zsh, where Bash did the same, with the string argv appended. Second try:

if [[ 0 == $#argv ]];then echo 54;else echo 50;fi;exit;

Well this one worked, for everything, except Brain-Flak. Brain-flak considers everything after the # as a comment. I didn’t want to move Brain-flak, nor did I want to redo it’s stack flipping jumbo in Octave’s space, so I went back to the drawing board. $argv[1] returned [1] in Bash and the value of argument 1 in Zsh. Third time’s the charm:

if [[ $argv[1] == "[1]" ]];then echo 50;else echo 54;fi;exit;

Well, Pyth and 05AB1E didn’t like the brackets outside of what they considered a string. But that was fixable. We’d just check if $argv[1] contained a 1. Boom:

if [[ $argv[1] == *"1"* ]];then echo 50;else echo 54;fi;exit;

Great Success!

Alphuck

The s in else added another close bracket that needed a matching opening, so I added p here 'p\'; to counterbalance.

Fission: defusing the bomb

You ever have a moment while coding something where the program inexplicably works as you’d expect? That’s kind what happened here.

I found the new Bash script shifted the scripting line into a position where the D’s in the INTERCAL line no longer lined up with commands on the scripting line that inflated atomic masses or output some undesired non-sense. At least this is my presumption because I put back the __ in R"12"__* and it put the error code (that @ais523 introduced ლ(ಠ_ಠლ)) back at zero.

This is usually the point at which I throw a comment in my code to taunt my future self for having to debug my hack. But after chatting with @ais523 a bit we arrived at a solution that would be a more permanent fix.

Fission now ends in a different location from where its string is added to the stack with the purpose of terminating the program as quickly as possible – hopefully before any other atoms collide, split, or introduce bugs. The shortest time span where we can collapse the reaction and still produce a correct result is 3 tics. For example, if we add Rx_* to the polyglot, then it will synch up with R"12 by hitting the 2 and the program ending * command simultaneously. The _ here is to reduce the mass of the atom to zero since all atoms start with a mass of 1 and * outputs the colliding atom’s mass as it’s error code. The x is a space holding no-op here. I didn’t actually look up if x is a no-op, I’m just making conversation.

This gives us 1 character of flexibility to find a home in the polyglot and it turned out that adding Z_* to Cardinal’s line was generally accepted. This atom starts at the D in #=x<R+++++[D heading in the down direction. The Z makes pointer turn left, which is fortunate because Z is ignored by Minimal-2D and Cardinal, both of which traverse this character location in their 2 dimensional code paths.

Good enough for fission.

Cardinal

Cardinal had one wrinkle that had to be worked out with this Fission thing. The existing solution was 1 character too long to allow Fission to divert into a private code path, and the Fission snippet included * which is an addition operation for the tops of Cardinals two stacks. So I reworked the solution to end with the addition operation, which coincidentally is how an older version of cardinal used to work. New solution is: %++=ttt *. (extraneous no-ops removed).

And here’s a breakdown of the logic:

++ Add primary stack up to 2 [2][0]

= Copy active stack top value to secondary stack [2][2]

ttt Multiply the tops of the stacks and push the result onto the active. Three times. [4][2], [8][2],[16][2]

* Add the stacks and push the result onto the active stack. [18][2]

. Output active stack

TRIGGERED

The Z in the new fission solution is the Trigger jump code, so we need a new, unused letter. Now it’s X initiated here: PkPPX

Incident Report

I honestly don’t know what happened here. I worked the Zsh version with curly braces, got to the point of balancing for Incident, and then realized a fatal bug. After reworking everything else, Incident just seems to work. All I can say for sure is I removed the 89 detokenizing string on the last line.

Edit: the Modular SNSUP change below tokenized #<, so I threw a space between # and <

Modular SNSUP Edit

Thanks to @CalculatorFeline for pointing out that Modular SNSUP was broken!

The $ in the Bash/Zsh section broke Modular SNSUP which starts are the first $ encountered. I moved <$+@+-@@@@=>+<@@@=>+<?#d>+.--. to the line prior to it would continue to start at the correct place.

Where to go from here

This resource I found for Zsh has some other shell scripting languages with minor differences to Bash. My suspicion is that some of the other languages can be worked into the same space as Bash and Zsh without too much effort.

Good Luck

\$\endgroup\$
5
  • \$\begingroup\$ You seem to have accidentally put in two VIP scores. \$\endgroup\$ Apr 25, 2017 at 21:24
  • \$\begingroup\$ @user2357112 thanks. fixed. \$\endgroup\$
    – Chance
    Apr 25, 2017 at 21:30
  • \$\begingroup\$ Does Modular SNUSP work? \$\endgroup\$ Apr 26, 2017 at 16:14
  • \$\begingroup\$ @CalculatorFeline Oops. Nope, it doesn't. Fixed. Thanks. \$\endgroup\$
    – Chance
    Apr 26, 2017 at 17:31
  • \$\begingroup\$ @Chance Nope, you kept the old VIP score :P. I dropped in the correct one. \$\endgroup\$ Apr 27, 2017 at 14:05
10
\$\begingroup\$

63. Brian & Chuck, 1605 bytes

#16  "(}+?23!@)-("//*\Dv;'[af2.qc]PkPPX'#)"14";n4
#/*0|7//```"`   ␉['][!(>77*,;68*,@;'1,@10␉11)(22)S␉␉(1 P''53'S^'q
#>␉
# 36!@␉`
#
#_>++++.>.}+?
#`<`
#<]+<[.>-]>[
#{
#z}
#
#=x<R+++++[D>+++++++59L+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>+.---.>][
#x%+>+=ttt Z_*.4O6O@
#D>xU/-<+++L
#R+.----\).>]|
#[#[(?2?20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_00)
[ "]56p26q[puts 59][exit]" ,'\[' ];#/s\\/;print"24";exit}}__DATA__/
#
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.

#
'(((p\';a=a;case $argv[1]+${a:u} in *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f2")and 9or 13)-(0and 4)^1<<(65)>>62)or"'x"or'{}{}{}{}({}<(((((()()())){}{})){}{})>){(<{}(({}){})>)}{}({}())wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWW li ha '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("'3)3)3)"'
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39
""""
=begin
<>{
#sseeeemPaeueewuuweeeeeeeeeeCis:ajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/*
#define p sizeof'p'-1?"38":"37"
#include<stdio.h>
main ( ){puts(p);}/*
print 61
#}
disp 49;
#{
}<>
$'main'3
#-3o4o#$$$
#<q>"3"O.s
=end
"""#"
#}
#s|o51~nJ;#:p'34'3\=#print (17)#>27.say#]#print(47)#]#echo 21# xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi ax fwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm
# sss8␛dggi2␛`|$// ''25  16*///~-<~-<~-<<<~-^_^_X2229996

VIP score (Versatile Integer Printer): .006414 (to improve, next entry should be no more than 1681 bytes)

Try it online

Rundown

This program prints 63 in Brian & Chuck, 62 in Grass 61 in S.I.L.O.S, 60 in Moorhens 2.0, 59 in Tcl, 58 in Ksh, 57 in Wise, 56 in dc, 55 in Brain-Flak Classic, 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainfuck, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

Verification

Most of the languages are tested by the test driver shown above.

  • Reng can be tested to output 19 here.

  • Modular SNUSP can be tested to output 31 here.

  • Incident was verified to test 33 via manual balancing of tokens.

  • Deadfish~ was can be tested to output 48 locally, using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, but and prints a number of >> prompts to standard output, which are n unavoidable consequence of running any Deadfish~ program.

  • Moorhens 2.0 can be tested to output 60 using this interpreter.

Brian & Chuck

Brian and Chuck are two mutually modifying, BrainF**k-like languages. Like SMBF the memory tape starts containing the polyglot. Brian’s memory pointer is Chuck’s Instruction pointer and vise versa. The polyglot is split with a triple backtick, such that the part of the polyglot prior to ``` is put on Brian’s memory tape, while Chuck gets the portion after.

Backtick is used as a string declaration for Pyth which is used to hide most of the polyglot from its parser. The first instance of such a backtick string is on line 2, and we’ve added a an empty string just prior to this to create Brian & Chuck’s delimiter here: #/*0|7//```"

The +-<> commands for both Brian & Chuck function as you’d expect based on BrainF**k. The , and . commands also function as you’d expect with the caveat that only Brian uses , and only Chuck uses ..

For the more unique commands, we have the ?, which is a no-op if the current memory cell is zero, otherwise it switches control between Brian and Chuck. Also, curly braces will repeatedly move the tape head to the right (}) or left ({) until the cell under the memory pointer is zero/null. And finally, all instances of _ are replaced with null bytes, which makes for a convenient landing space when using curly braces to advance the memory tape.

The program starts by reading line 1 with Brian. The first operation encountered is } in the Hexagony capsule, and it’s here where we begin making changes. The } advances Chuck’s pointer to the _ I added to line 6. I chose line 6 because, as an even numbered line, it’s subject to Retina’s friendlier parser, which is needed for consecutive +’s. Second, this line leaves a buffer line between itself and Labyrinth’s code on line 4, which is needed to maintain the labyrinth walls. And third, we don’t need any spaces, and this is the final line of Whitespace’s command to end the program. This line is also located just prior to the SMBF/BF/Minimal-2D code space, and it aesthetically pleases me to keep the BrainF**k derivatives together.

With Chuck pointing at the _, Brian advances its IP to + which I’ve inserted in the Hexagony Capsule along with a ?. The + gives the null valued _ a positive value which is needed the ? to transfer control to Chuck where we read the bulk of this answer.

So when we switch control, Chuck is pointing at the _ in #_>++++.>.}+?. Chuck then advances it’s IP to the > which moves Brian’s pointer to the 2 in line 1. From here, we increment the 2 up to 6 with ++++, and then output the 6 with .. Then we advance Brian’s pointer again with > landing on the 3 in line 1, which we output with .. Finally, we advance Brian’s pointer to the end of its code segment with }, increment the null memory position with +, and transfer control back to Brian with ?. And from here, we let Brian advance to the end of his tape, ending the program.

It’s super easy to get lose track of who has control and where the pointers are at, so I want to share this configuration which runs Brian & Chuck with a switch for stepping through the code for debugging purposes. I’m sharing the verbose version of this debug switch which also has a @ command that only applies in debug and will terminate the program. The current solution skips over the @ in line 1, so it’s not an issue, but it is something to be aware of if this gets reworked in the future.

S.I.L.O.S.

@RohanJhunjhunwala updated Tio’s S.I.L.O.S. interpreter such that 1=61 // threw an error, which invalidated our test case in the Test Driver. C'est la vie.

This left me with a quandary - do I update the code or the test? @RohanJhunjhunwala rightly pointed out that the = could be replaced with a + to address the issue, so changing the code sounded like the ideal solution, assuming it was compatible with an old enough version of the interpreter. But I ended up taking a different path that came about while I was working on adding a different language: J.

Today, I’ve kind of given up on J at this point. I think it might be possible to add if I’m willing to heavily rework the top 2 lines (and to be honest, I’m increasingly disinclined to do so). But at the time, I had come to the conclusion that J had a blocking issue with Thutu’s requirement of having a trailing // on each line that didn’t start with a #.

I posted to the Polyglot Development board to see if anyone had an idea to get around Thutu’s requirement and @ais523 suggested injecting Perl in Thutu’s parser so it could get past the regex syntax requirement.

Cool!

I later realized that this Thutu hack would allow S.I.L.O.S. to use a more conventional solution, which would allow the S.I.L.O.S. test to remain valid, and golf down both the S.I.L.O.S. and Thutu code. So I jumped in with both feet and gave Thutu its Perl injection and changed the S.I.L.O.S. code to print 61.

Thutu

The Thutu hack is based on the \ command. Here's the documentation's definition:

(When the next character is punctuation) Remove any special meaning the next character might have, even if it's a slash or backslash. Removing the special meaning of a slash prevents it delimiting the end of a regexp, making it possible to write slashes within a regexp.

And this is the code snipped that @ais523 suggested (after I golfed it down and added the necessary bits to include it in the polyglot):

/s\\/;print"24";exit}}__DATA__/

So how does the injection work? Well, a quick look at the interpreter showed this line of code:

@regexps = split /(?<!\\)\//, $_, -1; # Split on / not preceded by \

Now, I’m not the Perl-y-est guy around, but fortunately the comments tell the story. This bit (\\/) from the Thutu line of the polyglot is being parsed by Thutu’s intrepeter as escaping out both the second \ and the /, where traditionally, we’d expect only the second \ to be escaped out.

And because we’ve formatted the line to otherwise look like a valid regex, we get past the syntax checks and arrive at this piece of the interpreter where I believe our Perl injection (;print"24";exit}}__DATA__) gets executed:

foreach $regexp (@regexps)
{
$regexp and print "/$regexp/ $regsep "; # Guards are just Perl regexps.
}

Originally, this was intended to just allow Thutu to bypass its regex syntactical requirements on a line, but what actually happened is it little broader. Every line after the injection point stopped requiring any regex syntax. Why is that? Well, we kinda crashed the compiler. But it still produced a good result.

This raised a philosophical dilemma though, did the program run without error? It wasn’t entirely clear. so @ais523 created a metapost to answer this question. The answer came back with an unequivocal yes – the program ran without error.

Cool. So now, Thutu runs through this line:

[ "]56p26q[puts 59][exit]" ,'\[' ];#/s\\/;print"24";exit}}__DATA__/

And everything past this compiler crash point doesn’t need to conform to Thutu syntax. This means that the space between =begin and =end now has virtually no syntax requirement as long as you don’t cut in the middle of any existing code pieces.

Where to go from here

Ok, there is one syntax requirement between the =begin and =end . Any code pieces that use Brain-flak tokens (){}[]<> without being preceded by a # will be exposed to Brain-Flak. But there is almost certainly a way to work around this one. So where are the safe spaced to add code in here?

There are a few:

• Before or after print 61

• Before =end

• After =begin

• After <>{

• After }<>

@Luke mentioned in polyglot chat he thought he had an answer to go next, and I'd point to these locations as probably good locations.

Good Luck.

Incident Report

#<R>"3"O.s became #<q>"3"O.s because Ris no longer a token and this detokenizes q

$'main' became $'main'3 In order to detokenizes ' ␊ and '3

###;console.log +39 became ###;console.log 39 Because 3 was no longer a token.

sseeeemPaeueewuuweeeeeeeeeeCisajjap became sseeeemPaeueewuuweeeeeeeeeeCis:ajjap Which detokenizes : and sa

]>+.-- -. >] became ]>+.---.>] because --. and .> are no longer tokens.

1k10v became 1k1x0vto detokenize 10

A Couple things I forgot to mention

I golfed off the 3 at the end of the C/C++ processor directive on line 1. This was to counter the addition of characters to line 1 so I didn't have to totally rework all the 2D languages. Just most of them.

Also, I added a - between the ) and ( on line 1 because I added a + earlier that incremented a memory cell in BF and SMBF which I needed to decrement back to zero.

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

42. evil, 930 bytes

#  4"16" 3//v\(@#/;\D"14"<;n4
#/*`3 afaaZ">;[77*,68*,@;'1,'1,q)(22)S#   ␉␉␉␉ (
#yy␉;36!@
#`<` ␉
#=␉x
#<]+<[.>-]>[
#␉<
###xR+++++[D>+++++++L+++<-][<<<]>+.---.>][
#px%>~~~+␉+~*ttt*.x
#D>xU/-<+++L)
#R+.----.R␉>]|
#[#yy#yy0l0vx01k1k0l0ix0jx0h0h1d111P0eU0bx0b0o1d0b0e0e00x1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10vx0v0l11111100(^_)
#|␉
print((eval("1\x2f2")and(9)or(13   ) )-(0and 4)^1<<(65)>>(62))or'(\{(\{})(\{}[()])}\{}\{}\{})'#46(8+9+9+9+9+=!)#1111|=/=1/24=x=9[<$+@+-@@@@=>+<@@@=>+<?#>+.--.]/
__DATA__=1#//
#.\."12"␉*
###; console.log  39
""""#//
=begin␉//
#mmeeaeueewuuw*/
#define␉z  sizeof 'c'-1?"38":"37"
#include<stdio.h>
int main()  /*/
#()`#`\'*/{puts(z);}/*'``
$'main'␉//
#-3o4o#$$$
<>"3"O.<␉>//
#
=end   #//
"""#"#//
#0]#echo 21#/(\[FAC,1<-#2FAC,1SUB#1<-#52FAC,1SUB#2<-#32FACLEGEREEX,1PLEASEGIVEUPPLEASE)  a>>>
#>27.say# /7Jn~15o|  
#8␛dggi2␛`␉|1|6$//''25  =#print(17) ###^_^_LEintnd"3"z!]/*///@!32*<>Z222999"26

is a literal tab, a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it.

Try it online!

VIP Score (Versatile Integer Printer): 0.01255 (snippet in answer 40 checks this for all answers)

Rundown

This program prints 42 in evil, 41 in brainf***, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

Verification

Most of the languages are tested by the test driver shown above. You can test Reng here and Modular SNUSP here; they output 19 and 31 respectively, as required. Incident is checked by keeping the tokens balances as described in previous answers.

Explanation

I looked at adding evil based on @Chance's recommendation. It slipped in quite easily and broke less things that any of my other additions did. All of evil's commands are lowercase letters. The most useful ones to note are the mark/jump related commands. There are two mark commands (m and j), two jump commands (f (forwards) and b (backwards)) and a mode toggle (x) to switch between standard and alternate marking (whether m's or j's are considered, respectively).

The f in line 2 jumps the bulk of the evil code: mmeeaeueewuuw, which is a slight tweak of the formula for generating 52 from 0 pulled off of the wiki (the accumulator is already 1 when we finish the jump, so the za wasn't needed). The extra m was to avoid creating a new token in Incident.

Working with evil moving forward

evil shouldn't be very hard to keep happy. As long as you don't create an infinite loop or add any ws, you have nothing to worry about. If you need a w, you'll need an f before it and an m or a j after it (depending on the mode when the f is reached).

Fixing things

A minor Incident

Incident was using 0m as a token, which threw evil into an endless loop. I changed that token to 0v.

Other stuff

Hexagony's code needed to be oriented the other direction to avoid bloating the byte count with padding, so a < mirror replaced the /. This required a matching > to keep perl6 happy.

For whatever reason, Japt did not like the new placement of Hexagony's }, so instead of "moving the MP to the right neighbor" I used a * to set the current edge to the product of the left/right neighbors. Since one of those is a zero, it gives us the zero at the current edge (which is all we really needed for Hexagony). Hexagony has a handful of other ways to direct the MP that also may have worked, so look into those if the asterisk becomes an issue.

And that's it. It's a little disconcerting how easy it was for evil to sneak into this polyglot.

\$\endgroup\$
1
  • \$\begingroup\$ I just realize I accidentally left that f in line 2 from my evil attempt. Oops. It looks like your code placement avoided all the problems I saw with mine though. Well done! \$\endgroup\$
    – Chance
    Feb 21, 2017 at 22:05
9
\$\begingroup\$

45. PicoLisp, 942 bytes

#  5"16" 3//v\(@;# # \D'[af2.q]'# "14"<;n4
#/*`3 gkggZ">[77*,;68* ,@;'1,q)  ␉␉␉␉(22)PSPP( 
#yx␉;36!@
#`<` ␉
#=
#<]+<[.>-]>[
#{#z}# (prin 45 ) (bye)<
###xR+++++[D>+++++++ndL+++<-][PLEASE,2<-#2PLEASE,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2DOGIVEUP]>+.---.>][
#Rx%>~~~+ +~*ttt*.x
#D>xU/-<+++L)
#R+.----.>]|
#[yxyx0l0v01k1k0l0ix0jx0h0h1(d111x0eU0bx0b0o1d0b0e0e00m1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10vx0v0l11111100(^_))46(8+9+9+9+9+=!)a
#|
print((eval("1\x2f2")and(9)or(13))-(0and 4)^1<<(65)>>(62))or'(\{(\{})(\{}[()])}\{}\{}\{})'#1111|=/=1/24=x=9[<$+@+-@@@@=>+<@@@=>+<?#>+.--.]/
__DATA__=1#//
#.\."12"__*
###;console.log 39
""""#//
=begin //
#sseemeePaeueewuuweeeeeeeeeecisajjapppp/*/
#define␉z sizeof 'c'-1?"38":"37"
#include<stdio.h>
main(   )/*/
#()`#`\'*/{puts(z);}/*'``
$'main'//
#-3o4o#$$$
<>"3"O.<>//
=end #//
"""#"#//
#>27.say# /7Jn~49c53c'43'p;|
#8␛dggi2␛`␉|1|6$//''25  =#print(17)#s!]#echo 21#^_^_@!32*<*///>ssZ222999"26

is a literal tab, a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it.

Try it online!

Edit: Japt is failing in the Test Driver. So here is a stand alone Japt link which outputs 7.

VIP score (Versatile Integer Printer): .010337 (to improve, next entry should be no more than 1006 bytes)

Rundown

This program prints 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainf***, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

Verification

Most of the languages are tested by the test driver shown above. You can test Reng here and Modular SNUSP here; they output 19 and 31 respectively, as required. Incident is checked by keeping the tokens balanced as described in previous answers.

I Did a Bad Thing

Have you ever done something you knew you’d regret, but then did it anyways? If you answered no, then you’re probably lying to either me or yourself. We’ve all done it. You know it’s true.

I’m trying to be better though. I knew I shouldn’t have asked the compiler its version. But I did it anyways. And that’s how I arrived at my first answer for #45 C (clang).

Yes, yes. I know the rule is “you may not use a language feature that returns the language's version number.” And I know that #ifdef __clang__ returns a boolean, not a version number. But you know what; we can do better than that - you and I. I may not have broken the letter of the rule, but am not my code. I can understand the spirit of a rule… and that is what I broke.

So let’s get back to printing sequential integers - the right way? Ya know what I mean? Maybe one day an unambiguous rule can be written that tells us when we are and aren’t asking, ‘what version are you?’

Driver Updates

I found a different directory for Whitespace on Tio. This is apparently where the Whitespace option points when you’re switching languages. So I changed the test driver to the version in the dir /opt/WSpace/wspace. I did this for Nim and INTERCAL in a prior answer as well and forgot to document those changes. Those languages broke so there was not really a choice. But for Whitespace, I believe the change was for the greater good. More on this below

I also started paying attention to the debug info in Tio. I really hadn’t been paying attention to this – specifically exit codes and I’ve kind of introduced a bunch of errors to the polyglot over the last several answers. And I think I’ve been violating this rule all over the place: Your program must run without erroring out or crashing. But, you know what; we’re trying to be better right? So I added the exit codes to the Test Driver so it’s more visible when programs throw errors while also providing the correct output.

Also, I went to the Tio chat room, and asked if Alphuck could/should be added, and it is in Tio now. But it’s a little different than the old-enough-to-be-used-in-this-challenge interpreter. The interpreter that @SnoringFrog and @ais523 dug out of the dark side of the internet was not case sensitive, but the Esolang.org entry @SnoringFrog found seemed to indicate that Alphuck was case sensitive. My interpretation is that Alphuck, as it is understood by the world council of people that case about such silly things, is case sensitive and we’re using a weird version. So in my view Tio is right and we’re wrong. Also, the Tio interpreter is a BF transpolation written just for Tio, so it’s newer than this challenge. As a result of all this, I wrote another test case abstraction for Tio that converts the polyglot to all lowercase and pushes it through Tio’s Alphuck interpreter. I probably should have just gone with @SnoringFrog’s Alphuck interpreter from the beginning, but here we are.

Like the V test abstraction, the Test in the Driver is not the test but is meant only to help in testing.

Edit: @SnoringFrog also points out that Tio’s transpolation is 8-bit where our interpreter is 32-bit. So a known limitation of this test abstraction is that any use of a number that’s valued outside of the 0-255 range will present different results.

PicoLisp Explanation

PicoLisp’s code, like a lot of other answers, uses a # to initiate a line comment. This one uses block comments that are initiated and terminated by #{ and }# respectively. So, the PicoLisp code addition is #{#z}# (prin 45 ) (bye). (prin 45 ) prints the integer in question and (bye) ends the program without error.

I should note that (bye) can be removed and the program will still produce the correct result. But then the Exit code Tio provides in Debug would be 1 instead of 0 – and we’re trying to be better than that.

Japt

The main problem with curly brace comment blocks is that Japt thinks opening curly braces contain code. Code is good normally, but Japt thinks you’ve got a screw lose when you tell it it’s going to receive some code then don’t give it any (e.g. {}). This is like telling someone you’ll call them back and then never doing it. It’s just rude… Becky. ლ(ಠ_ಠლ)

I got around the problem this time problem by giving Japt something trivial to do, while I went off and partied with PicoLisp. This is what’s going on between the braces here#{#z}#. Japt is taking the ascii value of the next character (with #) and that is a Incident token that I needed to detokenize.

Whitespace

This has apparently been broken for a long time. Actually it’s always been broken; I just didn’t know how to see it. It actually had the same dang problem I briefly cause with PicoLisp – I wasn’t telling it to end. So I did that. And then I realized how many random spaces and tabs could be golfed off as a result. Now, Whitespace prints it’s int on lines2-4 then it hits 3 consecutive line feeds to end gracefully. Huge byte savings!

Fission

It was around this time that I started poking around with the other languages looking for bad exit codes and Fission was being managed like an 80s era soviet reactor. After trying to destroy each atom created by INTERCAL and Minimal-2D, I finially stumbled on this piece of information in the documentation.

* Causes the program to terminate and all atoms are destroyed after this tick. The mass of the atom that caused termination is used as the exit code.

So how’d the atom get mass, you may be asking?

" Toggles printing mode. When an atom is in printing mode, it will print every character it encounters until the next ". Once printing is done, the atom's mass is set to the number of characters printed.

Cool, so all we have to do is decrement the mass according to the length of the string 12. That’s way easier than what I’ve been doing. So, _ does the decrementing here"12"__*, which puts our error exit code to a happy zero.

Pyth

I’m not sure I can correctly explain the top line anymore. It’s a code salad.

What I can say for sure is that Pyth also had an error, because I took out the code that told it to quit. (This really is becoming a theme.) Pyth’s quit command is .q and ideally, it would just be placed as early as possible on line 1 to quit out before any random command were attempted by Pyth.

Of course, the . can’t be executed by SM/BF, so we have to encapsulate Pyth’s quit in SM/BF jump commands, like so [.p]. Easy so far.

q is also a an operation in evil that we’d rather not execute, so the f jump command had to be moved earlier in the launch sequence. Problem though, the old evil solution had an a before the jump, which is lexed by evil as well, so this also had to get transplanted in the move.

So, [af.p] will work right? No. Pyth throws an error at the f which happens to be an instruction that expects a number to follow. Ok, I’ll throw a 1 in there to get Pyth to work. But now Whirl takes a dump because I have too many 1 before the Whirl/Incident line. Fine, code is now [af2.p].

Next, 05AB1E didn’t like one or more of the commands involved so far. Its polyglot long, " based string get started on line 2, and starting it earlier than Turtlèd’s "14" would throw a bunch of multilingual stringy chaos throughout the polyglot. So our Pyth quit command has to be thrown into a standalone 05AB1E string – meaning it will have to open and close shortly thereafter. Only thing is Pyth uses " for string declarations too, so we use ' to declare the 05AB1E string since Pyth handles this instruction differently. And now we have '[af2.p]'. Cool.

Meanwhile, the D in line 1 was locked into its current placement (or slightly off to the right) for Minimal-2D’s alignment and Turtlèd didn’t like crossing the Pyth quit statement in its current state. So Turtlèd’s jump code # really wanted to shift to the right, but Minimal-2D didn’t want the D to shift to the left if the #/ got removed. I tied a pair of place holding spaces here, but that made Trigger crap out. Then I tried ## as place holders, which would just make Turtlèd to a double jump. But that caused Pyth and Trigger to fail again. So the ultimate solution was to put # # before the D and another # for Turtlèd to land just prior to the string it should read.

Of course this still shifted the D two columns to the right, so the Minimal-2D L on line 8 had to shift also to catch the code path. These 2 columns ended up getting filled by incident token I wanted to detokenize, which gave us the ndL on line 8.

Solved.

# # could probably be golfed down to 2 characters in the future, but I’m not touching it. Not today at least.

INTERCAL

At some point after golfing off a ton of whitespace, I realized that INTERCAL’s code had 3 <s and was followed by >>> to balance for Perl 6. Meanwhile the BF and Minimal-2D code was preceded by [<<<] to balance a bunch of >s for Perl 6. And then I realized that the INTERCAL code could do the balancing work for the BF derivatives. So I transplanted it. The [<<<] space was already well hidden from BF/SMBF, Underload, and Retana, so most of the safety measures in INTERCAL’s old placement could be golfed off as well.

The one voice that complained though was Prelude’s. Prelude’s code, which I haven’t looked at in months, is 46(8+9+9+9+9+=!) and it likes to live near the end of the longest so it’s parenthesis can act one dimensionally. So I moved this bit to the longest line again, mostly for safety, but it still complained. Then I moved the parenthesis that hid INTERCAL form underload up to the Whirl/Incident line and placed them so they’d have roughly the same columns. This worked.

I don’t remember why, but I felt compelled to move the a that followed INTERCAL to the end of the Prelude code, but as I look now, this can probably be golfed off. Maybe.

Next, INTERCAL put some extra 1s before the Whirl code, and I preferred to not re-work the Whirl/Incident solution, so I set out to see what could change in INTERCAL. And let me tell you, INTERCAL has some interesting error messages.

Eventually, I found a way to swap out some 1s for 2s while storing my variable inside of west hyperspace… I think. Also, I found that I could golf off some Latin vocab while maintaining sufficient politeness if I was willing to take a compiler warning. I was, but now I sound insane. Worth it.

Oh! I forgot to golf off the UP. That can be done for some reason. Note for the future I guess.

Befunges

INTERCAL, Turtlèd, and Pyth all had a 1 that couldn’t be removed, and Befunge-98 had 2 1s, but we were only allowed a total of 4 before the Incident/Whirl line. This meant that one had to be cut from Befunge-98 somehow. And then it occurred to me that 77* can be used to arrive at ascii code for 1 in both Befunges, so I reworked the solution to leverage this common functionality and cut a 1 from the code. I should have done this before now anyways.

The only tricky bit was that the solution had to allow passage from the D for Minimal-2D code and not kill the Fission reaction with a *. The end solution ended up being 77*,;68* ,@;'1,q, which is similar enough to #41’s solution that I’d refer you there for a deeper explanation.

Incident

Moving INTERCAL ended up shifting a lot of tokens to before the Incident string, which changed the balance equation quite a bit. I ended up removing all the detokenizations I knew about and adding them back, one by one, to make the balance. Were now at a 10:17 balance. (10-17 = lucky number 7.) The only detokenizing strings in the polyglot I’m aware of are the z in {#z} and the nd in +ndL+ and these both serve the dual purpose of place holding for 2D langs.

Where to go from here.

By my estimation we are darn close to the VIP score goal. Between Cubix and the last ace I’ve been keeping up my sleeve, we could be within a couple ten thousandths. IMHO, it might be worth throwing the Cubix card, but pulling one more answer might be a little better. My gut says Octave is still in play, and the curly brace trick used for PicoLisp might be the secret sauce. But I’d bet there is another challenge to overcome C/++.

Here’s a Cubix resource I found somewhere along the way.

Good Luck

\$\endgroup\$
5
  • \$\begingroup\$ Also, TIO's alphuck uses 8 bit cells (otherwise this wouldn't work), whereas the compiler we've been uses C++'s default int size of 32 bits. Currently, the program isn't affected, but making use of the 8-bit-ness of the cells technically wouldn't be allowed since we have no evidence of an interpreter that did so that predates the challenge (although I agree that TIO's version is more true to the spec than what we have). \$\endgroup\$ Mar 2, 2017 at 14:46
  • \$\begingroup\$ For Fission: if you check the comments on the question, @ais523 confirmed exiting with a non-zero code intentionally is acceptable, as it's different than crashing. So there's no need to fuss over the exit code before calling *. \$\endgroup\$ Mar 2, 2017 at 15:23
  • \$\begingroup\$ @SnoringFrog I didn't realize that about fission, but I don't think I would have done things differently if I had. Consistancy is worth 2 bytes I think. Thanks for the Alphuck info. I'm gonna edit that in for visibility. \$\endgroup\$
    – Chance
    Mar 2, 2017 at 16:27
  • \$\begingroup\$ Octave's requires block comment indicators to be on their own line. That was enough to shut down my attempt (mainly japt being the issue there), unless I'm missing something. I'll try something else in a day or two, for now I've just golfed out a few characters. \$\endgroup\$ Mar 3, 2017 at 6:32
  • \$\begingroup\$ @SnoringFrog Oh. Yeah, that would shut it down for me too. Dang. We might be able to get there in two if we have to. Just gotta we golf off like 15-20 bytes I think. \$\endgroup\$
    – Chance
    Mar 3, 2017 at 7:12
9
\$\begingroup\$

49. Octave, 995 bytes

#16  "(}23!@)" 3//v\D(@;'[af2.q]GkGGZ'#)"14";n4
#/*` "[!PPP(22)SP(>7 7*,;68*,@;'1,@ ␉␉␉␉ q
#>␉
# >36!@␉
#`<`
#<]+<[.>-]>[
#{
#z}
#
#=<xR+++++[D>+++++++L+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52PLEASE,2SUB#2<-#32DOREADOUT,2DOGIVEUPDOiipsiis{i}ii@O6O4/oh]>+.---.>][
#Rx%>~~~+ +~*ttt*.x
#D>xU/-<+++L
#R+.----\).>]|
#[#[kGkGx/0l0v01k1k(x0l0ix0jx0h0h1d111x0eU0bx0b0o1d0b0e0e00m1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10vx0v0l11111100^_)46(8+9+9+9+9+=!)
###|
print( (eval ("1\x2f2")and(9)or(13))-(0and 4)^1<<(65)>>(62))or'({({1})({1}[(0)])}{1}\{1})'#}#(prin 45)(bye)|/=1/24=x<$+@+-@@@@=>+<@@@=>+<?#d>+.--./
__DATA__=1#//
#.\."12"__*
###;console.log 39
""""#//
=begin //
#ssseemeePaeueewuuweeeeeeeeeeCisajjapppp/*/
#define z sizeof'c'-1?"38":"37"
#include<stdio.h>
main(   )/*/
#()`#`\'*/{puts(z );}/*'``
<>{# }//
#}
disp 49#//
#{
1}<>//
$'main'//
#-3o4o#$$$
#< >"3"O.
=end #//
"""#"#//
#}
#|o51~nJ;#:p'34'\
#ss8␛dggi2␛ `|1|6$//''25  =#print(17)#>27.say#]#print(47)#]#echo 21#ss*///nd^_^_Z222999"26

is a literal tab, a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it.

Try it online!

VIP score (Versatile Integer Printer): .008457 (to improve, next entry should be no more than 1057 bytes)

This program prints 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainf***, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

Verification

Most of the languages are tested by the test driver shown above.

  • Reng can be tested to output 19 here. I’m not positive this doesn’t have an error, if someone could verify…?

  • Modular SNUSP can be tested to output 31 here.

  • Cubix’s cube shape viewed here

  • For Deadfish~, can be tested to output 48 with this. Note that Deadfish~ takes the polyglot to be fed on stdin, but and prints a number of >> prompts to standard output, which are an unavoidable consequence of running any Deadfish~ program.

  • Incident is checked by keeping the tokens balanced as described in previous answers.

  • Polyglot Chat

Octave Explanation

Octave is the last of the languages that I initially spotted as a possible inclusion when I set out to opened the polyglot up to lines of code that didn’t start with # in my Rail answer. For those that have been following along, I’ve been talking about Octave for a few weeks as a possible inclusion and I almost gave up on it when @SnoringFrog rightly pointed out that its start and end block comment statements had to be on their own lines. This turned out to be a critical piece of information I had missed in testing, which previously lead to some poor assumptions.

But on a whim last week, I tried to probe Octave’s requirements and developed my way into a little Japt/Octave polyglot. This code runs in both Japt and Octave to produce their respective numbers.

With proof positive of Japt/Octave co-habitability, I set out to see if there were any other hidden problems, and yes there were several issues. But first, let’s go over the Octave basics. #{ and #} are the begin and end block comment statements, both of which have to be on their own line, with nothing before or after the statement. This means that the print statement disp 47 can’t be tacked onto the end of the block comment like so many other languages do, which was the driver for its placement. Here is how the Polyglot looks from Octave’s perspective.

# Several Line Comments
#{
Block Comment
#}
disp 47 # Line comment
#{
Block Comment
#}
# A Couple Line Comments

A language of note for Octave is PicoLisp, which has the same command to initiate a block comment, and in fact both share the same #{ to open their first block comment. But PicoLisp’s end block comment is }# instead of #}, which can be seen on the long Python line.

CoffeeScript

The big surprise of looking at Octave again, long after noting it as a possibility, was that CoffeeScript had a similar problem to Japt, in that it treated a #{} in a string as containing code between the curly braces. And if you’ll remember, CoffeeScript handles literal string declaration the same way that Pythons do. So deep in the center of our Russian doll of string/comment declarations, where Octave’s print statement had to live, CoffeeScript didn’t want to see Octave’s block comment indicator. That’s a problem.

Instinct would suggest that the same basic trick for Japt should work for CoffeeScript. But there is a difference. CoffeeScript has # based line comments, so if the line following Octave’s #{ started with # it wouldn’t be parsed by CoffeeScript.

Why is this as problem? Well, the next line has to have a } to terminate the in-string-code for CoffeeScript and if we put in a } that’s not hidden behind a # it breaks another language. Care to guess which one?

Yes, you in the back…

You are correct; this is a silly, complicated mess. The answer however is Brain-Flack. You see, Brain-Flak needs balanced {s and }s, and by hiding the { behind a # but not the } causes Brain-Flak to bomb out.

So we must expose a preceding { to Brain-Flak, and this is what’s going on here: <>{# }//. The # inside the braces is the same Japt trick I used to party with PickLisp in answer 45. Then the } closes the brace for Japt while leaving it open for Brain-Flak. And of course the // at the end of the line is the same Thutu placation trick used whenever a line doesn’t start with a #. For Brain-Flak the {} instruction pops the active stack, which is bad mojo for us because that’s where our answer lives. I solved this by preceding the {} with an active stack swap instruction: <>. Then once Brain-Flak is done popping the empty stack, we switch back to the answer stack here: 1}<>//.

Altogether, this leaves us with the following code snippet to integrate Octave:

<>{# }//
#}
disp 47#//
#{
1}<>//

Everything Else

Well, there wasn’t really anything else. A little tweaking for Retina, Incident, and Cubix, and that’s it. Nothing note worthy for once.

Happy Polyglotting!

\$\endgroup\$
1
  • 1
    \$\begingroup\$ It might be useful to note that Octave also has %{ and %} as block comment markers, and from this quick test it appears that they can be mixed with #{ and #} (which I didn't expect would work). \$\endgroup\$ Mar 21, 2017 at 15:30
9
\$\begingroup\$

53. Shove, 1158 bytes

#16  "(}23!@)(" 3//*v\D@;'[af2.qc]'#)"14";n4
#/*` PkPPZ (22)S"[!(>7 7*,;68*,@;'1,@␉␉␉␉ P''53'S^'q
#>␉
# >36!@␉
#`<`
#<]+<[.>-]>[
#{
#z}
#
#=x<R+++++[D>+++++++EAL+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>+.-- -. >][
#x%+>+=+~tt .
#D>xU/-<+++L
#R+.----\).>]|
#[#[(}2}20l0v0x1k1k\4O6O@MoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k10vx0v0l111111^_)0046(8+9+9+9+9+=!)
###|
'\';echo 50;exit;';print((eval("2\x2f5")and(9)or(13))-(0and 4)^1<<(65)>>(62))or"'x"or'({({1})({1}[(0)])}{1}\{1})'#}#(prin 45)(bye)|/=1/24=x<$+@+-@@@@=>+<@@@=>+<?#d>+.--./
__DATA__=1#"'x"//
#.;R"12"*'
###;console.log 39
""""#//
=begin //
#sseeeemPaeueewuuweeeeeeeeeeCisajjap*///;.int 2298589328,898451655,12,178790,1018168591,84934449,12597/*
#define p sizeof'p'-1?"38":"37"
#include<stdio.h>
main ( )/*/
#
#"`#"\'*/{puts (p);}/*'"`"
/*
<>{#65}//
#}
disp 49#//
#{
1}<>//
$'main'//
#-3o4o#$$$
#<R>"3"O.
=end #//
"""#"#//
#}
#s|o51~nJ;#:p'34'\=#print (17)#>27.say#]#print(47)#]#echo 21
#sss8␛dggi2␛ `|1|6$//''25  16*///89^_^_Z222999"26

Try them online!

is a literal tab, a literal ESC character; Stack Exchange would mangle the program otherwise. I recommend copying the program from the "input" box of the TIO link below, if you want to work on it.

Want to learn more? Try the polygot chat!

VIP score (Versatile Integer Printer): .007778 (to improve, next entry should be no more than 1224 bytes)

Rundown

This program prints 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainf***, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

Verification

Most of the languages are tested by the test driver shown above.

  • Reng can be tested to output 19 here.

  • Modular SNUSP can be tested to output 31 here.

  • Incident was verified to test 33 by running the official interpreter on my own machine.

  • Deadfish~ can be tested to output 48 using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, but and prints a number of >> prompts to standard output, which are an unavoidable consequence of running any Deadfish~ program.

  • Shove was tested to output 53 using Ørjan's interpreter (which is a slight modification of my own that handles I/O in a much better way for this challenge than mine did); it was formerly available at this link, but the link is now dead. Luckily, the Wayback Machine had saved a copy. Turns out that that's no longer needed; a) Ørjan's website is back up now; b) TIO now supports Shove, so the program is now part of the main testbench.

Explanation

Shove

At this point, the challenge is mostly just about finding languages that predate the challenge to add, and then finding working interpreters for those languages that also predate the challenge glares at PPCG rules. (Anyone happen to have a pre-existing Sansism interpreter handy?) So I decided to look down the list of 2D languages on Esolang to see if any of them gave me inspiration, and stumbled across one of my own.

Shove is basically a 2D language inspired by Underload. However, rather than using an eval command ^ that works on the stack directly, stack manipulation instead works by dropping the contents of the stack directly into the program, shoving aside things that were already there, and then letting the IP run into it. In this polyglot, we're ignoring all that, and just outputting a string literal without doing any sort of calculation.

The really nice thing about using Shove in this polyglot is that it naturally splits itself off from the other languages; running polyglot #52 unmodified in a Shove interpreter causes the IP to fall off the second line of the program in stringmode, complaining about an unterminated string literal ("…" and '…' are both strings, and apart from that, the only relevant characters to Shove are the v in the first line and the > immediately below it in the second; I'm pretty glad that the interpreter ignores what it can't understand). Well, that's easy enough to fix, and dropping an apostrophe in just before the final q lets us create a capsule that only Shove parses (besides the languages that parse everything, obviously). '53'S is our Shove program to print 53. We then use the ^ command to change execution direction to upwards, causing the IP to fall off the playfield and exit the program. Simple enough, right?

Alphuck

Shove's print command S closes blocks in Alphuck. That was the easiest non-empty fix here; just drop in a P to balance it just before the Shove capsule, and everything just works.

Cubix and INTERCAL

Normally, you can just find a point in the program which Cubix control flow hits naturally, and move the Cubix capsule around into its path; not a lot of Cubix commands have irreversible effects, so you often have a lot of choice. Here, though, the very first command is naturally O, which will output a zero before we can do anything else. What a pain.

The O is inside the INTERCAL code, at a point which is fairly difficult to pad out of the way (it's in the middle of a fairly long keyword), so I decided to rearrange the INTERCAL code instead. In this case, I moved the politeness to a different part of the code. I also changed one copy of DO to FAC because I needed a padding character for Cubix to prevent its capsule breaking up an Incident token that's part of the main program. That let me drop the capsule into the Incident/COW line, which is to be honest probably the easiest place to put it.

Fission

Fission is an absolute minefield here, and even with the help of a Fission debugger I couldn't figure out what was causing extraneous output in the Fission program. In the end, I decided that in the interests of keeping the polyglot going, I'd try to terminate the Fission program as soon as possible. This isn't a challenge, but in Fission, it may as well be; there are way too many Fission landmines (atom bombs?) now in the code for the Fission code to sanely be allowed to run for long.

There are two potential ways to do this; add something like R.__* to a safe place in the polyglot as a sort of fuse that causes the program to end, or just remove the __ that sets the exit code in the existing program. In the end, laziness ran out, and I decided that an intentional exit with exit code 2 was the simplest way to stop having to think about Fission any more; after all, it's within the rules, and we can always fix it later if we really want to.

Incident and Python

Nearly all the changes I made have zero effect on Incident, so I was hoping to get away without any incidents occurring. However, removing one of the three copies of __ while fixing Fission created a token imbalance, fairly obviously. Given that I created Incident and thus ought to know it better than most of the other people here, I looked for a zero-byte way to fix it, and did so in a rather indirect way; Python's division "1\x2f2" can be changed to any other fraction numerically between 0 and 1, such as "2\x2f5", which causes "1 to no longer appear three times in the program. Now, that wasn't a token anyway, but the reason it wasn't a token was because 12 also appeared three times in the code, and the overlap "12 in the Fission code disqualified both tokens. Remove "1, and now there's no overlap, meaning that 12 becomes a token, and rebalances the code.

And that's pretty much it. I hardly added anything, and thus hardly had to change anything; this program's only 8 bytes longer than the last. (Sorry for reducing the VIP headroom so much. Hopefully there's still space for whatever you want to do, and if there isn't, we can always backtrack on the VIP score a bit and make it up later.)

\$\endgroup\$
2
  • 2
    \$\begingroup\$ The Shove interpreter link is back up now. \$\endgroup\$ Apr 18, 2017 at 0:29
  • 3
    \$\begingroup\$ I have a feeling that a year later, the three of you guys (SnoringFrog, Chance and you) are still going to be answering... good job, though! \$\endgroup\$
    – clismique
    Apr 18, 2017 at 11:54
9
\$\begingroup\$

74. Archway, 2051 bytes

#16  "}(o+?23!@- "/*\Dv;'[af2.q]PkPPX)\('#CO"14";*/
#/*0|7//```"`  )[-'][(>77*,;68*,@;'1,@1011)(22)S ␉\4n;␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx
#>␉
# 36!@␉`
#
#_>++++.>++++++::@---x---.+?
#`<`
#<]}}+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++qL+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][
#x%+>+=ttt Z_*.ar
#D>xU/-<+++L
#R+.----\).>]|
#[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d@O6O4111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0
[ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.
'((( p\';a=a;case $argv[1]+${a:u} in  *1*)echo 50;;*A)echo 54;;*)echo 58;;esac;exit;';print((eval("1\x2f 2")and 9or 13<<(65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>){(<{}(({}5){})>)}{}({}() )wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWW li ha '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'#
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39
""""
=begin
<>{
utpb now 70 dollar off!
ai
utpb has been selling out worldwide!
ai fir at fir
#sseeeemPaeueewuuweeeeeeeeeeCis:ajjap*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1"" //*
#define u8 "38\0"
#define p sizeof'p'-1?u8"67":"37"
#include<stdio.h> 
main (  )  {puts(p);}//*/
#if 0
#endif//* --... ...--
/*/
print'("72" )';end;
#if 0
#endif//* rk:start | print: "69" rk:end
print 61
#}
disp 49;
#{
}<>
$'main'3
#-3o4o#$$$
#<T>"3"O. /++++++++++++++++++++++++++++++++++++++++++++++++++++++.-x--.
=end
"""#"
#}
#s|o51~nJ;#:p'34'3\=#print(17)#>27.say#]#print (47) #]#echo 21# xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi os fwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M`|$//''         16~-<~-<~-<<<~-COprint("65")#ssss^_^_#
#5 "25"  +/ *///X2229996#

VIP score (Versatile Integer Printer): .005061 (to improve, next entry should be no more than 2135 bytes)

Try it online!

Rundown

This program prints74 in Archway, 73 in Morse, 72 in Fortran, 71 in what, 70 in Commercial, 69 in rk-lang, 68 in Python, 67 in C11, 66 in Surface, 65 in ALGOL 68, 64 in Agony, 63 in Brian & Chuck, 62 in Grass, 61 in S.I.L.O.S, 60 in Moorhens 2.0, 59 in Tcl, 58 in Ksh, 57 in Wise, 56 in dc, 55 in Brain-Flak Classic, 54 in Zsh, 53 in Shove, 52 in COW, 51 in Assembly, 50 in Bash, 49 in Octave, 48 in Deadfish~, 47 in Lily, 46 in Cubix, 45 in PicoLisp, 44 in alphuck, 43 in reticular, 42 in evil, 41 in brainfuck, 40 in Minimal-2D, 39 in CoffeeScript, 38 in C99, 37 in C++, 36 in Labyrinth, 35 in INTERCAL, 34 in Rail, 33 in Incident, 32 in Whirl, 31 in Modular SNUSP, 30 in Whitespace, 29 in Trigger, 28 in Brain-Flak, 27 in Perl 6, 26 in 05AB1E, 25 in Pip, 24 in Thutu, 23 in Hexagony, 22 in Underload, 21 in Nim, 20 in Prelude, 19 in Reng, 18 in Cardinal, 17 in Julia, 16 in Pyth, 15 in Haystack, 14 in Turtlèd, 13 in Ruby, 12 in Fission, 11 in Befunge-98, 10 in Befunge-93, 9 in Perl 5, 8 in Retina, 7 in Japt, 6 in SMBF, 5 in Python 2, 4 in ><>, 3 in Minkolang, 2 in V/Vim, and 1 in Python 3.

  • Reng can be tested to output 19 here.
  • Modular SNUSP can be tested to output 31 here.
  • Surface can be tested to output 66 here. Now in driver also. Test outputs an error code, but this is acceptable according to challenge rules.
  • Japt was updated in Tio to fix the parsing error we've been exploiting, so it must be tested individually here.
  • Incident was tested by WheatWizard. Now in Driver.
  • Surface was tested locally.
  • Moorhens 2.0 and Deadfish were tested by WheatWizard
  • Morse was tested using this interpreter.
  • Archway was tested using this interpreter

Archway

Archway is a 2D language based on brainfuck. The commands are the same as brainfuck except loops are replaced by reflectors (/ and ) these only activate if the current cell is non-zero. The instruction pointer starts in the lower left (ignoring the trailing newline) and travelling rightward. The only characters relevant to Archway in the last line are the + to increment the first cell to 1 and the first / which reflect the IP upward. The instruction pointer travels upward until it hits

/++++++++++++++++++++++++++++++++++++++++++++++++++++++.-x--.

Which increments the first cell to 55 (ascii value of 7) then prints, decrements 3 times then prints 4.

Because the Archway interpreter requires the last character of a file to be a linefeed the last line had to be rearranged.

Retina

I originally tried to fit Archway into the old last line and appending a newline, but this broke Retina. With some help from Martin Ender it was fixed by putting an M before the back tick in the (now) second last line. Martin said retina should continue working as long as the last non-empty line is a valid regex and it does not match 8.

# comment languages

The last line line now not beginning with # broke many languages so we made it start with a #. We needed one at the end of the line to close Algol's comment as well.

pip

Rearranging the last lines made pip fail so its answer of 25 was moved to the new last line and changed from being an integer to a string, the 5 at the beginning of the last line is because pip interprets # as meaning 'length of' so we use 5 as a dummy argument.

trigger

The rearranging at the end of the program also broke trigger. Triggers answer of X222999 was moved from its previous location to be on the new last line.

C, C++, etc

The */// comment delimiters were moved to the new last line.

SMBF

SMBF was reading the 6 that was the second last character of the program. It has been moved to the new last line, but is now the 3rd last character of the program so the SMBF code on line 8 was changed from

#<]}}+<[<.>>-]>[

To

#<]}}+<[<<.>>x>-]>[

Cubix/INTERCAL

The extra characters from the SMBF made the Cubix broken. This was fixed by changing the FAC in the INTERCAL to being DO.

Incident

Since I don't understand incident I got some help from Wheat Wizard. They adjusted some of the code to fix the tokens.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Prints 73g in Morse due to the --. you added :I Could be fixed by simply putting non-spaces around it. \$\endgroup\$
    – MD XF
    Jun 9, 2017 at 19:20
9
\$\begingroup\$

79. C++17, 2191 bytes

#16  "}(o+?23!@- "/*\Dv;'[af2.q]PkPPX)\('#CO"14";*/
#/*0|7//```"`  )[-'][(>77*;,68*,@,1',;# l1011)(22)\4nS ␉;␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx
#>␉
# 36!@␉`
#
#_>++++.>++++++::@---x---.+?
#`<`
#<]}}+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++qL+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACiiipsdds4O6O@doh]>@@+.---@.>][
#x%+>+=ttt Z_*.ar
#D>xU/-<+++L
#R+.----\).>]|
#[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0
[ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<
'(wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWw(([5]{} )))␉\';';print((eval("1\x2f  2")and 9or 13<< (65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>){(<{}(({}5){})>)}{}({}())wWW'#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'#
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39
""""
'<>\';    a=$(printf \\x00  );b=${#a};

"}"';           ((((';case "{"$ar[1]"}"${b} in    *1)echo 54;;*4)echo 78;; *1*)echo 50;;*)echo 58;;esac;exit;# (((('))))
=begin
<3>
<>{
utpb now 70 dollar off!
ai
utpb has been selling out worldwide!
ai fir at fir
#sseeeemPaeueewuuweeeeeeeeeeCis:ajjapp*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1"" //*
#include<stdio.h> 
#define ␉p(d)␉#d
#define u8 "38\0\0"
main (  ){puts( sizeof(0,u8)-5?u8"67":*u8""?"37": p( 0'0  "'\"")[9]?"75\0":'??-'&1? "79":"77\0");}//*/
#if 0
#endif//* --... ...--
/*/
print'("72")';end;
#if 0␌
#endif//* rk:start | print: "69" rk:end<>5b*:,1-,@
print 61
#}
disp 49;
#{
}<>
$'main'3
#-3o4o#$$$
#<T>"3"O.</+++++++>/+++<-\>+++.---.
=end
"""#"# xi xi xi xi \++++>/ xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi xi os
#}
#s|o51~nJ;#:p'34'3\=#print(17)#>27.say#]#print (47) #]#echo 21#fwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M`|$//''   16~-<~-<~-<<<~-COprint("65")#ssss^_^_#
#5 "25"  +/ *///X222999686#

VIP score (Versatile Integer Printer): .004443 (to improve, next entry should be no more than 2274 bytes)

This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14, 78 in dash, 79 in C++17

Verification

Try it online!

Languages that are not on TIO:

  • Reng (#19) online.

  • Deadfish~ (#48) local. Run like this: deadfish.py < polyglot. Prints a bunch of >> lines, but that's an unavoidable consequence of running any Deadfish~ program, so it's okay.

  • Moorhens (#60) local. Use python 2. Note that moorhens.py from master branch doesn't work.

  • Morse (#73) local.

  • Archway (#74) local

  • Trefunge-98 (#76) local. Note that flags must be -v 98 -d 3 for Trefunge-98. Could also be installed via pip.

Languages that use abstracted interpreters in the test driver:

Other languages:

  • Japt (#7) was updated in Tio to fix the parsing error we've been exploiting, so it must be tested individually online.

Explanation

Adding C++17

C++17 standard is not published yet (will be published this year), but it is unlikely to change so late in the standardization process. Isocpp.org states: "The committee has completed work on C++17, which is now in its final ISO balloting process..."

Trigraphs are optional in the new standard, see draft par C.4.1 page 1453 "Change: Removal of trigraph support as a required feature." Gcc does not support trigraphs by default in C++17 mode. So to separate C++17 from C++14 we can just use '??-'&1:

puts( '??-'&1 ? "C++17" : "C++14" );

Incident

Incident broke as a result. Added \0 to untokenize 5" and 7". Changed _ to \0 in u8 to untokenize \0.

\$\endgroup\$
9
\$\begingroup\$

85. zkl, 2379 bytes

#16  "}(o+?23!@- "/*\Dv;'[af2.q]PkPPX)\('#CO"14";*/
#/*0|7//```"`  )[-'][(>77*;,68*,@,1',;# l1011)(22)\4nS ␉;␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx
#>␉
# 36!@␉`
#~
#_>++++.>++++++::@---x---.+?
#`<`
#<<<#>>]}}+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++qL+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][
#x%+>+=ttt Z_*.ar4O6O@
#D>xU/-<+++L
#R+.----\).>]|
#[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0
[ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<
'(wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWw((.*.*.*.*.*.*.*.*.*.*819.+.*.+@[5]{}) ) )␉\';';print((eval("1\x2f 2")and 9or 13<< (65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{(x<(<()>)({})({}<{}>({}){})>)}({}){}({}())wWW no no no no no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*]*(<\>@*99[?]*]*.*|!)'#
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39
""""
'<>{\';   a=$(printf \\x00    );b=${#a};

" }"';           (( ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;; *1*)echo 50;;*)echo 58;;esac;exit;# (((('))))
=begin
utpb now 70 dollar off!
utpb has been selling out worldwide!
#seeeemPaeueewuuweeeeeeeeeeCis:ajjappp*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1"" //*
#include<stdio.h> 
#define ␉l(d)␉#d
#define u8 "38\0\0"
main ( ␉){puts( sizeof (0,u8)-5?u8"67":*u8""?"37":l( 0'0  "'\"")[9]?"75\0":'??-'&1? "79":"77\0");}//*/
#if 0
#endif//* --... ...--
/*/
print'("72")';end;
#if 0␌
#endif//* rk:start | print: "69" rk:end<>5b*:,1-,@
print 61
#}
disp 49;
#{
}<>
$'main'3
#-3o4o#$$$
#<T>"3"O.</+++++++>/+++<-\>+++.---.
#<<<#>>>
reg end="";print(85);reg s
=end
;"""#"#yxxxxxxxxxxx\++++>/<~#class P{   function:Main(a:String[] )~Nil{83->Print();} }
#}
#s|o51~nJ;#:p'34'3\=#print(17)#>27.say#]#print (47) #]#echo 21#fwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M`|$//''   16~-<~-<~-<<<~-COprint("65")#sss^_^_#
#5 "25"  +/ *///X222999686#

VIP score (Versatile Integer Printer): .003873 (to improve, next entry should be no more than 2463 bytes)

Rundown

This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14, 78 in dash, 79 in C++17, 80 in Klein 201, 81 in Klein 100, 82 in Brain-Flueue, 83 in Objeck, 84 in Klein 001, 85 in zkl

Verification

Try it Online!

Languages currently not on TIO:

  • Japt, 7 online.

  • Reng, 19 online.

  • Deadfish~, 48 local.

  • Moorhens, 60 local. use moorhens.py from the v2.0-dev branch

  • Morse, 73 local

  • Archway, 74 local

  • Trefunge-98, 76 local. Use -v 98 -d 3 for Trefunge-98.

  • Objeck, 83 local

  • zkl, 85 local

Explanation

zkl is a dynamically typed language that feels somewhat like lua or ruby (I think, I have never programmed in either of those). The main feature of the language with regards to the polyglot is the variety of comment syntax:

  • // line comment

  • # line comment

  • /* */ block comment, can be nested

  • #if 0 #endif block comment

  • #<<<# #<<<# block comment, insides unparsed

Though the only kinds of comments used in this program are # comments and #<<<# comments.

The line that was previously

#<]}}+<[<<.>>x>-]>[

Is now

#<<<#>>]}}+<[<<.>>x>-]>[

This opens a block comment. The extra > are to keep perl6 and brainfuck balanced. This block comment extends until just before the end of the ruby block comment.

#<<<#>>>
reg end="";print(85);reg s
=end
;"""#"#yxxxxxxxxxxx\++++>/<~#class P{   function:Main(a:String[] )~Nil{83->Print();} }

The block comment ending has some perl6 balancing > tacked on the end. The code that actually does the printing is the print(85). The regs are variable declarations (var could be used instead). reg s is used to make the =end part of an assignment. The reg end="" is used to give end a value. A semicolon was added to the start of the next line to separate statements. zkl is okay with the adjacent string literals. An x was deleted from the string of x to keep archway aligned.

Cubix, Incident, Prelude

Standard adjustements made for Cubix and Prelude.

One of the spaces inside the brackets for the C main method is now a tab to detokenise ).

Going forward

The Archway code could be put inside the currently empty string literal in the zkl code.

The zkl code could be moved higher if we introduce another block comment for the code after it.

\$\endgroup\$
3
  • \$\begingroup\$ Hmmm... does this work in whitespace? I tried to compile it and it didn't print anything. \$\endgroup\$ Jun 23, 2017 at 14:26
  • \$\begingroup\$ @bearacuda13 according to the test driver in the TIO link it does work, it should be printing 30. Are you copying from the post or the TIO link? \$\endgroup\$
    – Potato44
    Jun 23, 2017 at 16:18
  • \$\begingroup\$ I was using a different one, tutorialspoint or whatever... +1! \$\endgroup\$ Jun 23, 2017 at 16:20
9
\$\begingroup\$

92. C89, 2697 bytes

#16  "?63(o?23!*# #@"/*\DZZCv;'[af2.q]PkPPX)\('#CO"14"; */
#/*0|7//```"`  [>.>.])[-'][(>77*;,68*,@,1',;# l1011)(22)S\4n;␉␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx
#>␉
# 36!@␉`  e++++++::@ 
#~
#y
#`<`
#<<<#>>]}}+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++q   L+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][
#x%+>+=ttt Z_*.xxxxxxx4O6O@
#D>xU/-<+++L
#R+.----\   \).>]|
#[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO   /"78"oo@0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0)0\\
[ "]56p26q[puts 59][exit]" ,'\['];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<!\
'(wWWWwWWWWwvwWWwWWWwvwWWWw WWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWw  (([5]{}) ))␉\';';print((eval("1\x2f 2")and 9or 13<< (65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{(x<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW no no no no no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*]*(<*.*\>]xxxxxxxxxxxxx)'# \\
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39;'(*****************819+*+@[*99[?]*]***|!)'
#\\
""""#\
' ( <><        (          )>  ){ ({}[()]  )}{\';      a=$(printf \\x00    );b=${#a};#\\
" }"';           ((   ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;; *1*)echo 50;;*)echo 58;;esac;exit;# (((('))))#\
=begin
#p
;set print "-";print 89;exit#ss
utpb now 70 dollar off!
utpb has been selling out worldwide!
#seeeemPaeueewuuweeeeeeeeeeCis:ajjappppp
More 91 of thisof re
How much is it*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1"" //*
#include<stdio.h> 
#define␉ x(d)␉#d
#define u8 "38\0 "
main ( ) {puts( sizeof (0,u8)-5?u8"67":*u8""?"37":     x( 0'0  "'\"")[9]?"75":'??-'&1? "79":"77");"eg5""6 27";}//*/
#if 0
#endif//* --... ...--
/*/
p=sizeof( "(\"           ); print'(''72'')';end!"           ); main( ){puts("92" );return 0;}
#if 0␌
#endif//* rk:start | print: "69" rk:end<(     >5b*:,1-,@
print 61
#}
disp 49;
#{
}{}<>
$'main'3
#-3o4o#$$$
#<T>"3"O.</+++++++>/+++<-\>+++.---.
#<<<#>>>
reg end="";print(85);reg s
=end
;"""#"#xxxxxxxy"78"\++++>/<~#class P{        function:Main(a:String[] )~Nil{83->Print();} }
#}pS9^7^8^MUOUOF@:8:8\\
#s|)o51~nJ;#:p'34'3  \=#print(17)#>27.say#]# print(47) #]#echo 21#fwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M`|$//''  1$6~-<~-<~-<<<~-COprint ("65")#sss^_^_#
#5 "25"  +/ *///X222999686#

VIP score (Versatile Integer Printer): .003463 (to improve, next entry should be no more than 2785 bytes)

This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14, 78 in dash, 79 in C++17, 80 in Klein 201, 81 in Klein 100, 82 in Brain-Flueue, 83 in Objeck, 84 in Klein 001, 85 in zkl, 86 in Miniflak, 87 in Alice, 88 in PingPong, 89 in gnuplot, 90 in RunR, 91 in Cood, 92 in C89

Verification

Try it Online!

Languages currently not on TIO:

Explanation

I spent a lot of time looking at wrong direction. Standard trick to distinguish C89 in polyglots is to abuse comments (C89 does not have //). But we already have complex thing going on with comments and preprocessor between C/C++, Assembly and Fortran. I didn't want to mess with that and started to look how else C89 can be separated from C99. All of this is of course irrelevant because C89 doesn't even see main C/C++ block, it sees Fortran code (I guess because Fortran doesn't support // either).

So we have to polyglot Fortran and C89 with these restrictions:

  • no preprocessor, because we use preprocessed Fortran, so macros would expand in Fortran too
  • no /**/ comments, because as I said I didn't want to mess with existing C/C++/Assembly/Fortran code

As it turns out, it is possible, because:

  • Fortran escapes quotes differently than C. You have to double a qoute to escape it in Fortran.
  • Fortran, like C, has typeless variable declarations (implicit type)
  • Fortran has line comments (starting with !)

Main obstacle turned out to be Fortran's strict type system.

So we can try something like x="\";print'(''72'')';end!";main(){puts("92");}
However, this doesn't work in Fortran because implicit type is real and there is no implicit conversion from string to real. x="\"=="" doesn't work either because there is no conversion from logical to real. String subscription x="\"(1:2) doesn't work because in Fortran result of string subscription is another string. x=ichar("\") fails in C with "initializer is not a constant".

Luckily, gfortran supports sizeof as GNU extension, so we can use that: x=sizeof("\");print'(''72'')';end!");main(){puts("92");}

Added ( after first " to fix flaks. Not after ! because it breaks pyth. x -> p for alphuck. Prelude as usual.

C89 doesn't default to returning 0 if main returns nothing. As with other languages which don't return zero exit code it is easier to fix it in polyglot than in the test driver. Hence return 0;.

\$\endgroup\$
9
\$\begingroup\$

102. Symbolic Brainf*ck, 3004 bytes

    #16  "?63(o?23!*# #@"/*\DZZCv;'[af2.q]PkPPX)\('#CO"14"; */
#/*0|7//```"`  [>.>.])[-'][(>77*;,68*,@,1',;# l1011)(22)S\4n;iiipsddpsdoh coding:utf8␉␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx
#>␉
# 36!@␉`  e++++++::@ 
#~
#y
#`<`
#<<<#>>]}}+-[.+..]+-+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++q   L+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACs]>@@+.---@.>][
#x%+>+=ttt Z_*.
#D>xU/-<+++L
#R+.----\   \).>]4O6O@|
#[#[(?2?20l0v01k1kMoOMoOMoOMoO MOO0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0 )0\\
[  "]56p26q[puts 59][exit]" ,'\[999'];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<!\
'(wWWWwWWWWwvwWWwWWWwvwWWWw WWWWWWWWwWW/"78"oo@WWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWw              (([5]{})))␉\';';print((eval("1\x2f 2")and 9or 13<< (65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{(x<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW no no no no no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*]*(<*.*\>]xxxxxxxxxxxxx)'# \\
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39;'(******* **********819+*+@[*99[?]*]***|!)'
#\\
""""#\
' ( <><        (          )>  ){ ({}[()]  )}{\';      a=$(printf \\x00    );b=${#a};#\\
" }"';           ((   ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;; *1*)echo 50;;*)echo 58;;esac;exit;# (((('))))#\
=begin
#p             +555/2+55x%6E2x
;set print "-";print 89;exit# ss9
utpb now 70 dollar off!
utpb has been selling out worldwide!
#9999 9 seeeemPaeueewuuweeeeeeeeeeCis:ajjappppppp😆😨😒😨💬95💬👥➡
👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡

set ! 57
set ! 51
More 91 of thiset of re9
How much is it*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449, 12597
#endif//*
#1"" //*
#include<stdio.h>
#define␉ x(d)␉#d
#define u8 "38\0 "
main ( ) {puts( sizeof (0,u8)-5?u8"67":*u8""?"37":     x( 0'0  "'\"")[9]?"75":'??-'&1? "79":"77");"-' 101+-eg5""6 27""Zinge  ";}//*/
#if 0
#endif//* --... ...--
/*/
p=sizeof("9( 999 99\"    ); print'(''72'')';end!"            );main( ){puts('??-'&1?"101":"92");return(9-9+9 -9);}
#if 0␌
#endif//* rk:start | print: "69" rk:end<(9    >5b*:,1-,@
print 61
#}
disp 49 ;9;
#{
}{}<>
$'main'3
#-3o4o#$$$
#<T>"3"O.</+++++++>/+++<-\>+++.---.
#<<<#>>> /
reg end="";print(85);reg s#++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-.
=end
;"""#"#xxxxxxxy"78"\++++>/<~#class P{        function:Main(a:String[] )~Nil{83->Print();} }
#}pS9^7^8^MUOUOF@:8:8\\
#s|)o51~nJ;#:p'34'3  \=#print(17)#>27.say#]# print(47) #]#echo 21#fwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M`|$//''  1$6~-<~-<~-<<<~-COprint ("65")#asss^_^_#
#9 "25"  +/ *///X222999686#

I used standalone pretty printer because the one in the test driver doesn't work properly.

VIP score (Versatile Integer Printer): .002881 (to improve, next entry should be no more than 3057 bytes)

This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14, 78 in dash, 79 in C++17, 80 in Klein 201, 81 in Klein 100, 82 in Brain-Flueue, 83 in Objeck, 84 in Klein 001, 85 in zkl, 86 in Miniflak, 87 in Alice, 88 in PingPong, 89 in gnuplot, 90 in RunR, 91 in Cood, 92 in C89, 93 in Set, 94 in Emotinomicon, 95 in Emoji, 96 in EmojiCoder, 97 in Cubically, 98 in Archway2, 99 in 99, 100 in brainbool, 101 in K&R C, 102 in Symbolic Brainfuck

Verification

Try it online!

Languages not available on TIO:

(All verified by me, @WheatWizard, or @stasoid (thanks for the help!))

Explanation

Symbolic Brainfuck only uses symbols. It contains all the usual brainfuck commands, plus a handful of extras. The only new command I used was ², which doubles the current cell value. and increment/decrement the pointer, and ¡ is output.

Nothing broke. Cubix claims it's failing in the driver, but seems to work both when run alone on TIO and when executed on the ethproductions interpreter

\$\endgroup\$
1
  • \$\begingroup\$ It works on all non-tio interpreters \$\endgroup\$
    – stasoid
    Jul 31, 2017 at 16:04
9
\$\begingroup\$

104. Paintf*ck, 3159 3123 bytes

    #16  "?63(o?23!*# #@"/*\DZZCv;'[af2.q]PkPPX)\('#CO"14"; */
#/*0|7//```"`  [>.>.])[-'][(>77*;,68*,@,1',;# l1011)(22)S\4n;iiipsddpsdoh coding:utf8␉␉␉␉(1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx
#>␉
# 36!@␉`  e++++++::@ 
#~
#y
#`<`
#<<<#>>]}}+-[.+..]+-+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++q   L+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACs]>@@+.---@.>][
#x%+>+=ttt Z_*.
#D>xU/-<+++L
#R+.----\   \).>]|
#[#[(?2?20l0v01k1kMoOMoOMoOMoO MOO0l0ix0jor0h0h1d1114O6O@x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_0 )0\\
[  "]56p26q[puts 59][exit]" ,'\[999'];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<!\
'(wWWWwWWWWwvwWWwWWWwvwWWWw WWWWWWWWwWW/"78"oo@WWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWw              (([5]{})))␉\';';print((eval("1\x2f 2")and 9or 13<< (65)>>65or 68)-(0and 4)^1<<(65)>>62)or"'x"or' {}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}x{(x<(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW no no no no no no no no no no no no no no no no no no no no no no no no no no no no no no os sp '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*]*(<*.*\>]xxxxxxxxxxxxx)'# \\
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39;'(******* **********819+*+@[*99[?]*]***|!)'
#\\
""""#\
' ( <><        (          )>  ){ ({}[()]  )}{\';      a=$(printf \\x00    );b=${#a};#\\
" }"';           ((   ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;; *1*)echo 50;;*)echo 58;;esac;exit;# (((('))))#\
=begin
#p             +555/2+55x%6E2x
;set print "-";print 89;exit# ss9
utpb now 70 dollar off!
utpb has been selling out worldwide!
#9999 9 seeeemPaeueewuuweeeeeeeeeeCis:ajjappppppp😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀
👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡

set ! 57
set ! 51
More 91 of thiset of re9
How much is it*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449, 12597
#endif//*
#1"" //*
#include<stdio.h>
#define␉ x(d)␉#d
#define u8 "38\0 "
main ( ) {puts( sizeof (0,u8)-5?u8"67":*u8""?"37":     x( 0'0  "'\"")[9]?"75":'??-'&1? "79":"77");"-' 101+-eg5""6 27""Zinge  ";}//*/
#if 0
#endif//* --... ...--
/*/
p=sizeof("9( 999 99\"    ); print'(''72'')';end!"            );main( ){puts('??-'&1?"101":"92");return(9-9+9 -9);}
#if 0␌
#endif//* rk:start | print: "69" rk:end<(9    >5b*:,1-,@
print 61
#}
disp 49 ;9;
#{
}{}<>
$'main'3
#-3o4o#$$$
#<T>"3"O.</+++++++>/+++<-\>+++.---.
#<<<#>>> /
reg end="";print(85);reg s#++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-.
=end
;"""#"#xxxxxxxy"78"\++++>/<~#class P{        function:Main(a:String[] )~Nil{83->Print();} }
#}pS9^7^8^MUOUOF@:8:8\\
#s|)o51~nJ;#:p'34'3  \=#print(17)#>27.say#]# print(47) #]#echo 21#fwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++
#s8␛dggi2␛M`|$//''  1$6~-<~-<~-<<<~-COprint ("65")#asss^_^_#
#9 "25"  +/ ppppppp*n*n*n*e*s*s*s*ee*n*n*n*e*sss*e*n*n*n*ee*s*e*///X222999686#

The code above is generated by this pretty printer.

VIP score (Versatile Integer Printer): .002776 (to improve, next entry should be no more than 3213 bytes)

This program prints 1 in Python 3, 2 in V/Vim, 3 in Minkolang, 4 in ><>, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby, 14 in Turtlèd, 15 in Haystack, 16 in Pyth, 17 in Julia, 18 in Cardinal, 19 in Reng, 20 in Prelude, 21 in Nim, 22 in Underload, 23 in Hexagony, 24 in Thutu, 25 in Pip, 26 in 05AB1E, 27 in Perl 6, 28 in Brain-Flak, 29 in Trigger, 30 in Whitespace, 31 in Modular SNUSP, 32 in Whirl, 33 in Incident, 34 in Rail, 35 in INTERCAL, 36 in Labyrinth, 37 in C++03, 38 in C99, 39 in CoffeeScript, 40 in Minimal-2D, 41 in brainfuck, 42 in evil, 43 in reticular, 44 in alphuck, 45 in PicoLisp, 46 in Cubix, 47 in Lily, 48 in Deadfish~, 49 in Octave, 50 in Bash, 51 in Assembly, 52 in COW, 53 in Shove, 54 in Zsh, 55 in Brain-Flak Classic, 56 in dc, 57 in Wise, 58 in Ksh, 59 in Tcl, 60 in Moorhens, 61 in S.I.L.O.S, 62 in Grass, 63 in Brian & Chuck, 64 in Agony, 65 in ALGOL 68, 66 in Surface, 67 in C11, 68 in Python 1, 69 in rk-lang, 70 in Commercial, 71 in what, 72 in Fortran, 73 in Morse, 74 in Archway, 75 in C++11, 76 in Trefunge-98, 77 in C++14, 78 in dash, 79 in C++17, 80 in Klein 201, 81 in Klein 100, 82 in Brain-Flueue, 83 in Objeck, 84 in Klein 001, 85 in zkl, 86 in Miniflak, 87 in Alice, 88 in PingPong, 89 in gnuplot, 90 in RunR, 91 in Cood, 92 in C89, 93 in Set, 94 in Emotinomicon, 95 in Emoji, 96 in EmojiCoder, 97 in Cubically, 98 in Archway2, 99 in 99, 100 in brainbool, 101 in K&R C, 102 in Symbolic Brainfuck, 103 in Unicat, 104 in Paintfuck

Verification

Try it online!

Languages not available on TIO:

Explanation

To output in Paintfuck, you traverse a 2D grid and toggle pixels in that grid on (black) and off (white). It only has a few commands: nsew move along compass directions, * toggles a cell on/off, and [] form loops like traditional brainfuck. The 2D grid wraps in every direction.

All the Paintfuck code is on the last line. By selecting a grid size of 9x9, we minimize some of the necessary movements. Then, it's just drawing a simple 104 (starting with the rightmost line of the 4, then wrapping east and drawing the rest). In the end, that gives us this grid (red pixel is the pointer position):

paintfuck results

Grass

Thanks to Grass, I had to avoid ever moving west.

Underload

Underload did not like all the * (trying to run operations on an empty stack), so all the : were added to appease it.

Wise

The Underload fix left Wise with too many items on the stack, so I &'d them away.

When I came back to this today, I discovered I didn't need to fix Underload after all. Maybe something in my golfing of Paintfuck or something else I did dodged the issue? I don't know, but it let me golf all this out.

alphuck

All the ss needed corresponding ps.

Incident

<space>e became tokenized, so I put all of alphuck's ps in front of the string of e.

Cubix/Cubically

Cubix, as usual, needed to be moved. I placed it before a spacer x in the Incident line to make sure the @ didn't create a Cubically command.

\$\endgroup\$
4
  • \$\begingroup\$ Still a handful of languages to check, but real work is calling. I'll get to them myself in a couple hours if no one happens by who can check them for me. \$\endgroup\$ Aug 2, 2017 at 16:13
  • \$\begingroup\$ >_> I already said Archway(2) and Set are on TIO pls add to verifier \$\endgroup\$
    – ASCII-only
    Aug 2, 2017 at 21:48
  • \$\begingroup\$ @ASCII-only the TIO set interpreter is too strict. It errors on lines not starting with set. I see zkl is also now available on TIO as well \$\endgroup\$
    – Potato44
    Aug 2, 2017 at 23:02
  • \$\begingroup\$ Oops lol fixed just need to wait for Dennis to pull \$\endgroup\$
    – ASCII-only
    Aug 2, 2017 at 23:20
9
\$\begingroup\$

156. Moorhens, 7154 bytes

Try it online!

#16  "?63(o+?50;+'51;'# #@"/*"r"{\D-v e-'[fa5.q]PkPPX)\( 9 '#CO"14"^ 92*/
#/*0|7//```"`  [>.>.])[-'][(      7 >77*,68*,@'_          7 )(22)S/ \ 5 \7aa*+42@n; 7 999993 1 7 3 1 8 1 1 55 EEEEEδΘΔΔΔΘΔΘλiiipsddpsdoh k zzzzkf kf k zzzzzd kf k zzzzza kf bfz(coding=utf8␉␉␉␉1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????! 
#>c#z#111#y#y#y#_#1111xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/112\␉
# 36!@␉`  e++++++::@          /"78"oo@    h#115 o# dO           x-----
#comment afTaTaTa TbTbTbRtRtRtVkVk-VkRcRcRcBkBkBkMbMbMbLzLzxxxxxxxxxxxx8=,
#~==++++++++++++++++++++++++++++++ +++++++++++++++++++.._+++++++.
#`<`============================================================   x
#<<<#>>]}}+-[.^+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]+-+<[<<.>>x>-]>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++              L+++<-][PLACET,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACs]_>@@+.---@._+>][
#x%+>+=ttt Z_*.                                    _         _              _
#D>xU/-<+++L
#R+.----._>]|
#[#[(+?+?0l0v01k1kMoOMoOMoOMoOMOOx0l0ix0jor0h0h1d111 0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n114O6O@MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i000x1k1x0vx0v0l111111^_0   )0\\
[ "`e```.1'.0'.6''i]56pq{}26q[puts 59][exit]" ,'_\[999'];#/s\\/;print"24"; exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>;?\:-._++._++++._#/<?\>3-++._6+---2._#</++++++++++++++++++++++++++++++++++++++++++++++++._++._++++++.!\
'(wWWWwWWWWwvwWWwWWWwvwWWWwWWWW\WWWWwWWWWwWWWWW/WW\wWWWWWWWWwwwwvwWW/WwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwx                  (([5]{})))\';';print(( eval("1\x2f 2")and(9)or 13<< (65 )>>65or 68)-(0and eval("\"ppp\".bytes.class==Array and(4)or(95==\"ar_\"[2]and 5-96 or-93)"))^1<<(65)>>62) or"'x"or' {}{}{}{}{}{}{}({}<(((((()()())){}{})  ){}{})>)(({})5){}x{( <(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO MU s '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*.*]*.*(<\>]xxxxxxxxxxxxxxxxxxx)'# \\
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39; 999;
#\\
""""#\
' ( <><        (         x)>  ){ ({}[( )] )}{\';      a=$(printf \\x00    ) ;b=${#a};#\\
" }"';           ((   ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;;*1*) echo 50;;*) echo 58;;esac;exit;#(((('))))#\
=begin
#p            +555!/2+55x%6E2x********>********************828+*+@[*9 9[?]*]*****|!
;set print "-";print 89;exit# ss9 111<e$P+x+x+x+x+x*D*x+x+x+1+x+1E!s
utpb now 70 dollar off!
utpb has been selling out worldwide!
#9999 9 seeeemPaeueewuuweeeeeeeeeeCis:ajjapppppp⠆⠄⡒⡆⡘😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀
👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡→
밠밠따빠빠맣박다맣받다맣희맣희うんたんたんたんたんうんうんうんうんうんたんうんうんうんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんたんたんうんうんうんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうん
😊♈💖
😇♈♈ +-------+
😊♉♈ |$0011 \|
😇♈♈ |/1000 /|
😇♈♉ |\ 0011\|
😇♈💜|/01 00/|
😊♉♈ |\ 0011\|
😊📢♈|@ 0110/|
😈♈💜|       |
😊📢♈+-------+---
😇♉💞
😊📢♉⠀⢃⠛⠋
1  1  ! !
2   !    !
1      !!
1  x*
53  +
1  x*
51  +
1  x*
34  +
15  +                    ?   ?@             !
1   *                   ?@    ?
1   !                     +   *
1                       ?  !  ?
1     !                  ? @ ?
<  <    <<   <  <
< B=  =====  =>8 =
, 8= > B    = =
=  ==  =    = >   8  =
D B    =   D  x   xxx x
` `    =   >  8  = >
 ~ B   =  =   =  = > ~
 B =   D  ~   8 =  > xx
x   x  x x      x  xx  x
x   x    x    xx   x
x    x xx     xx
x    x xx     x
 8=,x  x

7 UP
7 RIGHT
7 RIGHT
7 TEACH
6 BOND
6 BOND
6 BOND
5 RIGHT
5 LEFT
5 RIGHT
7 BOND
7 TEACH
5 TEACH
6 YELL
5 TEACH
6 YELL
6 YELL
Yo::=~147
::=
You can see an x here.<<110[0]{472454523665721469465830106052219449897} 9

>{-<<
>SET x TO 120.
>X x. PPQ-}
>main=print 146{-ss

set ! 57,,...,,.,,..,,,,,,..,,,.$^
set ! 51.                         #"1015""6027""ing-?"ye h m 3 ;p seLz
More 91 of thiset of re9 red down one blue up red down one blue up red up one red right two blue up ssswwwWWWwWWWWWwWWWWWWWwWWWWWWWWW baa baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeeeeet bleeeeeeeeeeeeet bleeeeeeeeeet baaaa bleet bleeeeeeeeeet bleeet bleeeeeeeeeet
How much is it*/
#if 0
.int 2298589328,898451655,12,178790,1018168591 ,84934449, 12597
#endif//*
#1""//*
#include<stdio.h>
#define  x(d) #d
#define u8 "38\0 "//"16
char*x="24 10 31 1"
"a c #FFC0FF""B c #0000C0""d c #58007B""e c #0C8302"
"h c #E60001""i c #CAFFFF""j c #280000""k c #CA0000""l c #CA007F""n c #330001 ""q c #E60000"
"o c #FF8000""t c #FF00BC""u c #008080"
"A c #0040C0""E c #808000""F c #00C040""G c #008000 ""R c #800000"
"H c #0000AA""I c #00AA00""J c #55FFFF""K c #AAAAAA"
"r c red""g c green""b c blue""c c cyan""m c magenta""y c #FFFF00""x c black""_ c #FFFFFF"
"HHHahtdegggggggyrggggggc"
"IHHaixuEFbGGbggbryAEGRgc"
"JJHajyurbgbgggggggb____o"
"IJHakmyyyyyyyyyyyyyyyyye"
"I__almyyyyyyyyyyyyyyyyye"
"K__anmyyyyyyyyyyyyyy_y_e"
"HH_aqggyyyyyyyyg____m_Je"
"JH_axxxxxxxxxxxxxxxxxxxx"
"K__aaaam___bbbbbBm_bbBab"
"K__________bbbbb___bbxbb";//"
int  y(){puts ( sizeof (0,u8)-5?u8"67":*u8""?"37":x( 0'0  "'\"")[9]?"75":'??-'&1? "79":"77" );return 2;}int z=0;int q(int a,int b   ){return b;}main( ){q(z+=1,z)?puts("124"):y();}//<*/
#1""/*/

>main=putStr"128"--}

#1""/*/
#if 0
#endif//* --... ...--
/*/
p=sizeof("9( 999   99\"  ) ;print'(''72'')';end! ");  main(   ){puts('??-'&1?"101":"92");return(9-9+9 -9);}
#if 0
#endif//* rk:start | print: "69" rk:end 9                 @,-1,:*b5<>␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋
print 61
#}
disp 49 ;9;
#{
}{}<>        K yya+-        &  g+$
$'main'3x             A=AgRA;       AC
#-3o4o#$$$
#<T>"3"O._</+++++++>/+++<-\>+++.---.\_<!+++++++++++++++++++++++++++++++++++++++++++++++++._++.-.>@
#<<<#>>>  /
reg end="";print(85);reg s#++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-.
=end
;"""#"#xxxxclou"78" \++++>/<~#class P{function:Main (a:String[]  )~Nil{83->Print();}}
#endcOmment
#nocOmment   outtext("155"   )
#}pS9^7^8^MUOUOF@0:8:8     \\     @,,1'1'<>   _@125iRE
# |o51~nJ;#:p'34'3         \=#print(17)#>27.say#]# print(47)#]#echo 21#WWWWWWWWWWWWWWWwWWWWWWWWWWWWwv>++++
#8M`|   <esc>dggi2<esc>//  $}<}}<}>}[<<}< <<<<}<<}<<<<}<<<}}}<}}<}}<}}<    }}<}}<}}}<}}<<<<<<<<<<<}}}<}}<}}<}}<}}<}}<}}}<<<<<<<<<<}+++++++++++++++++++++++++++++++++++++++++++++++++._++.._#]~-<~-<~-<<<~-<COprint("65")#`=>asss^_^_# 
#9 "25"   +/ppppppp neeeeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n*n*n*ee<*s 5>1  *e*///\)Q222999686#

VIP score (Versatile Integer Printer): .001884 (to improve, next entry should be no more than 7290 bytes)

The old Moorens was run on the v2.0-dev branch, this runs on the master branch.

I also have not tested this in a few of the untestable languages because I don't have my normal environment, everything on TIO and plus both versions of Moorhens work for sure.

Explanation

The biggest trouble in making Moorhens work was Moorhens 2. Both Moorhens and Moorhens 2 have the same tokens, but each token essentially does a random thing in each language. In order to fix this I had to write a program to find all of the tokens I needed.

Here's what I got:

 command     Moorhens     Moorhens 2
 ho          increment    increment
 dO          increment    No-op
 MU          reverse      reverse
 ay          jump         No-op

Asside from the normal transformations that had to occur, to make the code work, this means I basically need to get rid of every token not part of the code. Previously some tokens could be ignored because they were helpful or did nothing, but the chances of that happening go down drastically when there are two languages involved. So I needed to detokenize all of the things. Most of this was the ands in the python code. I had intentionally tokenized these before so it wasn't very hard to undo that. Simply removing a space on either side works.

In the end the relevant tokens are

dO ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO MU

The final MU is impassable so anything after is meaningless. For those of you counting at home that is 30 hos and 48 dOs. Since all of them are run twice that makes 60 for Moorhens 2 and 156 for Moorhens (ho counts towards both totals).

\$\endgroup\$
9
\$\begingroup\$

158. Hyper-Dimensional Brainf*ck, 7269 bytes

#16  "?63(o+?50;+'51;'# #@"/*"r"{\D-v e-'[fa5.q]PkPPX)\( 9 '#CO"14"^ 92*/
#/*0|7//```"`  [>.>.])[-'][(      7 >77*,68*,@'_          7 )(22)S/ \ 5 \7aa*+42@n; 7 999993 1 7 3 1 8 1 1 55 EEEEEδΘΔΔΔΘΔΘλiiipsddpsdoh k zzzzkf kf k zzzzzd kf k zzzzza kf bfz(coding=utf8␉␉␉␉1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????! 
#>c#z#111#y#y#y#_#1111xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/112\␉
# 36!@␉`  e++++++::@          /"78"oo@    h#115 o# dO           x-----
#comment afTaTaTa TbTbTbRtRtRtVkVk-VkRcRcRcBkBkBkMbMbMbLzLzLzxxxxxxxxxx8=,
#~==++++++++++++++++++++++++++++++ +++++++++++++++++++.._+++++++.
#`<`============================================================                                               x
#<<<#>>]}}+-[.^+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]}--<^>++[+++++[>+++++++<-]>._++++._++._^<]+-+<[<<._>>x>-]^>[
#{
#x}
#2""/*\*
#=x<R+++++[D>+++++++              L+++<-][PLACET,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACs]_>@@+.---@._+>][
#x%+>+=ttt Z_*.                                    _         _              _
#D>xU/-<+++L
#R+.----._>]|
#[#[(+?+?0l0v01k1kMoOx4O6O@MoOMoOMoOMOOx0l0ix0jor0h0h1d111 0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i000x1k1x0vx0v0l111111^_0   )0\\
[ "`e```.1'.0'.6''i]56pq{}26q[puts 59][exit]" ,'_\[999'];#/s\\/;print"24"; exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>;?\:-._++._++++._#/<?\>3-++._6+---2._#</++++++++++++++++++++++++++++++++++++++++++++++++._++._++++++.!\
'(wWWWwWWWWwvwWWwWWWwvwWWWwWWWW\WWWWwWWWWwWWWWW/WW\wWWWWWWWWwwwwvwWW/WwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwx                  (([5]{})))\';';print(( eval("1\x2f 2")and(9)or 13<< (65 )>>65or 68)-(0and eval("\"ppp\".bytes.class==Array and(4)or(95==\"ar_\"[2]and 5-96 or-93)"))^1<<(65)>>62) or"'x"or' {}{}{}{}{}{}{}({}<(((((()()())){}{})  ){}{})>)(({})5){}x{( <(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO MU s '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*.*]*.*(<\>]xxxxxxxxxxxxxxxxxxx)'# \\
__DATA__=1#"'x"
#.;R"12"'
###;console.log 39; 999;
#\\
""""#\
' ( <><        (         x)>  ){ ({}[( )] )}{\';      a=$(printf \\x00    ) ;b=${#a};#\\
" }"';           ((   ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;;*1*) echo 50;;*) echo 58;;esac;exit;#(((('))))#\
=begin
#p            +555!/2+55x%6E2x********>********************828+*+@[*9 9[?]*]*****|!
;set print "-";print 89;exit# ss9 111<e$P+x+x+x+x+x*D*x+x+x+1+x+1E!s
utpb now 70 dollar off!
utpb has been selling out worldwide!
#9999 9 seeeemPaeueewuuweeeeeeeeeeCis:ajjapppppp⠆⠄⡒⡆⡘😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀
👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡→
밠밠따빠빠맣박다맣받다맣희맣희うんたんたんたんたんうんうんうんうんうんたんうんうんうんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんたんたんうんうんうんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうん
😊♈💖
😇♈♈ +-------+
😊♉♈ |$0011 \|
😇♈♈ |/1000 /|
😇♈♉ |\ 0011\|
😇♈💜|/01 00/|
😊♉♈ |\ 0011\|
😊📢♈|@ 0110/|
😈♈💜|       |
😊📢♈+-------+---
😇♉💞
😊📢♉⠀⢃⠛⠋
1  1  ! !
2   !    !
1      !!
1  x*
53  +
1  x*
51  +
1  x*
34  +
15  +                    ?   ?@             !
1   *                   ?@    ?
1   !                     +   *
1                       ?  !  ?
1     !                  ? @ ?
<  <    <<   <  <
< B=  =====  =>8 =
, 8= > B    = =
=  ==  =    = >   8  =
D B    =   D  x   xxx x
` `    =   >  8  = >
 ~ B   =  =   =  = > ~
 B =   D  ~   8 =  > xx
x   x  x x      x  xx  x
x   x    x    xx   x
x    x xx     xx
x    x xx     x
 8=,x  x

7 UP
7 RIGHT
7 RIGHT
7 TEACH
6 BOND
6 BOND
6 BOND
5 RIGHT
5 LEFT
5 RIGHT
7 BOND
7 TEACH
5 TEACH
6 YELL
5 TEACH
6 YELL
6 YELL
Yo::=~147
::=
You can see an x here.<<<<110[0]{472454523665721469465830106052219449897} 9

>{-<<
>SET x TO 120.
>X x. PPQ-}
>x--/2
> =157;y=146--/2
>main=print y{-ss

set ! 57,,...,,.,,..,,,,,,..,,,.$^
set ! 51.                         #"1015""6027""ing-?" ye h m 3 ;p se do
More 91 of thiset of re9 red down one blue up red down one blue up red up one red right two blue up ssswwwWWWwWWWWWwWWWWWWWwWWWWWWWWW baa baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeeeeet bleeeeeeeeeeeeet bleeeeeeeeeet baaaa bleet bleeeeeeeeeet bleeet bleeeeeeeeeet
How much is it*/
#if 0
.int 2298589328,898451655,12,178790,1018168591 ,84934449, 12597
#endif//*
#1""//*
#include<stdio.h>
#define  x(d) #d
#define u8 "38\0 "//"16
char*x="24 10 31 1"
"a c #FFC0FF""B c #0000C0""d c #58007B""e c #0C8302"
"h c #E60001""i c #CAFFFF""j c #280000""k c #CA0000""l c #CA007F""n c #330001 ""q c #E60000"
"o c #FF8000""t c #FF00BC""u c #008080"
"A c #0040C0""E c #808000""F c #00C040""G c #008000 ""R c #800000"
"H c #0000AA""I c #00AA00""J c #55FFFF""K c #AAAAAA"
"r c red""g c green""b c blue""c c cyan""m c magenta""y c #FFFF00""x c black""_ c #FFFFFF"
"HHHahtdegggggggyrggggggc"
"IHHaixuEFbGGbggbryAEGRgc"
"JJHajyurbgbgggggggb____o"
"IJHakmyyyyyyyyyyyyyyyyye"
"I__almyyyyyyyyyyyyyyyyye"
"K__anmyyyyyyyyyyyyyy_y_e"
"HH_aqggyyyyyyyyg____m_Je"
"JH_axxxxxxxxxxxxxxxxxxxx"
"K__aaaam___bbbbbBm_bbBab"
"K__________bbbbb___bbxbb";//"
int  y(){puts ( sizeof (0,u8)-5?u8"67":*u8""?"37":x( 0'0  "'\"")[9]?"75":'??-'&1? "79":"77" );return 2;}int z=0;int q(int a,int b   ){return b;}main( ){q(z+=1,z)?puts("124"):y();}//<*/
#1""/*/
 
>main=putStr"128"--}
 
#1""/*/
#if 0
#endif//* --... ...--
/*/
p=sizeof("9( 999   99\"  ) ;print'(''72'')';end! ");  main(   ){puts('??-'&1?"101":"92");return(9-9+9 -9);}
#if 0
#endif//* rk:start | print: "69" rk:end 9                 @,-1,:*b5<>␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋
print 61
#}
disp 49 ;9;
#{
}{}<>        K yya+-        &  g+$
$'main'3x             A=AgRA;       AC
#-3o4o#$$$
#<T>"3"O._</+++++++>/+++<-\>+++.---.\_<!+++++++++++++++++++++++++++++++++++++++++++++++++._++.-.>@
#<<<#>>>  /
reg end="";print(85);reg s#++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-.
=end
;"""#"#xxxxclou"78" \++++>/<~#class P{function:Main (a:String[]  )~Nil{83->Print();}}
#endcOmment
#nocOmment   outtext("155"   )
#}pS9^7^8^MUOUOF@0:8:8     \\     @,,1'1'<>   _@125iRE
# |o51~nJ;#:p'34'3         \=#print(17)#>27.say#]# print(47)#]#echo 21#WWWWWWWWWWWWWWWwWWWWWWWWWWWWwv>++++
#8M`|   <esc>dggi2<esc>//  $}<}}<}>}[<<}< <<<<}<<}<<<<}<<<}}}<}}<}}<}}<    }}<}}<}}}<}}<<<<<<<<<<<}}}<}}<}}<}}<}}<}}<}}}<<<<<<<<<<}+++++++++++++++++++++++++++++++++++++++++++++++++._++.._#]~-<~-<~-<<<~-<COprint("65")#`=>asss^_^_# 
#9 "25"   +/ppppppp neeeeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n*n*n*ee<*s 5>1  *e*///\)Q222999686#

VIP score: .001842

Verification

Try it online!

Languages that are not in the driver: 7 Japt, 26 05AB1E, 60/156 Moorhens, 83 Objeck, 90 RunR, 94 Emotinomicon, 96 EmojiCoder, 97 Cubically, 104 Paintfuck (origin at top-left), 108/110 Ruby 1.8.7/1.9.3, 119 ImageFuck, 121 Braincopter, 123 Mycelium, 127 Deltaplex, 129 Brainloller, 131 Extended Brainloller, 136 Wierd, 141 Floater, 145 MiLambda, 146 Curry, 153 l33t, 154 cockfuck (perl version), 157 Haskell(Hugs), 158 Hyper-Dimensional Brainfuck

Explanation

Hyper-Dimensional Brainfuck(HDBF) is a brainfuck extension that extends the tape to having infinite dimensions instead of just 1. There are 2 new commands that are added to navigate these extra dimensions. ^ and V change which coordinate axis we are travelling along. ^ changes the axis to the next axis e.g. If we are travelling along the 1st-axis(x-axis) a ^ would switch us to travelling along the 2nd-axis(y-axis). V would switch to travelling along the previous axis.

The changes to incorporate HDBF mostly happened on the 8th line along with the other brainfuck derivatives. The line now looks like this

#<<<#>>]}}+-[.^+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]}--<^>++[+++++[>+++++++<-]>._++++._++._^<]+-+<[<<._>>x>-]^>[

There has been a HDBF only loop added between the boolfuck loop and the SMBF loop.

Before this loop is }--<^>++. This construct is a no-op in brainfuck, SMBF, boolfuck and brainbool. It is also a near no-op in bitchanger(It flips a bit irrelevant to its output). This construct is more interesting in HDBF. Assuming the coordinates are (0,0,0...) and we are travelling along the 1st axis at the beginning of the snippet (we aren't but it doesn't matter where exactly we are as the tape is all zeros at this point) the -- sets (0,0,0...) to 254. The < then changes our coordinate to (-1,0,0...). The ^ then changes the axis we are travelling along to the next axis and we are still at (-1,0,0...). The > then moves us to (-1,1,0...) and the ++ sets this cell to 2. Since we have a non-zero cell value we are able to enter the loop.

[+++++[>+++++++<-]>._++++._++._^<]

Inside the loop we start by perform a standard multiplication of 7 by 7 to give 49 in cell (-1,2,0...), we then perform increments and prints to output 158. After the last print we then change axis and move to (-1,2,-1,0...). This cell has a value of 0 so we exit the loop.

The next commands are +-+< which set (-1,2,-1,0...) to 1 and move the cursor to (-1,2,-2,0...). As this cell has a value of 0 we skip over the SMBF loop. After the SMBF loop is ^> we change axis so that we do not move back onto (-1,2,-1,0...) which has a value of 1, instead we move onto (-1,2,-2,1,0...) which has a value of 0 allowing us to skip the brainfuck loop and the rest of the loops in the program.

\$\endgroup\$
2
  • \$\begingroup\$ I'm wondering why you censored Brainfuck in your title but not in your body. I suppose it doesn't matter, as long as the language name is in the body it is still searchable, it just seems a little strange. \$\endgroup\$
    – Wheat Wizard
    Nov 26, 2017 at 19:36
  • 1
    \$\begingroup\$ @WheatWizard being consistant with the other answers is why. Both Snoring Frog and stasoid had answers with censored titles but the name in the body before I answered with any of the *fuck languages \$\endgroup\$
    – Potato44
    Nov 26, 2017 at 21:49
9
\$\begingroup\$

159. Agda, 7460 bytes

#16  "?63(o+?50;+'51;'# #@"/*"r"{\D-v e-'[fa5.q]PkPPX)\( 9 '#CO"14"^ 92*/
#/*0|7//```"`  [>.>.])[-'][(      7 >77*,68*,@'_          7 )(22)S/ \ 5 \7aa*+42@n; 7 999993 1 7 3 1 8 1 1 55 EEEEEδΘΔΔΔΘΔΘλiiipsddpsdoh k zzzzkf kf k zzzzzd kf k zzzzza kf bfz(coding=utf8 1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!
#>c#z#111#y#y#y#_#1111xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/112\  
# 36!@ `  e++++++::@          /"78"oo@    h#115 o# dO           x-----
#comment afTaTaTa TbTbTbRtRtRtVkVk-VkRcRcRcBkBkBkMbMbMbLzLzLzxxxxxxxxxxx8=,  
#~==++++++++++++++++++++++++++++++ +++++++++++++++++++.._+++++++.  
#`<`============================================================                                                x
#<<<#>>]}}+-[.^+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]}--<^>++[+++++[>+++++++<-]>._++++._+++._^<]+-+<[<<._>>x>-]^>[  
#{  
#x}  
#2""/*\*  
#=x<R+++++[D>+++++++              L+++<-][PLACET,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACs]_>@@+.---@._+>][
#x%+>+=ttt Z_*.                                    _         _              _
#D>xU/-<+++L  
#R+.----._>]|  
#[#[(+?+?0l0v01k1kMoOMoOMoOMoOMOOx0l0ix0jor0h0h1d111 0eU0y0yx0moO1d0y0e0e00m1d0i0fx4O6O@x0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i000x1k1x0vx0v0l111111^_0   )0\\
[ "`e```.1'.0'.6''i]56pq{}26q[puts 59][exit]" ,'_\[999'];#/s\\/;print"24"; exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>;?\:-._++._++++._#/<?\>3-++._6+---2._#</++++++++++++++++++++++++++++++++++++++++++++++++._++._++++++.!\
'(wWWWwWWWWwvwWWwWWWwvwWWWwWWWW\WWWWwWWWWwWWWWW/WW\wWWWWWWWWwwwwvwWW/WwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwx                  (([5]{})))\';';print(( eval("1\x2f 2")and(9)or 13<< (65 )>>65or 68)-(0and eval("\"ppp\".bytes.class==Array and(4)or(95==\"ar_\"[2]and 5-96 or-93)"))^1<<(65)>>62) or"'x"or' {}{}{}{}{}{}{}({}<(((((()()())){}{})  ){}{})>)(({})5){}x{( <(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO MU s '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*.*]*.*(<\>]xxxxxxxxxxxxxxxxxxx)'# \\
__DATA__=1#"'x"  
#.;R"12"'  
###;console.log 39; 999; 
#  \\
""""#  \
' ( <><        (         x)>  ){ ({}[( )] )}{\';      a=$(printf \\x00    ) ;b=${#a};#\\
" }"';           ((   ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;;*1*) echo 50;;*) echo 58;;esac;exit;#(((('))))#\
=begin  
#p            +555!/2+55x%6E2x********>********************828+*+@[*9 9[?]*]*****|!
;set print "-";print 89;exit# ss9 111<e$P+x+x+x+x+x*D*x+x+x+1+x+1E!s
utpb now 70 dollar off!
utpb has been selling out worldwide!
#9999 9 seeeemPaeueewuuweeeeeeeeeeCis:ajjapppppp⠆⠄⡒⡆⡘😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀
👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡→  
밠밠따빠빠맣박다맣받다맣희맣희うんたんたんたんたんうんうんうんうんうんたんうんうんうんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんたんたんうんうんうんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうん  
😊♈💖  
😇♈♈ +-------+ 
😊♉♈ |$0011 \|
😇♈♈ |/1000 /|
😇♈♉ |\ 0011\|
😇♈💜|/01 00/| 
😊♉♈ |\ 0011\|
😊📢♈|@ 0110/| 
😈♈💜|       |
😊📢♈+-------+---  
😇♉💞  
😊📢♉⠀⢃⠛⠋  
1  1  ! !
2   !    !
1      !!
1  x*
53  +
1  x*
51  +
1  x*
34  +
15  +                    ?   ?@             !
1   *                   ?@    ?
1   !                     +   *
1                       ?  !  ?
1     !                  ? @ ?
<  <    <<   <  <
< B=  =====  =>8 =
, 8= > B    = =
=  ==  =    = >   8  =
D B    =   D  x   xxx x
` `    =   >  8  = >
 ~ B   =  =   =  = > ~
 B =   D  ~   8 =  > xx
x   x  x x      x  xx  x
x   x    x    xx   x
x    x xx     xx
x    x xx     x
 8=,x  x
  
Yo::=~147
::=  
You can see an x here.<<<<110
  
>{-<<mxf  
>SET x TO 120. [0]{472454523665721469465830106052219449897} 9
>X x. PPQ-} 
>x--/2  
> =157;y=146--/2 
>main=print y{-ss 
  
\begin{code}  
{-x   ␉␉␉␉ 
␉
 ␉  



-}
module x where open import IO;main = run(putStr"159"               ) --9ss
\end{code}
7 UP
7 RIGHT
7 RIGHT
7 TEACH
6 BOND
6 BOND
6 BOND
5 RIGHT
5 LEFT
5 RIGHT
7 BOND
7 TEACH
5 TEACH
6 YELL
5 TEACH
6 YELL
6 YELL
set ! 57,,...,,.,,..,,,,,,..,,,.$^
set ! 51.                         #"5""6027""ing-?" ye h m 3 ;p se do{--}gibe
More 91 of thiset of re9 red down one blue up red down one blue up red up one red right two blue up ssswwWWWwWWWWWwWWWWWWWwWWWWWWWWW baa baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeeeeet bleeeeeeeeeeeeet bleeeeeeeeeet baaaa bleet bleeeeeeeeeet bleeet bleeeeeeeeeet
How much is it*/
#if 0
.int 2298589328,898451655,12,178790,1018168591 ,84934449, 12597
#endif//*
#1""//*
#include<stdio.h>
#define  x(d) #d
#define u8 "38\0 "//"16
char*x="24 10 31 1"
"a c #FFC0FF""B c #0000C0""d c #58007B""e c #0C8302"
"h c #E60001""i c #CAFFFF""j c #280000""k c #CA0000""l c #CA007F""n c #330001 ""q c #E60000"
"o c #FF8000""t c #FF00BC""u c #008080"
"A c #0040C0""E c #808000""F c #00C040""G c #008000 ""R c #800000"
"H c #0000AA""I c #00AA00""J c #55FFFF""K c #AAAAAA"
"r c red""g c green""b c blue""c c cyan""m c magenta""y c #FFFF00""x c black""_ c #FFFFFF"
"HHHahtdegggggggyrggggggc"
"IHHaixuEFbGGbggbryAEGRgc"
"JJHajyurbgbgggggggb____o"
"IJHakmyyyyyyyyyyyyyyyyye"
"I__almyyyyyyyyyyyyyyyyye"
"K__anmyyyyyyyyyyyyyy_y_e"
"HH_aqggyyyyyyyyg____m_Je"
"JH_axxxxxxxxxxxxxxxxxxxx"
"K__aaaam___bbbbbBm_bbBab"
"K__________bbbbb___bbxbb";//"
int  y(){puts ( sizeof (0,u8)-5?u8"67":*u8""?"37":x( 0'0  "'\"")[9]?"75":'??-'&1? "79":"77" );return 2;}int z=0;int q(int a,int b   ){return b;}main( ){q(z+=1,z)?puts("124"):y();}//<*/
#1""/*/
 
>main=putStr"128"--}
 
#1""/*/
#if 0
#endif//* --... ...--
/*/
p=sizeof("9( 999   99\"  ) ;print'(''72'')';end! ");  main(   ){puts('??-'&1?"101":"92");return(9-9+9 -9);}
#if 0
#endif//* rk:start | print: "69" rk:end 9                 @,-1,:*b5<>␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋
print 61
#}
disp 49 ;9;
#{
}{}<>        K yya+-        &  g+$
$'main'3x             A=AgRA;       AC
#-3o4o#$$$
#<T>"3"O._</+++++++>/+++<-\>+++.---.\_<!+++++++++++++++++++++++++++++++++++++++++++++++++._++.-.>@
#<<<#>>>  /
reg end="";print(85);reg s#++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-.
=end
;"""#"#xxxxclou"78" \++++>/<~#class P{function:Main (a:String[]  )~Nil{83->Print();}}
#endcOmment
#nocOmment   outtext("155"   )
#}pS9^7^8^MUOUOF@0:8:8     \\     @,,1'1'<>   _@125iRE
# |o51~nJ;#:p'34'3         \=#print(17)#>27.say#]# print(47)#]#echo 21#WWWWWWWWWWWWWWWwWWWWWWWWWWWWwv>++++
#8M`|   <esc>dggi2<esc>//  $}<}}<}>}[<<}< <<<<}<<}<<<<}<<<}}}<}}<}}<}}<    }}<}}<}}}<}}<<<<<<<<<<<}}}<}}<}}<}}<}}<}}<}}}<<<<<<<<<<}+++++++++++++++++++++++++++++++++++++++++++++++++._++.._#]~-<~-<~-<<<~-<COprint("65")#`=>asss^_^_# 
#9 "25"   +/ppppppp neeeeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n*n*n*ee<*s 5>1  *e*///\)Q222999686#

Try it online!

Agda is another language from Haskell/Curry family. It supports Latex-style literate programming.

Installing on Fedora:

sudo yum install Agda
sudo yum install Agda-stdlib

Compiling:

agda -i /usr/share/Agda-stdlib -c x.lagda

Polyglot must have name x.lagda.

The code is based on hello world from here:

\begin{code}  
{-x                  





-}
module x where open import IO;main = run(putStr"159"               ) --9ss
\end{code}

Currently Agda has a bug which makes impossible to have tabs in a text section of .lagda file, so I moved Whitespace into Agda comment. For Whitespace to reach its main code lines before it should have at least two spaces. This rule is not strict - eg. lines 18 and 75 do not have spaces, but Whitespace still works.

Spaces around = are important for Agda. Haskell 98 (Hugs) sees Agda code, but it is inside {- -} for Hugs. x after {- is for SILOS.

Removed w from line 115 to fix Grass. mxf on line 79 is for evil. Could not add spaces to Monkeys code, so moved it below Agda. Moved ChuckScript to line 80 to fix Retina.

\$\endgroup\$
3
  • \$\begingroup\$ @WheatWizard It works in Emotinomicon. It takes about 2-3 minutes for online interpreter to display the number. Or you can use node.js version which is faster. \$\endgroup\$
    – stasoid
    Dec 11, 2017 at 11:31
  • \$\begingroup\$ Agda is on TIO now. tio.run/##S0xPSfz/… \$\endgroup\$
    – Dennis
    Dec 23, 2017 at 21:02
  • \$\begingroup\$ More on Agda is in answer 165. \$\endgroup\$
    – stasoid
    Feb 11, 2018 at 2:24
9
\$\begingroup\$

162. Julia 0.5, 7863 bytes

#16  "?63(o+?50;+'51;'# #@"/*"r"{\D-v e-'[fa5.q]PkPPX)\( 9 '#CO"14"^ 92*/
#/*0|7//```"`  [>.>.])[-'][(      7 >77*,68*,@'_          7 )(22)S/ \ 5 \7aa*+42@n; 7 999993 1 7 3 1 8 1 1 55 EEEEEδΘΔΔΔΘΔΘλiiipsddpsdoh k zzzzkf kf k zzzzzd kf k zzzzza kf bfz(coding=utf8 1P''53'S^'????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!
#>c#z#111#y#y#y#_#1111x        xxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/112\ 
# 36!@ `  e++++++::@          /"78"oo@    h#115 o# dO           x-----
#comment afTaTaTa TbTbTbRtRtRtVkVk-VkRcRcRcBkBkBkMbMbMbLzLzLzxxxxxxxxxxx8=,  
#~==++++++++++++++++++++++++++++++ +++++++++++++++++++.._+++++++.  
#`<`============================================================                                                x
#<<<#>>]}}+-[.^+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]}--<^>++[+++++[>+++++++<-]>._++++._+++._^<]+-+<[<<._>>x>-]^>[  
#{  
#x}  
#2""/*\*  
#=x<R+++++[D>+++++++9999 9 9      L+++<-][PLACET,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACs]_>@@+.---@._+>][
#x%+>+=ttt_Z_*.9 999 99 9999 9                     _         _              _
#D>xU/-<+++L_9  
#R+.----._>]| 9 9999
#[#[(+?+?0l0v01k1kMoOMoOMoOMoOMOOx0l0ix0jor0h0h1d111 0eU0y0yx0moO1d0y0e0e00m1d0i0fx4O6O@x0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i000x1k1x0vx0v0l111111^_0   )000011100\\
[ "`e```.1'.0'.6''i]56pq{}26q[puts 59][exit]" ,'_\['];#/s\\/;print"24"; exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>;?\:-._++._++++._#/<?\>3-++._6+---2._#</++++++++++++++++++++++++++++++++++++++++++++++++._++._++++++.!\
'(wWWWwWWWWwvwWWwWWWwvwWWWwWWWW\WWWWwWWWWwWWWWW/WW\wWWWWWWWWwwwwvwWW/WwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwx                  (([5]{})))\';';print(( eval("1\x2f 2")and(9)or 13<< (65 )>>65or 68)-(0and eval("\"ppp\".bytes.class==Array and(4)or(95==\"ar_\"[2]and 5-96 or-93)"))^1<<(65)>>62) or"'x"or' {}{}{}{}{}{}{}({}<(((((()()())){}{})  ){}{})>)(({})5){}x{( <(<()>)({})({}<{}>({}){})>){({}[()])}}({}){}({}()<()()()>)wWW ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho ho dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO dO MU s '#}#(prin 45)(bye)46(8+9+9+9+9+=!)((("3'3)))"'a'[[@*3*74[?]*.*]*.*(<\>]xxxxxxxxxxxxxxxxxxx)'# \\
__DATA__=1#"'x"  
#.;R"12"'  
###;console.log 39; 
#  \\
""""#  \
' ( <><        (         x)>  ){ ({}[( )] )}{\';      a=$(printf \\x00    ) ;b=${#a};#\\
" }"';           ((   ( (';case "{"$ar[1]"}"${b} in *1)echo 54;;*4)echo 78;;*1*) echo 50;;*) echo 58;;esac;exit;#(((('))))#\
=begin  
#p            +555!/2+55x%6E2x********>********************828+*+@[*99[?]*]*****|!
;set print "-";print 89;exit#ss      <e$P+ + + + + *D* + + +1+ +1E!s
utpb now 70 dollar off!
utpb has been selling out worldwide!
seeeemPaeueewuuweeeeeeeeeeCis:ajjappppppxf⠆⠄⡒⡆⡘😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀
👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡→  
밠밠따빠빠맣박다맣받다맣희맣희うんたんたんたんたんうんうんうんうんうんたんうんうんうんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんたんたんうんうんうんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうん  
😊♈💖  
😇♈♈ +-------+ 
😊♉♈ |$0011 \|
😇♈♈ |/1000 /|
😇♈♉ |\ 0011\|
😇♈💜|/01 00/| 
😊♉♈ |\ 0011\|
😊📢♈|@ 0110/| 
😈♈💜|       |
😊📢♈+-------+---  
😇♉💞  
😊📢♉⠀⢃⠛⠋  
#-49,A,-1                              #
#-5,A,-1                               #
#6,A,-1                                #
#                                     _
1     ! !
2   !    !
1      !!
1  x*
53  +
1  x*
51  +
1  x*
34  +
15  +                    ?   ?@             !
1   *                   ?@    ?
1   !                     +   *
1                       ?  !  ?
1     !                  ? @ ?
<  <    <<   <  <
< B=  =====  =>8 =
, 8= > B    = =
=  ==  =    = >   8  =
D B    =   D  x   xxx x
` `    =   >  8  = >
 ~ B   =  =   =  = > ~
 B =   D  ~   8 =  > xx
x   x  x x      x  xx  x
x   x    x    xx   x
x    x xx     xx
x    x xx     x
 8=,x  x

# + 
#+
#  +
+#
  *   +
  *+*

   *************************************************+
# +  +
#          +                                       +
   +    + *
         *****+
# +       +
#   +        +
  * *
   +*****
#        +
  
Yo::=~147
::=  
You can see an x here.<<<<
  
>{-<<  
>SET x TO 120. [0]{472454523665721469465830106052219449897}
>X x. PPQ-} 
>x--/2  
> =157;y=146--/2 
>main=print y{-ss 
  
\begin{code}  
{-x   ␉␉␉␉ 
␉
 ␉  



-}
module x where open import IO;main = run(putStr"159"               ) --s
\end{code}
7 UP
7 RIGHT
7 RIGHT
7 TEACH
6 BOND
6 BOND
6 BOND
5 RIGHT
5 LEFT
5 RIGHT
7 BOND
7 TEACH
5 TEACH
6 YELL
5 TEACH
6 YELL
6 YELL
set ! 57,,...,,.,,..,,,,,,..,,,.$^
set ! 51.                         #"5""6027""ing"ye re h  do{--}gibe16"124"&#8+*sizechar*
More 91 of thiset of re red down one blue up red down one blue up red up one red right two blue up ssswwWWWwWWWWWwWWWWWWWwWWWWWWWWW baa baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeeeeet bleeeeeeeeeeeeet bleeeeeeeeeet baaaa bleet bleeeeeeeeeet bleeet bleeeeeeeeeet
How much is it*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1""//*
#include<stdio.h>
#define  x(d) #d
#define u8 "38\0 "//"
char*x="24 10 31 1"
"a c #FFC0FF""B c #0000C0""d c #58007B""e c #0C8302"
"h c #E60001""i c #CAFFFF""j c #280000""k c #CA0000""l c #CA007F""n c #330001 ""q c #E60000"
"o c #FF8000""t c #FF00BC""u c #008080"
"A c #0040C0""E c #808000""F c #00C040""G c #008000 ""R c #800000"
"H c #0000AA""I c #00AA00""J c #55FFFF""K c #AAAAAA"
"r c red""g c green""b c blue""c c cyan""m c magenta""y c #FFFF00""x c black""_ c #FFFFFF"
"HHHahtdegggggggyrggggggc"
"IHHaixuEFbGGbggbryAEGRgc"
"JJHajyurbgbgggggggb____o"
"IJHakmyyyyyyyyyyyyyyyyye"
"I__almyyyyyyyyyyyyyyyyye"
"K__anmyyyyyyyyyyyyyy_y_e"
"HH_aqggyyyyyyyyg____m_Je"
"JH_axxxxxxxxxxxxxxxxxxxx"
"K__aaaam___bbbbbBm_bbBab"
"K__________bbbbb___bbxbb";//"
int f(char*a,char*b    ){  puts(a?"124":sizeof(0,u8)-5?u8"67":*u8""?"37": x( 0'0  "'\"")[9]?"75":'??-'&1? "79":"77"  );}main(){f(x,x=0);}//<*/
#1""/*/
 
>main=putStr"128"--}
 
#1""/*/
#if 0
#endif//* --... ...--
/*/
p=sizeof(" (\");   print'(''72'')';end!" );main(){    puts('??-'&1?"101":"92");return 0;}
#if 0
#endif//* rk:start | print: "69" rk:end                   @,-1,:*b5<>␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋
print 61
#}
disp 49;
#{
}{}<>        K yya+-        &  g+$
$'main'3x             A=AgRA;       AC
#-3o4o#$$$
#<T>"3"O._</+++++++>/+++<-\>+++.---.\_<!+++++++++++++++++++++++++++++++++++++++++++++++++._++.-.>@
#<<<#>>>  /
reg end="";print(85);reg s#++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-.
=end
;"""#"#xxxxclou"78" \++++>/<~#class P{function:Main (a:String[]  )~Nil{83->Print();}}
#endcOmment
#nocOmment   outtext("155"   )
#}pS9^7^8^MUOUOF@0:8:8     \\     @,,1'1'<>   @125iRE                                     _
# |o51~nJ;#:p'34'3         \=#print(   size([[1] [3]][1,:] )==(2,   )?1_58+4:17   )#>27.say#]# print(47)#]#echo 21#WWWWWWWWWWWWWWWwWWWWWWWWWWWWwv>++++
#8M`|   <esc>dggi2<esc>//  $}<}}<}>}[<<}< <<<<}<<}<<<<}<<<}}}<}}<}}<}}<    }}<}}<}}}<}}<<<<<<<<<<<}}}<}}<}}<}}<}}<}}<}}}<<<<<<<<<<}+++++++++++++++++++++++++++++++++++++++++++++++++._++.._#]~-<~-<~-<<<~-<COprint("65")#`=>ass^_^_#
#9 "25"   +/ppppppp  eeeeee*n*n*n*es*s*s*^ee*n*n*n*e*sss*e*n*n*n*ee<*s 5>1  *e*///\)Q222999686#

VIP score: .001849

Verification

Try it online!

Languages that are not in the driver: 7 Japt, 26 05AB1E, 60/156 Moorhens, 83 Objeck, 90 RunR, 94 Emotinomicon, 96 EmojiCoder, 97 Cubically, 104 Paintfuck (origin at top-left), 108/110 Ruby 1.8.7/1.9.3, 119 ImageFuck, 121 Braincopter, 123 Mycelium, 127 Deltaplex, 129 Brainloller, 131 Extended Brainloller, 136 Wierd, 141 Floater, 145 MiLambda, 146 Curry, 153 l33t, 154 cockfuck (perl version), 157 Haskell(Hugs), 158 Hyper-Dimensional Brainfuck, 160 TinCan, 161 2L

Explanation

The version of Julia that was used for answer 17 was 0.4. Since Julia is a fast changing language there are exploitable differences between version 0.4 and 0.5. The specific difference we use involves a difference in the dimensions of taking slices of multidimensional arrays as mentioned towards the end of this blog post.

The Julia code is changed from

=#print(17)#

to

=#print(   size([[1] [3]][1,:] )==(2,   )?1_58+4:17   )#

We construct the array [[1] [3]] which is a 1x2 matrix and then index into the first row and the all columns (this is the [1,:]) which creates a 1x2 matrix in Julia 0.4 and a length 2 vector in Julia 0.5. We then use the size function which returns the dimensions of an array as a tuple, this will be (1,2) in Julia 0.4 and (2,) in Julia 0.5. We compare this to (2,) in the head of a ternary operator. Julia 0.5 will evaluate 1_58+4, which evaluates to 162. Julia 0.4 will evaluate the 17.

The reason for the underscore in the numeric literal (yes, Julia allows that) in the Julia 0.5 branch of the ternary is the need to stop the comma from hitting the + in DOBELA. The reason why + is used is because using a 6 causes YABALL to loop infinitely.

The Befunge-98 that was previously passing throgh the 27 in the perl6 code now passes through the z in size which is a no-op.

\$\endgroup\$
2
  • \$\begingroup\$ Congratulations on 2K! \$\endgroup\$ Dec 13, 2017 at 23:21
  • 2
    \$\begingroup\$ @cairdcoinheringaahing Thanks. I used my new deleted answer viewing powers to see the history of parts of the polyglot that, well, aren't parts of the polyglot. \$\endgroup\$
    – Potato44
    Dec 13, 2017 at 23:43
1 2
3
4 5
16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.