COPY WITH @
Jump to navigation
Jump to search
COPY WITH @ or CW@ is a esolang(made by User:Yayimhere) where you copy values of a stack and increment and decrement them. the stack starts with a 1 on it.
symbol | description |
---|---|
@ | copy top of stack |
# | discard top of stack |
! | output the top of the stack. does not pop the value |
; | output the top of the stack as a ascii char |
+ | increment top of the stack |
- | decrement top of stack |
? | take user input and push onto stack |
{ | jump to corresponding } if the top of the stack is a 0 |
} | jump to corresponding { if the top of the stack is not 0 |
↷ | put the top of the stack to the bottom |
Examples
here are some examples:
truth-machine
?{!}!
and a lot longer one:
-@@+↷↷+{↷{↷↷↷↷+↷↷+↷↷↷-}↷↷↷↷{↷↷+↷↷↷↷-}↷↷{{-}↷↷↷↷#?↷↷↷↷↷↷↷↷+↷↷↷↷↷↷+↷↷↷↷{↷↷{-}↷+↷↷↷↷↷↷-}↷↷↷{↷↷↷↷↷↷+↷↷↷-}↷↷{↷↷↷{-}↷↷{-} ↷↷↷↷↷↷↷↷↷↷↷↷↷↷↷↷{↷↷↷↷↷↷↷↷+↷↷+↷↷↷↷↷↷↷↷↷↷↷↷↷↷-}↷↷↷↷↷↷↷{↷↷↷↷↷↷↷↷↷↷↷↷↷↷+↷↷↷↷↷↷↷-}↷↷{-}}↷↷↷↷↷↷↷↷↷↷↷↷{-}↷↷↷↷↷↷}↷↷↷{↷↷↷↷+↷↷+↷↷ ↷-}↷↷↷↷{↷↷+↷↷↷↷-}↷↷{{-}↷↷↷↷{;}}↷↷+↷↷+↷↷{↷↷↷↷-↷↷+↷↷↷-}↷↷↷↷↷↷{↷↷↷+↷↷↷↷↷↷-}↷{-↷↷+↷↷{↷↷↷↷↷↷-↷↷+↷-}↷↷{↷+↷↷-}↷↷↷↷{↷-↷↷ {-}}↷{↷↷↷+↷↷↷↷↷↷-}↷}↷↷↷↷{-}↷↷↷↷{↷↷↷↷+↷↷+↷↷↷-}↷↷↷↷{↷↷+↷↷↷↷-}↷↷{{-}↷↷↷↷;↷↷}↷↷↷{↷↷↷↷+↷↷+↷↷↷-}↷↷↷↷{↷↷+↷↷↷↷-}↷↷{{- }↷↷↷{-}↷↷{-}↷↷↷↷}↷↷}
-@@++{------↷↷+↷}↷↷-@;{@:}
Computational class
COPY WITH @ is Turing-complete because it can almost directly implement all the commands of 3-cell brainfuck (at the start of the program it is easy to create a stack of 3(-@@) cells with the value 0, then < can be implemented as ↷ and > can be implemented as ↷↷, with the other commands having direct equivalents as one- or two-command combinations (substitution system)).
External resources
Github repo for an interpreter(the ; command doesn't work for some reason if you can fix it plz do)