2 added 898 characters in body
source | link

Explanation

After working for a long time on how to integrate Haskell with the FreeDOS COM binary code and finding an ugly solution, it didn't work with the interpreter on TIO and thus I pinged @NieDzejkob which quickly found another way, thanks!

Instead of /* multi-line comment */ Haskell uses {- multi-line comment -}, so void /* ... will get properly parsed. The way this polyglot handles it, is to use void as an identifier for defining the operator (/*-) after which follows a long comment, a new identifier _ and a definition and finally the main-function.

Basically I only needed to take care of Unefunge-98 (just moving it to the end of the file, fixing Somme and rebalancing & no-opping the newly integrated parentheses for Brain-Flak. This worked nicely because I had a useless definition floating around, where I could just put the only tricky paren ).

Hexdump

Hexdump

Explanation

After working for a long time on how to integrate Haskell with the FreeDOS COM binary code and finding an ugly solution, it didn't work with the interpreter on TIO and thus I pinged @NieDzejkob which quickly found another way, thanks!

Instead of /* multi-line comment */ Haskell uses {- multi-line comment -}, so void /* ... will get properly parsed. The way this polyglot handles it, is to use void as an identifier for defining the operator (/*-) after which follows a long comment, a new identifier _ and a definition and finally the main-function.

Basically I only needed to take care of Unefunge-98 (just moving it to the end of the file, fixing Somme and rebalancing & no-opping the newly integrated parentheses for Brain-Flak. This worked nicely because I had a useless definition floating around, where I could just put the only tricky paren ).

Hexdump

1
source | link

19. Haskell, 690 bytes

void /*-{-- #hR!X-@ P^h~~X@@0D 0D"hv!X-@ PZh +X5 "M!M elif MOC SODeerF$}++++[*/main(){//\
 /+ #\
 echo hsab<<'EOF' #>>
1+///\
/*ggcGmiVZZ;ooo"loG";?=0%S!11ooo<"><>"
#define S""
#ifdef __OBJC__
#define S"-evitcejbO"
#endif
printf("C"S)/*/import std.stdio;"D".write/**/;}/*<<
 "rT";#z_"B",@>2+;  >    ][ v;#;8k,7y2-;@,, <<<
>"Befunge-96"#^Z00G#^_$4->1+>,,,,,,,,,,@
n*'um{Z'; 5kziZ<m%*///><>}]⎚¿⁵laocrahC¦++++[-<+++++>]<[-<++++++<+++++<+++++>>>]<<<+++++++.>-.>---.<<-----.++++++++.-----.>--.>---.<+.>>>((((((((((()()()){}){}){}){}()){})((()()()()){}){})[(([][]){}){}()])([]()){})[]())(([[][]()]([]()((((([][][])){}{})[]){})))[]())({ -}_=")";main=putStr"lleksaH"-- *///@,ka"89-egnufenU"

Prints:

  • D in D
  • emmoS in Somme
  • ><> in ><>
  • C in C
  • laocrahC in Charcoal
  • miV in Vim
  • C-evitcejbO in Objective-C
  • 89-egnufeB in Befunge-98
  • 39-egnufeB in Befunge-93
  • elif MOC SODeerF in FreeDOS COM file
  • ><>loG in Gol><>
  • 89-egnufenU in Unefunge-98
  • 79-egnufeB in Befunge-97
  • 69-egnufeB in Befunge-96
  • kcufniarb in brainfuck
  • 89-egnuferT in Trefunge-98
  • kalf-niarb in brain-flak
  • hsab in bash
  • lleksaH in Haskell

Try it online!

Next answer must not exceed 897 bytes.

Hexdump

