Add a language to a polyglot

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

• 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.)
• 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.

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

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

jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function (data) {
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();

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>"

('#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> • For people who can see deleted posts: the Sandbox post was here. – user62131 Dec 6 '16 at 19:00 • 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. – user62131 Dec 6 '16 at 19:44 • @ais523 I think what was meant was that should new answers contain try it links with the new code? – Blue Dec 6 '16 at 19:45 • I think we need a script that takes a hex dump of the code and automatically runs it in all the languages... – mbomb007 Dec 7 '16 at 20:05 • 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... :) – Stewie Griffin Dec 17 '16 at 12:11 300 Answers 67. C11, 1674 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!@␉ # #_>++++.>.+?+++++::@ #< #<]}} +<[<.>>-]>[ #{ #z} # #=x<R+++++[D>+++++++59xL+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---@.>][ # #x4O6O@ #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\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
<>{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 ax fwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm # sss8␛dggi2␛|// ''25 16*///~-<~-<~-<<<~-XCOprint("65")#s^_^_2229996#  VIP score (Versatile Integer Printer): .005565 (to improve, next entry should be no more than 1749 bytes) Try it online! Numbers 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++, 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 Verification Most languages can be tested with the test driver above, but 6 languages have to be tested manually: • Reng (#19) online. • Modular SNUSP (#31) online. • Incident (#33) local. • 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. Note that moorhens.py from master branch doesn't work. • Surface (#66) local. Explanation Adding C11 I am using the trick with utf-8 literals (introduced in C11). #define u8 "C99\0" puts(u8"C11");  This trick can also be used to distinguish C++11 from C++03. Cubix and Retina broke as a result. Cubix Cube size 16 -> 17. Moved 4O6O@ further in file, it ended up on line 13 (#x%+>+=ttt Z_*.), which broke fission, cardinal and minimal-2d. So I placed 4O6O@ on a separate line instead and padded it with #x. Retina I ended up adding 2 lines (#define u8 "38\0" and #x4O6O@), so total line count remained odd, which is good for retina. But retina still didn't work. So I moved empty line around to fix it (line 20 in answer 66). This empty line ended up before #x4O6O@. Thutu broke, so I added # to that line. Surface Surface still prints NULL character before 66, I didn't fix it. (It is fixed in the next answer.) • Given that #38’s C has so far been tested with bash run-wrapper.sh gcc -o polyglot polyglot.blah.c, I would prefer to define #38 as the C11 answer, and #67 as the C99 answer, but that is trivial. Nice Addition! – Chance Jun 5 '17 at 15:56 • I thought surface printed a null character, but when I run it on my machine I don't seem to get it in my output. How are you running surface? – Wheat Wizard Jun 5 '17 at 16:28 • @WheatWizard I run surface.exe on my Windows 7 32-bit machine. In console window I see blank space before 66 (NULL char is displayed exactly like a space char). If I redirect output to a file I can see it in hex viewer: ...0D 0D 0A 00 36 36 │ 0D 0D 0A 0D 0D... (newlines and other text are added by interpreter). Also, python program print("\x00\x01") produces exactly the same output (minus newlines and interpreter text) as surface program .+.@ - a blank space followed by a smiley face (char \1). – stasoid Jun 5 '17 at 19:15 • @stasoid Hm, I'll investigate perhaps it is a difference between running on windows and using Wine. I may have also made a mistake. I did run it through a hex editor but I might have missed it. – Wheat Wizard Jun 5 '17 at 19:39 7. Japt (50 bytes) #v;7||"<++++<;n4 #>3N. print('1'if 1/2else'5') #i2  Man, it was fun to fit Japt in there. Hopefully it didn't kill anyone's plans... Test it online! This program prints 1 in Python 3, 2 in V, 3 in Minkolang v0.15, 4 in ><>, 5 in Python 2, 6 in SMBF and 7 in Japt How this works: #v; takes the char code of v, or 118. Then 7|| returns the logical OR of 7 and the rest of the code, which is wrapped in a string with " to avoid any syntax errors. The result, 7, is automatically sent to STDOUT. For future polyglotters, " can be changed to  at no penalty to the Japt program (though I'm not sure about the others). • More on Japt is in answer 58. – stasoid Jan 26 '20 at 13:18 8. Retina, 70 bytes #v;7||"<+0+0+0+<;n4 #>3N. #|\w* #8 #| #M print('1'if 1/2else'5') #i2  Try it online This program prints 1 in Python 3, 2 in V, 3 in Minkolang v0.15, 4 in ><>, 5 in Python 2, 6 in SMBF, and 7 in Japt. Screw creating hyperlinks to interpreters. That's going to take way too much time. It's up to the poster and anyone creating new answers to test it yourself. Explanation: #v;7||"<+0+0+0+<;n4 # replace every empty string with "#>3N." #>3N. #|\w* # replace words chars with "#8" #8 #| # remove all "#". The "|" is something I could've golfed off. #M # match all places between characters (finds 8) print('1'if 1/2else'5') # replace something that won't be found. noop #i2  • This is 2 bytes too long (50 + 20 is 70, 50 + 20% is 60). – user62131 Dec 6 '16 at 20:30 • @ais523 Fixed it. – mbomb007 Dec 6 '16 at 20:36 • Care to provide an explanation? If not, that's ok. – MercyBeaucou Dec 7 '16 at 5:41 • @MistahFiggins Sure. Added. – mbomb007 Dec 7 '16 at 14:44 14. Turtlèd (135 bytes) #v;2^0;7||"<+0+0+0+<*!2'!1'L#'1r'4;n4 #v0#_q@ #>3N. #|\w* #8 ^1b0< #| #M print ((0 and'13')or(None and 9 or 1/2 and 1 or 5)) #jd5ki2  This prints 1 in Python 3, 2 in Vim, 3 in Minkolang, 4 in <><, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl, 10 in Befunge, 11 in Befunge-98, 12 in Fission, 13 in Ruby and 14 in Turtlèd. First line added #'1r'4 near the end of line, Turtled takes #[string]# as string input then 'X places the value of x on the grid, r moves right 1 space on the grid. The value on the grid is printed at the end of the program implicitly. Try it Online Link to Turtled docs • @Sp3000 - edited and fixed (should be) – Teal pelican Dec 7 '16 at 9:34 • – Teal pelican Dec 7 '16 at 9:48 • hooray! My language is used. Also it has a capital t, unlike brainfuck – Destructible Lemon Dec 8 '16 at 5:26 • @DestructibleWatermelon It's a fun little language for some challenges :) I saw you post a while back and thought I'd pick it up just in case. – Teal pelican Dec 8 '16 at 8:42 300. ↑110010000100110110010, 14244 bytes # 6 "(?63_lv+'50;+'51;5 5 %\--[250=@]aat\" a/4*DvehfbIg/\"" 3 4//*26qkp16*^[.qx]"[8=,k]Pk PPX~_~)"xvy"$$7# CO|"14" #:7 9 7 9 7 222222222222222222222222 "'" #\\ # 1"7"//['][']  [>.>.?]~~)[7aatxy\#184 O@ (22)Siii/ \psddpsdoh ]##### #######++(- #### ##-[###### mxf ####xAegguEay######i#u####Ft#######MZWWW####WWWWWW zR###### # #### #######:_a5# 202ø!},{P_<Ám/e!<ÁmOe!<É}M<ÁmS15%!!%BB44,222%!!%BBPZPYAAA4D,5P[5?4-0!<½!!22<2/!]ss1]'[kkX"204".â'_PPQss 7 999993 1 7 3 1 8 1 1 55 k zzzzkf kf k zzzzzd kf k zzzzza kf bfz 2#z#111#y#y#y#_# coding=utf8 ! 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退 @[[[["472"?]]]]******< # if-0// 18&1& nthteo nthieo nthneo a;net R[+++].----._ /112\ ##### ####### # # #####; # # # ##### #### ### #### # W#W#####WW#WWWW#####W####WW###WWW####W#WW#W#####WW#WWWW#WWWWWWWWWWWWWWWWWWWW;WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWR #6!@eD>>if 2>2*>++++++!\:: _@_/ 78"oo@" '\"'  L >"082",,,@_ 1 x-----x######## ## ### ###### ######## #### ##### ####### ##### ### # # #### ### ##### ####### ##### ### # # #### ### ##### #EEEEEδΘΔΔΔΘΔΘλ # endif/* v>>>>>>> >>">r"{\>>>> @ 0:8:8/_ }\(*[>]R 10G|'53'S 1 >>>>$$ # ##########>>###>## #####>>##>####>##>#>#####>>##>#####>####>>>#####>##>#>##>>##>####>>##>#####>####>>>##### ## # ## ## #### #comment -[v] >>>>>>>> [@,,,"279"]>252O>"01",,@_ 9 hs o# #????!?!??!??!!!!?? ?!?!??!!?!?!!!!!?!!!!?????!????????????????????! >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #[[/]e] x > >>>>>>>@!:!8:6:2/_ >>>>>>>>>>>>>>>>>>>>>>>>>;>>>>>>>>>>>>>>>>>> #v @.7.8.2< #~[! R++++++] +++++++++\++++++++++++++++++++++++++++++++++U.._+++++++._+++o+++o--ox# ####################################################################################> #{{{{]~*[~* __+++++++[>+++++++<-]>+._+++++._+._@]+-}}[.^+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]}--<^>++[+++++[>+++++++<-]>._++++._+++._^<]+-+<[<=oC<=oC<._>>>>-]^>[<+++++[>++++++++++<-]>@@+.---@._+>] '4o'6o@)++--![+++[>+++++++<-]>+._+++++.._>]( <<>> }<}>}[<}}<<}<<<<<}<<}<<<<}<<<}}}<}}<}}<}}<}}<}}<}}}<}}<<<<<<<<<<<}}}<}}<}}<}}<}}<}}<}}}<<<<<<<<<<}] >>\[/>\/\>>>>>>>]>\[./>>\/\./\/>>>\./] [[[ #- x #* *#p 173#* e:1*23/5x%6E2 []-main=-[165]- ### . :-write(186). end_of_file.  #⟪⟪\⟫9999 9 9 #/*9 999 99 9999 Mn MMM MMMMnnMnnnMnMMMMMMMnMMnnnnnMMnMnMnnMnMnnnnnnMnMnMMMMMMMMnnMnMnnnMnMMMM @,,,"286"_+1y2 #<"67",,@␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋'''␌297'print quits'''␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␌␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋␋ #|9 #cs 9 9999 # #<<<# #> #{ #bqbqbqLzLzLzqtqtqtTcTcTcRqRqRq TzTzTzRtRtRtMbMbMbPsPsPsTqTqTqAbAbAbTmTmTmBqBqBqMtMtMtUgUgUg #=(??0l0c01k1k0l0i 0r 0h0h1d111 0e 0y0y 0mo1d0y0e0e001d0i0f 0g 0n0n110mo0n0t 0t0mo0f0t0g0g0f0h0r0r0i0001k10c 0c0l11110000011100|_ )\ [ ' "e.1.0.6i]56pq["]298 .quit._[\']put 294 bye!\ #s['];#/\\/;print 24;exit}}__END__/ ###\MoOMoOMoOMoOMOOmoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOomoomoOOOM e>+@+-@@@@=>+<@@@=>+<?#>;?\:-._++._++++._#/<?\>3-++._6+---2._#/++++++++++++++++++++++++++++++++++++++++++++++++._++._++++++.>!\ ' WWWw;WW;WW;wv;w;;WW;wW;WW;wv;wW;W_;Ww;WW;WW;WW;WW;wW;WW;Ww;W;WW;WWWWwW;;;WWWWWWWwwwwvwWWWwWWWWwvwWWwW\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||110')or(None and(-1 %2>0and 9or 247)or 1/2and eval('hasattr(zip,"iters")and 200or\'𒁁\'=="-"and 241or 1')or 5<<64>>64or 68));"{print(g+91)}/";exit; "'#{print(187);exit}'/"; #< ?>wWWsssss {}#(prin 45)(bye){{{}#}#}#(prin 199)(bye) 46(8+9+9+9+9+=!) >* * * * *[[[[3+4*7*@] ] ] ]xxxxxxxxxxxxxxxxxxxxx ###;{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# # # # #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 # XX x+------+XX X XXX x|/0110@| X X XXXXXXXXX X x|/0011 | X X XXXXXXX x|/0010 | X x|/0011 | x|/0001 | x|/0011| x+------+ #+ + 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       + e$P+++++*D*+++1++1E!s + ; + *$'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 Yo::=~147 ::= You can see an x here.<< >{-<<<<< > 176 >> Output 1 >SET x TO 120. [0]{472454523665721469465830106052219449897} >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} ppppppppppppp;pppppppppppppp # {{{ {{{ {{{ {{ #!ZZt >>END-IF #xxxh program-id.h.procedure #xxxg diVision.display 230. #}}}f >>IF 2>2 #}}}e #xxxd #xx}c #}}}b #x}xa <script> onload=function (){d=document;f=[].sort;d.body.style.display='block';d.body.innerHTML=/a/.__proto__=='//'?275:!/r/.test (f )?267:!/\n/.test(f)?257:!/^\n/.test(f)?259:d.documentMode?262:265}</script> <style>body{display:none}html:after{content:"258";[;content:"276";]}@media \0 all{html:after{content:"266"}}@media screen and (min-width:0\0){html:after{content:"260"}}</style> <attache>Print[194]Exit[]</attache> 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 # ; 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 # ata#8;min;dnu&&1Prers>80::\0}ngt=Be;bk:peseps>Ex Cr u Uitharbodyh$/+--- $5"6c"2:F 4, ._#a*een gi=[ Show]pR 8ogr ca34* 16 prstd 在ent */ #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="24 10 31 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""HHHahtdegggggggyrggggggc""IHHaixuEFbGGbggbryAEGRgc""CCHafyurbgbgggggggb____o""ICHakmyyyyyyyyyyyyyyyyye""I__almyyyyyyyyyyyyyyyyye""K__anmyyyyyyyyyyyyyy_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};instance Num B where fromInteger _=B 170;negate _=B$ x#x
>data B=B{u::Int};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$0ff 2 64;class(Show a,Floating a)=>K a where{k::a->String;k _=show$(id::a->a)pi};g=[here|here<-""]--[|] >--W >x=0;y#a=subtract 0b1206;x#a=174;h b=b^x;r=pure ;l a=length$ show a;forall=0;z| (∀)<-5=forall;b1206|let _._=x;negate _=3=[246,264,0,263,261,232,222,209,210,128,206,207,214,211,212,217]!!(l("  ",0x0.1,1e1,  (0id),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[0!61,{-_-}last$172:[u$[-1]!!0|g<">"] ]--} #1""/*/ #if!1 #endif//* /*/ #if!1 _; select 192; .exit print1(292 ) 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"?]] #]]******<
#<<<#
#8␛dggi2␛␉ |1|6$//''25 #>say␉␉ 27#T222999+/+23!@"26  As usual, ␛ is a literal ESC character and ␉ is a literal tab. Rundown This program prints 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 Explanation First off, thanks @ais523 for the Polyglot Test Driver! It helped testing tremendously. I'll need help updating it for this solution. Whirl is, well, maybe you should look at this flash representation first. Whirl only reads 1's and 0's and the only performs operations when it reads 2 consecutive 0's. So this is a really easy one to fit in and is unlikely to break on future additions. 1's just spin the dials and singleton 0's switch between the dial being controlled. I debated with myself about going with this solution because it's so byte heavy, but ultimately decided that it would be worked in eventually, since it can fit in so easily, and #32 is the best place for it since round numbers are much easier. In code we're adding up to 2 then multiplying by 2 until we hit the magic number. The long binary looking string could be moved elsewhere if needed in the future, but you may need to rework the solution using the flash program if you lose track of where the dials are pointing, which is very easy to do. Keep in mind that there are 4 1's in code prior to the Whirl string, which are integral to the correct output. Everything after this irrelevant dial spinning, like a DJ that forgot to power the turntables. • I was actually considering Whirl for 31, but that language is a pain to write in (and I wasn't aware of the Flash program), and I also hadn't cottoned on to the fact that 32 would be easier. So you were way ahead of me on this one. (Also, thanks for setting up #33!) – user62131 Jan 17 '17 at 22:48 47. Lily, 938 bytes #16 "(}23!@)" 3//v\D(@;'[af2.q]GkGGZ'#)"14";n4 #/* "[!PPP(22)SP(>7 7*,;68*,@;'1,@ ␉␉␉␉ q #>␉ # >36!@␉ #< #<]+<[.>-]>[ #{#z} #=<xR+++++[D>+++++++L+++<-][PLEASE,2<-#2DO,2SUB#1<-#52PLEASE,2SUB#2<-#32DOREADOUT,2DOGIVEUPDO]>+.---.>][ #Rx%>~~~+ +~*ttt*.x #D>xU/-<+++Lnd #R+.----\).>]| #[#[kGkGx@O6O4/0l0v01k1k(0l0i0jx0h0h1d111x0eU0bx0b0o1d0b0e0e00m1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10vx0v0l11111100^_)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 );}/*'
$'main'// #-3o4o#$$#<.>"3"O. =end #// """#"#// #|o51~nJ;#:p'34'\ #ss8␛dggi2␛ |1|6//''25 =#print(17)#>27.say#]#print(47)#]#echo 21#ss*///^_^_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): .009034 (to improve, next entry should be no more than 999 bytes) Rundown This program prints 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 Incident is checked by keeping the tokens balanced as described in previous answers. VIP I’m happy to announce that with the addition of Lily today, we officially have the lowest VIP score of all time. And so, I do hereby proclaim that this polyglot, at the time of writing, to be unequivocally the greatest polyglot of all time. Congratulations to all contributors. Because we’ve finally achieved this self-imposed goal, and because I ended up touching code for damn near all the languages this round, I’ve added a small code snippet from each language along with the code change description. The purpose of these is to provide a place to search for code snippets from the polyglot for research starting point. For example, if you want to make a change to this 8+9+9+9+9+ you could search for this string, to find that it’s part of Prelude’s code. Then, you may wish to read over the original prelude answer, look at some prelude code changes that have been made, or review the Prelude documentation for alternative solutions. State of the Test Driver I copied @SnoringFrog’s Alphuck Transpiler into the Test Driver for viewing the Alphuck code’s in the BrainF*** character set. I found it much easier to debug this way, and I suspect others would as well. I also added titles to the Extra Information outputs since Alphick’s output is easy to confuse with BF if you’re not familiar with the Bash script. Lily ]#print(47)# Nim, we know from this polyglot, uses #[ and ]# for block comments and according to this tip for creating polyglots, Lily uses the same syntax for block comments. So, I wondered if I could find a truthy/falsey abuse to create different outputs, but alas I could not. Then while browsing Rosettscode.org for unused block comment structures, I came to this post about Nim, and realized it was wrong in its assertion that Nim only has single-line comments. Then I checked Lily’s post and it too failed to mention block comments. (Sadly, I did not have permission to edit the posts.) Then I went ahead and looked at Nim and Lily’s documentation, just to make sure I wasn’t crazy and I saw an exploitable difference. Nim allows nested comments. I sat on this knowledge for months, thinking it would be my final addition to the polyglot because it was virtually guaranteed to be available at any time considering its block comment structure was already included, and because it was so under documented. Over the months, it occurred to me that abusing nested block comments is not a trick that’s not documented in the Tips for Creating Polyglot thread, so I added it. My explanation used a simplified Lily/Nim polyglot as an example, so I’ll refer you to that post if it’s not obvious how I abused this language feature. CoffeeScript ###;console.log 39 One of Lily’s features is that ### is used to attach a docstring to a function, so if you use this without following it with what Lily views as a function, then Lily will error out. And since ### is CoffeeScript’s block comment, the ### on the INTERCAL line had to change. So the final two # got cut from this line and moved to the line after Lily’s #[ block comment so Lily would view it as a comment instead of a doc string. Julia =#print(17)# By moving the two ## for CoffeeScript, a hole was opened up on the INTERCAL line. The spacing on this line is delicate because Minimal-2D is looping between the beginning of this line and the line two below. So I had to fill the space. The first byte I filled with Julia’s initial block comment command (#=) by moving the = down to fill the space. This move also helped as a partial solve for Labrynth’s final answer, which I talk about later. BrainF*** +++++[D>+++++++L+++<-] >+.---.> The second space opened up by the CoffeeScript move still needed to be filled, and the > at the end of the line above was an easy move. This character set up the proper memory cell for BF so it just needed to go anywhere in the correct order of BF characters, and since there were no BF characters between the old and new location, no problem. Brain-Flack ({({1})({1}[(0)])}{1}\{1}) In the process of working a different solution, I had an epiphany about old this Brain-Flak code: (\{(\{})(\{}[()])}\{}\{}\{}). I was using \ to escape out { for Japt, but I could put a 1 in each curly brace, to give Japt something to do like I did in the PicoLisp answer. But what would that give me? Trading a \ for any other instruction was at best an even byte swap. But wait… Retina. Retina had a string of 1s in the same line that were somehow integral to its answer. So I tried moving the 1s over to Brain-Flak’s code to handle Japt and it worked almost entirely. Thutu, didn’t like having the last \ removed from this snippet, so I left it. I had one fewer 1 in Retina’s code than I required to fill Japt’s braces anyways, so it all worked out rather swimmingly to golf down 5 bytes and produce this: ({({1})({1}[(1)])}{1}\{}). Later I found I had to swap around 1s because The above tokenized {1} for Incident. So I swapped around the 1s to make ({({1})({1}[(0)])}{1}\{1}). Modular SNUSP <+@+-@@@@=>+<@@@=>+<?#>+.--. While I was looking at the big line, I decided to look at some other languages. Modular SNUSP is encased in a pair of [], to protect the code from SM/BF. But SM/BF were both already jumping this code because of the [ on line 14. Cut. Thutu |/=1/24=x I never bothered to learn how Thutu works, but I do know that it’s answer was somehow produced in part by |=/=1/24=x=9, so I experimentally, removed various characters and verified that the same results were produced, and found I could get there with less. Golfed! INTERCAL [PLEASE,2<-#2DO,2SUB#1<-#52PLEASE,2SUB#2<-#32DOREADOUT,2DOGIVE] I swapped some Latin FACs for English DOs because it was byte saving, and all the Ds worked safely as Fusion starting points with INTERCAL’s new location. Hexagony "(}23!@)" Here’s where things got messy. I got it in my head that Hexagony’s code module should really, really go inside C/++’s preprocessor directive on line 1. The benefit here is that Hexagony would be permanently be solved because its pointer always starts on line 1 heading to the right, which puts its output command prior to any hexagon wrapping non-sense. And with Cubix in the mix now, providing basically the same headache… Well let’s just do this with 1 language, yeah? So }23!@ appears in line 1 now, and everything that follows is a consequence of that move. Note that the } is still needed to clear the top value of the stack due to the preceding ( in the final solution. Pyth #16 ;'[af2.q] The first problem was moving Pyth’s answer to somewhere else. I spent quite a while looking through Pyth’s documentation for a way to pop the string off the stack or something, before stumbling into the answer. For Pyth, a space preceding any command causes the command to be skipped. This actually works for a full string, like where our Hexagony capsule is residing, so the first x characters of the polyglot became #16 "}23!@", with the 16 here now being Pyth’s answer. Underload (22)S Underload needed the Hexagony capsule to exist within a pair of parenthesis, but if too much of the polyglot went into that first set of parentheses Underload would bomb out. Also, our last few solutions had an open ended ( on line 1, which was preceded by a \ for Retina to escape it out of consideration. (Retina didn’t like the imbalanced ().) But now, this solution didn’t work for Retina if there was already a pair of () in the line. The new solution opens and closes 2 sets of parenthesis on line 1 to get around these problems. Fortunately Underload didn’t complain before a new set of parenthesis could be opened on line 2. Meanwhile, inserting more text in line 1 prior to the v causes line 2 to require a bunch of filler characters prior to its >, which is the Befunge code path. The largest piece of lose code that could fill the hole was Underloads answer statement (22)S which got moved earlier in line 2 along with some related Alphuck Ps that needed to appear prior to s’s for its jump. (More on Alphuck later.) Trigger GkGGZ Z222999 Trigger’s jump code got pushed out of line 2 by Underload’s shift, so it had to go somewhere and the earlier the better. The Japt string '[af2.q]’ in line 1 turned out to be a well-hidden location, so I plopped Trigger jump code there after Pyth quit, making '[af2.q] GkGGZ’. You may notice that the letters in the jump code got changed again, this is partly because I wanted to leverage the space for a polyglot unique Incident jump token, and partly because of a problem caused by… wait never mind. I just uppercased the Gs for no good reason. Ok, whatever. SMBF <]+<[.>-]>[ With characters spaces to fill prior to the > on line 2, I moved the [ back in the line to help fill the hole. You might think as I did that it might be possible to golf off this character all together, as well as the ] on line 1, but this causes Retina to get grumpy, as it did with Underload. And even if you think about throwing a \ prior to [ might fix Retina, you would be right, but it would cause 05AB1E to fail in a way that I presume cannot be fixed with a zero byte budget. So I didn’t bother. Turtlèd #)"14" I managed a line 1 character order that didn’t necessitate the # # therein. So the turtle no longer pokes his head out of the shell before finding “14”. Labrynth # >36!@ The maze got kinda messed up by all the shifts for Hexagony. The biggest problem was that the old solution relied on the second character in the polyglot being a space (aka maze wall). Now the pointer turns right once it passes into the 1 on line 1, which was a problem because the / on line 2 set the top of the stack to 0, which caused the pointer to really want to go straight. Trial and error montage This got solved by putting a > in the path of the pointer after the /, which is an instruction to shift all of row 3 one cell to the right. This puts the pointer in column 3 as it continues its zero valued straight path to the > in >36!@ which again shifts; this time row 4. From this point, the pointer turns to head down line 4 which from that point forward is a 1 way trip to the end of the maze. @SnoringFrog made a gif of Labrynth's code path to help someone with an answer, and I thought it was cool and helpful enough that it should be added here. Japt |1|6 I golfed some other bytes off of line 1. It was all trial and error and I have no idea how Japt works for the most part. I guess I can say that in the # near the end of line 1 causes Japt to take the ascii value of the ). Most everything else is a mystery. Minimal-2D #=<xR+++++[D>+++++++L #Rx%>~~~+ +~*ttt*.x #D>xU/-<+++Lnd #R+.----\).>]| Part of the line 1 refactor was to place the D early enough in the line to minimize the amount of empty space thrown into line 8, where Minimal 2-D catches the code path From the D to L. I ended up being able to place the \D just after the v in line 1, which ended up being the same column it started in, so I didn’t have to touch line 8. Befunge 7 7*,;68*,@ The space between the 7’s on line 2 is a spacing shift for Minimal-2D’s D on line 1 so that Fission doesn’t pass through a character. The 7 that Fission would otherwise pass through here doesn’t actually cause a problems, but the space is part of White space’s answer, so it needs to appear somewhere on the line, and this seemed like a better place than most. Befunge-98 >7 7*,;68*,@;'1,@ For some reason the Hexagony capsule gave a problem for Befung-98. I believe it was producing non-deterministic results for a while there. I don’t know what the issue was, because I went back and looked at an old solution for inspiration and saw that there was a @ before it quit in prior solutions, so I tried it and it worked. Reticular ;#:p'34'\ Reticular, Haystack, and Reng, which all wrap around the polyglot when they hit the first / on line 1, had to be redone because we’re wrapping on a later column than in previous solutions. Now the code path goes through the 6 on the final line, which gets buried in a stack values for these languages, and continues to the \ on the next to last line which catches the code path, and pushes these languages’ pointers to the left. Reticular was the problem child of the bunch because it had a command in the Hexagony capsule, which it traversed prior to wrapping, that caused the old solution to break on Reng’s code. I solved this by throwing Reticular’s code first in the order. Reng ~nJ The ;, which terminated Reticular, gave Reng some problems because it views the command as a reflector. So Reng gets a # jump command to skip past the ;. But Reticular threw an error on the #, so I tossed in a preceding : to indicate that the following # was to be pushed onto the stack as a string. Haystack |o51 Haystack’s old solution was too long, unless I was going to wrap up to another line, but I no longer needed to use the old solution because I was terminating Reticular earlier, so I reverted to the old solution of outputting a string rather than ascii values, which was shorter, allowing the 3 languages to exactly fit in one line. Minkolang $$$

#<.>"3"O.

The change to remove the space before the first number in line 1 caused Minkolang to fall through time a in column 4. The upshot of this was I could golf out a bunch of the junk that had to be thrown into Minkolang’s code line because it previously couldn’t start with a #. The . in the final solution is both needed as a placeholder, and to detokenize .>.

Incident

kGkG0l0v0@O6O4/1k1k0l(0i0jx0h0h1d111x0eU0bx0b0o1d0b0e0e00m1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10vx0v0l11111100^_

^_^_

I think @SnoringFrog, during his week of all-nighters and fantastic code golfing, changed the incident token 0e to 0ee, presumably to make Cubix work. I found I could once again set this token back to 0e to save a few bytes.

I also went through the polyglot and re-tokenized any Incident tokens that were littered about. I ended up putting just a few back. One I mentioned is the . in <.>. Another is the ! in [!PPP on line 2. The nd in +Lnd is a detokenizing string as well that I couldn’t otherwise fit into a place holding gap.

PicoLisp

}#(prin 45)(bye)

The location of PicoLisp’s instructions became kind of a problem because Prelude’s parenthesis budget got shifted by Underload’s change. So I just moved PicoLisp’s answer. Putting all these parenthesis so close to column 1 was just asking for trouble anyway. Code is now in the Python line, which is safer.

Alphuck

ssseemeePaeueewuuweeeeeeeeeeCisajjapppp

This is my first time working with Alphuck and it is surprising how much it doesn’t feel like BrainF***. Just the fact that all the characters show up all the time makes the language much harder to work with. And it’s much more difficult to read. Anyways, the PicoLisp move changed the [] balance (speaking in BF terms) so I had to add back some s’ in the evil line and the last line.

Prelude

46(8+9+9+9+9+=!)

Prelude had all kinds of rearrangements due to the Underload move. But these we’re mostly just the spacing shifts we’ve all become accustomed to. The one large change was to move the ) now seen in #R+.----\).>]| from the end of the line above. To leave it in its old home required too many spaces. Experimentation showed there was a happy home a few columns left of its original spot and the the characters to the left were all rigidly incorporated into the Minimal-2D solution. So the next best move was to go down a line where Minimal-2D was more flexible and Underload was still happy.

Retina

({({1})({1}[(0)])}{1}\{1})

|1|6

Retina had a small problem with the Prelude move discussed above however. The line change put the hanging ) on a cares-about-symbol-balance line, so preceding \ was thrown in to placate Retina. We were still byte saving from the number of spaces Prelude needed on the line above, so we were good with this result.

Cubix

@O6O4/

While I loved the elegance of the Cubix Placement in the last answer it was fragile, and yeah I broke it with all this stuff I did. So I stepped through the Cubix interpreter to find a good place to catch the code path and ended up hooking it in the Incident/While line, which is a pretty good place to catch it because the Cubix module could mostly slide freely throughout the line. The only catch was that you had to be very careful not to place Cubix inside an incident token. All the incident tokens in this space start with either a 1 or a 0 and are followed by a letter, other than x. x in this space appears to be a de-tokenizer. Fortunately Cubix slipped in between tokens without a spacer.

Whitespace

Or

␉␉␉␉

There were a few hidden tabs left over from earlier Whitespace solutions that were still needed as whitespace for whatever other languages were in the region. So I swapped these out for plain old spaces, just for the convenience of reading.

And that was the last of my code changes. Here are the few languages I didn’t touch.

evil

meePaeueewuuw

Cardinal

x%>~~~+ +~*ttt*.x

C

#define z sizeof'c'-1?"38":"37"

#include<stdio.h>

main( )/*/

#()#\'*/{puts(z );}/*' 

C++

#define z sizeof'c'-1?"38":"37"

#include<stdio.h>

main( )/*/

#()#\'*/{puts(z );}/*' 

__DATA__=1#//
#.\."12"␉;
""""#//
=begin␉//

The Literal Zone

New lines can be added now above or below the Rail code with a few stipulations:

• Lines need to be added in pairs for Retina to keep working.
• Lines not starting with a # are exposed to Thutu but have generally worked for me if I end the statement with //
• Code before a # is still exposed to Brain-Flak, so (){}[] and <> may cause problems.
• Every other line should have a literal tab for Whitespace. Or, if this pattern has to be broken, a triple space will usually work.

Incident required a few alterations. $ and nd turned out to be new tokens after the refactor, so I added an extra set of both of these tokens near the end so they no longer counted. The Hexagony module needed to be nearer the end than Incident's final jump token wanted to be placed as a copy of the end of the module, so I had replaced the final jump token with ^_ which all appear before hexagony. Finally, I believe a [ got pushed to the other side of the bulk of incident's code Incident's which I believe caused the center token to be changed. AIS523 pointed out that an extra set could probably be added safely around the Modular SNUSP code, which worked out nicely and let us meet the byte count, just barely. • Fails in Incident due to adding a lot of new strings that are repeated three times after the Incident code; the control flow in the Incident program is still correct, but there's no longer an 0o in the centre of the program (the centre of the program in tokens, as seen by Incident, comes rather later). This seems fixable, however. – user62131 Jan 18 '17 at 1:16 • Dangit, I was going to add Cubix as 34, which would only require a carefully placed QO@... – ETHproductions Jan 18 '17 at 1:20 • It still doesn't work, due to more stray tokens; the easiest fix I've found is to add an additional [ and ] (each of which currently appears three times). I placed them around the SNUSP code; no idea if that breaks anything else. – user62131 Jan 18 '17 at 15:50 • @ais523 Thanks again. That looked like a good fix for everything else. I had to reduce the second Incident jump code to 2 characters to meet the byte limit. We might need something that identifies Incident's tokens and specifically the center token for testing purposes. – Chance Jan 18 '17 at 17:20 • I can confirm that this works in Incident now. I agree that an Incident syntax highlighter would be useful here (there's one as part of the Incident distribution, but that's not really usable online). I know Martin Ender was considering starting a challenge about writing one; I wonder what the progress on that is like. – user62131 Jan 18 '17 at 18:11 56. dc, 1286 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]>+.-- -. >][4O6O@ #x%+>+=ttt Z_*. #D>xU/-<+++L #R+.----\).>]| #[#[(}2}20l0v0x1k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0yx0y0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k10vx0v0l111111^_)0 ###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.|
#
[ ']56pq[' ];#//
'(p(x0 \';case $argv[1] in *1*)echo 50;;*)echo 54;;esac;exit;0';print((eval("2\x2f5")and(9)or(13))-(0and 4)^1<<(65)>>(62))or"'x"or'\{0}1{0}1{0}1{0}([9]<((((((1)(1)(1))){1}1{1}))0{1}1{1})1>0)5{(<{1}(({1}){1})>0)}{0}({1}(1))'#}#(prin 45)(bye)|/=1/24=x046(8+9+9+9+9+=!)/ __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  ␉ 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 them online! VIP score (Versatile Integer Printer): .007322 (to improve, next entry should be no more than 1355 bytes) Rundown This program prints 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 (including the most recent addition, dc) were tested via the use of the test driver on TIO, linked 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 locally. • Deadfish~ can be tested to output 48 using this interpreter. Note that Deadfish~ takes the polyglot to be fed on stdin, and prints a number of >> prompts to standard output, which are an unavoidable consequence of running any Deadfish~ program; the remaining output is the output of the program. Explanation dc dc is a fairly old programming language. It originally started as a calculator program, then ended up being given a bunch of stack manipulation commands, and the ability to place functions on the stack, making it Turing complete (in a way rather close to Underload). It was originally intended as a practical language – in fact, it was the first programming language that could be run on the PDP-11 machine that was later used to develop UNIX – but more recently, many people would consider it an esolang. It's also a fairly popular choice for answering challenges here on PPCG, despite being fairly obscure nowadays. In this case, there are a few relevant properties of dc that make it easy to work into a polyglot: # comments; […] string literals; and a quit command q. So the program that runs is simply […]56pq, i.e. push a string literal (that we never look at), print 56, then quit. bash, zsh, Perl, Python, Ruby The dc line is a new line, and it comes before the existing scripting language code. As such, it needs to be harmless in all those languages. In Perl, Python, and Ruby, […] is a list literal. Placing a string literal inside this allows us to hide the code from these languages, while allowing dc to see it. Single quotes are much better for this purpose than double quotes (single quotes are only used in the polyglot at present to skip small sections of code, whereas several languages have almost the whole thing in a double-quoted literal). We also need a semicolon to discard the list literal when we're done. In bash and zsh, [ is a command that evaluates expressions (and for balance's sake, uses ] to terminate the command rather than ;). If the first parameter seen doesn't start with - (it doesn't), this is a test for nonemptiness, which is great as we can meaningfully apply it to pretty much any string. Thutu Adding a new line that doesn't start with a # means it need to be made Thutu-safe. Appending // is the typical way to do this, and works. I also needed to add a # to hide it from the scripting languages. Retina Retina ascribes a different meaning to odd lines and to even lines. I added a line with just # in order to get the parity right. Brainf***, self-modifying and otherwise dc has no need to reopen a string literal after its q. However, square brackets need to match for another reason: they're loops in Brainf***. We can fix this by putting in an opening square bracket in at the point just between the q (where dc stops reading) and the ' (where the scripting languages start). Alphuck p, dc's print instruction, starts a loop in Alphuck. I changed a p on the next line to an x in order to rebalance the Alphuck code. Incident As usual. The rebalancing here was accomplished by adding a filler character to the Modular SNUSP line to break up one copy of the #< token (this rebalance was more awkward than usual as I needed to break up a token which had copies before the main body of the Incident code). Summary This was actually a really easy add (as can be seen by the small size increase). The difference in literal syntax between dc and the scripting languages made it possible to split it off early and safely (this is the same technique that's normally used to include Lua in polyglots, but Lua doesn't have # comments; dc does). A lot of languages needed changing, but most of the changes were really minor. 61. S.I.L.O.S., 1445 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);}/* # /* 1=61 // printInt 1// <>{// #} disp 49#// #{ }<>// 'main'// #-3o4o#$$$#<R>"3"O.s =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): .006366 (to improve, next entry should be no more than 1517 bytes)

Rundown

This program prints 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.

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

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

S.I.L.O.S.

At @RohanJhunjhunwala’s suggestion, I looked at adding S.I.L.O.S.. It was a short investigation, because I only had to put a line that said print 61 in somewhere, and it worked. The only problem was Thutu, which required a trailing // on each line that didn’t start with a #, and when I added this to the end of the print statement, the output became 61//. So I poked around with the documentation for a minute, and found this:

1 = 5

printInt 1

//prints five

Well that’s easy. 1 = 61 // and printInt 1// gets us past Thutu and virtually done. Just a couple tweaks.

Alphuck

S.I.L.O.S. added a p, which is a loop initializer is Alphuck, so I had to add the matching terminator to compile. That Terminator, s, got placed at the end of the Minkolang line #<R>"3"O.s

Incident

Incident was slightly imbalanced, so I removed some detokenizing bits from @ais523’s last answer in a guess and check fashion. Now, #*/{puts(p);}/* no longer has a trailing space, and console.log 39 no longer has a +.

Edit: Okay, I didn't need to actually do anything with incident, so I just undid all the above detokenizations.

Test Driver Update

In the past, I've found myself failing to notice that a language was returning a number, but the wrong one. I've finally gotten around to addressing the problem and added a test result to the output of the test driver. so now, when Retina returns 7 instead of 8, the test will be flagged as a fail.

I also did a little formatting for alignment. Languages that aren't on Tio will now have a place holding X's where their numeric result is expected and single digit results will have a place holding space inserted as well.

• Wow +1 because I didn't think anyone would come up with such a clever abuse of the use of integers as variables!! – Rohan Jhunjhunwala May 3 '17 at 22:37
• Moorhens 2.0 works – Wheat Wizard May 3 '17 at 23:32
• @RohanJhunjhunwala Did you patch my hack? :P This polyglot solution stopped working. tio.run/nexus/silos#@29oa2aooK/PVVCUmVfimVeiYKiv//8/AA – Chance May 18 '17 at 20:40
• Unfortunately, the latest change with expression parsing is broken, however this works – Rohan Jhunjhunwala May 18 '17 at 21:05
• @RohanJhunjhunwala Oh, thanks! That's an easy swap. – Chance May 18 '17 at 21:37

72. Fortran (GFortran), 1948 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} #2""/*\* #=x<R+++++[D>+++++++qL+++<-][pPLEASE,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,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. =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␛|// '' 25 16*///~-<~-<~-<<<~-COprint("65")#ssss^_^_X2229996#  VIP score (Versatile Integer Printer): .005219 (to improve, next entry should be no more than 2030 bytes) This program prints 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. 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~ and Moorhens were tested by WheatWizard. • Surface can be tested to output 66 here. • Japt was updated in Tio to fix the parsing error we've been exploiting, so it must be tested individually here. Explanation Fortran Fortran is another old and famous language we're able to add to the polyglot. It’s original spec appeared in 1956 which is a just prior to ALGOL 58, which I believe makes this the oldest high-level language we’ve added. Assembly is, I believe, the oldest overall. Of course we’re not using the original compiler, because that wouldn’t work. We’re using GCC’s Gfortran interpreter and we're using the 08 version of Fortran, although the Fortran code we’re using is compatible with other versions, it’s just the one I arbitrarily picked. The biggest problem with adding Fortran was that the language doesn’t have a block comment, which is the #1 trick for hiding the polyglot. But, Gfortran happened to have C style preprocessor directives if you’re file extension is among the following (.fpp, .FPP, .F, .FOR, .FTN, .F90, .F95, .F03 or .F08), which is the track I took. I happen to be using F08. I had originally planned to hide the polyglot in a non-executing preprocessor if block, but the lines contained therein continued to be read by the pre-processor unfavorably. But I stumbled into the realization that C-style comments appearing within pre-processor directives are treated as comments. After some experimentation I found that #endif//* entered a comment block for Fortran, but not the C family, nor asm. This appears to be because the GFortran supports C style block comments, but not line comments. Our asm interpreter naturally treats lines starting with a # (that it doesn’t recognize as a preprocessor directive) as a comment. Once C comments were handled, I just needed to put in the following line in a space only read by Fortran print'("72")';end; and we made a successful polyglot. /* Comments */ The comments were the main difficulty with this addition, so I’m going to step through the comment state of all the languages that use /* comments since I changed them so drastically. C11, C99 and C++ all use the same comment path, unsurprisingly, so I’ll just refer to this group as C. The other unique comment blocks are in asm and Fortran. The polyglot starts out with a preprocesser directive of the form of #1 "", which refers to a line number and file name in quotes. The previous answers followed this with a //* to line comment in C and block comment in asm. Fortran didn’t accept this comment style, so things had to change, and the fix was to change line 1’s comment to a block style comment with a #1 ""/* bla */ pattern. Line 2’s answer held Japt, which it somewhat syntactically rigid in the polyglot, so I opted to leave Japt’s line 2 answer intact. Japt transpiles to JavaScript BTW, which is another /* style comment language, but these comment indicators can get altered in the transpolation. The /* at the beginning of line 2 is such a case. By converting the // comment to a /* comment on line 1, japt needed the /* comment to close, so a */ was added to the end of line 1. This BTW broke <><, so we now redirect it’s IP to line 2 since / is conveniently a reflector. Okay, so line 1 is a single line block comment for C, a # style line comment for asm, and an unknown preprocessor directive for Fortran, which only issues a warning. Line 2 starts a block comment for C and Fortran, and asm again ignores it as a line comment. The Fortran block comment is in the middle of a preprocessor directive and so is required to end the comment just prior to the completion of the directive, or with a line feed. I chose the latter. From here, asm continues to see line comments until we arrive at #2""/*\* which is the pre-processor pattern from before. The \* exists here because Agony needed a second * to complete its copy paste operation, and Retina needed the \ to escape out the second *. Ok, we’ve established the 3 languages in a comment and can move down the polyglot to evil’s line where we drop out of the comment and begin the real work. We start with a #if 0 directive, valid in both C and Fortran as initiating a non-executing preprocessor if block. Perfect! We can answer asm within the block and move to close the block as well as start a Fortran comment with #endif//*. Following this, we have to close asm so we’ll once again use our preprocessor output file syntax to begin an asm comment, which leaves only C open. So we’ll just answer for the C family and end with //*/ , which sets asm and Fortran comments to a closed state. Now, all the comments are closed, and we need to have a state when only Fortran is open. I don’t actually see a good way to do this, so I take the verbose track of starting a Fortran only comment with #endif//* and then toggling all 3 languages with /*/. Finally! We can answer Fortran with print'("72")';end; and then put Fortran back into a comment with the same if block trick from before. Hurray! Currently we’re closing the comment for all 3 on the final line with */// which somehow works for all 3 and I don’t totally understand why. But I accept that it is valid and that is enough. What I massively busted What with my changes, and it turns out that any change has a 2/3 chance of busting what, if the code is placed prior to its code. So I move it into line 2, to mitigate that problem going forward. This caused some Cubix problems because the starting IP was dead center in INTERCAL. I fixed by changing some INTERCAL DOs to FACs and adding a padding x at the end of line 2. Golf Report I cut ! on line 2 after finding experimentally that it was not needed by Underload. Similarly, I removed ) and a ( near the beginning of line 1 because Underload could get by without it. Prelude no longer needed the space in the Brain-Flak’s code, so I cut that. Alphuck got its end of polyglot s’s rearranged because the changes to line 1 caused the 2D langs that wrap around the polyglot to be off by 1 column. I had to shorten the last 2 lines to match so, I moved some leading s’s to near the end. There is a bit of overhead to put code at the end of the polyglot, so rk was ripe for some byte saving simply by moving it. Now it lives near the beginning of the final C family comment block. Incident Report <>{nd became <>{ because nd was no longer needed to be detokenized Removed the space between }} and + in #<]}} +<[<.>>-]>[ to detokenize because }}+ no longer needed to be detokenized. I removed “6” at the end of commercial with no good reason. Added a 5 to the Brain-Flak line. removed the 59 detokenizing string from the Minimal-2D space and replaced it with a q to detokenize q because e the space was now only 1 char wide. Never replaced the 59 • Hey, that "6" was added to detokenize a "6, I had a good reason for it, I swear :P – SnoringFrog Jun 9 '17 at 11:29 • "clock comments" – CalculatorFeline Jun 9 '17 at 17:00 64. Agony, 1613 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,2PLEASEGIVEUPFACiiipsddsd4O6O@oh]>@@+.---@.>][ #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\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): .006153 (to improve, next entry should be no more than 1689 bytes)

Try it online!

Rundown

This program prints 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

Most languages can be tested with the test driver above, but 6 languages have to be tested locally.

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

• Agony can be tested to output 64 using this interpreter

Agony

Agony is another brainfuck derivative, but quite an interesting one. I found it on the list of esolangs and it seemed to be fit for this polyglot. It ignores all characters it doesn't recognise (it only recognises $*+-@~[]()<>{}.,). Most brainfuck programs also work in Agony, but every memory cell only has 4 bits. On top of that, the code and memory share the same space, so this language is self-modifying as well (though we don't use that here). Input and output work on two memory cells, effectively the same as brainfuck. The commands @~{}() are the counterparts of +-<>[] respectively, but they only work on one memory cell. The commands imported from brainfuck work on two memory cells. The program stops when it reaches the first $ and it knows two loops (() and []) which can also be executed 0 times, effectively adding holes to the code. It's important to skip .s until we've placed the correct value on the tape, as that is the output command.

Let's get to the code Agony sees. As I said before, all characters it doesn't recognise are discarded. The ^ character indicates that this is either a loop that isn't executed or a comment to indicate the line number.

(^)-(*[^])
*[-][^line 8^]}}+<[^]>
[{}^line 12^<+++++[>++++++++++<-][^]>@@+.---@.>[^line 19^ The first loop is skipped, because the memory starts as 0. Then, the memory value is decremented, so it is non-zero, so it enters the loop. Then, the * character is executed, which copies the current memory value and replaces it by 0. That causes the [] loop to not be executed. Then there's another *, which pastes the (non-zero) copied value. This causes the [-] loop to be executed, which decrements the memory value until it reaches 0. This then causes the next loop to not be executed. Then, we move the memory pointer two positions to the right, increment that memory value and then move the memory pointer back to the 0 memory value. This causes the following loop to not be executed. Then > moves the memory pointer to the 1 value, so the next loop is executed. Until now, we've followed the exact same path as brainfuck, so we now reach the loop that sets brainfuck's memory cell to the ASCII value for 3. We follow that same loop, until it reaches the output. There, brainfuck prints 41. To print 64, we simply add two @ commands before the first print (they are not recognised by brainfuck, so that is not messed up), and one before the second print. Other changes First of all, I added a - on line two, which caused several 2D languages to misalign. To fix this, I removed the tab just before it and placed it later on the same line. This fixed all the 2D languages and Whitespace was happy as well. Secondly, I added two }s on line 8, which caused an Incident. }+ was tokenised, so to counter that, I added }+ to the very last line, just before ^_^_. Thirdly, I moved Cubix' code one line up, because the o from the Deadfish~ part caused a null byte to be prepended to Cubix' output. I think this also is a good place to note that the c in the very first line turned out to be just a filler character, so we might be able to replace that in the future. This is my very first contribution to this project and I couldn't have done this without the help from the people in the chatroom. I want to thank @Chance and @ais532 in particular because of their help and guidance. I'm looking forward to making another contribution soon! • "The stack"? There's no stack! – CalculatorFeline Jun 9 '17 at 16:52 • You're right. Fixed it. – Luke Jun 9 '17 at 21:57 77. C++14, 2089 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_*.ar #D>xU/-<+++L #R+.----$$.>]| #[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111\4O6O@x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_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:ajjapp*/
#if 0
.int 2298589328,898451655,12,178790,1018168591,84934449,12597
#endif//*
#1"" //*
#include<stdio.h>
#define ␉p(d) #d
#define u8 "38\0_"
main (  ){puts( sizeof( 0,u8)-5?u8"67":*u8""?"37":p(0'0  "'\"")[9]?"75":"77" );"7";}//*/
#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): .004575 (to improve, next entry should be no more than 2171 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 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. • Surface (#66) local. Tio Surface interpreter is no contest because it was created after challenge was started. Explanation Adding C++14 I am using digit separators to separate C++14 from C++11. See also: stringizing. #define s(x) #x // stringize puts( s(0'0 "'\"")[9] ? "C++11" : "C++14" );  C++11 sees 4 tokens: 0, '0 "', \, "" and puts them in a string as is. C++14 sees 2 tokens: 0'0 and "'\"". Two spaces between these tokens are collapsed into one, so resulting string is one char shorter than in C++11. I also tried using comments: s(0'0/*'*/). C++14 sees it as token 0'0 followed by comment; comment is replaced with space, which is then discarded (because it is trailing). C++11 sees it as sequence of 4 tokens (0, '0/*', *, /), nothing is replaced/discarded. But I cannot use it because multiline comment breaks assembler. If use single-line comments instead: s(0'0//' )  then closing paren needs to be padded with 13 bytes to satisfy Prelude, which is more bytes than just using a string. Fixing other languages Prelude, incident and alphuck broke as a result. Prelude and incident are fixed as usual. Spaces around main() are for prelude. Space after <stdio.h>, tab before p(d), space after "77" are there to break unwanted incident tokens. Macro parameter called d also for that reason, to untokenize #d. "7"; is there to untokenize "7. Alphuck is fixed by naming macro p and adding another p to ajjap (seems like number of s and p should match for alphuck to work). C vs C++ As someone who worked with a processor with sizeof(void*) == sizeof(int) == sizeof(char) == 1 (TMS320C33, search for "A TMS320C3x/C4x Byte Is 32 Bits"), I didn't feel very comfortable with separating C from C++ using sizeof('p'). So I decided to search for another method, hopefully not too much more verbose than existing one. I found this: in the C++ standard, par C.1.4 page 1232 "Change: The result of a conditional expression, an assignment expression, or a comma expression may be an lvalue" char arr[100]; sizeof(0, arr)  yields 100 in C++ and sizeof(char*) in C Luckily, we already have an array - u8. Also we already have redundant use of it to satisfy incident (see u8; after puts(p); in the previous answer). So we can just put that into use. I only changed its size from 4 to 5 bytes because 4 is a common pointer size. So to separate C++ from C I use sizeof(0,u8)-5. It should work on all architectures except those were sizeof(void*) == 5. • RIP online Japt testing please unfix (or provide a flag for enabling broken behavior or something) – CalculatorFeline Jun 19 '17 at 17:51 • @CalculatorFeline I don't quite understand what you want me to do. I personally also don't like that we use interpreter bug (seems unfair to me) and ended up in this situation. But I can't see how it could be fixed. – stasoid Jun 19 '17 at 18:17 • Ask (whoever makes Japt) to add a flag reintroducing the parser bug so we can pretend we're using an earlier version. – CalculatorFeline Jun 19 '17 at 18:19 • @CalculatorFeline I don't want to solve this problem, at least at the moment. If you want this done you could ask him yourself. – stasoid Jun 19 '17 at 18:25 • Not interested enough :/ – CalculatorFeline Jun 19 '17 at 18:28 99. 99, 2943 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+.----\$$.>]| #[#[(?24O6O@?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#ss 9 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");"eg5""6 27""e ' Zing ";}//*/ #if 0 #endif//* --... ...-- /*/ p=sizeof("9( 999 99\" ); print'(''72'')';end!" );main( ){puts( "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#


VIP score (Versatile Integer Printer): .003033 (to improve, next entry should be no more than 3032 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

Verification

Try it Online!

Languages currently not on TIO:

Explanation

99 is a language that only cares about 9s newlines and spaces. Each line falls into one of 4 forms (excluding nop lines) depending on whether there is a space before the first 9 or not and whether there are multiple space seperated groups of 9s or not.

Lines that have only one variable (group of 9s) and have no spaces before that variable are print statements. Lines that have only one varable but preceded by at least one space prompt for input. Lines that have multiple variables but no space before the first variable are assignment via alternating sum. Lines that have multiple variables and spaces before the first variable are conditional jumps.

The code this answer is based off is this:

9999 9 9          // assign 0 (9-9) to 9999
9 999 99 9999 9   // assign 881 (999-99+0-9) to 9
9                 // print 99 because 881/9 = 99 and 9 is a variable with an odd number of 9s


The code in the answer also includes a lot of conditional jumps that don't activate. These mostly came from adding extra 9s to prevent input statements from being in the code.

A code formatter for 99 has been added to the test driver if you want to see the full program.

The 3 main lines of the program are located:

• near the Evil

#9999 9 seeeemPaeueewuuweeeeeeeeeeCis:ajjappppppp😆😨😒😨💬95💬👥➡

• inside the Fortran/C89

p=sizeof("9( 999 99\"    ); print'(''72'')';end!"            );main( ){puts(  "92");return(9-9+9 -9);}

• on the 5th last line

#}pS9^7^8^MUOUOF@:8:8\\


Pip

Pip was the only language that gave me any real trouble and even that was fairly minor. I had to get a 9 into the last line to avoid the creation of an input statement for 99. This was achieved by replacing the 5 that we were using as a dummy argument to the # operator with the 9

• Heh. Good language choice. – MD XF Jul 30 '17 at 21:12
• @MDXF I have been waiting out since the late 80s or so to add it. – Potato44 Jul 31 '17 at 3:46

62. Grass, 1617 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%+>+=ttt Z_*.x4O6O@
#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'{}{}{}{}({}<(((((()()())){}{})){}{})>)\{(<{}(( {}){})>)}{}({}())wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWW 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);}/* # /* 1=61 // printInt 1// <>{// #} disp 49#// #{ }<>//$'main'//
#-3o4o##<R>"3"O.s =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 fwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm #sss8␛dggi2␛|//''25 16*///~-<~-<~-<<<~-^_^_X2229996  Try it online VIP score (Versatile Integer Printer): .006780 (to improve, next entry should be no more than 1695 bytes) Rundown This program prints 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. • Amazingly the incident tokenizer in the test driver indicated that the tokens had not changed from the last entry, so I did not bother to run this. • 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. Explanation Here is the Grass code: wWWWwWWWWwv wWWwWWWwv w WWWw WWWWWWWWw WWWWw WWWWWWWw WWWWWWWWwwww v wWWWwWWWWwv wWWwWWWwv wWWwWWWwv wWWwWWWwv wWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwv  Try it online! It was taken from an earlier answer made by myself and 1000000000. Evil The first problem with inserting the grass was that evil already had some ws in its code which would mess with the grass. In order to fix this I split the grass code into two sections straddling the evil code. Now evil had a little bit of a problem with the grass code. Each w in the grass code printed a null character \x00 so I needed to skip over all the ws, this was done easily with a f and an m. Cubix Cubix once again broke because of the increase in program size so I had to move the capsule. Moving the Capsule broke cardinal, but I was able to fix it by adding an x before the Cubix. • SILOS has recently had changes, therefore, this was valid with a recent commit, but with the new version, l=61 // doesn't quite work, instead please change it to l+61 – Rohan Jhunjhunwala May 18 '17 at 21:57 12. Fission (110 bytes) Just adding yet another 2d lang... Streak of 3 2d-langs in a row, let's keep it moving folks! #v;2^0;7||"<+0+0+0+<*!2'!1'L;n4 #v0#_q@ #>3N. #|\w* #8 ^1b0< #| #M print(None and 9or 1/2and 1or 5) #jd5ki2  This prints 1 in Python 3, 2 in Vim, 3 in Minkolang, 4 in <><, 5 in Python 2, 6 in SMBF, 7 in Japt, 8 in Retina, 9 in Perl, 10 in Befunge, 11 in Befunge-98, and 12 in Fission. Try it online! Explanation The only important piece of code is the first line  These are the important bits >------< #v;2^0;7||"<+0+0+0+<*!2'!1'L;n4 ^ we start here by creating an atom moving Left (I could not use R for Right since that means Replace in Vim) 1' sets the atom's mass to the ASCII value of '1' ! outputs the atom's mass (as a character) 2' sets the atom's mass to the ASCII value of '2' ! outputs it * program terminates  Next... If Fission is causing trouble, remember, you can move the Fission code anywhere you want, since the start of the program is only identified by the commands that create atoms, and the program ends whenever the atoms are destroyed. You can also change the atom's start direction to suit your needs, R for Right (but Vim will interpret that as Replace), U for Up, D for Down (or Deletes entire line in Vim, can be useful). • This answer doesn't work with the Befunge93 answer, it only produces a 0 not 10. – Teal pelican Dec 7 '16 at 8:54 • @Tealpelican Works for me. Did you remember the ESC character between j and d on the last line? See the TIO link. – Zgarb Dec 7 '16 at 8:59 • @Tealpelican tio.run/nexus/… – user41805 Dec 7 '16 at 9:00 • Yeah my bad, for some reason chrome was removing it for me. – Teal pelican Dec 7 '16 at 9:23 25. Pip, 220 bytes #v16/"<"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. 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! • 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. – user62131 Dec 14 '16 at 15:35 • 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".) – user62131 Dec 14 '16 at 15:44 • @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... – Dom Hastings Dec 14 '16 at 15:45 • 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. – user62131 Dec 14 '16 at 15:46 26. 05AB1E, 224 bytes #v16/"<"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. 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. • 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 – Sp3000 Dec 17 '16 at 8:53 39. CoffeeScript, 828 bytes # 1"16" 3//v@#/;n4"14" #/*3 auaaZ<>16/"<"6/b.q@")(22)S# ␉␉␉␉ #yy␉;36!@ ### ␉ #=␉> #[#yy#yy0l0mx01k1k0l0ix0jx0h0h1d111P0eU0bx0b0o1d0b0e0e00x1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10mx0m0l11111100(^_) #<␉| 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␉// #*/ #define␉z sizeof 'c'-1?"38":"37" #include<stdio.h> int main() /*/ #()#\'*/{puts(z);;}/*' 'main'␉// #-3o4o# <>3N.<>␉// #xx #x%~~~+␉+~*ttt*.x #xx =end #// """#"#// #0]#echo 21#/(\[FAC,1<-#2FAC,1SUB#1<-#52FAC,1SUB#2<-#32FACLEGEREEX,1PLEASEGIVEUPPLEASE) ap #_~nJ|#o51\ #0␛dggi2␛␉|1|6//''25 >>>#>27.say# =#print(17)###^_^_7LEintndus({})!<>+]/*///Z/}23!@222999"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 them online! Rundown This program prints 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. Here is yet another evolution of the Incident tokenizer, I reworked it so the polyglot can be put directly to input and removed the linefeed replacing format from the test driver since it was no longer needed. Edit: Thanks to @SnoringFrog to pointing out how to fit CoffeeScript into the test driver. Link is updated. Explanation This answer came directly from this general polyglot tip by @Sp3000 where I learned that Coffeescript used # based comments, and a different block comment indicator than all the other languages we’ve used so far. @Sp3000’s example didn’t have the output going to STDOUT though. So I took a quick trip over to the PPCG Hello, World! Collection and found that @Lynn provided an example here that was closer to my STDOUT tastes. Sweet. Here are the CoffeeScript syntactic highlights: • # This is a line comment • ### This is a block ### • """ This is a literal string""" • console.log 39 # This is the STDOUT print statement There were only a couple quirks with CoffeeScript that I had to work out. First, the print statement really needed to live behind a # to hide from the other languages, but the statement seemed to want to be on its own line. This was eventually resolved by throwing a ; between the end of the comment block and the print statement. Second, the block comments seem fail on the C/C++lines. I’m not sure why exactly, but my guess is something to do with the /* comments. (CoffeeScript is used to programmatically generate JavaScript which uses /* comments. /Shrug. ) In any event, I found that I could use Python’s syntactically matching literal string to hide this code more effectively. So I simply dropped out of the block comment earlier than I had planned to print 39 and everything else was just magically hidden from CoffeeScript. Great Success! The Few Things I Did Break Retina didn’t like the line I inserted for console.log 39, so I needed to remove a line for Retina’s rule of even numbers. Maybe I just made that rule up, or maybe it’s legit. It feels legit. Anyways, there was already a do nothing line in the Python string. So I just removed that. This changed the value of Retina’s output, but that was easy to fix by throwing a few more 1’s in the long Python print statement. So far so good. Hexagony’s hex got bumped up to the next size, so I had to resolve that. But first, the new Hexagony module /(3!@) , while super effective, made my Prelude sense tingle. I didn’t like the idea of having to move this all the time for Hexagony’s alignment and then having to redo Prelude’s vertical parenthetic alignment. So I dug in and found a new Hexagony module that didn’t have this poly-linguistic baggage: /}23!@. Incident, in all these tweaks lost its singular left side incidental token. (Get it? Cuz it’s not used by Incident… Never mind). The easiest solution to re-balance Incident’s center token turned out to be CoffeeScript’s block comment. So, I added the 3rd ### just prior to final pair of jump tokens (^_). This put one unused token on the left side and eight unused tokes on the right side. (Eight minus one is lucky number seven.) This also happened to align the hexagon so the Hexagony module could be nested in Trigger’s code like so: Z/}23!@222999. Whitespace was the last piece of broken code, but it was not too difficult rebuild. It was just a matter of removing lines from the end until it worked, and then putting them back one by one and figuring out if I should make it a triple space line, a tab line, or a no whitespace line. Good Luck. • Nice one! There are definitely more things that can be done with #-initiated multi-line comments, I think. – Muzer Feb 4 '17 at 1:23 • @Muzer Thanks. Yeah, I decided go into some # space since you've been having so much success with the C variants. Looking forward to your next. – Chance Feb 4 '17 at 2:12 • coffee polyglot.poly is all you need to add it to the driver, at least that worked for me – SnoringFrog Feb 6 '17 at 15:38 • @SnoringFrog And of course it's the easy solution I didn't bother to try. Thanks! – Chance Feb 6 '17 at 19:42 • "Retina’s rule of even numbers" → Retina has two parsers, and (in the common case where lines don't contain the backquote character) alternates which one it uses from one line to the next. One is a lot more tolerant than the other one, so making sure that complex lines end up on the tolerant parser is likely going to be helpful. – user62131 Apr 27 '17 at 23:53 40. Minimal-2D, 902 bytes  # 1"16" 3//v\(@#/;"14"\Dv #/*3 auaaZ<>16/"<"6/b.q@")(22)S# ␉␉␉␉ #yy␉;36!@ ### ␉ #=␉> #[#yy#yy0l0mx01k1k0l0ix0jx0h0h1d111P0eU0bx0b0o1d0b0e0e00x1d0i0fx0g0n0n11x0o0n0cx0c0o0f0c0gx0g0f0h0j0j0i0001k10mx0m0l11111100(^_) #<␉| 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␉// #*/ #define␉z sizeof 'c'-1?"38":"37" #include<stdio.h> int main() /*/ #()#\'*/{puts(z);;}/*' 'main'␉// #-3o4o# <>3N.<>␉// #xx\"R++++++++++++++++++\"++++++++++++++++++.----. #x%~~~+␉+~*ttt*.x #xx++U++++++++++++++++v<L>4n; =end #// """#"#// #0]#echo 21#/(\[FAC,1<-#2FAC,1SUB#1<-#52FAC,1SUB#2<-#32FACLEGEREEX,1PLEASEGIVEUPPLEASE) ap #_|#o51~nJ\ #0␛dggi2␛␉|1|6//''25 >>>#>27.say# =#print(17)###^_^_7LEintndus({})!<>+]/*///Z/}23!@222999"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! Rundown This program prints 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. Minimal-2D is not available on TIO, but a python interpreter is available here. Current version of the Incident tokenizer for working with Incident. Explanation I couldn't find something I knew that would work, so I googled "2D language" and used the first thing that popped up. Minimal-2D is essentially Brainfuck, except it lacks loops and used UDLR to redirect a pointer around. If the pointer hits an edge of the file, execution terminates. It can probably be golfed down somewhat; if I get a chance before the next answer comes in I'll try to do that. The D on the first line sends the pointer downwards to the L in <L>, then the rest is dumb, brute force brainfuck to the U and R. The ++ preceding the U is filler to not break Fission, and the final + on line 22 is Hexagony filler. Things that broke ><> breaks on D, so it's code is now redirected downwards. Since I was already extending line 20, I used that to terminate the string that got started, and moved the >4n; into line 22. I tried to just use ! to skip the D, but Turtled didn't like that. Fission broke in various places, which led to filler characters throughout this process. The ++ before the U is all that's left of that now, I think. Those could be changed to whatever is necessary for other languages. Perl 6 didn't like my unmatched >, so I added in a <. 05ab1e went a little crazy over my extra quotation mark, so I quoted most of line 20 to appease it. Pyth didn't like the D or the quotations, so all of those got escaped (at least I guess that's what happened? I just tossed a \ before all of them and it worked, so I moved on). Hexagony was broken most of the time. Then at the end it miraculously worked. Reng was apparently broken a few answers back and was outputting a nonprintable character before the 19. That's been fixed now by putting the Haystack code before the Reng. Incident, by this point, had picked up two new tokens that shifted the center, v and +<. So I changed my +< to +v<. Problem solved. Scores from The versatile integer printer Just for kicks and going off of @Stewie Griffin's comment on the question, here's a snippet that shows how each answer would have scored if it was entered into "The Verstatile Integer Printer". So far, looks like answer 31 was our best score with a .01094, but still not quite good enough to beat the best VIP score of .009185. // This was stolen/sloppily hacked together from the snippet here: https://codegolf.stackexchange.com/questions/55422/hello-world. Feel free to clean it up if you'd like. /* Configuration */ var QUESTION_ID = 102370; // Obtain this from the url // It will be like http://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe"; var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk"; var OVERRIDE_USER = 8478; // This should be the user ID of the challenge author. /* App */ var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page; function answersUrl(index) { return "http://api.stackexchange.com/2.2/questions/" + QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=asc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER; } function commentUrl(index, answers) { return "http://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER; } function getAnswers() { jQuery.ajax({ url: answersUrl(answer_page++), method: "get", dataType: "jsonp", crossDomain: true, success: function (data) { answers.push.apply(answers, data.items); answers_hash = []; answer_ids = []; data.items.forEach(function(a) { a.comments = []; var id = +a.share_link.match(/\d+/); answer_ids.push(id); answers_hash[id] = a; }); if (!data.has_more) more_answers = false; comment_page = 1; getComments(); } }); } function getComments() { jQuery.ajax({ url: commentUrl(comment_page++, answer_ids), method: "get", dataType: "jsonp", crossDomain: true, success: function (data) { data.items.forEach(function(c) { if (c.owner.user_id === OVERRIDE_USER) answers_hash[c.post_id].comments.push(c); }); if (data.has_more) getComments(); else if (more_answers) getAnswers(); else process(); } }); } getAnswers(); var SCORE_REG = /<h\d>\s*([^\n,<]*(?:<(?:[^\n>]*>[^\n<]*<\/[^\n>]*>)[^\n,<]*)*)[,\(].*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/; var OVERRIDE_REG = /^Override\s*header:\s*/i; function getAuthorName(a) { return a.owner.display_name; } function getScore(langs, bytes) { var l = Math.pow(langs,3); return bytes/l; } function process() { var valid = []; answers.forEach(function(a) { var body = a.body; a.comments.forEach(function(c) { if(OVERRIDE_REG.test(c.body)) body = '<h1>' + c.body.replace(OVERRIDE_REG, '') + '</h1>'; }); var match = body.match(SCORE_REG); if (match) valid.push({ user: getAuthorName(a), size: +match[2], language: match[1], link: a.share_link, score: getScore(match[1].split(".")[0],+match[2]).toFixed(6), }); else console.log(body); }); valid.sort(function (a, b) { var aB = a.size, bB = b.size; return aB - bB }); var languages = {}; var place = 1; var lastSize = null; var lastPlace = 1; valid.forEach(function (a) { if (a.size != lastSize) lastPlace = place; lastSize = a.size; ++place; var answer = jQuery("#answer-template").html(); answer = answer.replace("{{PLACE}}", lastPlace + ".") .replace("{{NAME}}", a.user) .replace("{{LANGUAGE}}", a.language) .replace("{{SIZE}}", a.size) .replace("{{LINK}}", a.link); answer = jQuery(answer); jQuery("#answers").append(answer); var lang = a.language; lang = jQuery('<a>'+lang+'</a>').text(); languages[lang] = languages[lang] || {lang: a.language, lang_raw: lang, user: a.user, size: a.size, link: a.link, score: a.score}; }); var langs = []; for (var lang in languages) if (languages.hasOwnProperty(lang)) langs.push(languages[lang]); langs.sort(function (a, b) { return a.lang_raw.split(".")[0] - b.lang_raw.split(".")[0]; }); for (var i = 0; i < langs.length; ++i) { var language = jQuery("#language-template").html(); var lang = langs[i]; language = language.replace("{{LANGUAGE}}", lang.lang) .replace("{{NAME}}", lang.user) .replace("{{SIZE}}", lang.score) .replace("{{LINK}}", lang.link); language = jQuery(language); jQuery("#languages").append(language); } } body { text-align: left !important} #language-list { padding: 10px; width: 400px; float: left; } table thead { font-weight: bold; } table td { padding: 5px; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="language-list"> <h2>Scores from <a href="https://codegolf.stackexchange.com/questions/65641/the-versatile-integer-printer">The Versatile Integer Printer</a></h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr> </thead> <tbody id="languages"> </tbody> </table> </div> <table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr> </tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr> </tbody> </table> • Fun note: changing the text after \" to ++]++++[>+++++++++++++<-]>.---<[-]>. will get brainfuck to output 41. Didn't have time to fix the problems that causes, but maybe it's a decent starting point for someone; esp with SMBF. – SnoringFrog Feb 6 '17 at 22:57 • I think your Tio link's code is different from your submission. Can you update? – Chance Feb 7 '17 at 4:10 • @SnoringFrog I was under the impression that the only way to produce SMBF code that will have a different result in BF, is to rely on undefined behaviour in BF? Even if you have a BF compiler that allows you to go left without UB, I suspect it'll be rather tricky to get them both to behave... perhaps not impossible though! – Muzer Feb 7 '17 at 16:47 • @Muzer It'd hinge on the interpreter. Assuming we use TIO, moving left from the start in BF doesn't error out, it's just a no-op. From there it's just getting BF/SMBF to enter/skip different loops than one another. This does it (kept the line structure of the current program but stripped unnecessary characters). Mixing that w/ the other langs is the issue then. – SnoringFrog Feb 7 '17 at 21:37 • @Muzer But I'm not seeing any good/easy way to do that. I'd wager the SMBF needs to be significantly altered to have a chance at making this work with everything else. That line 1 period is annoying. – SnoringFrog Feb 7 '17 at 21:58 29. Trigger, 292 bytes #v16/"<"6/b.q@"(: ::T): :(22)S#;n4"14" #>3N6@15o|> ^*ttt*~++~~~% #=~nJ<R"12"; #[ #<| print((eval("1\x2f2")and (9) or (13))-(0and 4)^(1)<<(65)>>62)or'(\{(\{})(\{\/+23!@=}[()])}\{})(\{}\{})'#@46(8+9+9+9+9+=!)=#print(17)#]#echo 5+5+11#|/=1/24=x=90/ #8␛dggi2␛ |1|6//''25 #>say 27#T222999"26  Something must have been working in my subconcious in the time since the last submission to this challenge, because by the point I decided it was running low on time and I wanted to ensure it wouldn't die, I suddenly remembered a language from years back that could be added fairly easily as seen by the low increase in the byte count, and quite a bit of that was due to Hexagony rather than Trigger itself. Except for commands that assign to variables (which mostly don't matter), all Trigger's commands contain two consecutive equal characters. The first time this happens is in the Underload code in the first line, so I simply modified that a bit to jump to almost the end of the program, and placed the Trigger code to print 29 (which is 222999) there. The jump label I used is T (originally I tried U but Fission disliked it), but if you need to use a capital T in your own program for some reason, you can easily change both occurrences to something else that isn't used in your program. Very little else needed changing, apart from (as always) the Hexagony. I decided it was time to stop messing around with formatting the code into a hexagon by hand, but luckily we've already had a challenge about Hexagony parsing, so I went and modified this answer to the challenge into an online-usable Hexagony formatter that handles backticks correctly (here). Here's how this version of the program looks as a hexagon:  # v 1 6 / " < " 6 / b . q @ " ( : : : U ) : : ( 2 2 ) S # ; n 4 " 1 4 " # > 3 N 6 @ 1 5 o | > ^ * t t t * ~ + + ~ ~ ~ % # = ~ n J < R " 1 2 " ; # [ # < | p r i n t ( ( e v a l ( " 1 \ x 2 f 2 " ) a n d ( 9 ) o r ( 1 3 ) ) - ( 0 a n d 4 ) ^ ( 1 ) < < ( 6 5 ) > > 6 2 ) o r ' ( \ { ( \ { } ) ( \ { \ / + 2 3 ! @ # } [ ( ) ] ) } \ { } ) ( \ { } \ { } ) ' # @ 4 6 ( 8 + 9 + 9 + 9 + 9 + = ! ) = # p r i n t ( 1 7 ) # ] # e c h o 5 + 5 + 1 1 # | / = 1 / 2 4 = x = 9 0 / # 8 ␛ d g g i 2 ␛ | 1 | 6 / / ' ' 2 5 # > s a y 2 7 # U 2 2 2 9 9 9 " 2 6 .  You might well have noticed that the Nim code is more verbose than it used to be. This is purely because padding it out as 5+5+11 rather than 21 happened to make the Hexagony line up perfectly; if you start at the / of /+23!@#, you can see an uninterrupted run of Hexagony-safe characters, and that's how I made that part of the program work. • +1 for the updated hexagony formatter. Are there any online resources for testing in Trigger? I think it may have blown out my next solution. :P – Chance Jan 5 '17 at 17:00 • @Chance: Not yet, although I put in a request for it on TIO. Also, I'd be both surprised and upset if Trigger ended up blocking a language, because it's fairly easy to work into a polyglot; it doesn't parse code you jump over, and its jumping ability is fairly flexible. – user62131 Jan 5 '17 at 17:16 • Yeah, I've been digging into some turing tarpits with limited character sets, which had a lot of repeated characters as you'd expect. I'll read up about Trigger's jumping ability though. Maybe it is workable. – Chance Jan 5 '17 at 17:40 • @Chance: The : ::U in the current program jumps to the U at the end. Everything in between won't even be parsed, so you can repeat as much as you like there. – user62131 Jan 5 '17 at 18:31 • /+23!@= != /+23!@# – CalculatorFeline Mar 10 '17 at 17:16 68. Python (1.6.1), 1698 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-.+? #< #<]}} +<[<.>>-]>[ #{ #z} # #=x<R+++++[D>+++++++59xL+++<-][pPLEASE,2<-#2DO,2SUB#1<-#52DO,2SUB#2<-#32DOREADOUT,2PLEASEGIVEUPFACiiipsddsdoh]>@@+.---4O6O@.>][ # #x #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 ax fwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwvwWWwwwwwwwwwwwWWWwWWWWWwWWWWWWWwWWWWWWWWWwWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm # sss8␛dggi2␛|$// ''25  16*///~-<~-<~-<<<~-XCOprint("65")#s^_^_2229996#


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

Try it online!

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++, 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

Verification

Most languages can be tested with the test driver above, but 6 languages have to be tested locally.

• Reng can be tested to output 19 here.

• Modular SNUSP can be tested to output 31 here.

• Incident was verified to test 33 locally.

• Deadfish~ 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.

• Surface can be tested to output 66 using this interpreter run using Wine (It probably works on Windows but Windows is not a free software, so it would be forbidden for this challenge (I also don't have it so I can't test it anyway))

Explanation

The first thing Python took issue with was "1\x2f2". It parses \x2f2 as one character instead of two separate characters. In order to remedy this I inserted a new space between f and 2. Now Python outputs 13 as if it were Ruby. This meant I wanted to separate it from Ruby and Python 2, making 68 instead of 13.

To do this we rely on python's limited precision, not present in Ruby or Python 2. In ruby or python2:

13<<65>>65


Is just 13, but in python it is 0. We use this to short circuit an or causing Python to get a 68 instead of a 13.

Ok so what did I break? Surprisingly not much. When I ran this in TIO the only thing that broke was Brain-Flak Classic.

Brain-Flak Classic

Brain-Flak Classic had a problem with <<>>. This is a stack switch and caused Classic to get caught in a loop. We could remedy this by placing parentheses around 65, this will cause the <<>> to become <<()>> which is a noop.

Prelude

Fixing Brain-Flak broke prelude again. I added a space to counteract the movement caused by fixing Brain-Flak.

• I confirm that it works in surface on windows (no null bytes). – stasoid Jun 5 '17 at 20:33

#16  "?63(o?23!*# #@"/*"r"{\Dv;'[af2.q]PkPPX)$$'#CO"14" ^; */ #/*0|7//" [>.>.])[-'][(x>77*;,68*,@,1',;# l1011)(22)/ \S \7aa*+42@n;iiipsddpsdoh coding=utf8␉␉␉␉(1P''53'S^'?????!?!??!??!!!!???!?!??!!?!?!!!!!?!!!!?????!????????????????????!) (qx #>␉xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxOBxxxxxV/112\n # 36!@␉ e++++++::@ / "78"oo@xxxx h#115 o# doxe b xx----- #cxx#z#111#y#y#y#_#11111xx #~==++++++++++++++++++++++++++++++++++++++++x+++++++++.._+++++++. #<============================================================ #<<<#>>]}}+-[.^+.._]+-+<[<<.>>x>-]>[ #{ #x} #2""/*\* #=x<R+++++[D>+++++++q L+++<-][PLACET,2<-#2FAC,2SUB#1<-#52FAC,2SUB#2<-#32FACREADOUT,2PLEASEGIVEUPFACs]_>@@+.---@.>][ #x%+>+=ttt Z_*. _ _ _ #D>xU/-<+++L _ #R+.----\$$.>]|
#[#[(?2?20l0v01k1kMoOMoOMoOMoOMOO0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00@O6O4/m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i000x1k1x0vx0v0l111111^_0    )0\\
[ "e.1'.0'.6''i]56pq{}26q[puts 59][exit]" ,'_\[999'];#/s\\/;print"24";exit}}__DATA__/
###x<$+@+-@@@@=>+<@@@=>+<?#d>+.--.<!\ '(wWWWwWWWWwvwWWwWWWwvwWWWwWWWWWWWWwWWWWwWWWWWWWwWWWWWWWWwwwwvwWWWwWWWWwvwWWwWWWwvwWWwWWWwvwWWwWWWwx (([5]{})))␉\';';print(( eval("1\x2f 2") and 9or 13<< (65)>>65or 68)-(0 and eval("\"ppp\".bytes.class==Array and 4or(\"ar_\"[2]==95 and 5-96 or-93)"))^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 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 9seeeemPaeueewuuweeeeeeeeeeCis:aj (japppppp😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀 👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡ 😊♈💖 😇♈♈ 😊♉♈ +-------+ 😇♈♈ |$0011 \|
😇♈♉ |/1000 /|
😇♈💜|\ 0011\|
😊♉♈ |/01 00/|
😊📢♈|\ 0011\|
😈♈💜|@ 0110/|
😊📢♈|       |
😇♉💞+-------+
😊📢♉
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
You can see a y and a x here. <><

>{-<
>SET y TO 88. <
>SET x TO 32. <

>PUT x IN y. <
>X y. PPVs""o<
>-}

set ! 57,,...,,.,,..,,,,,,..,,,.$^ set ! 51. # 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 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[]={"23 7 20 1 ", # define _ , "z c #0C8302"_"b c #B87A63"_"_ c #0000C0"_"d c #708FB7"_"e c #58007B"_"f c #FFC0FF"_"O c #FFFFFF"_"y c #FFFF00", "h c #E60001 "_"i c #CAFFFF" _"j c #280000"_"k c #CA0000"_"l c #E60100"_"m c #CA007F"_"n c #330001 "_"q c #E60000", "c c black", "g c green","x c blue","o c magenta", "fheyyyyyyyyyyyyyyyyyyyz", "fibyyyyyyyyyyyyyyyyyyyz", "fjbyyyyyyyyyyOyOdObOOOO", "fkggyyyyyyyygOOOOOOOOOO", "flmnqcccccccccccccccccc", "fffoOOOxxxxx_oOxxx_Oxo_", "fffOOOOxxxxxOOOxxxOOc__"};//" int y(){puts ( sizeof (0,u8)-5?u8"67":*u8""?"37":x( 0'0 "'\"")[9]?"75":'??-'&1? "79":"77" );"21015""6 27""Zingeg-' ?";return 2;}int z=0;int q(int a,int b){return b;}main(){q(z++,z++)?puts("124"):y ();}//*/ #1"" /*/ 1<2 >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 >5b*:,1-,@ print 61 #} disp 49 ;9; #{ }{}<> K y7g+H ;$'main'3x            #     $| #-3o4o#$$#<T>"3"O._</+++++++>/+++<-\>;+=4C++.---. #<<<#>>> / 44 reg end="";print(85);reg s#+++;+++++++++++++++++++++++++++++++++++++++++++++++++++++.-. =end ;"""#"#pxxxxcly"78" \++++>/<~#class P{ function:Main(a:String[] )~Nil{83->Print();} } #}S9^7^8^MUOUOF@0:8:8\\ _@125iRE #s|)o51~nJ;#:p'34'3 \=#print(17)#>27.say#]# print(47 ) #]#echo 21 #fWWWWWWWWWWWWWWWwWWWWWWWWWWWWwvm>++++ #s8␛dggi2␛M|//'' 16~-<~-<~-<<<~-COprint("65")#asss^_^_# #9 "25" +/ ppppppp (x*n*n*n*e*s*s*s*ee*n*n*n*e*sss*e*n*n*n*ee*s*e)*///V222999686#  VIP score (Versatile Integer Printer): .002338 (to improve, next entry should be no more than 5018 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 1.4, 8 in Retina, 9 in Perl 5, 10 in Befunge-93, 11 in Befunge-98, 12 in Fission, 13 in Ruby 2.4.1, 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(gcc), 38 in C99(gcc), 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(gcc), 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(gcc), 76 in Trefunge, 77 in C++14(gcc), 78 in dash, 79 in C++17(gcc), 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(gcc), 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(gcc), 102 in Symbolic Brainfuck, 103 in Unicat, 104 in Paintfuck, 105 in Emoji-gramming, 106 in Unlambda, 107 in Gol><>, 108 in Ruby 1.8.7, 109 in DOBELA, 110 in Ruby 1.9.3, 111 in Del|m|t, 112 in Pyramid Scheme, 113 in ADJUST, 114 in Axo, 115 in xEec, 116 in Piet(XPM), 117 in Stones, 118 in MarioLANG, 119 in ImageFuck, 120 in TRANSCRIPT, 121 in Braincopter, 122 in Monkeys, 123 in Mycelium, 124 in C(clang), 125 in Gammaplex, 126 in Nhohnhehr, 127 in Deltaplex, 128 in Haskell Verification Try it online! Languages that are not in the driver: • Japt (7) online. • Moorhens (60) local. Use moorhens.py from the v2.0-dev branch. • Objeck (83) local • RunR (90) local • Emotinomicon (94) online • EmojiCoder (96) online • Cubically (97) local • Symbolic Brainfuck (102) local • Paintfuck (104) online (9x9 grid, origin at top-left) • Gol><> (107) local, online • Ruby 1.8.7 and 1.9.3 (108 and 110) installed locally using rvm • Piet (116) local • Stones (117) local • ImageFuck (119) local • Braincopter (121) local • Mycelium (123) local • Deltaplex (127) local Explanation We’ve been chasing Haskell in polyglot chat for quite some time. It has long seemed an attractive option because it supports literate programming natively. Literate programming is sort of a philosophy that says a program should primarily be written for the benefit of the person reading the code. In Haskell this means that instead of comment blocks, you’d have non-comment blocks. Sound’s attractive right? Well, not so much. Haskell seemed to interpret the first line of the polyglot as the same preprocessor directive we’ve all come to love, but then failed on line 2. This seemed like a blocking issue for a long time, until I started looking into Haskell’s option to use C-style preprocessor directive. Much like FORTRAN, Haskell’s C-preprocessor allowed c-style block comments (/*bla*/), which vastly simplified the insertion process. Haskell, unlike the other members of the /* comment family only seemed to read start and end comment declarations on lines that start with #. This was a difference that could be leveraged easily enough, so I went back to my documentation in the FORTRAN answer to figure out which languages were commented where. The insertion point I choose was immediately after the C family languages, where a //*/ was purported to take all the related languages out of their comment state. A careful read of the polyglot up to this point told me that Haskell had still never dropped out of its pre-processor comment, so a #1"" /*/ statement is read by all the languages, and accepted because it is essentially the same directive used on line 1, and the /*/ is a toggle to initiate a comment for everything not in a comment, and to close the comment for the only one left open: Haskell. So now we have a private place to put our Haskell print statement: >main=putStr"128". The > here is the Bird style literate programming I mentioned earlier to indicate this is code and not comment. Everything else on this line is just a modification of Tio’s “Hello, World!” example. After this line I wanted to flip all the comments to the state they were in prior to editing. A simple #/*/ would do this, but Haskell protested because of the way the polyglot ends. On the last line with code, we use */// to end the block comment and initiate a line comment to hide the remainder of the code, but Haskell didn’t accept // as a preprocessor comment indicator, and concatenated the before and after of this block as #//, which it declared an error worthy invalid preprocessor declaration. Haskell allows junk code after a valid preprocessor declaration however, so we just needed to change #/*/ to the gold standard directive of #1"" /*/. Transcript Ok, now we’ve hidden all the invalid preprocessor directives from Haskell’s pre-parser (Is that a thing? That must be a thing.) But we still had the main parser to deal with. Almost everything is hidden by our commitment to literacy, but Transcript also uses Bird style code declarations, so it had to be dealt with. Fortunately, Transcript didn’t have a problem with being encased in a Haskell comment block. So, with a couple adjustments for Perl and Incident, this: You can see a y and a x here. < >SET y TO 88. < >SET x TO 32. < >PUT x IN y. < >X y. PPVs""o  Became this: You can see a y and a x here. <>< >{-< >SET y TO 88. < >SET x TO 32. < >PUT x IN y. < >X y. PPVs""o< >-}  I should also note here that Haskell comments don’t like to touch Haskell code. You need a buffer line between. So, I’m adjusting for that and Retina her as well. S.I.L.O.S. Finally, within the Haskell private code block, I had to add a < preceding the > code indicator to balance the symbols for Perl6 and the Flaks. Attempting to put a lone < on the line above worked for everything except S.I.L.O.S.. It saw this as something it should parse, and then crash about. The simple fix was to make the statement into this S.I.L.O.S. parse-able statement: 1<2. So, in total, the main Haskell section is now this: #1"" /*/ 1<2 >main=putStr"128" #1"" /*/  • I think what happens is that the "literate pre-processor" runs first, stripping away everything except lines starting with # or > (or in LaTeX-style \begin{code} blocks), and that happens before it gets sent to CPP. This would explain why CPP is not parsed on other lines, and also means it could be put on > lines if you want. Also it means you've hidden things from the final normal Haskell parser, not a pre-parser. – Ørjan Johansen Sep 7 '17 at 2:48 • @ØrjanJohansen Testing confirms your thinking. Thanks for the insight! – Chance Sep 7 '17 at 4:18 • This is impressive. Thanks for adding it. – stasoid Sep 7 '17 at 8:07 • runhaskell can accept options for particular phases, -optL passes the option to literate pre-processor (unlit). Unfort-ly, there is curr-ly no way to config unlit to remove lines starting with #, which can be considered a bug 'cause it must remove them according to docs. unlit.c already has necessary var leavecpp which is set to 1 by default, but there is no command line option to change it. – stasoid Sep 7 '17 at 8:56 • @ØrjanJohansen Might not be the reason why but the loops cancel thesmselves in Alphuck with putStr. – Potato44 Sep 9 '17 at 2:21 155. Simula (cim), 7000 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-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 9or 13<< (65)>>65or 68)-(0 and eval("\"ppp\".bytes.class==Array and 4or(\"ar_\"[2]==95 and 5-96 or-93)"))^1<<(65)>>62) or"'x"or' {}{}{}{}{}{}{}({}<(((((()()())){}{})){}{})>)(({})5){}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 os sp '#}#(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<eP+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# Try it online! Simula is an object-oriented extension of ALGOL. Simula does not allow most of non-whitespace controls (link). Before this addition polyglot had only one such character - ESC for V. To get rid of it I used V verbose mode in which <esc> can be used instead of literal ESC character. Cim Simula compiler (installed on tio) has preprocessor. I used #comment and #endcomment to hide the bulk of polyglot and #nocomment to insert Simula code on a line starting with #. Invalid preprocessor directives are ignored. Line 5: #comment af ...  Lines 153/154: #endcOmment #nocOmment outtext("155" )  To fix evil: removed a before f on the first line, added af after #comment. Removing a from the first line breaks Beatnik, so I just swapped a and f. Capital Os are for ADJUST. Line 157: #8M| <esc>dggi2<esc>// ...  Separated Retina from V. Two spaces before <esc> are for Pip, third space is to fix Archway. // after <esc> is for V. Two es in <esc>s are compensated by removing two es from Paintfuck. Two ss are compensated in alphuck by removing ss from lines 156/157 (previously 154/155). One of these ss is skipped by Paintfuck, so we still need to add one n to fix it. Two <s are compensated with two }<} in BitChanger. Removed , '' and string of {s from line 157. Small refactoring: 2 + 35 for l33t on the first line. • That's not just "an object-oriented extension of ALGOL", that's the oldest OO language, period! – Ørjan Johansen Nov 10 '17 at 3:19 • #comment af ... well that's a pretty good description of this polyglot – Kamil Drakari Nov 15 '17 at 21:35 87. Alice, 2448 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?20l0v01k1kMoOMoOMoOMoOMOO/"78"oo@0l0ix0jor0h0h1d111x0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOoMOo0moo0n0tx0t0moO0f0t0gOOM0g0f0h0j0j0i0001k1x0vx0v0l111111^_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
;"""#"#yxxxxxxx"78"\++++>/<~#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): .003717 (to improve, next entry should be no more than 2533 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 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 Alice is a 2D language created by Martin Ender. As well as the orthogonal movement that most 2D languages have it also has diagonal movement. Although we don't really use it in this program each character performs a different operation depending on whether travel is orthogonal or diagonal. Operations with integers when moving orthogonally and string operations when moving diagonally. Mirrors (/ and \) are how the IP changes between orthogonal and diagonal movement. This diagram from the github explains in which way they do so: The IP starts in the top left corner travelling East. We travel over some commands that don't do anything besides add junk to the stack until we reach /. This sends the IP South-East which we will go through a couple of other commands that don't do anything important until we reach /"78"oo@  embedded in the Incident/Whirl/Cow line (The reason it is here and not earlier is because Underload didn't like it earlier). The IP comes into this snippet on the / which changes its direction from South-East to East. The " then puts Alice in string mode. As we are in String mode the 7and 8 don't perform their normal action. The second " then closes string mode; since we are travelling orthogonally this means the ascii values of the characters we passed over in string mode are pushed onto the stack, one number per character. The o command is the output top of stack (truncated to one byte) command. Passing over two of these will output the '8' and then the '7'. @ then ends the program. Incident Some of the x just before the archway loop were replaced with "78" to prevent 8" and 78 from becoming tokens • The mirrors behave more like lenses. If they were mirrors, the IP wouldn't go through them. – CalculatorFeline Sep 27 '17 at 17:01 • @CalculatorFeline I prefer the description Martin gave somewhere. The path the IP follows is like what would happen if you were to hold a stick up to a mirror and came in travelling along the stick and then came out along the reflection of the stick. – Potato44 Sep 27 '17 at 17:07 170. Haskell with NegativeLiterals, 8944 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 -x xxxxxxxxxxxxxxxxxxxxxxxxx/112\ # 36!@  e ++++++::@ /"78"oo@ h#115 o# dO x----- #comment -[af] tAtAtA TbTbTbRtRtRt-VkVkVkRcRcRcBkBkBkMbMbMbPSPSPSpspspsQhQhQhQrQrQrHnHnHnbqbqbqLzLzLzTcTcTcxxxxx8=, #~==++++++ ++++++++++++++++++++++ +++++++++++++++++++++.._+++++++. #<=============================================================== p #<<<#>>]+-}}[.^+;;+;;+;;+<>;;+;;+;;+;;;;;;+;;+;;.._]}--<^>++[+++++[>+++++++<-]>._++++._+++._^<]+-+<[<<._>>x>-]^>[ #{ #cs} #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 0eU0y0yx0moO1d0y0e0e00m1d0i0fx0g0n0n11yxMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOmOotMOo0moo0n0tx0t0moO0fx4O6O@ 0t0gOOM0g0f0h0j0j0i000x1k1x0vx0v0l111111^_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 ((19629227668178112600/ 118248359446856100));; *1*)echo 50;;*)echo 58;;esac;exit;#( (((') )))#\ =begin #p +555!/2+55x%6E2x!<******>**********************828+*+@[*99[?]*]*****|! ;set print "-";print 89;exit#ss eP+ + + + + *D* + + +1+ +1E!s p now 70 dollar off! p has been selling out worldwide! [mxf]-main=-[165]-###jxf # seeeemPaeueewuuweeeeeeeeeeCisajjappppppxf⠆⠄⡒⡆⡘😆😨😒😨💬95💬👥➡😻😹😸🙀🙀😹😼😿🙀🙀😼😼😸🙀🙀🙀🙀 👋🔢🌚🌝🌝🌚🌚🌚🌚🌚▲▲▲²²²²▲¡▼¡▲▲¡→ 밠밠따빠빠맣박다맣받다맣희맣희うんたんたんたんたんうんうんうんうんうんたんうんうんうんたんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんたんたんうんうんうんうんたんたんうんたんたんたんうんうんうんたんうんうんたんうんうんたんうんうんたんうんたんうんうんうんたんたんうんたんたんうんたんたんうんたんたんうんたんたんたんうんうん 😊♈💖 😇♈♈ 😊♉♈ 😇♈♈ 😇♈♉ 😇♈💜 😊♉♈ 😊📢♈ 😈♈💜 😊📢♈ 😇♉💞 😊📢♉⠀⢃⠛⠋ #-49,A,-1 # #-5,A,-1 # #6,A,-1 # 1 ! ! 2 ! ! 1 !! 1 x* 53 ++-------+ 1 x*|0011 \| 51 +|/1000 /| 1 x*|\ 0011\| 34 +|/01 00/| 15 +|\ 0011\| ? ?@ _ ! 1 *|@ 0110/| ?@ ? 1 | +| + * 1 !+-------+--- ? ! ? 1 ! ? @ ? < < << < < < B= ===== =>8 = , 8= > B = = = == = = > 8 = D B+ += D x xxx x   + = > 8 = > x ~ B = = = = > ~ B + = D+ ~ 8 = >x x x x x x xx x x x x+ xx x + + + + + x x xx xx +++ + x+ +x +x x + + + + 8=+, _ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # + + + #+ + ++ + + + # + + + +# * + *+* *************************************************+ # + + # + + + + * *****+ # + + # + + * * +***** # + ( printout t 164 ) (exit ) #cepp MsgBox(0,"",169 ) #cs 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 ␉␉␉␉ ␉ ␉ -} open import IO;main = run (putStr"159" ) --s \end{code} pppppppppppp 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. #"6027"1,_ye do{--}gibe16"124"&#8+*sizeString tnd xfmain=9717 96lo More 91 of this 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 "//" 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""/*/ >data B=B Integer--WWWWWWWWWWWWWW<<W<p >instance Eq B where{-[ppWWWWWWWWWWWWay Uce stagehere]-}(B a )== (B b)=a==b >instance Num B where{ fromInteger=B;negate ( B a )=Ba+1} >main=printlast169+1:[128|B 2==head [(-1 )::B]]--} #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" ) #ce pS9^7^8^MUOUOF @0:8:8 \ @,,1'1'<> @125iRE # |o51~nJ;#:p'34'3 \=#print( size([[1] [3]][1,:] )[1]==2?158+4:17 )#>say 27#p>>>say 170-3#]#print(47)#]#echo 21#v>++++ #8M| <esc>dggi2<esc>// }<}}<}>} [<<}<<<<<}<<}<<<<}<<<}}}<}}<}}<}}< }}<}}<}}}<}}<<<<<<<<<<<}}}<}}<}}<}}<}}<}}<}}}<<<<<<<<<<}+++++++++++++++++++++++++++++++++++++++++++++++++._++.._#]~-<~-<~-<<<~-<COprint("65")#=>ass^_^_# #9 "25" +/ppppppp ggeeee*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): .001820 (to improve, next entry should be no more than 9100 bytes) Try it online! Explanation The new language is the same old Haskell we used before, except with the language extension NegativeLiterals enabled. The negative literals extension is pretty simple it makes it so that when Haskell is desugaring negative literals it applies fromInteger.negate instead of applying negate.fromInteger. Usually this doesn't make a lick of difference to the way a Haskell program behaves, however thanks to this SO answer we can use split the two versions of Haskell. >data B=B Integer deriving Eq >instance Num B where{fromInteger=B;negate(B a)=B$a+1}
>main=print$last$170:[128|B 2==((-1)::B)]


This prints 128 normally and 170 when NegativeLiterals is enabled. I replaced the existing code with this.

Grass

This program would have added vw to grass, which is not something we could afford. I was able to remove the v by not deriving Eq

>data B=B Integer
>instance Eq B where(B a)==(B b)=a==b
>instance Num B where{fromInteger=B;negate(B a)=B$a+1} >main=print$last$170:[128|B 2==((-1)::B)]  however this added another w making the code as read by Grass ww. ww is a bit easier to work with than vw because v is a delimiter and thus is really hard to add to the program. In order to make ww work I had to move all of the remaining Grass into the Haskell program. >data B=B Integer--WWWWWWWWWWWWWWW >instance Eq B where(B a)==(B b)=a==b--WWWWWWWWWWWW >instance Num B where{fromInteger=B;negate(B a)=B$a+1}
>main=print$last$170:[128|B 2==((-1)::B)]


There were only two remaining ws so we are all out now, if more are needed some creativity is going to be required.

Balancing act

The insertion of this code caused a few languages to have unbalanced parentheses. In particular the Brain-Flak family are upset by the >s used to make the Haskell literate and the ss upset alphuck. Fixing this one was pretty simple we just add the relevant open parens

>data B=B Integer--WWWWWWWWWWWWWWW<<<ppp
>instance Eq B where(B a)==(B b)=a==b--WWWWWWWWWWWW
>instance Num B where{fromInteger=B;negate(B a)=B$a+1} >main=print$last$170:[128|B 2==((-1)::B)]  Prelude Prelude of course had a problem with me adding parentheses to the code. In order to fix this I first tried to minimize the parentheses I used. All in all I was only able to remove one pair of parentheses by changing (...) to last[...] this made the code >data B=B Integer--WWWWWWWWWWWWWWW<<<ppp >instance Eq B where(B a)==(B b)=a==b--WWWWWWWWWWWW >instance Num B where{fromInteger=B;negate(B a)=B$a+1}
>main=print$last$170:[128|B 2==last[(-1)::B]]


From here I just started adding the relevant whitespace.

>data B=B Integer--WWWWWWWWWWWWWWW<<<ppp
>instance Eq B where                                    (B a  )==  (B b)=a==b--WWWWWWWWWWWW
>instance Num B where{fromInteger=B;negate   ( B a             )=B$a+1} >main=print$last$169+1:[128|B 2==head [(-1 )::B]]--}  Now since this just needs to be spacing I was able to move parts of the comments into this space to reduce the size of the code >data B=B Integer--WWWWWWWWWWWWWWW<<<p >instance Eq B where{-ppWWWWWWWWWWWW-} (B a )== (B b)=a==b >instance Num B where{fromInteger=B;negate ( B a )=B$a+1}
>main=print$last$169+1:[128|B 2==head  [(-1 )::B]]--}


Incident Incidents

I had quite the struggle with Incident in this case, but I was able to get everything in order, in the end my code came out like:

>data B=B Integer--WWWWWWWWWWWWWW<<W<p
>instance Eq B where{-[ppWWWWWWWWWWWWay Uce stagehere]-}(B a  )==  (B b)=a==b
>instance Num B where{ fromInteger=B;negate  ( B a             )=B$a+1} >main=print$last\$169+1:[128|B 2==head  [(-1 )::B]]--}

• I think something similar to data B=B Int;instance Num B where fromInteger _=B 170;negate _=B 128 and B x= -1;main=print x might shorten this (and make the Eq instance unnecessary.) – Ørjan Johansen Jan 18 '18 at 3:03
• Might also be able to replace B with the use of lists. – Ørjan Johansen Jan 18 '18 at 3:41
• @ØrjanJohansen If I were to do this again I would probably do something like data B=B{u::Integer}, which would give me the function u this would reduce the need for parens (shortening the code drastically) and would mean I don't need it to be an instance of Eq`. However at this point things are very fragile so I probably won't be changing the way it works unless I'm already making edits to that section of the code. – Wheat Wizard Jan 18 '18 at 3:45