We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Template literal madness
Jump to navigation
Jump to search
This is a subset of JavaScript that only allows the [`$=>{}] characters.
As the name implies, encoded programs use lots of template literals. They are used both for string concatenation and for calling functions.
With this language, it's possible to generate arbitrary strings without calling the Function() constructor.
Also, it's possible to pass those strings to the Function() constructor, so it can do anything that JavaScript can, therefore it's Turing-complete.
Examples
Hello World!
[$=>[$=>[$$=>[][$][`${`${$>$}`[$>>$]}${`${$==$}`[[$==$][$>>$]>>$]}${`${{}}`[[$==$][$>>$]>>$]}${`[[[[[[[[[${[$>>$][$>>$][$]}`[`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[$>>$]}`]}`][`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${[`${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${`${{}}`[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${`${{}}`[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${`${{}}`[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${`${{}}`[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${`${{}}`[$>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${`${{}}`[$>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${`${{}}`[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${`${{}}`[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${`${{}}`[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${`${{}}`[$>>$]}${[[$==$][$>>$]>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${`${{}}`[$>>$]}${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[[$==$][$>>$]>>$]}`][$>>$][`${`[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${$$[`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]]}`>>$}`[$>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[${$[$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$==$}`[$>>$]}`]`[`}${[$=>$$=>$[`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${`${`${[$>>$]}${`[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`}${$$}`}`][$>>$][`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${$[$][[][$][`${`${$>$}`[$>>$]}${`${$==$}`[[$==$][$>>$]>>$]}${`${{}}`[[$==$][$>>$]>>$]}${`[[[[[[[[[${[$>>$][$>>$][$]}`[`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[$>>$]}`]}`][`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${[$$=>[][$][`${`${$>$}`[$>>$]}${`${$==$}`[[$==$][$>>$]>>$]}${`${{}}`[[$==$][$>>$]>>$]}${`[[[[[[[[[${[$>>$][$>>$][$]}`[`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[$>>$]}`]}`][`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${[`${`${{}}`[[$==$][$>>$]>>$]}${`[[[[[${$[$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${[][[]]}`[[$==$][$>>$]>>$]}${`${$==$}`[$>>$]}`]}${$$[`${`[[[[[${$[$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${[][[]]}`[[$==$][$>>$]>>$]}${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${[][[]]}`[$>>$]}${`[[${[][[]]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]}${$$}`[$>>$]]}${[][`${`${$>$}`[$>>$]}${`[[[[[${$[$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${[][[]]}`[[$==$][$>>$]>>$]}${`[[${[][[]]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]}${{}[$][`${`[[[[[[${$[$]}`[`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[$>>$]}`]}${`[[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$==$}`[$>>$]}${`[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${$$[`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${`${`[[[[[[${`${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}`>>[$==$][$>>$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}`>>$}`[$>>$]}${`${[][[]]}`[[$==$][$>>$]>>$]}${`{[${[][$][`${`${$>$}`[$>>$]}${`${$==$}`[[$==$][$>>$]>>$]}${`${{}}`[[$==$][$>>$]>>$]}${`[[[[[[[[[${[$>>$][$>>$][$]}`[`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[$>>$]}`]}${`[${[][$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[${[][$]}`[`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[$>>$]}`]}${`${[][[]]}`[[$==$][$>>$]>>$]}${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]``}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$==$}`[[$==$][$>>$]>>$]}${`${{}}`[[$==$][$>>$]>>$]}${$$[`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]]}`>>$}`[$>>$]}${`[[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$==$}`[[$==$][$>>$]>>$]}${`${$==$}`[$>>$]}${`[[[[[[[${[][$]}`[`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[$>>$]}`]}${`[${[$>>$][$>>$][$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[[${[$>>$][$>>$][$]}`[`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[$>>$]}`]}${`[[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`][`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${$[$]}`}`]}`}`[`${`${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${{}}`[[$==$][$>>$]>>$]}${`[[[[[${$[$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${[][[]]}`[[$==$][$>>$]>>$]}`]``][``>>``][`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${[][$][`${`${$>$}`[$>>$]}${`${$==$}`[[$==$][$>>$]>>$]}${`${{}}`[[$==$][$>>$]>>$]}${`[[[[[[[[[${[$>>$][$>>$][$]}`[`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[$>>$]}`]}`][`${`[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[${$[$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${[][[]]}`[[$==$][$>>$]>>$]}${`[[${[][[]]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${[`${`[[[[[[${`${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}`>>[$==$][$>>$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[${`${[[$==$][$>>$]>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}${[$>>$]}`>>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]}${[$>>$][$>>$][`${`${$==$}`[$>>$]}${`${{}}`[[$==$][$>>$]>>$]}${`[${$[$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$==$}`[$>>$]}${`${$==$}`[[$==$][$>>$]>>$]}${`[[[[[${$[$]}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${[][[]]}`[[$==$][$>>$]>>$]}${`[[[[[[${$[$]}`[`${[`${[[$==$][$>>$]>>$]}${[$>>$]}`>>[$==$][$>>$]>>[$==$][$>>$]]}${[$>>$]}`]}`]}`}`][``>>``][`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$>$}`[[$==$][$>>$]>>$]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`[[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}`]`${`${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${{}}`[[$==$][$>>$]>>$]}${`${[][[]]}`[[$==$][$>>$]>>$]}${`[[[[[[[${$>$}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$==$}`[$>>$]}${`${$==$}`[[$==$][$>>$]>>$]}${`${[][[]]}`[$>>$]}${`[[[[[${{}}`[`${[[$==$][$>>$]>>$]}${[$>>$]}`]}${`${$==$}`[$>>$]}${`${{}}`[[$==$][$>>$]>>$]}${`${$==$}`[[$==$][$>>$]>>$]}`}`][``>>``]``
The same thing in a partially encoded format:
[
$=>[
$=>[
$$=>[][$]['from']['call']`${
[
// "Hello World!" but encoded
'1001000[1100101[1101100[1101100[1101111[100000[1010111[1101111[1110010[1101100[1100100[100001'
][$>>$]['split']`[`
}${
// fromCodePoint => (encoded => decoded)
[$=>$$=>$['call']`${`${'0b'}${$$}`}`][$>>$]['call']`${
// String.fromCodePoint
$[$][
[][$]['from']['call']`${[
$$=>[][$]['from']['call']`${['oint']}${$$['includes']}${$$}`[$>>$]
]}${[]['find']}${
{}[$]['getOwnPropertyNames']['call']`${$[$]}`
}`
]
}`
}`['join']``
][``>>``]['call']`${
[][$]['from']['bind']`${['36']}${[$>>$][$>>$]['toString']}`
}`
][``>>``]['call']`${'constructor'}`
][``>>``]``