ULSAL
Jump to navigation
Jump to search
- This is still a work in progress. It may be changed in the future.
ULSAL (ultlang's stack apiolanguage) is a heavily wip stack-based programming language by User:Ultlang.
types
each item of the stack has one of these types:
mrk
/ markerstr
/ stringnum
/ numberfnc
/ function
commands
command | arguments | function |
---|---|---|
` |
0 | pushes a marker to the stack |
0123456789 |
0 | pushes the respective integer to the stack as a num
|
' or ´ |
varies | concatenates items on the stack until a marker is hit. if all components are num s, the result is a num , otherwise it is a str . this, along with both alphabetic characters and spaces pushing themselves, makes `string example' the way to express strings.
|
+-×÷ |
2 | executes the operation on the two top numbers on the stack (95- returns 4). if any of the arguments is not a number, bees may occur, along with apioforms.
|
² |
1 | pushes the top item twice |
ⁿ |
2 | pushes the top item [floor of second from top item value] times. if that value is not a number, bees could arise, followed by beeoids. |
⌁ |
1 | "splits" the top item on the stack. this has varying behavior depending on the type and characteristics of the item:
|
· |
0 | does nothing (as opposed to the space, which does ¬nothing) |
[…] |
bees | pushes anything between the brackets as a fnc . works as matching brackets, not the first ] after the [ : a[b[c]] should make the stack a: str; b[c]: fnc .
note that as opposed to |
ε |
1 | executes the code in the top stack item. if it's not a function item, bees will happen, and apioids might too. |
ᵋ |
2 | executes the code in the top stack item [floor of second from top item value] times. if it's not a number or the top item is not a function, bees can be expected to take place, and apēs melliferæ could as well. |
ℓ |
0 | pushes the stack length as a number |
σ |
2 | swaps the last two items of the stack |
any other | 0 | pushes the character to the stack as a str
|
implementations
there are approximately "0" implementations of ulsal. sina ale li utterly trolled