Betray

From Esolang
Jump to navigation Jump to search

Betray is an esolang created by User:Anothaccount. It's designed to scramble the code right before it is executed, which makes it really difficult for programming. Betray also has commands that modify the code in different ways. Note that there is a varying chance the code will run correctly depending on how long the code is.

Commands

Command Description
+ Increment
- Decrement
* Multiply the increment by 2
/ Divide the increment by 2
= Outputs the increment as a number
0 Zeroes the increment
^ Negates the increment
i Gets input from the user and outputs it
! Gets input and sets it as the increment
@ Sets the increment to a random number from 0 to 100
H Halts the program
? Has a 50/50 chance to either halt the program or do nothing
| Outputs the increment as an ASCII character
C Clears the output
% Adds a random command to the code
$ Changes a random command from the code to another one
# Changes every command from the code to a random one
X Removes a random command from the code

Examples

Countdown

(has a 1/16 chance to work properly)

+++++=-=-=-=-=-=

Random Number

(1/2 chance)

@=

One Time Cat

(will always work, because it's only one character)

i

Hello World

(1/151 chance)

++++****++++++++|0+++++++++++++***---|+++++++||+++|0+++++***++++|0++****|0+++++****+++++++|0+++++++++++++***---++++++++++|+++|------|--------|0++****+|

Implementations

Official scratch interpreter