¯\_(ツ)_/¯
Jump to navigation
Jump to search
Paradigm(s) | imperative |
---|---|
Designed by | Randairox |
Appeared in | 2018 |
Memory system | tape-based |
Computational class | Turing complete |
Reference implementation | Original JS script |
File extension(s) | .shr , .sh , .¯\_(ツ)_/¯ |
¯\_(ツ)_/¯ (or shruglang) is based on the concept of a memory-dynamic language.
Overview
Just as brainfuck, it operates in an array of cells, which have an ASCII value each.
Command | Description |
---|---|
\
|
Go to previous cell |
/
|
Go to next cell |
+
|
Add one unit to the current cell |
-
|
Subtract one to the current cell |
$
|
Print the value as an ASCII character. |
_
|
Input a character, encode it, and add make it the cell |
{
|
For loop until the referenced cell is 0 |
}
|
Repeat if the cell is not 0, end otherwise |
%
|
? |
@
|
Erase all cells |
Example
¯\_(ツ)_/¯ is capable of printing "Hello World!" as following:
++++++++++ |^ Make a counter ^|
{ |^ Initialize a loop ^|
/ |^ Move ONE cell forward ^|
+ |^ Add ONE unit to the current cell
/
+++
/
+++++++
/
++++++++++
\ |^ Move ONE cell backwards ^|
\
\
\
- |^ Subtract ONE unit to the current cell ^|
} |^ End loop ^|
/
/
/
++
$ |^ Print equivalent ASCII character ^|
/
+
$
+++++++
$$
+++
$
\
\
++
$
/
+++++++++++++++
$
/
$
+++
$
------
$
--------
$
\
\
+
$
@ //end program