25
\$\begingroup\$

As TIO can show, every letter of the Latin alphabet is represented when it comes to languages. For every letter there is at least 1 programming language whose name begins with that letter. Your task is to create a polyglot in order to demonstrate that.

Your program should be runnable in between 2 and 26 different languages, each of which starts with a different letter. However, if your program runs in \$N\$ languages, the languages used must have the first \$N\$ letters of the alphabet as the first letter of their names. So if your program runs in 5 languages, the languages must start with A, B, C, D and E. (e.g. A Pear Tree, BrainSpace, C++, Dash and Enlist)

Your program should take no input, and output a constant string: the alphabet (case-irrelevant, in order), but with the letter of the language name removed. So the language beginning with A should output BCDEFGHIJKLMNOPQRSTUVWXYZ (or the equivalent lower case version). Case doesn’t have to be consistent for different languages, but it does between runs in the same language.

Any languages are fair game, so long as no letters are repeated. This rules out using different versions for most languages (e.g. Python 2 vs Python 3), but this is only as a consequence of having unique letters. Seriously and Actually, for example, are considered different versions, but can both be used in the same answer as they start with different characters.

If using languages with custom code pages, then, as is standard, the bytes must match between programs, not characters.

Submissions are scored by number of languages used, with a tie breaker of shortest code.

\$\endgroup\$
  • \$\begingroup\$ Sandbox (deleted). Please don't hesitate to leave any feedback. \$\endgroup\$ – caird coinheringaahing Aug 17 '20 at 18:16
  • 1
    \$\begingroup\$ Looking forward to seeing an answer that includes a language beginning with Z. \$\endgroup\$ – Adám Aug 17 '20 at 18:54
  • 2
    \$\begingroup\$ @Adám I'm tempted to offer a bounty to any valid answer that includes Ziim \$\endgroup\$ – caird coinheringaahing Aug 17 '20 at 18:57
  • 1
    \$\begingroup\$ @DomHastings As long as they are consistent (only within one language, different languages may use different separators), and not letters themselves, yes \$\endgroup\$ – caird coinheringaahing Aug 17 '20 at 19:24
  • 3
    \$\begingroup\$ It would be interesting to see a (mostly) shell-only answer, as there are ash, bash, csh, dash, eshell, fish, Hamilton shell, Ion, Korn, mksh, Oh, posh, rc, sh, tcsh, xonsh, yash, zsh... Missing are G, J, L, N, Q, U, V, W. \$\endgroup\$ – Bubbler Aug 20 '20 at 1:27
24
+500
\$\begingroup\$

AsciiDots, Bash, Cardinal, Dash, evil, fish, goruby, Haystack, Implicit, J-uby, ksh, Ly, mksh, Numberwang, OSH, Python 3, QuadR, Ruby, Super Stack!, Taco, Unefunge-98 (Pyfunge), V (Vim), Wumpus, xonsh, yash, Zsh, 1009 bytes

9 shells, 3 Rubies, some 2D (and 1D!) languages and many languages I learned just for this challenge. I really enjoyed this challenge and learned some new languages and features. I enjoyed finding a shorter way than just the raw string in some languages (in some languages generating the string seemed longer) and trying to re-use the s variable as many times as possible was fun too. I've also tried to keep the byte-count as low as possible. If I find the time and the inclination, I wonder if I could start adding the letters of the alphabet to the end instead... Crazy talk...

