NGGYU

From Esolang
Jump to navigation Jump to search

nggyu is a golfing programming language created by an unknown person. It is designed to Rick roll people.

instructions

   12.55: push that number on the stack.
   "String": push that string.
   i: input a string and push it to the stack
   n: input a number and push it to the stack
   o: output top of stack popping it
   +: add top two stack values. If strings, concatenate instead.
   -: subtract (pop a, b, push b-a)
   *: multiply
   /: divide
   %: module
   ^: exponentation
   $: sine function
   à: absolute value
   ä: floor
   ã: ceiling
   å: remove top of stack and push 0
   ,: digital root
   ;: duplicate
   :: swap
   #: pop
   p: primality test, 1 if true, 0 if false
   S: Pop String a and number b, push character b of a (0 indexed)
   L: push length of top string
   I: if top of stack is not 0
   W: while top of stack is not 0
   =: equals, pop a, b, push 1 if a==b 0 otherwise
   <: greater than
   >: less than
   !: logical not
   (: infinite loop
   h: push “Hello World”
   q: push “q”
   N: push 99 bottles of beer
   a-f: push 10-15
   æ: push 16
   g: push 17
   î: push 18
   į: push 19
   A: push 20
   Å: push 32
   B: push 42
   C: push 64
   Ç: push 69 (nice)
   Ć: push 100
   D: push 420 (nice again)
   E: push e
   P: push pi
   Q: if top of stack is “iQ”, push 1, else push 0
   À: push 1000
   Á: push 1000000
   Æ: push 2147483647
   Ã: push 9007199254740991
   Ā: push 9999999999999999999999999999
   H: end the program
   ?: break
   ¥: continue
   ): end loop or if statement
   {: convert number to Unicode character
   }: convert Unicode character to number
   Ń: convert top of stack to number
   Ś: convert top of stack to string
   Ē: interpret top of stack as brainf*** and push output string.
   There is an implicit output at the end of the program, but if the stack is empty,
   it prints the never gonna give you up lyrics.

computational class

Turing complete, since the Ē command can interpret brainf***.

examples

Hello World

   h

Never Gonna Give You Up
An empty program prints never gonna give you up.