| Bytes | Lang | Time | Link |
|---|---|---|---|
| 003 | Excel | 250806T220049Z | doubleun |
| 662 | CJam | 180605T152540Z | jimmy230 |
| nan | MATL | 250802T160753Z | Luis Men |
| nan | Pip | 250804T194728Z | DLosc |
| nan | MATL | 180604T200144Z | Stewie G |
| nan | Ruby | 250802T053137Z | Value In |
| nan | Vyxal 3 | 250801T114216Z | Themooni |
| nan | R | 180528T141357Z | ngm |
| nan | Lua | 180807T192841Z | GalladeG |
| nan | 05AB1E | 180528T123844Z | Emigna |
| 431 | Java 8 | 180528T225909Z | Jakob |
| nan | CJam | 180604T210905Z | lynn |
| nan | PHP 7.0 | 180604T145248Z | Maz |
| 538 | 05AB1E | 180602T152936Z | Caleb Ev |
| 048 | dc | 180531T202410Z | brhfl |
| nan | Python 2 | 180531T062650Z | Jo King |
| nan | JavaScript REPL | 180529T025039Z | l4m2 |
| 035 | Jelly | 180530T164916Z | Jonathan |
| 375 | SmileBASIC | 180530T155601Z | 12Me21 |
| nan | Java 8 | 180528T115436Z | Kevin Cr |
| 042 | Octave | 180528T133056Z | Stewie G |
| nan | Ruby | 180530T063534Z | G B |
| nan | Perl 5 | 180529T021933Z | breadbox |
| nan | Röda | 180529T171136Z | fergusq |
| 9211 | Braingolf | 180529T122629Z | Mayube |
| nan | Cjam | 180529T052112Z | Chromium |
| nan | Python 2 | 180528T120423Z | Jo King |
| 104 | x86 bytecode | 180528T140810Z | S.Klumpe |
| nan | Charcoal | 180528T135303Z | Neil |
| nan | JavaScript ES6 | 180528T133856Z | Arnauld |
| nan | APL Dyalog | 180528T130924Z | Uriel |
| 273 | Excel | 180528T112943Z | tsh |
Excel, chain length 3
71 + 10 + 3 = 84 bytes
=HSTACK(CONCAT(CHAR(HSTACK(43,98,55,38,98,55,38,SUM(45,5),94,48))),CHAR(45))
+b7&b7&2^0
--1
1
Put the first formula in cell A7. It outputs the string +b7&b7&2^0, which is a valid Excel formula, plus it spills a minus sign in cell B7.
The second formula concatenates the minus sign twice and adds 1 from 2^0. It outputs the string --1, which is a valid Excel formula.
The third formula applies the double unary operator to 1. It outputs 1.
This works because + is a valid way to start a textual formula, and -- is a valid way to start a numeric formula.
CJam, 10 11 programs, 10,414,248,662 bytes
I was too lazy to golf it... But apparently I don't need to golf it to be competitive. But without golfing it is a bit difficult to post the solution in an answer.
It should work in the JavaScript interpreter in theory, but the program is too long to be tested in a browser. It should output the same in the Java interpreter except for the last few programs, where the output format of floating point numbers is different. But it is likely to run out of memory in both interpreters for the first few programs.
Edit: This challenge allows using the character 1 in programs. So I changed the previous final output to 01, which is a new iteration to generate 1, to take advantage of that. Most of the programs are rewritten to avoid the new necessary characters e- in the previous iteration of 01.
Statistics
9721001919 bytes, used ,=>DEF[]`
642356955 bytes, used +:BHIN
42823797 bytes, used CJKOSTXmt|~
7527796 bytes, used 34c
471347 bytes, used '(;gn
61259 bytes, used 56^_fl (input must be empty)
5156 bytes, used %&27<Ws{}
355 bytes, used !"$)@Y\k
44 bytes, used #*/AZabdop
32 bytes, used -.9e and newline(\x0a)
2 bytes, used 01
1 byte, used 1 (doesn't count)
Unused printable ascii: 8?GLMPQRUVhijqruvwxyz and space
First bytes
[F]`F=,D>D>D>D>D>D=[F]`F=,F>F>F>D=[F]`F=,F>F>D=[F]`F=,F>F>E>E>E=[F]`F=,F>F>D=...
N:+H+H+H+B+B+N:+I+I+H+B+N:+I+H+H+H+H+H+B+N:+I+I+I+H+H+H+B+N:+I+H+H+H+H+H+B+N:...
SJ|~|SK|~|SK|~|SJ|~|SK|~|SK|~|SJ|~|SJ|~|SK|~|SK|~|SJ|~|SK|~|SJ|~|SK|~|SJ|~|SC...
344344334434343c34434443444334c344344334434344c344344334434344c34434433443434...
'n((';(((((';((((((';((((((';((((((';(((((';((((((';(((((';((((((';(((((';(((...
l65556565655665f^_6f^_65556565655566f^_655565656555556f^_556665655656555f^_56...
{}sW<{2722&}%{}sW<{2777&}%{}sW<{2722&}%{}sW<{772777&}%{}sW<{772777&}%{}sW<{27...
"Y"))"Y"))"$")))))))"@"))"@"))"!")))"@"))"!")))"@"))"$"))))))))))))"\\"))))))...
ZZ*AA#A#A/d/oZZ*pZZ*aA*AbAd/ZZ*aA*ZZ*AA#A/d/
9e-999<newline>999999999.999999999999e-9
01
1
Explanations
To output an arbitrary string, it generally needs a way to get a string value in the stack, a way to extract the character from the string, and a way to do computations on the character.
Program 1 uses ` to get the string representation of something, , to get a list of characters with values smaller than the given character, > to remove the first n elements in a list, so that using this operation repeatedly would be equivalent to adding the parameters together, and = to extract an element from the list.
Program 2 uses N, a variable defaulted to newline, to get a string, : followed by any binary operation, i.e. to reduce by that operation, to extract from a singleton list, and + to do computations.
Program 3 uses S, a variable defaulted to space, to get a string, ~ as the usual way to extract from lists, but with a | before that to avoid from being interpreted as a string, and | to do computations. It is not possible to get every character using bitwise operations from only the predefined variables 10 to 20. So I make it output the simplest program using only 34c to increase the chance that it is possible with the fewest characters. It used CXmtmtTmO~|~, i.e. round(tan(tan(1))) && ~12 to get the value 67.
Program 4 uses 34 to directly define a number, and c to convert it to a character. The higher bits are truncated, and only the number mod 65536 is used for the character value.
Program 5 uses ' to directly define a character, and (, i.e. decrement, to do computations.
Program 6 uses l, which returns newline on EOF, to get a string, f to operate on elements without extracting the character from the string, and ^ to do computations. This time it uses 56 to specify operands with arbitrary mod 65536 values.
Program 7 uses s to convert something to a string, {...}% to operate on elements without extracting, and & to do computations. While it uses 27 to specify the number operands with arbitrary mod 65536 values, the character operands generated from s aren't arbitrary. With the character {}, which is 3 and 5 mod 8 respectively, I could get every printable ASCII character with its codepoint mod 8 not larger than 5. I make it output a program that happens to use only these characters.
Program 8 uses "" to directly define a string, and ) to both extract from the string and do computations.
Now we have run out of the ways of getting strings in CJam. The next programs could only output numbers, except for p which prints the string represent of the argument followed by a newline. (Tio also supports n without converting it to the string representation.) But we could still make a few iterations using only numbers and newlines.
Program 9 is the following:
ZZ*AA#A#A/d/o e# Output 9/((10^10)^10/10), which is 9e-99.
ZZ*p e# Output 9, followed by a newline, as a separator in the next program.
ZZ*aA*AbAd/ e# 10 9s concatenated, divided by 10, that is 999999999.9.
ZZ*aA* e# 10 9s.
ZZ*AA#A/d/ e# 9/(10^10/10), which is 9e-9.
And the result is Program 10, which is just the numbers concatenated:
9e-999 e# Rounds to 0.
999999999.999999999999e-9 e# Rounds to 1.
So Program 11 is just 01, which outputs the final result 1.
First bytes (old version)
l)__)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))...
<newline>{s}sX>X<eu{h}sX>X<eu{<newline>}sX>X<{{XXXXXXX}seeseeseeW>{X<{|}%}%}%...
SH+~+E+E+E+SH+~+H+E~+SH+~+H+E~+SI+~+H+D+D+SI+~+I+E+E+SH+~+H+E~+SF+~+E+SD+~+D+...
[33]`3=,3333=[33]`3=,388333=[8]`88=,8333=[8]`88=,8333=[8]`88=,8338=[8]`88=,33...
N:--25--22- 2-N:--25--22- 2-N:--22--22-N:--25--22- 2-N:--25--22- 2-N:--22--22...
776776777767c677676676677667c66677666676776c776776777767c7667776c666776666767...
'#('@('T(('k(('T((('k(('K('p(''((('@('T(('k(('T((('k(('k('M('#(('#('C('g('g((...
"?RiQiJo$?RiQijL!"Bf^
4YbZbAd/4YbZbaG*
0.99999999999999999
1
Generator
"ZZ*AA#A#A/d/oZZ*pZZ*aA*AbAd/ZZ*aA*ZZ*AA#A/d/"
[{["!$@Y\k"$W%{U<}=_s`U@-)')*]s}fU]s
{i
_4&"{}sW%W<""{}sW<"?
\[i{_127&{_2X#&7 2? \1$AX#*-}&}16fX;]W%
_{"{"\"&}%"}e&
}%s
[
'lN@+2ew::^
{[i{_Wci&{_2X#&5 6? \1$AX#*-}&}16fX;]W%_"f^"e&+}%'_*
]s
[{[''";gn"${U>}=_U-'(*]s}fU]s
{[i{_Wci&{_2X#&3 4? \1$AX#*-}&}16fX;]W%'c}%s
"34c"
"SJ|~|
SK|~|
SCXmtmtTmO~|~|~|"N/ers
"CJKOSTXmt|~"
"IHBB IIHB IIIB IHHH HHHBB IHHBB HHBBBB IIIHHB IIIIHH IHHHHHB IIIHHHB"
S/'+ff+"N:+"f{\+}ers
"+:BHIN"
"FFD FFFD EDDDD FFEEE FFFEE DDDDDD"
S/'>f*'=f+"[F]`F=,"f{\+}ers
The second to last iteration outputs very slowly for some reasons. And the last iteration would probably run out of memory. Use this to test the correctness of the last iteration (very slow):
"ZZ*AA#A#A/d/oZZ*pZZ*aA*AbAd/ZZ*aA*ZZ*AA#A/d/"
[{["!$@Y\k"$W%{U<}=_s`U@-)')*]s}fU]s
{i
_4&"{}sW%W<""{}sW<"?
\[i{_127&{_2X#&7 2? \1$AX#*-}&}16fX;]W%
_{"{"\"&}%"}e&
}%s
[
'lN@+2ew::^
{[i{_Wci&{_2X#&5 6? \1$AX#*-}&}16fX;]W%_"f^"e&+}%'_*
]s
[{[''";gn"${U>}=_U-'(*]s}fU]s
{[i{_Wci&{_2X#&3 4? \1$AX#*-}&}16fX;]W%'c}%s
"34c"
"SJ|~|
SK|~|
SCXmtmtTmO~|~|~|"N/ers
10000/{
"CJKOSTXmt|~"
"IHBB IIHB IIIB IHHH HHHBB IHHBB HHBBBB IIIHHB IIIIHH IHHHHHB IIIHHHB"
S/'+ff+"N:+"f{\+}ers
_
"+:BHIN"
"FFD FFFD EDDDD FFEEE FFFEE DDDDDD"
S/'>f*'=f+"[F]`F=,"f{\+}ers
[~]s=o
}%
MATL, 7 programs, 11024 bytes in total
For convenience, programs are listed and explained in reverse order.
Program n has to produce a string containing program n−1. In all cases, this is done using some form of conversion from numbers to characters, which has to be different in each program:
- Converting from number to its string representation (Program 2);
- Concatenating the empty string, which implicitly converts to characters (Program 3);
- Converting between bases, using a string as the set of target "digits" (Program 4);
- Using a regular expression, which implicitly converts numerical inputs to strings (Program 5);
- Applying reference indexing into a string to extract some of its entries (Program 5);
- Using straightforward character conversion (Program 6);
- Applying assignment indexing to a predefined string literal to modify or delete some of its entries (Program 7);
- Using
sprinftwith format specifier'%s'(Program 7).
Likewise, different methods must be used for concatenating or generating arrays or strings:
- Vertical concatenation (Program 2);
- Horizontal concatenation (Program 3);
- Array literal
[···](Program 4); - Cell array literal
{···}(Program 5); - Logical array literal
TF···(Program 6); - Function
sprintfwith format specifier'%s'and more than one numerical input, which converts each of those inputs to a string and implicitly concatenates all the strings (Program 7).
Program 1 (2 bytes)
01
This pushes number 01, that is 1, to the stack, and implicitly displays it.
Program 2 (6 bytes)
OVlVv!
The code uses function O to push number 0, and then converts it to its string representation, '0'. Similarly, l pushes 1, which is concerted to '1'. Then v concatenates these two strings vertically, and ! transposes the result to give '01'.
Program 3 (12 bytes)
'PWmWw"'q''h
The code first pushes the string 'PWmWw"', which is like Program 2 but with each codepoint increased by 1. Then, q subtracts 1 from each character, which gives a numerical vector of codepoints. Lastly, this is concatenated horizontally with the empty string, which converts from codepoints back to characters.
Program 4 (91 bytes)
[55-7-7 77-I55 95-7 77-I-I75- -55-I-I95- -I- -I97-I55- -55-77 99- -7- -7- -I95 77-9]I~I~~Za
The code creates the array [41 74 55 88 71 124 101 94 33 116 95 68], using only a subset of decimal digits (so other digits can be used in subsequent programs) and only binary and unary - as arithmetical operations (which saves other operations for later). I is equivalent to 3. This array is then base-converted using a predefined string, containing all characters from space to '~', as target of the conversion. The result is a string representing Program 3.
Program 5 (358 bytes)
2|8^2/46XX:{448,22,22,4282,24,4282,24,486,24,24,4282,42,22,22,486,26,22,4282,24,486,24,24,4282,42,4282,42,24,22,4282,486,4282,22,22,4282,42,4282,42,26,22,4282,486,4282,42,4282,486,4282,42,26,24,4282,42,22,22,4282,486,4282,22,22,4282,24,24,486,26,26,4282,486,4282,24,4282,486,4282,24,4282,486,4282,42,26,22,486,24,24,4282,26,62,42,4266,42,4266,4266,2484,66}g)
The code 2|8^2/46XX looks for matches of the regular expression '.' (codepoint 46) to the character with code point 128, obtained as 2^8/2). Inputs to the regexp function (XX) can be numerical vectors, which are interpreted as (codepoints of) characters. The output is of character type. So this gives the character with codepoint 128. Then, the "range" function : is applied, which gives a string with all characters from space (codepoint 32) to that.
The cell array {448,22,···,66} is converted to a numerical vector (g) and used as an index ()) into the string. Indexing is modular, which allows building all the required indices using only even digits. Comma is employed as separator, because space has been used previously.
Program 6 (3977 bytes)
TFFFFFFFFFFTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTFFFFFFFFFFTTTTTTTFFFFFFFFFFFFTTTTTTTTTTTTTTFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTFFFFFFFFFFFFFFFFFFTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTFFFFFFFFFFFFTTTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTTTTTTTFFFFFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTFFFFFFFFFFFFFFTTTTFFFFFFFFFFFFFFTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTFFFFFFFFFFFFTTTTTTTTTTFFFFFFFFFFFFFFTTTTTTTTTTTTTTFFFFTTTTTTTTTTTTFFFFFFFFFFTTTTTTTTTTTTTTFFFFFFFFFFFFFFTTTTFFFFFFFFFFTTTTTTTTTTTTFFFFFFFFFFFFFFFFTTTTTTTTTTTTFFFFTTTTTTTTTTTTTTFFFFFFFFFFFFFFTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFTFdfdTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTs+c
The logical vector TFFFFFFFFFFFFFF···T is pushed to the stack. Run lengths in this vector define codepoints of the characters of Program 5 minus 40 (the lowest codepoint in that program is 41). Then, dfd essentially applies run-length decoding, and TT···Ts+ adds 40 back. Thanks to this the runs are much shorter, and so is the code. Then, c converts from code points to characters, which produces a string containing Program 5.
Program 7 (6578 bytes)
HEQEEQEEHEEEQEQEtttttttttHEQEEQEEtttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttttttttttttttttttttttttttttttttttttttttttttttHEEEQEQEtttttttttHEQEEQEEttttttHEEEQEQEtttttttttttHEQEEQEEtttttttttttttHEEEQEQEtttttttttttttttttttttttttttttttttttttttttttttttHEQEEQEEtttttttttttttttttttttttttttttttttttttttttttttttHEEEQEQEtttttttttttttttttHEQEEQEEttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttHEEEQEQEtttttttttttHEQEEQEEtttttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttttttttHEEEQEQEtttttttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttHEEEQEQEtttttttttttttHEQEEQEEtttHEEEQEQEtttttttttttttHEQEEQEEtttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttHEEEQEQEtttttttttttHEQEEQEEtttttttttHEEEQEQEtttttttttttttHEQEEQEEtttttttttttttHEEEQEQEtttHEQEEQEEtttttttttttHEEEQEQEtttttttttHEQEEQEEtttttttttttttHEEEQEQEtttttttttttttHEQEEQEEtttHEEEQEQEtttttttttHEQEEQEEtttttttttttHEEEQEQEtttttttttttttttHEQEEQEEtttttttttttHEEEQEQEtttHEQEEQEEtttttttttttttHEEEQEQEtttttttttttttHEQEEQEEttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttHEEEQEQEttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttHEQEEQEEHEEEQEQEHQEEEQEEHQEEEQEQEHQEEEQEEHEQEEQEEtttttttttttttttttttttttttttttttttttttttHQEQEEEQEQHEQEEQEQHQEEEEQEQHEEQEEY3HEEQEEQH(HY3UHn(N$YD
Don't try it online! (it times out; but it works in the offline compiler).
The codepoint of each character in Program 6 is sequentially pushed to the stack, using the basic operations H (push 2), Q (add 1) and E (multiply by 2). For example, character 'T' has codepoint 84, which is generated as HEQEEQEE. When a character is the same as the preceding one (which happens often), t (duplicate the top of the stack) is used instead, to save bytes.
Near the end of the code, HEEQEEY3 produces the predefined string literal 'kms'. HEEQEEQH( writes 37 (codepoint of '%') in the second entry of this string. Then HY3UHn( writes [] in its first entry ([] is obtained by pushing the predefined string literal 'hilb' with HY3 and attempting to convert it to a number with U, which yields an empty array). This deletes that entry, giving the string '%s'. Finally, this is used as format specifier for the sprintf function (YD). The statement N$ causes this function to take all numbers in the stack as inputs. The numbers are thus converted to characters, which are then implicitly concatenated into a single string, corresponding to Program 6.
Pip, 4 programs, 45 + 20 + 4 + 1 = 70 bytes
In reverse order:
o
Output the value of o, a built-in variable equal to 1.
C111
Output the character with codepoint 111 (o).
(Ui.V J(STXUXU)3*^m)
We want to save PA for the last program, so we need another way to generate an uppercase C. AZ (uppercase alphabet) won't work because of the shared A. z won't work because it's lowercase, and we can't use UC or SC to uppercase it because of the shared C.
What we can do, as it turns out, is use the built-in regex variable XU, which is preset to . [A-Z]ST converts it to a string, and then we extract the A and Z by finding all regex matches of XU itself. Joining that list into a string, we then eVal it as Pip code, giving us the uppercase alphabet.
Next, we increment i (preset to 0) to get 1, which we concatenate to the front of the alphabet. We now want to index into this string to get C111. These are at indices [3;0;0;0]. We can generate that list by splitting the built-in variable m (preset to 1000) into digits and multiplying each digit by 3.
PA@[8n:A5D74A'☐A6x42;8D52A4A8nA8n9D20t62A'M9]
Attempt This Online! (The ☐ represents an unprintable character, ASCII 14.)
For the final program, we simply index into PA (string of all printable ASCII characters) using a list of indices. To save bytes and avoid the forbidden digits 1 and 3, the numbers are generated in several ways:
53isA5, the ASCII code of the digit5(and similarly for several others, including an unprintable for 14)73isD74, decrement 74 (and similarly for several others)0isx, a variable preset to""(which evaluates to 0 in numeric contexts); similarly,10ist- After calculating it, we assign
53tonfor reuse later
MATL, 5 programs, 404+160+35+4+1 = 604 bytes
Getting to 4 programs was hard. 5 programs was very hard!
'/'37 13+3+3+'3`/'37 13+3+3+77 13+37 13+3+3+'3`/'37 13+3+3+'3tttttttt`/'37 13+3+3+'3#'37 13+3+3+'3ttttt`'37 13+3+3+'3ttttt'37 13+3+3+77 13+'/'37 13+3+3+'3`<<tttttttttt'37 13+3+3+'3#'37 13+3+3+77 13+37 13+3+3+'3///<3////t````ttttt```<</////t`````t<3tttttttttt<3tt/'37 13+3+3+'3ttttttttt'37 13+3+3+'3`{'37 13+3+3+77 13+'y$'37 13+3+3+'3/////t`````ttI#I'77 13+3+'dk'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh3_+''h
,50],5W50],50qqqqqqqq],50 50qqqqq]50qqqqq5W,50]99qqqqqqqqqq50 5W50,,,90,,,,q]]]]qqqqq]]]99,,,,,q]]]]]q90qqqqqqqqqq90qq,50qqqqqqqqq50]x5Wv!50,,,,,q]]]]]qqF FZa&v
This might be my favorite program I've written on PPCG:
22 2 2**2-2-- 22Y2 2EEEEEEEEBPX)2)
84
c
T
Explanation:
Having used hours on this program, I won't write the entire explanation now! I'll write it later!
Short summary:
T -> Literal true = 1
84c -> Convert 84 to its ASCII-character T
22 2 2**... -> Calculate 84 using only 2, * and -
22Y2 -> 22Y2 is a cell array with the name of all the months
2EE..B -> Is 512 in binary [1 0 0 ...]
P -> Flips is, [0 0 ... 1]
X) -> Uses the binary vector as index and gets the 10th element
-> 'October'
2) -> The second character, 'c'
-> Resulting in the stack: 84, 'c' that's implicitly printed
,50]... -> A string with ASCII character codes of '22 2...
-> There's a lot of ,xyz], which means "do twice" and q which is decrement
In order to convert this to a string instead of character codes, we need to concatenate it with a string using h. To get a string, without using quotes, or the XY modifiers, we do base conversion and convert an integer to whitespace.
'/'37 13 ... -> Concatenation of strings and character codes using only available numbers
3_+ -> Subtract 3 from all character codes to get the correct ones
''h -> And concatenate with the empty string.
Ruby, 3-chain, 112+20+3 = 135 bytes
Improving on G B's answer by inserting an in-between step.
STDOUT<<(''<<45<<62<<99+24<<34<<92<<5*24<<55<<48<<32<<35<<99+24<<48<<46<<55*2<<99+2<<5*24<<29*4<<5**3<<34<<5**3)
Using the longer STDOUT over the classic alias $> used by G B because I need > for the next program. Math to avoid 0, 1, and 7 so they can be used later.
Prints the following:
->{"\x70 #{0.next}"}
A function that outputs the following:
p 1
Which prints 1.
Vyxal 3, 51 + 46 + 3 + 3 = 103 bytes, 4-chain
"C⍢↜⎘d∩'ƶ≓æ⨪ɾ⩔½.⨥=>≛¹⁜Ṭz⇩B⁰⩔⎶ḧ5⊠7I³6⍨ ⑶_⍟⁰vS↸0w“k⩔⊢
large compressed integer to base codepage
›$››› ››››››››››››››› ›››››››› ›››››››››⑤‹;OJ
increment empty stack yeilding 1, increment again yielding 35, decrement 100 once for 99. convert last 2 to characters and join the 1, yielding 1#c.
spaces are there to ensure the compressed integer from earlier doesn't contain chars we need later.
1#c
compress integer 1 to base-252
Ꮠλƛ
compressed integer 1, implicitly printed
<script type="vyxal3">
"C⍢↜⎘d∩'ƶ≓æ⨪ɾ⩔½.⨥=>≛¹⁜Ṭz⇩B⁰⩔⎶ḧ5⊠7I³6⍨ ⑶_⍟⁰vS↸0w“k⩔⊢,
›$››› ››››››››››››››› ›››››››› ›››››››››⑤‹;OJ,
1#c,
Ꮠλƛ,
</script>
<script>
args=[]
</script>
<script src="https://themoonisacheese.github.io/snippeterpreter/snippet.js" type="module"/>
R, 3-chain 198 + 44 + 3 bytes
`+`=`\143\141\164`;+"\143\141\164\050\151\156\164\124\157\125\164\146\070\050\143\050\070\070\055\071\055\071\054\071\071\071\055\070\070\071\055\070\055\070\054\070\070\055\071\055\071\051\051\051"
Returns :
cat(intToUtf8(c(88-9-9,999-889-8-8,88-9-9)))
Returns :
F^F
Returns 1
Explanation :
The first program is almost totally written in octal representation, where each character is written as \xxx where xxx is the ASCII code in octal mode. In human readable form would be :
`+`=`cat`;+"cat(intToUtf8(c(88-9-9,999-889-8-8,88-9-9)))"
Here, to avoid the use of round brackets we redefine the prefix operator + equal to cat function, then we use that to print the next string. Even after assigning cat to +, the latter still keeps its prefix operator "status" and will just take whatever follows it as its first parameter.
The second program, simply prints the characters F^F obtaining them from decimal ASCII : 70,94,70
Since in the first program we used the octal representation, only numbers 8 and 9 are free to be used; hence, we obtain 70 and 94 with some differences between numbers with only 8's and 9's.
Finally, the last program, F^F, exploits the ^ function (power of) which coerces FALSE to 0 and computes 0^0 returning 1
Credits to :
- @ngm for the first 2-chain idea
- @Giuseppe for the hint to use octals in functions
- @BLT and @JayCe for the idea to override
+in order to avoid brackets
Previous version :
R, 2-chain 27+3 24 + 2 bytes
cat(intToUtf8(c(49,76)))
Returns:
1L
Returns 1.
Lua, 2 chain, 83+8=91 bytes
load(('').char(0x70,0x72,0x69,0x6E,0x74,39,0x70,0x72,0x69,0x6E,0x74,34,49,34,39))()
Outputs
print"1"
Which outputs
1
05AB1E, 5-chain: 236 + 29 + 13 + 3 + 1 = 282 bytes
10101100011010001101100010110110001111000111001110101001000000000010111100100110011011010110011000100110101001001101100001110001111010100100000100010010001010011101011001110001000001011010101111001110011110001010111100001110110C₁<Au¦н.V
which prints the program
633693S<J6bαð3<žQTÌ>è9663тαhJ
which prints the program
522472 2-255B
which prints the program
88ç
which prints the program
X
which prints 1
Java 8, 3 programs, 431 bytes
Program 1, 332 bytes
A lambda from one (empty) parameter of any type to String.
x\u002D\u003E"\151\156\164\40\157\75\70\46\70\52\70\54\156\75\53\53\157\53\70\73\156\145\167\40\123\164\162\151\156\147\50\51\53\50\143\150\141\162\51\50\47\171\47\53\157\51\53\50\143\150\141\162\51\50\47\54\47\53\157\51\53\50\143\150\141\162\51\50\47\75\47\53\157\51\53\156\53\50\143\150\141\162\51\50\47\56\47\53\157\51\53\156\73"
This is just a lambda with the arrow characters Unicode-escaped returning the text of the second program encoded with octal escape sequences.
Program 2, 93 bytes
Snippet producing a String.
int o=8&8*8,n=++o+8;new String()+(char)('y'+o)+(char)(','+o)+(char)('='+o)+n+(char)('.'+o)+n;
Try It Online (with return added)
Program 3, 6 bytes
A lambda from one (empty) parameter of any type to int.
z->9/9
CJam, 7-chain, 92365+1819+79+14+9+3+1 bytes
This 92365-byte program prints
YaY+`$1<mR1+1+1+1+1+1+11+1+1+YaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR11+11+YaY+`$1<mR1+11+11+YaY+`$1<mR1+1+1+1+1+1+11+1+1+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR11+11+YaY+`$1<mR1+1+1+1+1+1+11+1+1+1+1+YaY+`$1<mR11+11+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR11+11+YaY+`$1<mR1+11+11+YaY+`$1<mR1+1+1+1+1+1+11+1+1+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR11+11+YaY+`$1<mR1+1+1+1+1+1+11+1+1+1+1+YaY+`$1<mR11+11+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+1+1+YaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR11+11+YaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR11+11+YaY+`$1<mR1+1+1+1+1+1+11+1+1+1+1+YaY+`$1<mR11+11+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR11+11+YaY+`$1<mR1+11+11+YaY+`$1<mR1+1+1+1+1+1+11+1+1+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR11+11+YaY+`$1<mR1+11+11+YaY+`$1<mR1+1+1+1+1+1+11+1+1+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR1+11+11+YaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR1+1+1+1+1+11+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+YaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+1+1+YaY+`$1<mR1+1+1+1+1+11+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+YaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR1+11+11+YaY+`$1<mR1+1+1+1+1+11+YaY+`$1<mR1+11+11+YaY+`$1<mRYaY+`$1<mR1+1+1+1+1+1+11+1+1+1+1+YaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR1+11+11+YaY+`$1<mR1+11+11+YaY+`$1<mR1+1+11+11+11+11+11+1+1+1+1+YaY+`$1<mR11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1+1+1+1+1+YaY+`$1<mR1+1+11+11+11+11+YaY+`$1<mR1+11+11+YaY+`$1<mR1+1+1+1+1+11+11+1+1+YaY+`$1<mR11+11+YaY+`$1<mR1+1+1+1+1+1+11+1+1+1+YaY+`$1<mR1+11+11+YaY+`$1<mR1+11+11+YaY+`$1<mR1+11+11+YaY+`$1<mR1+1+11+YaY+`$1<mR1+11+YaY+`$1<mR1+1+1+1+1+11+11+1+1+YaY+`$1<mR11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+YaY+`$1<mR1+1+1+1+1+
which prints
34 4673 4656 4673 4656 5464 4656 4673 4673 4740 34 50 34707 5477]{N7=64777-,=}%
which prints
";*;*Q*;;~"2f^
which prints
9(9(S(99|
which prints
88c
which prints
X
which prints 1.
PHP 7.0, 2-chain, 35 + 8 = 43 bytes
While writing my initial answer I realized I could just use base64 encode the second echo. It shaved off 11 bytes, so here it is. You can find my original idea below, too.
Run using php -r:
echo base64_decode('RUNITyAxPz4=');
This outputs:
ECHO 1?>
Which then obviously prints:
1
Output:

My code when run in a terminal. The appended && echo is for readability only.
Comments:
There's not much to it really. Very simple once you know about "?>" implicitly acting as ";". The "tricky" part was to figure out what to encode:
- ECHO 1; became RUNITyAxOw==, so we have a collision of uppercase O's. No good.
- echo 1; became ZWNobyAxOw==, so now there's two lowercase o's. Unfortunate!
- ECHO 1?> became RUNITyAxPz4=. It's the same length and none of the characters collide. So that's it!
Alternatively we can use "echO" and "ECHo", too (36 + 7 = 43 bytes).
echO base64_decOde('RUNIbyAxOw==')?>
ECHo 1;
1
We can also switch the ; and ?> around using that. It works equally well and it all scores the same in length.
My initial solution:
PHP 7.0, 2-chain, 44 + 10 = 54 bytes
This is the best I could come up with at first. I understood that "unique characters" meant "echo" is not equal to "ECHO". Hope I got that right!
Run using php -r:
echo strtoupper(urldecode('echo true%3b'))?>
This outputs:
ECHO TRUE;
Which in turn gives us our number:
1
Output:

My code when run in a terminal. The appended && echo is for readability only.
Some comments:
- I think you can only do a 2-chain in PHP since it requires the ";" instruction separator.
- You can get around this once by using "?>", which implies a semicolon, but obviously can't re-use it a second time
- This was the hardest part for me to figure out. I didn't know this worked beforehand, nor that "?>" was even allowed when running via php -r
- By using strtoupper() I was able to just write the code for chain #2 in lowercase, while the output is obviously uppercase. Easy mode right there!
- urldecode() allows me to encode ";" as "%3b"
- That's all there is really, nothing too exciting
Thanks for the challenge, I learned something today!
05AB1E, 5 + 3 = 8 bytes
ght<n
which right off the bat returns
I am taking the output 1.0 as not equalling 1, so I run that code:
1.0
which returns
1
And there you go!
Number of programs = 2
dc, 3 programs, 48 bytes
First:
82 2-adAArdAAI2*-rAAI-I2/2^-f
Yields the second:
75
P
90
P
110
P
Yields the third:
KZn
Yields 1.
Try it online! (has some stack-clearing and newline-printing code thrown in to make all three bits run in one go).
Perhaps best to start at program three, KZn. There are only a few ways to print things in dc, and I realized at this stage I would probably be stuck with either p or n, both of which are in the 100s in decimal ASCII. This means that I was almost certainly going to have to generate 1 instead of just using the program 1n. K pushes the current (default: 0) precision to the stack, and Z pushes the number of digits of top-of-stack, which gives us the 1 to print.
The second program is pretty straightforward. P prints the character with the given ASCII value, so we print 75 (K) 90 (Z) and finally 110 (n), which works wonderfully. It also means that, aside from the aforementioned 1, I can't use the digits 5, 7, 9, or 0 elsewhere. I also need a method other than P for turning numbers into characters.
The first program, then, has to make four numbers without using the digits 1, 5, 7, 9, or 0. It needs to make 80 (ASCII value of P): 82 2-; 75: AA (110) I- (subtract the default input radix, 10) I2/ (so, 5) 2^ (so, 5^2, 25) - (75); 90: AA (110) I2* (twice the default input radix of 10, so 20) - (90); and 110: well, it's just AA. After making 80, we use a to convert a number to a string. There are some reverse and duplicate commands in there to put the Ps in the right spots, and then finally we print the whole stack with f.
I'm pretty sure I didn't screw this up, but I did have my head spinning a little bit...
Python 2, 3 snippets, 68 + 12 + 3 = 83 bytes
chr(44*2+4).join([chr(42&54),`45+25`,`42*2+52`,`4*4+55`+chr(42&54)])
which produces the string of octal literals:
"\70\136\71"
which produces:
8^9
Which finally produces 1.
JavaScript REPL, lots of bytes, 4 iterate
(+!![]+[!![]+!![]+!![]+!![]]+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(+!![])+(+!![])+![]+![]+(!![]+!![]+!![])+![]+(!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(!![]+!![]+!![]+!![])+![]+![]+(+!![])+(!![]+!![])+![]+(+!![])+(!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(!![]+!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(+!![])+(!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(+!![])+(!![]+!![]+!![])+![]+![]+(!![]+!![]+!![])+![]+(!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(!![]+!![]+!![]+!![])+![]+![]+(+!![])+(!![]+!![])+![]+(+!![])+(!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(!![]+!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(+!![])+(!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(+!![])+(!![]+!![]+!![])+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(+!![])+(+!![])+![]+![]+(+!![])+(!![]+!![])+![]+(+!![])+(+[])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(!![]+!![]+!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(+!![])+(+!![])+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(+!![])+(!![]+!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(!![]+!![]+!![])+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(+!![])+(+!![])+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(+!![])+(+!![])+![]+![]+(+!![])+(!![]+!![])+![]+(+!![])+(+[])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(!![]+!![]+!![])+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(+!![])+(!![]+!![])+![]+(!![]+!![]+!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(!![]+!![]+!![])+![]+![]+(+!![])+![]+(!![]+!![])+![]+(!![]+!![]+!![]+!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(+!![])+(!![]+!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(!![]+!![]+!![]+!![]+!![])+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(!![]+!![])+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(+!![])+(+!![])+![]+![]+(+!![])+![]+(+!![])+(+[])+![]+(+!![])+(+!![])+![]+(+!![])+(!![]+!![]+!![]+!![]))[(![]+[])[!![]+!![]+!![]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]][([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]]+[])[!![]+!![]+[+[]]]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([![]]+[][[]])[+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(![]+[])[+!![]])()([][[]]))[+!![]+[+[]]]+(![]+[])[!![]+!![]]+([![]]+[][[]])[+!![]+[+[]]]+(!![]+[])[+[]]](![])[(+(!![]+!![]+[+[]]+(+!![])+(!![]+!![])+(!![]+!![]+!![]+!![]+!![])))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([]+[])[([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]][([][[]]+[])[+!![]]+(![]+[])[+!![]]+([]+(+[])[([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]])[+!![]+[+!![]]]+(!![]+[])[!![]+!![]+!![]]]](!![]+!![]+!![]+[+[]])](([]+[])[([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]][([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]]+[])[!![]+!![]+[+[]]]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([![]]+[][[]])[+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(![]+[])[+!![]])()(+[]+[![]])[!![]+!![]+!![]]+(![]+[])[+!![]]+(!![]+[])[+!![]]+(+[![]]+[][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([![]]+[][[]])[+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]())[+!![]+[+!![]]]+(!![]+[])[+[]]][([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([![]]+[][[]])[+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+([![]]+[][[]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+([][[]]+[])[!![]+!![]]]([][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]][([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]]+[])[!![]+!![]+[+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]+[+[]]]+(![]+[])[+!![]]+(![]+[])[!![]+!![]])()(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+[+!![]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]][([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]]+[])[!![]+!![]+[+[]]]+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([![]]+[][[]])[+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(![]+[])[+!![]])()(![]+[![]])[+!![]+[+[]]]+(!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!![]+!![]+!![]+!![])+([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([![]]+[][[]])[+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]]+(!![]+[])[!![]+!![]+!![]]+(!![]+!![]+!![])+(!![]+!![])+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(![]+[])[+[]]+(!![]+!![]+!![]+!![]+!![]+!![])+(+[])+(!![]+!![]+!![]+!![]+!![])+([][[]]+[])[!![]+!![]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+([]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+(!![]+[])[+!![]]]()[+!![]+[!![]+!![]]]+(!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![])))[([][(!![]+[])[!![]+!![]+!![]]+([][[]]+[])[+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([![]]+[][[]])[+!![]+[+[]]]+(!![]+[])[!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]]()+[])[!![]+!![]+!![]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!![]+[+[]]]+(![]+[])[!![]+!![]]+(![]+[])[!![]+!![]]])[+!![]+[+[]]]+([![]]+[][[]])[+!![]+[+[]]]+([][[]]+[])[+!![]]]([])
"\x60\44\x7b\55\x7e\x7b\x7d\x7d\44\x7b\55\x7e\x7b\x7d\x7d\x60\56\x73\x70\x6c\x69\x74\x60\x60\56\x74\x6f\x53\x74\x72\x69\x6e\x67\x60\x60"
`${-~{}}${-~{}}`.split``.toString``
1,1
1
Too lazy to optimize the JSFUCK code
JavaScript REPL, 164 bytes, 3 iterate
may be able to expand
[g=222222222222222222,e=2e40,f=2e23,f,2e40,n=2222e49,r=2e24,2e30,e,n,r,8e28,2e40,n,r,9e29,g].map(S=>String.fromCharCode(Math.log(S))).join([])
'\55\x7E\x7B\x7D'
-~{}
1
Jelly, 38 37 36 35 bytes, Chain of 4
ØJiⱮ⁾ɱṾ⁽÷ṃ;ṾØJ⁽¡Ṡị
Try it online! (18 bytes)
8220,163,187Ọ
Try it online! (13 bytes)
“£»
Try it online! (3 bytes)
!
Try it online! (1 byte)
18+13+3+1=35 bytes
How?
ØJiⱮ⁾ɱṾ⁽÷ṃ;ṾØJ⁽¡Ṡị - Main Link: no arguments
⁾ɱṾ - list of charcters -> ['ɱ','Ṿ']
ØJ - yield the characters of Jelly's code-page
Ɱ - Ɱap across the two characters applying:
i - first index of? -> [163, 187]
⁽÷ṃ - 8220 (a base 250 compressed number)
; - concatenate -> [8220, 163 187]
Ṿ - un-eval (get Jelly code) -> "8220,163,187"
- (Note: here a full program prints 8220,163,187 as it is the end
- of a leading constant chain due to the following constant)
ØJ - yield the characters of Jelly's code-page
⁽¡Ṡ - 1206 (a base 250 compressed number)
ị - index into (1-indexed & modular, so gets the 182nd item, 'Ọ')
- implicit print (making the final output 8220,163,187Ọ)
8220,163,187Ọ - Main link: no arguments
8220,162,187 - list of numbers -> [8220, 162, 187]
Ọ - cast ordinals to characters -> ['“','£','»']
- implicit print (flat Jelly lists print as if strings so outputs “£»)
“£» - Main link: no arguments
“ - open string-literal
£ - the content of the string-literal
» - close it interpreting as a compressed string
- this yields ['!']
- implicit print (outputs !)
! - Main link: no arguments
! - factorial (of implicit input 0 - 0! = 1 as it is the empty product)
- implicit print (outputs 1)
SmileBASIC, chain 3, 375 bytes
k=59599-44444print c("sbanm",k,4,"")+c("sbwav",44-5,2,"")+c("sbwav",594-222,4,"")+c("game5vs",4528-442,2,"")+c("sbanm",k,4,"")+c("sbanm",72,5-4,"")*2+c("sbwav",594-222,4,"")+c(sbwav,854-44,2,"")+c("staffroll",259+2,9,"")+c("ex8techdemo",24455,5-2,"")+key(4)[.]def c(f,s,l,q)for i=.to-5+l+4q=q+load("txt:sys/"+f,.)[s+i]next:return q:end
Outputs:
CHR$63OUT A$CHR$33OUT B$PRINT A$;B$;L
Outputs:
?!0
Outputs:
1
Java 8, chain of 2 functions, 90+10 37+4 28+4 = 32 bytes
o\u002D\u003E"\44\55\76"+2/2
Which is equivalent to:
o->"$->"+2/2
-57 bytes thanks to @OlivierGrégoire.
Which returns the String:
$->1
Which returns the integer:
1
Octave, 3 programs, Length 42 bytes
char("``;8%79b/7%,,b"-5)
Outputs: [[63 24]*2 ''].
Try it online!
[[63 24]*2 '']
Outputs: ~0. Try it online!
~0
Outputs: 1. Try it online!
Ruby, 2-chain, 24+3 = 27 bytes
$><<(''<<56+56<<' '<<49)
Output is
p 1
Perl 5, 3-chain, 151 139 chars (114 + 20 + 5)
&{"CORE::SYSWRITe"|"CORE::39372!4"}(STDOUT,"\x70\x72\x69\x6E\x74\47\x50\x42\x5A\3\22\47\x5E\47\43\43\43\43\43\47")
The ugliness inside the &{ } evaluates to CORE::syswrite, and so the hex-escaped string is printed to standard output as:
print'PBZ^C^R'^'#####'
Please note that the ^C and ^R in the above represent literal control characters. (And not to be confused with the literal ^ caret that occurs between the two strings.)
This program in turn outputs:
say 1
Röda, 2 chain, 31 + 3 = 34 bytes
Snippet 1:
(`X.Z`/"")|ord _|push _+3|chr _
Snippet 2:
[1]
They are snippets, because every valid Röda program must include main{...} bloat. They are also valid Röda REPL programs.
Braingolf, 2 chain, 9 + 2 = 11 bytes
72-_#23-@
This outputs
5/
(Plus some default output which can be ignored per OP's rules)
This in turn outputs
1
Cjam, 4-chain, 28+20+3+1=52 bytes
Snippet 1:
"tugshrm\x18$\x18vj\x1b\x07um~l$\x1b"{71^}%
Snippet 2:
32 4/5*_c_1-\@2*9+c\
Snippet 3:
'Y(
Snippet 4:
X
Which then prints 1.
Note:
Since Cjam does not have interpretation for escape characters, the ones in snippet 1 are only there for better web view. You need to use the corresponding actual characters to run the snippet.
If I cannot shave off more characters, then good job to @Emigna for the
05AB1Eanswer!
Python 2, 2-Chain, 7+44 = 51 bytes
lambda:("7072696e74203"+`3-2`).decode("hex")
and
print 1
The base 16 code translates to print 1, which is returned by the anonymous function.
x86 bytecode, Chain 2, 10+4 bytes
(Assembled with FASM, format PE)
ÇA.Ï?¿<÷Y. produces 1À@Ã in the address next to it and executes it, which returns 1 in eax (as per fastcall).
In both cases the . actually represents A or LF.
In hex: C7 41 0A CF 3F BF 3C F7 59 0A and 31 C0 40 C3.
Disassembled:
mov dword ptr ds:[ecx+A],3CBF3FCF
neg dword ptr ds:[ecx+A]
produces
xor eax,eax
inc eax
ret
This (ab?)uses the fact that the entrypoint of the program is stored in ecx, and then writes the inverse of the to be executed code to the address 10 bytes over and negates it.
May or may not break if assembled with anything but fasm, to anything but a PE or with a different entrypoint.
Charcoal, 2 programs, 10 + 2 = 12 bytes
⭆´G´·℅⊕⊕℅ι
Try it online! Outputs
I¹
Try it online! Which outputs 1.
JavaScript (ES6), 2 functions, 31+4 = 35 bytes
function(){return atob`Xz0+MQ`}
returns _=>1, which returns 1
f0 =
function(){return atob`Xz0+MQ`}
res0 = f0()
console.log('Output of 1st function:', res0)
f1 = eval(res0)
res1 = f1()
console.log('Output of 2nd function:', res1)
Excel, Chain 2, 27+3 bytes
=CHAR(45)&CHAR(45)&CHAR(49)
Not sure if this is OK...