' # "194940711909711999999999999940391270919999999999994039127zaeeeawawawawavaeeaaaaamvawvusb"' #165#1#1;.040;"ZYXWVTSRQPONMLKJIHGFEDCBA"8 3*k,q"ABCDEFGIJKLMNOPQRSTUVWXYZ"o¡72"8:é9:é8++:90+1®;65µ
'\&p"A""K"R"M""Z"R&o;';#   x%"ABDEFGHIJKLMNOPQRSTUVWXYZ"x.-$"BCDEFGHIJKLMNOPQRSTUVWXYZ" 0 65 65 if pop dup dup 83 sub if pop outputascii 0 fi pop 1 add dup 91 sub fi "ZYXVUTSRQPONMLKJIHGFEDCBA"#25&o   @"ABCDEFGHIJKLMNOPQRSUVWXYZ"
s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0#'
0//1;
try:echo -n;print(s[0:23]+"YZ");
except:print(s[0:15]+s[16:]);"""/.__id__;begin ~:*;puts s.gsub ?J,"";rescue;begin A;puts s.gsub ?G,"";rescue;puts s.gsub ?R,"";end;end;'
[ -z $s ]&&echo ABCDEGHIJKLMNOPQRSTUVWXYZ&&exit;echo `[ $status = 1 ]&&echo \${s/Z/}&&exit;[ \e =~ e ]&&echo \${s/Y/}&&exit;\[ -z \$- \]&&echo ABC\${s#ABCD}&&exit;[ -z \$BASHPID ]&&echo \${s/K/}&&exit;[ -z $_OVM_PATH ]||echo $s|tr -d O;[ -z $_OVM_PATH ]||exit;[[ -n $USER_ID ]]&&echo \${s/M/}||echo \${s/B/}`;';/
('Q'⎕R'')⎕A⋄'\} #<esc>ggdG¬AZ:s/#\|V//"""#\'⍵

AsciiDots

The relevant code is:

.-$"BCDEFGHIJKLMNOPQRSTUVWXYZ"

This needs to be wrapped in [...] to avoid [Extended Brainfuck Type I] from outputting rubbish before the desired string because of the ..

Try it online!

Bash

The relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0#'...'
[ -z $s ]&&echo ABCDEGHIJKLMNOPQRSTUVWXYZ&&exit;echo `[ $status = 1 ]&&echo \${s/Z/}&&exit;[ \e =~ e ]&&echo \${s/Y/}&&exit;\[ -z \$- \]&&echo ABC\${s#ABCD}&&exit;[ -z \$BASHPID ]&&echo \${s/K/}&&exit;[ -z $_OVM_PATH ]||echo $s|tr -d O;[ -z $_OVM_PATH ]||exit;[[ -n $USER_ID ]]&&echo \${s/M/}||echo \${s/B/}`;'...' #

This first line sets $s to be the full alphabet in uppercase, so -z $s is false and skipped over. $status is unset, \e is treated as an escape, not a \ and e, $BASHPID is set, $_OVM_PATH is not and $USER_ID isn't set so B is replaced with the empty string in $s (${s/B/}) and echoed it out.

Try it online!

Cardinal

The relevant code is:

x%"ABDEFGHIJKLMNOPQRSTUVWXYZ"x

The cursors spawn from the % and are terminated by the xs. This needed to be moved slightly to prevent additional output.

Try it online!

Dash

The relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0#'...'
[ -z $s ]&&echo ABCDEGHIJKLMNOPQRSTUVWXYZ&&exit;echo `[ $status = 1 ]&&echo \${s/Z/}&&exit;[ \e =~ e ]&&echo \${s/Y/}&&exit;\[ -z \$- \]&&echo ABC\${s#ABCD}&&exit;[ -z \$BASHPID ]&&echo \${s/K/}&&exit;[ -z $_OVM_PATH ]||echo $s|tr -d O;[ -z $_OVM_PATH ]||exit;[[ -n $USER_ID ]]&&echo \${s/M/}||echo \${s/B/}`;'...' #

As per Bash, this first sets $s to be the full alphabet in uppercase. so -z $s is false. $status is empty, \e is an escape sequence and doesn't match e, but $- is empty in Dash so that conditional is met and we echo out ABC followed by $s with the prefix ABCD removed (${s#ABCD}).

Try it online!

evil

The relevant code is:

zaeeeawawawawavaeeaaaaamvawvusb

Try it online!

fish

The relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0#'...'
[ -z $s ]&&echo ABCDEGHIJKLMNOPQRSTUVWXYZ&&exit;echo `[ $status = 1 ]&&echo \${s/Z/}&&exit;[ \e =~ e ]&&echo \${s/Y/}&&exit;\[ -z \$- \]&&echo ABC\${s#ABCD}&&exit;[ -z \$BASHPID ]&&echo \${s/K/}&&exit;[ -z $_OVM_PATH ]||echo $s|tr -d O;[ -z $_OVM_PATH ]||exit;[[ -n $USER_ID ]]&&echo \${s/M/}||echo \${s/B/}`;'...' #

In fish, variables aren't assigned via the s=... syntax so $s is empty meaning the first conditional is hit, the required string is echoed out and then exit is called.

Try it online!

goruby + --disable=gems

This isn't available on TIO, but is distributed with the official Ruby source and can be compiled (after the normal autoconf and ./configure steps) with make goruby. Tested on version ruby 2.8.0dev (2020-08-24T10:24:07Z master 1eb1add68a) [x86_64-linux]. The relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0
0//.../.__id__;begin ~:*&?,;puts s.gsub ?J,"";rescue;begin A;puts s.gsub ?G,"";rescue;puts s.gsub ?R,"";end;end

Haystack

The relevant code is:

"ABCDEFGIJKLMNOPQRSTUVWXYZ"o

which outputs the required string.

Try it online!

Implicit

The relevant code is:

¡72"8:é9:é8++:90+1®;65µ

This pushes the range of 1..72 and joins the last 8 items on the stack to a string, duplicates the top the stack, increments all codepoints by 9, duplicates the stack again, increments all codepoints in the string by 8, pushes 90 to the stack and concatenates all, reverses the stack, pop off the top 65 elements then prints the stack.

Try it online!

J-uby

The relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0
0//.../.__id__;begin ~:*&?,;puts s.gsub ?J,"";rescue;begin A;puts s.gsub ?G,"";rescue;puts s.gsub ?R,"";end;end

This shares the declaration of s with the shells and other Ruby implementations and and .gsubs J from the string before putsing it as long as ~:*&?, doesn't cause an error.

Try it online!

ksh

The relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0#'...'
[ -z $s ]&&echo ABCDEGHIJKLMNOPQRSTUVWXYZ&&exit;echo `[ $status = 1 ]&&echo \${s/Z/}&&exit;[ \e =~ e ]&&echo \${s/Y/}&&exit;\[ -z \$- \]&&echo ABC\${s#ABCD}&&exit;[ -z \$BASHPID ]&&echo \${s/K/}&&exit;[ -z $_OVM_PATH ]||echo $s|tr -d O;[ -z $_OVM_PATH ]||exit;[[ -n $USER_ID ]]&&echo \${s/M/}||echo \${s/B/}`;'...' #

$s is set as the other shells and $status is empty, \e doesn't match e, $- is not empty, but $BASHPID is so $s is echoed removing K (${s/K/}).

Try it online!

Ly

The relevant code is:

&p"A""K"R"M""Z"R&o;

which first clears the stack then pushes the Ranges from A-K and M-Z, before &outputting the stack contents and terminating (;).

Try it online!

mksh

The relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0#'...'
[ -z $s ]&&echo ABCDEGHIJKLMNOPQRSTUVWXYZ&&exit;echo `[ $status = 1 ]&&echo \${s/Z/}&&exit;[ \e =~ e ]&&echo \${s/Y/}&&exit;\[ -z \$- \]&&echo ABC\${s#ABCD}&&exit;[ -z \$BASHPID ]&&echo \${s/K/}&&exit;[ -z $_OVM_PATH ]||echo $s|tr -d O;[ -z $_OVM_PATH ]||exit;[[ -n $USER_ID ]]&&echo \${s/M/}||echo \${s/B/}`;'...' #

As per the previous shells, the first line sets $s to be the full alphabet in uppercase, so -z $s is false and skipped over. $status is unset, \e is treated as an escape, not a \ and e, $BASHPID is set, $_OVM_PATH is not and $USER_ID is set so M is replaced with the empty string in $s (${s/M/}) and echoed it out. Tested on version 58-1.

