/gɹəʊguː/
Jump to navigation
Jump to search
/gɹəʊguː/ is an esoteric programming language created by User:PythonshellDebugwindow.
Memory
/gɹəʊguː/ uses two unbounded signed integer registers: nr (Number Register) and dm (Deep Memory). Each is initially set to zero.
Commands
| Command | Meaning |
|---|---|
[ |
Output [no output]
|
; |
Input a signed integer into nr; if the input was not a valid integer, then instead set nr to zero |
] |
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 if nr is less than zero |
, |
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 |
Each character is considered to be its own command, with the exception of & followed by a digit. Unrecognised commands are ignored.
Examples
Truth-machine
;{-<![}+,}<!]?
Integer cat program
Halts when a non-positive or invalid integer is entered.
<{![}+!,;{<!]?
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{-<![}<{+,-}<!]?
The following is an alternative countdown which stops at one instead of zero.
;{-<![}+,}<{<!]?
External resources
- 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.
- An interpreter written in Node.js