AGL
Jump to navigation
Jump to search
Intro
AGL was made by user:helpeesl on April 19 2025 and was inspired by APL, and trying to be a minimalist golfing language.
Commands
AGL’s commands have 2 forms based on how many inputs the have.
1 input
| Symbol | Input |
|---|---|
| + | takes the absolute value of the input |
| - | multiplies the input by -1 |
| * | takes the square of the input |
| / | takes the square root of the input |
| & | takes the floor of the input |
| ⎸ | takes the ceiling of the input |
| = | if the top of the stack is less than the imaginary part of the input go to the real part of the input’th character and pop the top of the stack |
| < | takes the sign of the real part of the input |
| > | takes the sign of the imaginary part of the input |
| ‘ | inputs a string with the length of the imaginary part of the input+1 or less the real part of the input times if the real part is positive, otherwise input a number the real part * -1 times |
| , | pops the absolute of the real part characters on the top of the stack |
| : | duplicates the top item of the stack the absolute value of the input times |
| ~ | flips the top absolute of the input items of the stack |
| } | uses the variable at the location of the input |
| { | pushes the variable at the location of the input onto the stack and set that variable to 0 |
| i | takes the input and multiplies it by the positive square root of -1 |
| j | takes the input and multiplies it by the negative square root of -1 |
| $ | gets the absolute value of the input’th item of the stack |
| @ | gets the stack length times the input |
2 input
| Symbol | Procedure to the input before(a) and the input after(b) |
|---|---|
| + | a+b |
| - | a-b |
| * | a*b |
| / | a/b |
| & | the minimum of a and b |
| ⎸ | the maximum of a and b |
| = | if a = b push 1 onto the stack, otherwise push -1 |
| < | if a < b push 1 onto the stack, otherwise push -1 |
| > | if a > b push 1 onto the stack, otherwise push -1 |
| ‘ | pushes B(until linebreak) as a string a times onto the stack if a is positive and b as a number negative a times onto the stack if a is negative |
| , | outputs and pops the ath item of the stack as a string b times if b is positive and as a number negative b times if b is negative |
| : | nothing |
| ~ | rotates the top absolute value of b items the diagonalised form of a times |
| } | stores a into the variable of the position b |
| { | pulls the absolute value of a’th item of the stack into the variable at position b |
| i | a+(b*i) |
| j | a-(b*i) |
| $ | gets the item at the absolute value of a’th position and multiplies it by b |
| @ | gets the placement of the item of the stack of the bth time of a |
Programs
BCT interpreter
-1’1:}i1+1:’-1:$1}}i1=1:}}i1=0:$1|$2:=5:0}i1:}i1+1}i1:}}i1=0:=85:}}i1=1:=96:1=1:125:@1,1’1:=45:}i1+1}i1:}}i1}i2:{i2:1=1:=45:~@1:1,-1:-1’1:=129
Cat program
i1/0+1}1:’}1:1,1
Hello world
1’Hello, world! 1,1
Fibonacci
-4’1,-2::-1~3:$1+$2::1,-1:-1’1:=8
Factorial
-4’1,-1:1,-2:1~3:$1+1::-1~4:$1*$2::1,-1:1=1:=13
Truth machine
‘-1::2,-1:=4