Do something

From Esolang
Jump to navigation Jump to search

Do something is an esolang by User:Yoyolin0409. Its inspiration comes from a variety of other programming languages, including: INTERCAL, Brainfuck, Light Pattern, Velato, Malbolge, Whitespace, Piet, Olympus, Shakespeare, Chef, Chicken, Folders, Bodyfuck, spookylang, P′′.

What can it do?

Just do something:<section_name>

Switching to different sections is possible, and multiple entries can be added to switch between sections.

Do job

Do get <var1>'s document <expression>

Define variables

Do hidden the <var1>, <var2>..., <varx-1> and <varx>'s document

Push variables on stacks

Do retrieve the <var1>, <var2>..., <varx-1> and <varx>'s document

Pop variables from stacks

Do your job:<label> next

Jump to command, save return address on an 80-address stack

Do replace <expression>

Pop <expression> return addresses, jump to the last one popped

Do forget <expression>

Pop <expression> return addresses and discard them

Do abstain from <label1>, <label2>..., <labelx-1>, <labelx>

Don't execute the referenced line / lines

Do ignore <label1>, <label2>..., <labelx-1>, <labelx>

Make a variable read-only, silently ignoring writes

Do remind <label1>, <label2>..., <labelx-1>, <labelx>

Cancel out an ignore

Do write in <var1>

Input, using digits spelled out as words

Do read out <var1>

Output, in butchered Roman numerals

Do say please

You must have 1/10 to 1/3 of this code.

Do get coffee
Do kill computer

End Program
Regarding something in this section:
The 16-bit unsigned integer, written with a spot (.) followed by a number
The 32-bit unsigned integer, written with a two-spot (:) followed by a number
The array of 16-bit unsigned integers, written with a tail (,) followed by a number
The array of 32-bit unsigned integers, written with a hybrid (;) followed by a number
This section has five operators (not counting SUB). Symbols for the operators vary;
the following symbols are the ASCII versions (INTERCAL was originally written for EBCDIC).

"almost" (binary, called select)
Only bits in the left operand corresponding to set bits in the right operand are used to affect the result, and these bits are justified towards the least significant and padded with zeros. For instance, #12 ~ #5 (1100 and 101 in binary) is 10 (the 22 and 20 bits of #12). The return type of select is supposed to be 16 bits wide if there were fewer than 16 bits selected, and 32 bits wide otherwise. However, some compilers simply copy the type of the right-hand operand, so portable INTERCAL code should ensure it works in both cases.
"dollar" (binary, called mingle)
Bits are alternated from the left and right operands, with the least significant bit of the right operand becoming the least significant bit of the output. The return type is always 32 bits wide; an error results on overflow. (The sign for cent (¢: c, backspace, /) was used in EBCDIC; at least one modern compiler accepts a much wider range of currency symbols).
"value" (unary OR)
"question" (unary XOR; EBCDIC ∀: V, backspace, -)
"together" (unary AND)
There are three unary logic operators. Each operates on consecutive bits of the input; the 20 and 21 bits give the 20 bit of the output, and so on. The most significant bit of the output, which is as wide as the input, is obtained by combining the most and least significant bits of the input with the appropriate logical operation.

This section's Hello, world!

Do get SUB's document ,1 <- #13
Do say please
Do get SUB's document #,1 <- #238
Do get SUB's document #,2 <- #108
Do get SUB's document #,3 <- #112
Do get SUB's document #,4 <- #0
Do get SUB's document #,5 <- #64
Do get SUB's document #,6 <- #194
Do say please
Do get SUB's document #7 <- #48
Do get SUB's document #,8 <- #26
Do get SUB's document #,9 <- #24
Do say please
Do get SUB's document #,10 <- #168
Do get SUB's document #,11 <- #24
Do get SUB's document #,12 <- #16
Do get SUB's document #,13 <- #162
Do say please
Do read out SUB
Do say please
Do get coffee
Do kill computer

Do craft

This section operates on an array of memory cells, each initially set to zero. The array was 30,000 cells long. There is a pointer, initially pointing to the first memory cell. <things> are useless, The commands are:

Do pick up <things>

Move the pointer to the right

Do lay down <things>

Move the pointer to the left

Do add in <things>

Increment the memory cell at the pointer

Do remove <things>

Decrement the memory cell at the pointer

Do complete phase

Output the character signified by the cell at the pointer

Do see the instruction manual

Input a character and store it in the cell at the pointer

Do examine

Jump past the matching "Do try out" if the cell at the pointer is 0

Do try out

Jump back to the matching "Do examine" if the cell at the pointer is nonzero

This section's Hello, world!

Do add in wood
Do add in wood
Do add in wood
Do add in wood
Do add in wood
Do add in wood
Do add in wood
Do add in wood
Do examine
Do pick up wood
Do add in wood
Do add in wood
Do add in wood
Do add in wood
Do examine
Do pick up wood
Do add in wood
Do add in wood
Do pick up wood
Do add in wood
Do add in wood
Do add in wood
Do pick up wood
Do add in wood
Do add in wood
Do add in wood
Do pick up wood
Do add in wood
Do lay down wood
Do lay down wood
Do lay down wood
Do lay down wood
Do remove wood
Do try out
Do pick up wood
Do add in wood
Do pick up wood
Do add in wood
Do pick up wood
Do lay down wood
Do pick up wood
Do pick up wood
Do add in wood
Do examine
Do remove wood
Do try out
Do remove wood
Do lay down wood
Do try out
Do pick up wood
Do pick up wood
Do complete phase
Do pick up wood
Do remove wood
Do remove wood
Do remove wood
Do complete phase
Do add in wood
Do add in wood
Do add in wood
Do add in wood
Do add in wood
Do add in wood
Do add in wood
Do complete phase
Do complete phase
Do add in wood
Do add in wood
Do add in wood
Do complete phase
Do pick up wood
Do pick up wood
Do complete phase
Do lay down wood
Do remove wood
Do complete phase
Do lay down wood
Do complete phase
Do add in wood
Do add in wood
Do add in wood
Do complete phase
Do remove wood
Do remove wood
Do remove wood
Do remove wood
Do remove wood
Do remove wood
Do complete phase
Do remove wood
Do remove wood
Do remove wood
Do remove wood
Do remove wood
Do remove wood
Do remove wood
Do remove wood
Do complete phase
Do pick up wood
Do pick up wood
Do add in wood
Do complete phase
Do pick up wood
Do add in wood
Do add in wood
Do complete phase