Brit
Jump to navigation
Jump to search
Brit is are an esolang created to be cool looking
Brit are stack based and suport variables
you write brit code using tildas(~) and lines to separate commands,
you need the bar (|) at the beginning of each sentence, which tells the interpreter to execute the line, if it doesn't have it, it will be a comment
brit commands are:
command | description |
---|---|
/ | push the all leters in the line into the stack[last] |
? | push a nutonian number onto the stack[last] until it touches another one ? command |
\ | redifine stack[last-1] command of brit to stack[last] |
bar | allow brit to run the line code |
. | print the last item of stack |
> | discard the stack[last]item |
! | split stack[last-1] by stack[last] |
J | join stack[last-1] with stack[last] |
' | join the list stack[last-1] into one word with stack[last] between the letters |
T | reverse the stack |
Y | push the stack[last] reversed |
T | reverse the stack |
Y | push the stack[last] reversed |
{ | run the stack[last] as brit code |
R | run the comand writen(util for functions) |
% | pick input |
@ | push stack[last] ascii code |
" | push stack[last] ascii letter |
[ | create var stack[last] |
= | set var stack[last-1] to stack[last] |
] | remove var stack[last] |
< | jump to line stack[last] if stack[last - 1] = stack[last - 2] |
H | halt the program |
¹ | push label[line of label + 1] into labels |
² | go to label stack[last] item of labels |
L | pop the stack[last] and move it to stack[first] (simply, shift rotate stack to the left) |
F | push the stack[last] as flatten |
K | same as C, but keep the stack[first] |
} | do aritmatic of stack[last-1] and stack[last] (-+*/%) |
( | set var stack[last] to an empty list |
) | push stack[last-1] to stack[last] list var |
: | pop stack[last] list var and push-it |
; | push stack[last] var value |
X | push stack[last], replacing stack[last-2] with stack[last-1] at stack[last] |
|~/~Hello World! |~.
Cat:
|~% |~.
|~% |~?~1 |~?~9 |~< |~K |~. |~H | |~C |~¹ |~?~1 |~. |~²
nutonian is a number system who use $, & and ^ and you sum all digits in the line
^ - maps 2^number in line
$ - maps 10 ^ number in line
& - maps 2 * number in line
in the final, sum all lines
in brit, you use _ as the line
examples:
123 - 6
8&& - 32
$2_$1_1 - 111
link to it on Snap!: [1]