Numberwang

The relevant code is the big number as Numberwang is just a transliteration of brainfuck:

194940711909711999999999999940391270919999999999994039127
>+[+[<]>>+<+]>>+++++++++++++[<.+>-]<+>++++++++++++[<.+>-]

There's a minor amount of work to balance 4s and 7s throughout the rest of the code, alongside making sure things appear in the right order, but nothing major. Might be able to save some bytes by moving stuff around here...

Try it online!

OSH

Oh look, another shell! As per the others the relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0#'...'
[ -z $s ]&&echo ABCDEGHIJKLMNOPQRSTUVWXYZ&&exit;echo `[ $status = 1 ]&&echo \${s/Z/}&&exit;[ \e =~ e ]&&echo \${s/Y/}&&exit;\[ -z \$- \]&&echo ABC\${s#ABCD}&&exit;[ -z \$BASHPID ]&&echo \${s/K/}&&exit;[ -z $_OVM_PATH ]||echo $s|tr -d O;[ -z $_OVM_PATH ]||exit;[[ -n $USER_ID ]]&&echo \${s/M/}||echo \${s/B/}`;'...' #

The main difference here is that $_OVM_PATH is set in OSH, but not in Bash, so the correct string is echoed using tr to remove the O.

Try it online!

Python 3

The relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0
0//1;
try:echo -n;print(s[0:23]+"YZ");
except:print(s[0:15]+s[16:]);"""..."""

This shares the declaration of s with the shells and Rubies and is also shared with xonsh. The code in the try will fail in Python (echo -n), but works in xonsh so the code in the except is called, printing slices of s.

Try it online!

QuadR

The relevant code is:

('Q'⎕R'')⎕A⋄'...'⍵

In QuadR, when the final line contains all the preceding lines are patterns to match and the final line is a transformation function. This particular transformation function just takes the alphabet ⎕A and ⎕Replaces 'Q' with '', the rest of the function after the statement separator () is just to close off all the other strings/comments/regex literals and comment out the end of the function.

Try it online!

Ruby

The relevant code is shared with J-uby and goruby:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0
0//.../.__id__;begin ~:*&?,;puts s.gsub ?J,"";rescue;begin A;puts s.gsub ?G,"";rescue;puts s.gsub ?R,"";end;end

Like the other Rubies, s is shared from the shells but in Ruby here, both the other clauses ~:*&?, and A will raise exceptions so the final statement is executed which replaces R in s with the empty string.

Try it online!

Super Stack!

The relevant code is:

0 65 65 if pop dup dup 83 sub if pop outputascii 0 fi pop 1 add dup 91 sub fi

