/gɹəʊguː/

From Esolang
Jump to navigation Jump to search

/gɹəʊguː/ is an esoteric programming language by User:PythonshellDebugwindow.

Memory

/gɹəʊguː/ uses two signed unbounded integer registers: nr (Number Register) and dm (Deep Memory).

Commands

Command Meaning
[ Output [no output]
; Input an integer to nr (set nr to 0 for an invalid integer)
] Jump to after the previous [ (or to the start of the program if there are no previous [s) after appending [ to the end of the program
&d Add d to nr (d must be a digit from 0 to 9)
< Decrement nr
! Skip the next command iff nr < 0
, Print the result of floor dividing nr by 2
+ Add nr to nr
- Subtract nr from nr
{ Set dm to nr
} Set nr to dm
? Halt the program

Examples

Truth-machine

;{-<![}+,}<!]?

Integer cat program

Halts on input 0 or an invalid integer. This program is similar to the truth-machine program, as it essentially just takes another input and uses { instead of }.

;{-<![}+,;{<!]?

Countdown

The following program expects a nonnegative user input and prints the numbers starting from the same down to zero. For a negative start value only the input itself will be printed.

;&1{-<![}<{+,-}<!]?

Interpreter

  • Common Lisp implementation of the /gɹəʊguː/ programming language. Please note that the concrete character set deployed constitutes a dependency on the Common Lisp implementation; in corollary, Unicode support may or may not be a feature incorporated in the personal environment. The interpreter at hand has been developed and tested with Steel Bank Common Lisp (SBCL) version 1.1.4 as part of the Lisp Cabinet 0.3.5 bundle.