AT

From Esolang
Jump to navigation Jump to search
Not to be confused with @.
This is still a work in progress. It may be changed in the future.

AT (also @ or ATlang) is a stack-based functional minimal one-dimensional language created by User:IQBigBang in May 2019.

Syntax

AT language contains two stacks: command-stack and function-stack. As the interpreter moves, everything automatically gets pushed onto the command-stack. Once the interpreter gets to @ character (hence the name of the language), the last item on the command-stack is pushed onto the function-stack (and removed from the command one).
Until the function-stack is not empty again, interpreter sees every character as a function. Functions take arguments from the command-stack and push results back onto it.

Prebuilt functions

function char arguments action
print p whole stack Prints from the el. stack until it's not empty or the '\0' character is met.
Example Example Example Example
Example Example Example Example

o (Cycle) - Calls the function with name of last item on the function stack. It keeps calling the function, using other stack items as arguments until the stack is not empty (is used to prevent long lines of repeating one function). Only works with functions that take one argument.

B64AIF (Integers)

B64AIF (Base 64 Ascii Integer Format) is a format used to work with numbers in ATlang. All integers are saved in format

<prefix><digits>

where the prefix is a digit from 1 to 9 that tells the interpreter how long the number is
The digits are then in Base64 (see https://en.wikipedia.org/wiki/Base64#Base64_table) with incremental order, i.e. the first digit's value is multiplied by one (64^0), the second digit's value is multiplied by 64 (64^1) and so on. Example:

element stack: 2 j f . . .
  1. The length of the number is 2
  2. The first (zeroth) digit is j, which corresponds to value 35 * 1 = 35
  3. The second (first) digit is f, which corresponds to value 31 * 64 = 1984

This number is therefore equal to 2019.


Examples

Hello world!

Hello world!@@@@@@@@@@@@ppppppppppp

Or a shorter version using cycle function:

pHello World!@@@@@@@@@@@@@o