The Pyramid of Languages

15

1

Write a code that runs or compiles in as many programming languages as possible and prints a newline separated list of names of previous and current programming languages.

  • Every used language must have 1 character longer name than previous; ex. C#, C++, Ruby, Jelly, Python...
  • Each language must output a list of language names separated with a newline, sorted by length.
    • Output must be a pyramid: The list can only contain used language names, that are shorter than the running script language name + the running script language's name.
  • Leading and trailing newlines are allowed.
  • Standard loopholes are forbidden.
  • It's not allowed to create custom programming languages just to increase the score.
  • Version numbers don't count in language name, but you can specify it in your post if there are any incompatible changes in new versions of the language.
  • You can decide if you want to use the shortcut for the language name or it's full name, but you can't submit both forms in one answer. You can use ex. either SPL or Shakespeare Programming Language.
    • Only letters, numbers, ASCII symbols and single spaces (not leading nor trailing) count in language name length.

Examples

Example outputs for C, C# and C++:

C

C

C#

C
C#

C++

C
C#
C++

RedClover

Posted 2018-02-07T20:02:04.860

Reputation: 719

Sandbox post – RedClover – 2018-02-07T20:02:36.543

1There are plenty of languages with single-letter names: tio.run alone has 4, 7, C, D, I, J, K, M, R, and V. (Another significant one is B, the predecessor to C.) – Lynn – 2018-02-07T20:54:04.863

@Lynn But if you start from a longer language name you might lose score – RedClover – 2018-02-07T20:55:27.930

Answers

19

10 languages C, rk, ><>, Rail, Width, Gol><>, Fission, Cardinal, brainfuck, Befunge-98, 991 bytes

//Q rk:start print: "C^nrk" rk:end @,k*97C'a"rk"a"><>"a-1"Sail"a"Width"a"Gol><>"a"Fission"a"Cardinal"a"brainfuck"a"Befunge-98"
main(){puts("C");}
/*
$'main'
 \-[C\n\rk\n\><>\n\Rail]o

++++[++++>---<]>.>++++++++++.[------->+++<]>.-------.>++++++++++.[->++++++<]>++.--.++.>++++++++++.>-[--->+<]>---.[------>+<]>--.++++++++.+++.>++++++++++.[------>+<]>.+++[->++++<]>+.-----.--[--->+<]>--.------------.>++++++++++.[->+++++++<]>+.[--->+<]>++.---.--[->+++<]>.--.++.>++++++++++.[->+++++++<]>.[-->+++<]>.++++++++++..----------.++++++.-.>++++++++++.+[->++++++<]>+.-[-->+++<]>--.--[--->+<]>---.--------------.+++++.+++++.-------------.+++++++++++.>++++++++++.+[--->++++<]>--.[--->+<]>----.+++[->+++<]>++.++++++++.+++++.--------.-[--->+<]>--.+[->+++<]>+.++++++++.
R"C"N"rk"N"><>"N'S_!"ail"N"Width"N"Gol><>"N"Fission"*
/"><>krC"oaoooaooooE ao'liaR>'~ooooaoS"Width"aoS"Gol><>"; QQaAWAmcOAWAaicmaiWAAiwAOaOwWAAAOawmmFOcQww
 %"C"++++++++++,"rk","><>",=--t++,"ail"~,"Width","Gol><>","Fission","Cardinal"
 */

Try it online!

568 bytes of this is just the brainfuck code. The Befunge-98 program produces:

C
rk
><>
Rail
Width
Gol><>
Fission
Cardinal
brainfuck
Befunge-98

Jo King

Posted 2018-02-07T20:02:04.860

Reputation: 38 234

Can't you save 2 bytes by using puts instead of printf? – Neil – 2018-02-08T10:25:27.367

@Neil Thanks! (haven't golfed in C before (some would say i still haven't)) – Jo King – 2018-02-08T11:04:12.157

2

Nice! I would look into adding Parenthetic next — it ignores everything but ( and ), making it easy to quine with.

– Lynn – 2018-02-08T12:46:28.367

9

7 languages (J, es, zsh, Bash, Straw, Retina, Fission), 222 bytes

echo 'J'
#0 : 0
echo es #(10)#»:::J>>(es)>>(zsh)>>(Bash)>>(Straw)>>
(echo zsh;)
if [[ $BASH_VERSION ]]; then echo Bash; fi
#              ;R"J"N"es"N"zsh"N"Bash"N"Straw"N'Q+!"etina"N"Fission"N;
K`J¶es¶zsh¶Bash¶Straw¶Retina

Try it online!

Lynn

Posted 2018-02-07T20:02:04.860

Reputation: 55 648

I know this isn't a code-golf challenge, but you can remove the N after "Fission" to save 1 byte. :) – Kevin Cruijssen – 2018-02-08T15:00:29.930

1

rk, sed, Swap, 65 bytes

s/.*/rk\nsed/
rk:start print: "rk"
r>"pawSdeskr"oo52*oooo52*ooooo

rk: Try it online!

sed: Try it online!

Swap: Try it online!

dylnan

Posted 2018-02-07T20:02:04.860

Reputation: 4 993