Sus

From Esolang
Jump to navigation Jump to search

Sus is an esoteric programming language that is turing complete; it is an alternative BrainFuck. This was something user "iGottic" made in free time originally on the Roblox platform, but eventually decided to port it to the love2d framework in another set of free time for non-robloxians.

Similar to BrainFuck, it is based on an array and pointer. The pointer moves across an array and may increment/decrement values, and output that value as an ASCII character.

How it's Written

Sus is written with five symbols, which are documented below:

<SYMBOL> Meaning
> Move pointer one spot forward in the array
< Move pointer one spot backward in the array
+ Add to current pointer value
- Subtract to current pointer value
$ If current pointer value is 0, skip past the next "!"
! Go back to the previous "$"
| Convert the current pointer value to ASCII and add to output string

Any and all other characters are ignored when the program is compiled.

At the end of the code read, the interpreter prints the final output.

THE POINTER VALUE IS 97 BY DEFAULT! In a sense, this means each value in the pointer array will equal "a" as an ASCII value by default.

Example: Printing "Hello world!"

"Hello world!" can be printed with the following input:

-------------------------|>++++|>+++++++++++||>++++++++++++++|>-----------------------------------------------------------------|
>++++++++++++++++++++++|<<|>>>+++++++++++++++++|<<<<|>>>>>+++|>----------------------------------------------------------------|

Here is it broken down:

  • -------------------------| Go back to the ASCII value for "H," and add to output
  • >++++| Go forward a cell, go to the ASCII value for "e," and add to output
  • >+++++++++++| Go forward a cell, go to the ASCII value for "l," and add to output
  • | The current pointer already equals "l," so just re-add it to the output
  • >++++++++++++++| Go forward a cell, go to the ASCII value for "o," and add to output
  • >-----------------------------------------------------------------| Go forward a cell, go to the ASCII value for space, and add to output
  • >++++++++++++++++++++++| Go forward a cell, go to the ASCII value for "w," and add to output
  • <<| A couple cells ago, we already defined the letter "o," so go back to it and print it
  • >>>+++++++++++++++++| Go forward three cells, go to the ASCII value for "r," and add to output
  • <<<<| We already defined a value for "l," so go back to that cell and print that value
  • >>>>>+++| Go forward five cells, go to the ASCII value for "d," and add to output
  • >----------------------------------------------------------------| Go forward a cell, go to the ASCII value for "!," and add to output

Example: Printing "sus" (obfuscated)

Here is some code that prints "sus"

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣴⣆⣠⣤⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣻⣿++⠹⣧⣤⡀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠿⢿⣿⣷⣾⣯⠉⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿+⣿⡍⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⠁⠀⠘⣿⣆⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡟⠃⡄⠀⠘⢿⣆⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾+⣁⣋⣈ +++⣧⡀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠++++++++++⣦⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⡿⠉⠙⠛⠛⠛⠛⠻⢿⣿⣷⣤⡀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⠋⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⠈⢻+|⣿⡄⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣸⣿⡏⠀⠀⠀⣠+⣾⣿⣿⣿⠿⠿⠿⢿⣿⣿⣿⣄⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣿⣿⠁⠀⠀⢰⣿⣿⣯⠁⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⣷⡄⠀
⠀⠀⣀+|⣴⣶⣶⣿⡟⠀⠀⠀⢸⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣷⠀
⠀⢰⣿⡟⠋⠉⣹⣿⡇⠀⠀⠀⠘⣿⣿⣿⣿⣷⣦⣤⣤⣤⣶⣶⣶⣶⣿⣿⣿⠀
⠀⢸⣿⡇⠀⠀⣿⣿⡇⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠀
⠀⣸⣿⡇⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠉⠻⠿⣿⣿⣿⣿⡿⠿⠿⠛⢻⣿⡇⠀⠀
⠀⣿⣿⠁⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣧⠀⠀
⠀⣿⣿⠀⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀
⠀⣿⣿⠀⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀
⠀⢿⣿⡆⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⡇⠀⠀
⠀⠸⣿⣧⡀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠃⠀⠀
⠀⠀⠛--⣿⣿⣇⠀⠀⠀⠀⠀⣰⣿⣿⣷⣶⣶⣶⣶⠶⠀⢠⣿⣿⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⣿⣿⡇⠀⣽⣿⡏⠁⠀⠀⢸⣿⡇⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⠀⣿⣿⡇⠀⢹⣿⡆⠀⠀⠀⣸⣿⠇⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⢿|⣦⣄⣀⣠⣴⣿⣿⠁⠀⠈⠻⣿⣿⣿⣿⡿⠏⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠈⠛⠻⠿⠿⠿⠿⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀


Running the code