Punktuation

From Esolang
Jump to navigation Jump to search
Not to be confused with Punctuation.

Punktuation is a 2d programming language, that uses every punctuation symbol. The logo is the shortest program

Lgog

Symbols

Symbols and where to use them
> move right
< move left
^ move up
v move down
+ add the top of the stack, to the second to the top
- subtract
* multiply
/ divide
% mod
. print ascii (will stop after there’s nothing left)
, print number
: start program
; end program
~ if the top of the stack is 0, move up, if not, move down, if 1, keep moving
| randomly move in a random direction randomly random
start, and end, string, and add the ascii number to stack
start, and end, number sequence (example: ‘14 15’ as in coordinates)
@ goto coordinates (top and 2nd to top, in that order)
# add ascii top of stack to coordinates
$ add number top of stack of coordinates
& input (example: &’ to input numbers, &” to ascii)
_ call function (later down)
\ Rotate the stack clockwise if top is 1, if 0 the counterclockwise, else don’t to anything
` start comment
[ start loop
] go to [ if the top of the stack is not 0, if it is then keep going
( loop except while true
) end forever loop
{ subscript/function (can be multi line, like html tags)(also use like this: name{)
} stop the subscript (run like _name)

It automatically starts going right

Examples

Hello world: :>”!drloW ,olleH”............; (i hate apple for making it so that three periods make an ellipsis)

Multi line hello world:

                        v  <
:>”!drloW ,olleH”$1 $13 v >  ;
                        . ~^
                        >-^

Better hello world:

               v<<
               >.^;
:”!drloW ,olleH”^

Randomly choose from two numbers in input:

    >,;
:&'>|<
    >&',;

for example, the input:

1 2

randomly outputs 1 or 2.

Truth Machine:

   ;
   ,
:&’~(,)
   ;

Cat:

 v   < v  <
     ^<.
      ^<
:>&"      ^