UnnumericJS
Jump to navigation
Jump to search
UnnumericJS is an esolang create by User:None1 and inspired by MangularJS and JSFuck. It is JavaScript, but if your program includes digits (the characters 0
~9
), the program raises a syntax error.
Examples
Hello World
console.log('Hello World')
Truth Machine
function truth_machine(input){ if(input==!''+!!''){ while(!''){ console.log(!''+!!''); } }else{ console.log(!!''+!!''); } }
Since JavaScript has no input, UnnumericJS also has no input, so you have to pass !!''
for 0 and !''
for 1 to the truth_machine
function.
Raise a syntax error
0
Interpreter in JavaScript
function unnumericjs(code){ for(let i of '1234567890'){ if(code.includes(i)){ throw new Error('Syntax error'); } } eval(code); }
Turing completeness
We can use !!''+!!''
for 0 and !!''+!''
for 1, and therefore we can represent any number. Using String.fromCharCode
, we can represent any string, and finally, we can use eval
to run any JavaScript code. As a brainfuck interpreter is written in JavaScript, JavaScript is Turing complete, so UnnumericJS is also Turing complete.