Galang!!
Jump to navigation
Jump to search
Galang!! is currently a WIP, so expect changes in the future.
Galang!! is a stack-based esolang created by User:Random.esotera.
Commands
Function | Definition |
---|---|
/text/ | Comments. |
! | Push the value specified after onto the stack. !! pushes 2 of the value specified, !!! pushes 3, and so on. |
/ | Pops the top value of the stack and returns it. Returns 0 if the stack is empty. Adding * after / pops the second to top value, adding ** pops the third and so on. |
, | Outputs the top value of the stack and pops it. |
. | Returns user input as numbers. |
` | Returns user input as characters. |
+ | Increments the value specified after by 1. Adding * after + decreases the increment by powers of 10. |
- | Decrements the value specified after by 1. Adding * after + decreases the decrement by powers of 10. |
'' | Defines string values. |
"" | Defines ASCII values. |
] | Jump to the corresponding [ if the top value of the stack is non-zero. |
[ | Jump past the corresponding ] if the top value of the stack is zero. |
{...} | Returns code put inside, which will not execute. It has the same properties as any value in the stack, except always put () around / when returning it. For example, !!!!{!‘Hi! ’,}(/)(/)(/)(/) would output ‘Hi! ’ 4 times. |
Examples
Cat program
!`,
Hello, World!
!'Hello, World!',
Truth machine
!.[!!/,]
Input 0 or 1.
Looping counter
!1[!/[!"*",]!+/!"10",]
Factorial
!0!!6!/-2[!/**][!!{[!+/***2[!/***]]}!/***!/**!!/!/-[!/**(/****)!/**!!/****3[!/****]]]
Outputs 6!=720.