8
Based on How high can you count? let us give an advantage to the polyglot people.
Challenge:
Your task is to write as many programs / functions / snippets as you can, where each one outputs / prints / returns an integer. The first program must output the integer 1
, the second one 2
and so on.
You can not reuse any characters between the programs. So, if the first program is simply: 1
, then you may not use the character 1
again in any of the other programs. Note: It's allowed to use the same character many times in one program.
You can only use a programming language once. So every number must be in a different programming language.
Scoring:
The winner will be the submission that counts the highest. In case there's a tie, the winner will be the submission that used the fewest number of bytes in total.
Rules:
- You can only use a language for one integer - after that you cannot reuse the language
- Snippets are allowed!
- To keep it fair, all characters must be encoded using a single byte in same encoding in the languages you choose.
- The output must be in decimal. You may not output it with scientific notation or some other alternative format. Outputting floats is OK, as long as all digits that are shown behind the decimal point are
0
. So,4.000
is accepted. Inaccuracies due to FPA is accepted, as long as it's not shown in the output. ans =
, leading and trailing spaces and newlines etc. are allowed.- You may disregard STDERR, as long as the correct output is returned to STDOUT
- You may choose to output the integer to STDERR, but only if STDOUT is empty.
Note: Explanations are encouraged!
I suggest you remove the tag [tag:polyglot] because the code is not being run in multiple languages, but rather each program/snippet is run individually in each language. – user41805 – 2017-06-05T07:50:45.013
Also, do all the languages have to have the same encoding? – user41805 – 2017-06-05T07:52:30.103
What if the same character is encoded differently in different languages? E.g.
1
is encoded as 0x65 in language A, and as 0x67 in language B. Can I then use the character1
in both languages because they map to different bytes? – Luke – 2017-06-05T07:53:09.027@KritixiLithos As far as I know, only the hex bytes matter. – Okx – 2017-06-05T07:53:10.260
For future reference, these types of challenges which ask for individual programs in multiple languages are called [tag:rosetta-stone] – Beta Decay – 2017-06-05T08:37:42.520
Can we use languages where 0 bytes produces a number? – BlackCap – 2017-06-05T17:17:26.093