Impossible Script

From Esolang
Jump to navigation Jump to search

Programming might be hard for some people, but you will NEVER, EVER, EVER learn to code in Impossible Script. You need a zillionplex years to write useful programs in it.

Description

This programming language uses a stack. These are the data types.

Type Description
Number An integer between 0 and 100 inclusive. There is also "infinite", which represents every number over 100.
String A string of the characters in the code page of 50 51 "bytes".
Coolean Has two values: 'cool' and 'not cool'.
E This type has only one value, called E.
List A list indexed by any type, including E.
Function Similar to those in Python.
Word Represents a word in the English language. Can be inflected. Only ones in the dictionary are allowed values. Not a string.
Sentence A grammatical English sentence. Also not a string.

Coolean conversion

Values can be converted into cooleans in conditionals and loops.

Type Description
Number Cool iff nonzero.
String Cool iff nonempty.
E Cool because I like the meme.
List Cool iff nonempty and has no references to Worstscript in it.
Function Cool iff it does something good.
Word Cool iff it does not represent negative concepts, like "no", "not" and "nothing". Words like "maybe" cannot be converted into a coolean.
Sentence Cool iff it does not represent a negative concept.

Instructions

Instruction Codepage Value What it does
0 00 End the program.
1 01 Push the word "one" to the stack. Not the string or the number.
2 02 Push the word "two".
3 03 Push the word "three".
4 04 Push the word "four".
5 05 Push the word "five".
6 06 Push the word "six".
7 07 Push the word "seven".
8 08 Push the word "eight".
9 09 Push the word "nine", then erase your hard disk.
A 10 Pop a number, push a string containg that many A's.
B 11 Push the word "bye" to the stack.
C 12 Pop a list, then push its length times 2 plus 2 minus 2 plus 2 squared cubed squared.
D 13 Push a sentence containing every word in the dictionary.
E 14 Push the E value.
F 15 Pay your respects.
G 16 Print "3, 2, 1, GOOOOOOOOOOOOOOOOOOOOOOOOOOOO!" to the screen.
H 17 Interpret the rest of the code as HQ9+.
I 18 Identity function. Pop a value and push it back.
J 19 Pop a number, apply Bessel J to it, and convert it into an unsigned integer (negatives become positives).
K 20 Push the word "okay" to the stack.
L 21 Turn on liar mode. From now, all cooleans will push their inverse until it is turned off.
M 22 Malloc 999999999999 bytes.
N 23 Push a list of sentences corresponding to the lyrics of Never Gonna Give You Up.
O 24 Oh
P 25 If the top of the stack is a word representing a noun, push its plural form. Deletes your computer if it is uncountable.
Q 26 Turns on quiet mode, now nothing will be printed onto the screen.
R 27 Launch Roblox.
S 28 Push the words "sus", "sus", "sus", "amogus" in that order.
T 29 Take a line of input, convert it into a sentence and push it onto the stack. Error if the conversion fails.
U 30 Um, uh, um, uh, um, uh, um... I don't really know what this does.
V 31 Run the instruction directly below the V, if there is one.
W 32 Pop a number, apply Lambert W to it, and convert it into an unsigned integer (negatives become positives).
X 33 X
Y 34 Y are you using this instruction?
¤ 35 Do nothing.
[ 36 While the top of the stack is truthy cool when converted into a coolean...
\ 37 Swap the top two stack values.
] 38 End while.
^ 39 Pop two numbers and push the one with the most letters in toki pona. The number system used is implementation-dependent.
_ 40 Push the string "_" to the stack.
` 41 Do something.
Æ 42 Pop a word and push a copy of it with æ's in it if possible (for example, daemons -> dæmons)
Œ 43 Push an œmpty list to the stack.
44 Push a function which prints "ẞ" to the stack.
. 45 Pop a value and push its string representation, according to ChatGPT.
46 Push the number 6 to the stack.
47 Push an infinite number to the stack.
48 Equivalent to Rs.
49 Equivalent to
Z 50 Finally, we arrived at Z!

At the end of each program, the stack is printed from bottom to top, which these conversions.

Type Description
Number Print its prime factors as ASCII characters mod 50. If it is 0, 1 or infinite, throw an exception saying "lol".
String Just, like, print it.
Coolean Prints an ice cube if it is cool, else nothing.
E Just print the letter E Displays the E meme image.
List Don't print anything, because reasons.
Function Print its decompiled source code, implementation-dependent.
Word Print it translated into a random language on Google Translate.
Sentence Print it translated into Lojban.

Interpreter

no lol