00000000: 766f 6964 202f 2a2d 7b2d 2d20 2368 5221  void /*-{-- #hR!
00000010: 582d 4020 505e 687e 7e58 4040 3044 2030  X-@ P^h~~X@@0D 0
00000020: 4422 6876 2158 2d40 2050 5a68 202b 5835  D"hv!X-@ PZh +X5
00000030: 2022 4d21 4d20 656c 6966 204d 4f43 2053   "M!M elif MOC S
00000040: 4f44 6565 7246 247d 2b2b 2b2b 5b2a 2f6d  ODeerF$}++++[*/m
00000050: 6169 6e28 297b 2f2f 5c0a 202f 2b20 235c  ain(){//\. /+ #\
00000060: 0a20 6563 686f 2068 7361 623c 3c27 454f  . echo hsab<<'EO
00000070: 4627 2023 3e3e 0a31 2b2f 2f2f 5c0a 2f2a  F' #>>.1+///\./*
00000080: 1b67 6763 476d 6956 1b5a 5a3b 6f6f 6f22  .ggcGmiV.ZZ;ooo"
00000090: 6c6f 4722 3b3f 3d30 2553 2131 316f 6f6f  loG";?=0%S!11ooo
000000a0: 3c22 3e3c 3e22 0a23 6465 6669 6e65 2053  <"><>".#define S
000000b0: 2222 0a23 6966 6465 6620 5f5f 4f42 4a43  "".#ifdef __OBJC
000000c0: 5f5f 0a23 6465 6669 6e65 2053 222d 6576  __.#define S"-ev
000000d0: 6974 6365 6a62 4f22 0a23 656e 6469 660a  itcejbO".#endif.
000000e0: 7072 696e 7466 2822 4322 5329 2f2a 2f69  printf("C"S)/*/i
000000f0: 6d70 6f72 7420 7374 642e 7374 6469 6f3b  mport std.stdio;
00000100: 2244 222e 7772 6974 652f 2a2a 2f3b 7d2f  "D".write/**/;}/
00000110: 2a3c 3c0a 2022 7254 223b 237a 5f22 4222  *<<. "rT";#z_"B"
00000120: 2c40 3e32 2b3b 2020 3e20 2020 205d 5b20  ,@>2+;  >    ][ 
00000130: 763b 233b 386b 2c37 7932 2d3b 402c 2c20  v;#;8k,7y2-;@,, 
00000140: 3c3c 3c0a 3e22 4265 6675 6e67 652d 3936  <<<.>"Befunge-96
00000150: 2223 5e5a 3030 4723 5e5f 2434 2d3e 312b  "#^Z00G#^_$4->1+
00000160: 3e2c 2c2c 2c2c 2c2c 2c2c 2c40 0a6e 2a27  >,,,,,,,,,,@.n*'
00000170: 756d 7b5a 273b 2035 6b7a 695a 3c6d 252a  um{Z'; 5kziZ<m%*
00000180: 2f2f 2f3e 3c3e 7d5d e28e 9ac2 bfe2 81b5  ///><>}]........
00000190: 6c61 6f63 7261 6843 c2a6 2b2b 2b2b 5b2d  laocrahC..++++[-
000001a0: 3c2b 2b2b 2b2b 3e5d 3c5b 2d3c 2b2b 2b2b  <+++++>]<[-<++++
000001b0: 2b2b 3c2b 2b2b 2b2b 3c2b 2b2b 2b2b 3e3e  ++<+++++<+++++>>
000001c0: 3e5d 3c3c 3c2b 2b2b 2b2b 2b2b 2e3e 2d2e  >]<<<+++++++.>-.
000001d0: 3e2d 2d2d 2e3c 3c2d 2d2d 2d2d 2e2b 2b2b  >---.<<-----.+++
000001e0: 2b2b 2b2b 2b2e 2d2d 2d2d 2d2e 3e2d 2d2e  +++++.-----.>--.
000001f0: 3e2d 2d2d 2e3c 2b2e 3e3e 3e28 2828 2828  >---.<+.>>>(((((
00000200: 2828 2828 2828 2928 2928 2929 7b7d 297b  (((((()()()){}){
00000210: 7d29 7b7d 297b 7d28 2929 7b7d 2928 2828  }){}){}()){})(((
00000220: 2928 2928 2928 2929 7b7d 297b 7d29 5b28  )()()()){}){})[(
00000230: 285b 5d5b 5d29 7b7d 297b 7d28 295d 2928  ([][]){}){}()])(
00000240: 5b5d 2829 297b 7d29 5b5d 2829 2928 285b  []()){})[]())(([
00000250: 5b5d 5b5d 2829 5d28 5b5d 2829 2828 2828  [][]()]([]()((((
00000260: 285b 5d5b 5d5b 5d29 297b 7d7b 7d29 5b5d  ([][][])){}{})[]
00000270: 297b 7d29 2929 5b5d 2829 2928 7b20 2d7d  ){})))[]())({ -}
00000280: 5f3d 2229 223b 6d61 696e 3d70 7574 5374  _=")";main=putSt
00000290: 7222 6c6c 656b 7361 4822 2d2d 202a 2f2f  r"lleksaH"-- *//
000002a0: 2f40 2c6b 6122 3839 2d65 676e 7566 656e  /@,ka"89-egnufen
000002b0: 5522                                     U"