*$@(^$)!
Jump to navigation
Jump to search
- $@(^$)! is an esolang created by User:cleverxia (this should* be the 1st time I've create
23 languages in a day). It is made to make it very hard to do anything.
Program flow
let program be x0x1...xn. Define f(x)=((the character code of x)*91+114514)*77.
We first construct the command list L=((f(x0)mod 256,(f(x1)+1)mod 256),(f(x1)mod 256,(f(x2)+2)mod 256),...,(f(xn-1)mod 256,(f(xn)+n)mod 256))=(L1,...,Ln)
Then, we turn each Li=(a,b) into a command:
- let c:=(a*b+191980)mod 256
- let d:=(b3-35)mod 256
- let e:=((c mod 16) xor (a mod 16))2
- let c'=((c-e)mod 256)xor a, d'=((d*e)mod 256)xor a
- let g(x)=(sum of positions of 1 in the binary representation of x)mod 10. positions start at LSB=1, so g(0b1001100)=(3+4+7)mod 10=4.
- index into the table below: (Anything with "Example" are actually NOPs, but two of them appearing together are a syntax error)
| g(c'+d)\g(d'+e+c) | 3 | 7 | 6 | 0 | 4 | 1 | 9 | 2 | 8 | 5 |
|---|---|---|---|---|---|---|---|---|---|---|
| 4 | # |
S |
Example | Example | Example | ] |
Example | Example | Example | [
|
| 3 | Example | Example | , |
Example | Example | Example | Example | Example | Example | Example |
| 1 | Example | - |
Example | Example | Example | Example | > |
Example | Example | Example |
| 7 | Example | Example | Example | ] |
Example | . |
Example | Example | Example | Example |
| 9 | L |
Example | Example | Example | Example | Example | Example | Example | Example | :
|
| 2 | Example | Example | + |
> |
Example | Example | Example | Example | Example | Example |
| 6 | Example | Example | Example | Example | Example | E |
[ |
Example | Example | Example |
| 0 | - |
Example | Example | S |
Example | Example | Example | Y |
+ |
Example |
| 5 | Example | Example | Example | Example | Example | & |
Example | Example | Example | Example |
| 8 | Example | Example | @ |
Example | < |
Example | < |
Example | Example | Example |
then concatenate these commands together, and implement them in a sub-language called Brainstam.(I'll add a new page for this. Sometime.)
| Command | Meaning |
|---|---|
<>+-[],. |
Same in brainfuck but <> needs current cell to be zero
|
Y |
Raises a runtime error |
: |
Interprets Nil |
S |
Raises a syntax error |
@ |
toggles the tape (there are 2 tapes with the odd-numbered cells shared but even-numbered cells independent) |
& |
swap current cell with register |
E |
execute the first command in the extended command list, which starts out at [b, k, f, c, h, e, a, j, i, g, d]
|
L |
shift the leftmost command in the Extended command list to the right, then if current cell is zero, faro shuffle the list |
# |
set current cell to register |
| Extended commands | meaning |
a |
push current cel to the stack |
b |
shift stack up |
c |
reverse the stack except top of stack |
d |
Runtime error |
e |
APLWSI interpreter |
f |
shift stack down |
g |
pop stack to current cell |
h |
NOP |
i |
duplicate top of stack |
j |
same as L
|
k |
Nope. Interpreter |
Computational class
We don't know. In fact, we maybe will never know.
Interpreter
debugmode=2 //1: primt resulting code; 0: run the code
input='abcdefgh';
code=new Uint8Array([
17,13,43 //input code here, in hexdump
]).map(e=>e*95+170);Q=[new Uint8Array(code.length-1),new Uint8Array(code.length-1)];for(i=1;i<code.length;i++)Q[0][i-1]=code[i-1],Q[1][i-1]=code[i]+i;
let S='',P=new Uint8Array(5);function g(x){return[...x.toString(2)].reverse().map((e,t)=>[e,t+1]).filter(p=>+p[0]).
map(e=>e[1]).reduce((a,v)=>a+v)%10}const TABLE=
`SOY-X3c1+i|N!pa_74-w>|>9H*mQ+{'$|wj_7!X,z12|o]1#X[)Sy0|k&t'"h^Z4=|1E%9w_1iV[|].UCU=bqk(|Gj?D<q@='<|$D*LW:GH(H`.
split`|`;for(i=0;i<Q[0].length;i++){P[0]=Q[0][i]*Q[1][i]+191980;P[1]=Q[1][i]*Q[1][i]*Q[1][i]-35;P[2]=(P[0]&15)^(Q[0][i]&15);P[2]*=P[2]
P[3]=P[0]-P[2];P[3]^=Q[0][i];P[4]=P[1]*P[2];P[4]^=Q[0][i];S+=TABLE[g(P[3]+P[1])][g(P[4]+P[2]+P[0])];}
if(debugmode)console.log(S);
if(/[^[\-+<,.>#&@S\|LEY\]:]{2}|S/.test(S))throw 'syntax ERROR';
C=`t={CT:0,ptr:0,sw(){this.CT^=1},r(){this.ptr++},l(){this.ptr--},g(){return(this.ptr%2?
this[this.ptr]:this[this.ptr+';'+this.CT])||0},
s(v){if(this.ptr%2)this[this.ptr]=v;else this[this.ptr+';'+this.CT]=v;}};L=[...''bkfcheajigd'];$={h:_=>0,k:_=>0,}
function Ch(){L.push(L[0]);L=L.slice(1);if(!t.g())L=[L[1],L[3],L[5],L[7],L[9],L[0],L[2],L[4],L[6],L[8],L[10]]}EX={
h:_=>0,k:_=>console.log('Nope.'),j:Ch,a(){stk.push(t.g())}b(){stk.push(stk[0]);stk=stk.slice(1);}
,c(t){t=POP();stk=stk.reverse();stk.push(t)},d(){throw"runtime ERROR from extended d command"},
e(){stk.push(t.g())},f(h){h=POP();stk=[h].concat(stk)},g(){t.s(POP())},i(i){i=POP();stk.push(i);stk.push(i)}
};stk=[];function POP(){return+stk.pop()||0;}REG=0;TEMP=0;IST=0;`;for(i of S)C+=({
'+':'t.s(t.g()+1&255);',
'-':'t.s(t.g()-1&255);',
'[':'while(t.g()){',
']':'}','<':'if(!t.g())t.l();','>':'if(!t.g())t.r();',
'.':'process.stdout.write(Buffer([t.g()]));',',':'t.s(input.charCodeAt(IST++)||0);',
Y:'throw"runtime ERROR from Y comand";','@':'t.sw();','&':'TEMP=REG;REG=t.g();t.s(TEMP);',
'#':'t.s(TEMP);',E:'EX[L[0]]``;',L:'Ch``;'
}[i])??'';if(!debugmode)eval(C)
if(2==debugmode)console.log(C);