AGG

From Esolang
Jump to navigation Jump to search
AGG
Paradigm(s) Stack
Designed by User:mmph
Appeared in Category:2023
Computational class Turing complete
Major implementations Private
File extension(s) .agg

AGG, (pronounced "AAUUGHH!!!!") is a programming language created by mmph, meant to work like a DNA Strand, except that the codons' real purpose mean nothing in this context and only their abbreviations do.

A command is written as a "codon". A codon is a 3 letter combination that can only consist of A, C, T, and G. A codon can ONLY BE 3. If it is not it is ignored, or if it is after a "Push" (explained later) turned into "AAA". All codons are separated by whitespace.

AGG has 14 codons.

Codon Abbreviation Command Name Command Action
C Cout (Pop) Pops the top codon from the stack and prints it as a letter with its ascii value.
I Input Takes input from the keyboard, then for every character push's its ascii value to the stack.
P Push Push's the next codon as a number (explained later).
A Add Pops the two top codons from the list, then push's their (+) value.
S Sub Pops the two top codons from the list, then push's their (-) value.
M Multiply Pops the two top codons from the list, then push's their (×) value.
H Modulus Pops the two top codons from the list, then push's their (%) value.
D Divide Pops the two top codons from the list, then push's their (÷) value.
V Copy Push's the codon on the top of the stack.
T Turn (Reverse) Reverses the stack.
F Forget Pops the top codon from the stack and push's it to the memory stack.
R Remember Pops the top codon from the memory stack and push's it to the stack.
L Loop Checks if the codon on top of the stack is 0, if it is, it sets the current instructor to its corresponding "Stop" codon.
Stop Stop (End Loop) Checks if the codon on top of the stack is 0, if it is not, it sets the current instructor to its corresponding "Loop" codon.

If the codon is "Push", then it takes the codon after that and turns it into an integer. It does it with this algorithm.

It takes its letters and turns them into numbers with:

  • A turns into 0.
  • C turns into 1.
  • T turns into 2.
  • G turns into 3.

Then it converts it from base-4 to decimal. (Example: TCG -> 213 -> 39).

Programs

So far, there are have only be 3 programs written in AGG.


Hello World

This program prints "Hello, World!" to the console.

CCT TCA CCC AAT ATG TGT CCA GAT CCG AAT ATG CCT AAC GCT TGC CCC GCT CCA
AAT ATG GTT GTC GTA TGT TGC CCG AAG GCC GTG TGT CCT TGA TGC CCC TAA TGT
CCA CGC CCG AAG ATG TGC GTT TGT CCT AAG GCA TGC TGT CCT GAT CCC AAT ATG
TGC CCA TAC TGT

Cat

This program takes in input and then prints out out again.

ATA
CCT AAA
ACC
CTT
	TGT
TAA

Truth machine

If you give it a 0, it prints a 0, if you give it a 1, it prints 1 indefinitely.

ATA
CCT GAA
TCC
CTT
	CCT AAC
	CCT GAA
	GCC
	TGT
TGA
CCT GAA
GCC
TGT

Interpreter

I will release it soon, I do not know when. Yes I have coded it.