This pushes 0 and 65 (twice) to the stack, then if (which is "while top of stack is truthy" - non-zero), pops the top element, duplicates the new top element twice, pushes 83 and subtracts it from the next stack item down. Then if top of stack is truthy (e.g. it's not 83 - S), pop it, outputascii, push 0 and terminate with fi (since top of stack is now 0). Finally, pop, push 1, add the two top elements together (increment), duplicate, push 91 and subtract, terminate the loop, which will happen if the last output char was 90 (Z).

Try it online!

TacO

The relevant code is:

@"ABCDEFGHIJKLMNOPQRSUVWXYZ"

Try it online!

Unefunge-98 (PyFunge)

The relevant code is:

"ZYXWVTSRQPONMLKJIHGFEDCBA"8 3*k,q

There are a few commands before this that are executed and push things to the stack, but basically this just pushes the required chars in reverse, then pushes 8 and 3 and multiplies them. The k command repeats the next command TOS (24) + 1 times, outputting the required string and quits.

Try it online!

V (vim) + -v

The relevant code is:

<esc>ggdG¬AZ:s/V//"...

Which first leaves insert mode (<esc>), goes to the first line of text (gg), deletes to the last line (dG), inserts the letters from A to Z (¬AZ), then finally replaces V with the empty string (:s/V//). The rest of the line is commented out (").

Try it online!

Wumpus

The relevant code is:

...#220#1#1;.
..."ZYXVUTSRQPONMLKJIHGFEDCBA"#25&o @

The #220#1#1 pushes 220, 1, 1 to the stack, then ; pops off the last item then calls . which jumps the IP to line 1, char 220 and executes. We need to just because TacO mandates only one @ in the code.

Try it online!

xonsh

The relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0
0//1;
try:echo -n;print(s[0:23]+"YZ");
except:print(s[0:15]+s[16:]);"""..."""

xonsh is a Python based shell so the code is shared with Python 3 and uses the same s var as the shells and Rubies. I've used a technique I've used in many polyglots with Ruby to get this code in. 0//1 is integer division and the echo -n works fine since xonsh is a shell so the execution of printing the required substring portion of s with the literal string YZ concatenated, then the rest of the program is a """ string.

yash

The relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0#'...'
[ -z $s ]&&echo ABCDEGHIJKLMNOPQRSTUVWXYZ&&exit;echo `[ $status = 1 ]&&echo \${s/Z/}&&exit;[ \e =~ e ]&&echo \${s/Y/}&&exit;\[ -z \$- \]&&echo ABC\${s#ABCD}&&exit;[ -z \$BASHPID ]&&echo \${s/K/}&&exit;[ -z $_OVM_PATH ]||echo $s|tr -d O;[ -z $_OVM_PATH ]||exit;[[ -n $USER_ID ]]&&echo \${s/M/}||echo \${s/B/}`;'...' #

Like the other shells, but in yash, the sequence \e is not an escape sequence and so is just the string \e which matches e so $s is printed substituting Y for the empty string (${s/Y/}).

Try it online!

Zsh + --continueonerror

The relevant code is:

s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";0#'...'
[ -z $s ]&&echo ABCDEGHIJKLMNOPQRSTUVWXYZ&&exit;echo `[ $status = 1 ]&&echo \${s/Z/}&&exit;[ \e =~ e ]&&echo \${s/Y/}&&exit;\[ -z \$- \]&&echo ABC\${s#ABCD}&&exit;[ -z \$BASHPID ]&&echo \${s/K/}&&exit;[ -z $_OVM_PATH ]||echo $s|tr -d O;[ -z $_OVM_PATH ]||exit;[[ -n $USER_ID ]]&&echo \${s/M/}||echo \${s/B/}`;'...' #

Zsh is less tolerant of errors in a script than the other shells and so necessitates the --continueonerror flag. In Zsh $status is also set (in fish too) when a command fails, so if $status is 1, then $s is echoed out, substituting Z for the empty string (${s/Z/}).

Try it online!


Validation suite.

\$\endgroup\$
  • 1
    \$\begingroup\$ Should be easy to add Factor \$\endgroup\$ – Mukundan314 Aug 18 '20 at 7:06
  • 2
    \$\begingroup\$ This is already amazing even if it never gets beyond TacO, but I'm putting the Champagne in the fridge and hoping for the zsh finish... \$\endgroup\$ – Dominic van Essen Aug 25 '20 at 11:52
  • 1
    \$\begingroup\$ Fantastic! I wish I could upvote this another time! Well done! \$\endgroup\$ – Dominic van Essen Aug 27 '20 at 12:43
  • 3
    \$\begingroup\$ This is exactly the kind of answer I was hoping for! Amazing! \$\endgroup\$ – caird coinheringaahing Aug 27 '20 at 15:47
  • 1
    \$\begingroup\$ Thanks @DominicvanEssen! I want to try and condense it more and definitely fix the Brainfuck issue... But I'm pretty happy with it! \$\endgroup\$ – Dom Hastings Aug 27 '20 at 16:06
18
\$\begingroup\$

Arcyou, Braille, COW, Deadfish~, Emoji, Forked, Gaot++, Hyper-Dimensional Brainfuck, 3389 Bytes

"BCDEFGHIJKLMNOPQRSTUVWXYZ";11+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+@1+@1+@1+@1+@1+1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@&------------------------.+.+.+.+.+.+.++.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiciciciicicicicicicicicicicicicicicicicicicicicicich⠆⠄⡒⡆⡘⠀⢕⢍⢅⠽⠵⠭⠥⠝⠕⠍⠅⢼⢴⢬⢤⢜⢔⢌⢄⠼⠴⠬⠤⠜⠌💬ABCDFGHIJKLMNOPQRSTUVWXYZ💬➡MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MoO Moo MoO MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo baaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet bleeeeet

Try it online in Arcyou, Braille, COW, Deadfish~, Emoji, Forked, Gaot++, and Hyper-Dimensional Brainfuck.

I'll explain each part below:

Arcyou

"BCDEFGHIJKLMNOPQRSTUVWXYZ";

Implicitly prints the string, and ignores everything afterwards with a comment ;.

Braille

⠆⠄⡒⡆⡘⠀⢕⢍⢅⠽⠵⠭⠥⠝⠕⠍⠅⢼⢴⢬⢤⢜⢔⢌⢄⠼⠴⠬⠤⠜⠌

All non braille symbols are ignored, so this is an easy choice.

COW

MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MoO Moo MoO MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo MoO Moo

All non-moo tokens are ignored, making this easy as well. We also use a moo-exit (Moo) so that if we accidentally have a moo token in the future we don't run it.

Deadfish~

iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiciciciicicicicicicicicicicicicicicicicicicicicicich

Uses i to increment, o to output, and h to halt meaning we don't interpret future tokens.

Emoji

💬ABCDFGHIJKLMNOPQRSTUVWXYZ💬➡

All non-emoji tokens are ignored, making this another easy choice.

Forked

11+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+@1+@1+@1+@1+@1+1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@&

This language has a lot of tokens, but halts on & meaning we can put in it early. The "BCDEFGHIJKLMNOPQRSTUVWXYZ"; in front from Arcyou acts as a no-op.

Gaot++

baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeee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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bleeeeeeeeeet bleeeeet

All non-sheep tokens are ignored, making this another easy choice. I hope the cows and the sheep can get along.

Hyper-Dimensional Brainfuck

11+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+@1+@1+@1+@1+@1+1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@1+@&------------------------.+.+.+.+.+.+.++.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.

Basically brainfuck with some extra command we can ignore. Notice we use part of the Forked solution as a starter.

\$\endgroup\$
  • 3
    \$\begingroup\$ Deadfish~ is not a language. \$\endgroup\$ – null Aug 18 '20 at 3:47
  • \$\begingroup\$ @HighlyRadioactive Why? \$\endgroup\$ – the default. Aug 18 '20 at 8:24
  • 8
    \$\begingroup\$ Deadfish doesn’t meet our standards for programming languages (add two numbers and test for prime), but as this is a constant output challenge, that doesn’t matter - any language can be used \$\endgroup\$ – caird coinheringaahing Aug 18 '20 at 8:45
  • \$\begingroup\$ @cairdcoinheringaahing Oh, ok. \$\endgroup\$ – null Aug 18 '20 at 9:02
5
\$\begingroup\$

Aheui (esotope), Brainfuck, Canvas, 127 bytes

밤밦뚜
나타뺘우차빠빠빠
떠벓벓벅멓더희뎌
>+[+[<]>>+<+]>.+>>++++[<++++++>-]<[<+.>-]
ABDEFGHIJKLMNOPQRSTUVWXYZ

Try it online in Aheui, Brainfuck, and Canvas!

Just a trivial solution of three languages which ignore each other's code entirely.

  • Aheui ignores all non-Korean(Hangul) characters.
  • Brainfuck ignores all characters that are not Brainfuck instructions +-.,<>[].
  • Canvas treats all ASCII characters as string literals and prints the last line.
\$\endgroup\$
4
\$\begingroup\$

axo, Befunge-93, Canvas, Deadfish~, 104 bytes

"%A","EDC",,,"F">::,"Z"-|
{>B">[[("Z"-#%\{i}}dddci@
cici^icici +1<{c^i}{ci+1<}
ABDEFGHIJKLMNOPQRSTUVWXYZ

Try axo online! Try Befunge-93 online! Try Canvas online! Try Deadfish~ online!

Explanations

axo

"%
 >B">[[("Z"-#%\
    ^      +1<

It activates stringmode, pushes the B, then starts printing and incrementing that B until it's a Z.

Befunge-93

"%A","EDC",,,"F">::,"Z"-|
                        @
                ^     +1<

Print ACDE, push an F, print and increment it until it's a Z.

Canvas

Canvas prints the last line.

Deadfish~

{{i}}dddciciciicicic{ci}{ci}
\$\endgroup\$
3
\$\begingroup\$

AlphaBeta, brainfuck, Cauliflower, Dreaderef, emotifuck, 413 bytes

ebbbkiigZUaCILQ++++++++[>++++++++<-]>+.+<+++++[<+++++>-]<-[->>+.<<]deref16 4deref?7bool?9?7 13chro?add1 21 16deref100-1"abcefghijklmnopqrstuvwxyz"\;(print abdefghijklmnopqrstuvwxyz)🔥😂😂😂😂😂😂😂😂🌚🔥😂😂😂😂😂😂😂😂💯💩🐸🔥😂💞😂💞😂💞😂💞😂💯😂😂😂🌚💯😂😂😂😂😂😂😂🔥💩🐸💯🌚💩🔥🔥😂💞💯💯🐸

Try AlphaBeta, brainfuck, Cauliflower, Dreadref, emotifuck online!


AlphaBeta

The relevant part is

e                ;add 100 to register 1
 bbb             ;subtract 3 from register 1 (=97)
    k            ;add 100 to register 2
     ii          ;add 20 to register 2
       g         ;add 1 to register 2 (=121)
        ZU       ;add 10 to position register
                 ;loop: prints 'bcd...xyz'
          a      ;add 1 to register 1
           C     ;set value of register to register 1 
            I    ;set value of memory to register 3
             L   ;print value in memory as char
              Q  ;if reg1 <= reg2, jump to stored position (10)

There are no comments in AlphaBeta, which means most uppercase letters need to be avoided, as they break stuff and errors are printed to stdout.

brainfuck

++++++++[>++++++++<-]>+  ;calculate 65   
.+                       ;print A and increment
<+++++[<+++++>-]<-       ;push 24

[->>  <<]                ;24 times:
    +.                   ; increment and print

Since brainfuck ignores any other characters, this doesn't cause any further issues.

Cauliflower

I haven't found any good documentation on this language, so this was mostly trial and error:

\;                                  ;escaped comment?
  (print abdefghijklmnopqrstuvwxyz) ;print string

Dreaderef

The relevant part is

deref16 4deref?7bool?9?7 13chro?add1 21 16deref100-1"abcefghijklmnopqrstuvwxyz"\;

This is adapted from the Hello World in the documentation. The ; comments out the rest of the line.

emotifuck

🔥😂😂😂😂😂😂😂😂🌚🔥😂😂😂😂😂😂😂😂💯💩🐸🔥😂💞😂💞😂💞😂💞😂💯😂😂😂🌚💯😂😂😂😂😂😂😂🔥💩🐸💯🌚💩🔥🔥😂💞💯💯🐸

is equivalent to the brainfuck program

++++++++[>++++++++<-]>+.+.+.+.+<+++[<+++++++>-]<[->>+.<<]
\$\endgroup\$
2
\$\begingroup\$

AWK, Bash, 68 bytes

echo ACDEFGHIJKLMNOPQRSTUVWXYZ
END{print"BCDEFGHIJKLMNOPQRSTUVWXYZ"}

Try it online (AWK)!

Try it online (Bash)!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.