37. C++ (gcc), 776 bytes
# 1"16" 2//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+=!)#1|=/=1/24=x=9[<$+@+-@@@@=>+<@@@=>+<?#>+.--.]/
__DATA__=1#//
#.\."12"*␉
""""#//
=begin␉//
#*/
#include<iostream>␉
int main() /*/
#()"`#"\'*/{std::cout<<37;}/*'"`"
$'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({})!<>+]/*///Z222999/3!@"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.
Rundown
This program prints 37 in C++, 36 in Labrinth, 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.
I added another format to the test driver output that escapes double quotes as well as make line feed replacements. This is so I can feed the single line string to a c(gcc) program I wrapped around the function created by @feersum here. Hopefully others can make use of it as is.
Here's the Incident token program. Ideally I'd like to deliminate the tokens since they are a bit hard to read, indicate the "center" token, and include it in the test driver. But I don't really know how to do anything other than make various programs print sequential integers, so this is as far as I've gotten.
I've attempted to solve the obvious Incident problems, like tokens after the beginning and end jump tokens and anything that looked extraneous, but I haven't balanced the tokens to put 0o
at the center. I'm not really sure what the logic is exactly to determine the center. I'm hoping @ais523 will help there. This string near the end 7LEintndus({})!<>+
would all be tokens if not for this 4th inclusion in the code. These can all be removed (and replaced with a .
for Hexagony alignment) in order to adjust the center token.
I'm going to be updating this post off and on over the next day or two to walk through the code, (assuming Incident can be verified/fixed without going over the byte count). But it's super late now, and I mostly wanted to get this out there before I had to solve another Labyrinth like problem. :P