From Esolang
Jump to navigation Jump to search

™ is an esolang (or, a family of esolangs) that can do a Truth Machine (except type 4, 11, 22, and 48, which are basically jokes), created by User:None1, User:PrySigneToFry, User:Unname4798, User:I am islptng, and User:PkmnQ.

You are allowed to add dialects of the esolang and correct others' mistakes.

Paradigm(s) procedural, imperative
Designed by User:None1, User:PrySigneToFry, User:Unname4798, User:I am islptng, and User:PkmnQ
Appeared in 2023, 2024, 2025
Type system untyped/strong
Memory system no memory system/cell-based/variable based
Dimensions one-dimensional
Computational class Turing complete, Total, Uncomputable
Major implementations Python (some are unimplemented)
Dialects Type 1-48
Influenced by Truth machine
File extension(s) .tm

Syntax

Dialects created in 2023

Type 1

There is only one valid program: , which is a Truth Machine.

Other programs raise a syntax error:

Syntax error

Type 2

There are only three valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a cat program.
  3. ®, which is a reverse cat program.

Other programs raise a syntax error:

Syntax error

Type 3

There is only one valid program: an empty program, which is a Truth Machine.

Other programs raise a syntax error:

Syntax error

Type 4

Every program raises a syntax error:

Syntax error

It is obvious that type 4 is a Nope. derivative.

Type 5

Every program is a Truth Machine.

Type 6

Every program that isn't empty is a Truth Machine.

An empty program raises a syntax error:

Syntax error

Dialects created in 2024

Type 7

There is only one valid program: , which is a Truth Machine.

Other programs delete themselves.

Type 8

Any program that is not is a Truth Machine.

raises a syntax error:

Syntax error

Type 9

There are only three valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Truth Machine.
  3. ®, which is a Truth Machine.

Other programs raise a syntax error:

Syntax error

Type 10

There is only one valid program: , which is a Truth Machine.

Other programs do nothing.

Type 11

Every program does nothing.

This is the same as APLWSI.

Dialects created in 2025

Type 12

There is only one valid program: , which is a Truth Machine.

Other programs are A+B problems.

Type 13

There is only one valid program: , which is a Truth Machine.

Other programs output "滚!".

Type 14

Any program that is not is a Truth Machine.

does nothing.

Type 15

All program except works like in Python.

is Truth-machine.

Type 16

There is only one valid program: , which is a Truth Machine.

Other program does Cat program.

Type 17

There is only one valid program: , which is a Truth Machine.

Other program executes Terminal on your OS(If it is in Windows, then generate a random integer, if it is even then open cmd, otherwise powershell).

Type 18

There is only one valid program: , which is a Truth Machine.

Other program outputs itself.

Type 19

There is only one valid program: , which is a Truth Machine.

Other program has 50% chance to output "滚!" or "不是,哥们?"

Type 20

There is only three valid program:

  1. , which is a Truth Machine.
  2. ©, which is a cat program.
  3. ®, which is a reverse cat program.

Other program output this:

六王毕,四海一,蜀山兀,阿房出。覆压三百余里,隔离天日。骊山北构而西折,直走咸阳。二川溶溶,流入宫墙。五步一楼,十步一阁;廊腰缦回,檐牙高啄;各抱地势,钩心斗角。盘盘焉,囷囷焉,蜂房水涡,矗不知其几千万落。长桥卧波,未云何龙?复道行空,不霁何虹?高低冥迷,不知西东。歌台暖响,春光融融;舞殿冷袖,风雨凄凄。一日之内,一宫之间,而气候不齐。

妃嫔媵嫱,王子皇孙,辞楼下殿,辇来于秦。朝歌夜弦,为秦宫人。明星荧荧,开妆镜也;绿云扰扰,梳晓鬟也;渭流涨腻,弃脂水也;烟斜雾横,焚椒兰也。雷霆乍惊,宫车过也;辘辘远听,杳不知其所之也。一肌一容,尽态极妍,缦立远视,而望幸焉。有不见者三十六年。燕赵之收藏,韩魏之经营,齐楚之精英,几世几年,剽掠其人,倚叠如山。一旦不能有,输来其间。鼎铛玉石,金块珠砾,弃掷逦迤,秦人视之,亦不甚惜。

嗟乎!一人之心,千万人之心也。秦爱纷奢,人亦念其家。奈何取之尽锱铢,用之如泥沙?使负栋之柱,多于南亩之农夫;架梁之椽,多于机上之工女;钉头磷磷,多于在庾之粟粒;瓦缝参差,多于周身之帛缕;直栏横槛,多于九土之城郭;管弦呕哑,多于市人之言语。使天下之人,不敢言而敢怒。独夫之心,日益骄固。戍卒叫,函谷举,楚人一炬,可怜焦土!

呜呼!灭六国者六国也,非秦也;族秦者秦也,非天下也。嗟乎!使六国各爱其人,则足以拒秦;使秦复爱六国之人,则递三世可至万世而为君,谁得而族灭也?秦人不暇自哀,而后人哀之;后人哀之而不鉴之,亦使后人而复哀后人也。

Type 21

There is only one valid program: , which is a Truth Machine.

Other programs raise a syntax error:

Nope.

Type 22

Every program outputs "Nope."

Nope.: 亻尔女子

Type 23

There is only one valid program: , which is a Truth Machine.

Other program calculates 5÷0.

Type 24

There is only one valid program: , which is a Truth Machine.

Other program prints "Hello, world!".

Type 25

There are only four valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Cat program.
  3. ®, which is a Reversed cat program.
  4. , which is a Guessing number game.

Other programs raise a syntax error:

Nope.

Type 26

There are only three valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a cat program.
  3. ®, which is a reverse cat program.

Other programs raise a syntax error:

Fuck you!

Type 27

There is only one valid program: , which is a Truth Machine.

Other program are brainfuck interpreters.

Type 28

There is only one valid program: , which is a Truth Machine.

Other program does like Brainfuck.

Type 29

There are only four valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Truth Machine.
  3. ®, which is a Truth Machine.
  4. , which is a Truth Machine.

Other programs are HQ9 interpreters.

Alternate introduction

There are seven valid programs/commands:

  1. , which is a Truth Machine.
  2. ©, which is a Truth Machine.
  3. ®, which is a Truth Machine.
  4. , which is a Truth Machine.
  5. H, which outputs "Hello, world!".
  6. Q, which outputs the source code.
  7. 9, which outputs 99 bottles of beer.

Type 30

There are only four valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Truth Machine.
  3. ®, which is a Truth Machine.
  4. , which is a Truth Machine.

Other programs are NOR Machine interpreters.

Type 31

There are only four valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Cat program.
  3. ®, which is a Reversed cat program.
  4. , which is a Guessing number game.

Other programs Rickrolls you.

Type 32

There are only four valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Cat program.
  3. ®, which is a Reversed cat program.
  4. , which is a Guessing number game.

Other programs works like C++.

Type 33

There are only four valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Cat program.
  3. ®, which is a Reversed cat program.
  4. , which is a Guessing number game.

Other programs is a clock.

Type 34

There are only four valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Cat program.
  3. ®, which is a Reversed cat program.
  4. , which is a Guessing number game.

Other programs open and register "Zillions of Games"[1]. If you have no this software, then it will automatically install the software.

Type 35

There are only four valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Cat program.
  3. ®, which is a Reversed cat program.
  4. , which is a Guessing number game.

Other programs open a random app.

Type 36

There is only one valid program: , which is a Truth Machine.

Other programs run the code in Recursive.

Type 37

There is only one valid program: , which is a Truth Machine.

Other programs run the code in ™ Type 37.

Type 38

There are only three valid programs:

  1. , which is a Truth Machine.
  2. 0, which is a Quine.
  3. 1, which is an infini-Quine (outputs the source code an infinite amount of times).

Other programs run the code in ™ Type 38.


Type 39

There are only three valid programs:

  1. , which modifies the program to the input and runs the code in ™ Type 39.
  2. 0, which is a Quine.
  3. 1, which is an infini-Quine (outputs the source code an infinite amount of times).

Other programs run the code in ™ Type 39.

Type 40

There are only ten valid programs:

  1. , which is a Truth Machine.
  2. 0, which is a Quine.
  3. 1, which is an infini-Quine (outputs the source code an infinite amount of times).
  4. ©, which is a Cat program.
  5. ®, which is a Reversed cat program.
  6. , which is a Guessing number game.
  7. 9, which outputs 99 bottles of beer.
  8. , which changes the programming language to Python.
  9. K, which is a Reversed cat program.
  10. , which outputs "Bismillah Ar-rahman Ar-raheem".

Other programs works in Java.

Type 41

There are infinite valid programs.

  • If the code has things besides ™,© and ®, it will raise Nope.
  • Elif the code's length is even, execute corresponding Ook! program. ™ is Ook. ,© is Ook? and ® is Ook!
  • Elif the code's length is 1, execute it as ™ Type 2.
  • Else outputs 99 bottles of beer in Simplified Literal Chinese. (春日宴。与君九十九杯酒......绿酒千杯肠已烂。)

Type 42

There are 11 valid programs:

  1. , which is a Truth Machine.
  2. 0, which is a Quine.
  3. 1, which is an infini-Quine (outputs the source code an infinite amount of times).
  4. ©, which is a Cat program.
  5. ®, which is a Reversed cat program.
  6. , which is a Guessing number game.
  7. 9, which outputs 99 bottles of beer.
  8. , which changes the programming language to Python.
  9. K, which is a Reversed cat program.
  10. , which outputs "Bismillah Ar-rahman Ar-raheem".
  11. , which outputs "唵嘛呢叭咪吽".

Other programs works in Java.

Type 43

There are only five valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Cat program.
  3. ®, which is a Reversed cat program.
  4. , which is a Guessing number game.
  5. , which outputs 99 bottles of beer.

Other programs works in Lua.

Type 44

There are only five valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Cat program.
  3. ®, which is a Reversed cat program.
  4. , which is a Guessing number game.
  5. , which outputs 99 bottles of beer.

Other program raises the syntax error:


Type 45

There are only six valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Cat program.
  3. ®, which is a Reversed cat program.
  4. , which is a Guessing number game.
  5. , which outputs 99 bottles of beer.
  6. Empty program, which interprets Python.

Other program raises the syntax error:


Type 46

There are only six valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Cat program.
  3. ®, which is a Reversed cat program.
  4. , which is a Guessing number game.
  5. , which outputs 99 bottles of beer.
  6. Empty program, which interprets Python.

Other program raises the syntax error:

你干嘛~哈哈哎哟~

Type 47

There are only four valid programs:

  1. , which is a Truth Machine.
  2. ©, which is a Cat program.
  3. ®, which is a Reversed cat program.
  4. 4, which is an XKCD Random Number.

Other programs output the Chinese license plate song ("鲁A济南车鲁B青岛的...").

Type 48

Every program is an interpreter of type 1.

Type 49

There are infinity amount of programs.

  1. If the length of program is 1, execute as Type 2.
  2. If the length of program is even, execute as Ook! program. ™ is Ook. ,© is Ook? and ® is Ook!.
  3. If program appears any command in Brainfuck, execute as Brainfuck command.
  4. If program's length is 99, output 与君九十九杯酒.
  5. If program is empty, ask user for input and execute the Python file with input filename. If file doesn't exist, then output 与君九十九杯酒.
  6. If none of the above conditions are met, output "Fuck you!".

Example Programs

Type 1

Truth Machine

Quine

Syntax error

Type 2

Cat Program

©

Reverse Cat Program

®

Truth Machine

Quine

Syntax error

Type 3

Truth Machine


The Truth Machine for type 3 is shorter than Truth Machine in any other language.

Quine

Syntax error

Type 4

Quine

Syntax error

Self interpreter

No matter what this is.

Self interpreter 2

Syntax error

Type 5

Truth Machine


Alternative
Hello World!

Type 6

Truth Machine

Truth Machine

Type 7

Truth Machine

Delete itself

Any text can go here

Type 8

Truth Machine

Any text can go here (really?)

Type 9

Truth Machine

©
®

Are all truth machines.

Quine

Syntax error

Type 10

Truth Machine

Interpreter for type 11/APLWSI/Nil

Anything can go here

Type 11

Self interpreter/Nil/APLWSI interpreter

Anything can go here

Type 12

Truth Machine

A+B

a plus b

Type 13

Truth Machine

Quine

滚!

Type 14

Truth Machine

Truth Machine

™ type 11/Nil/APLWSI interpreter

Type 28

Truth Machine

Cat program

,[.,]

Type 47

Cat Program

©

Reverse Cat Program

®

Truth Machine

Quine 1

4

Quine 2

鲁A济南车鲁B青岛的...(a lot of characters ommited)

Type 48

™ type 1 interpreter

Any text can go here

Interpreters

The following interpreters are in Python.

Type 1

import sys
code=sys.stdin.read()
if code=='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
else:
    print('Syntax error')

Type 2

import sys
code=sys.stdin.read()
if code=='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
elif code=='©':
    print(sys.stdin.read())
elif code=='®':
    a=input()
    l=list(a)
    l.reverse()
    print(''.join(l))
else:
    print('Syntax error')

Type 3

import sys
code=sys.stdin.read()
if code=='':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
else:
    print('Syntax error')

Type 4

print('Syntax error')

Type 5

import sys
code=sys.stdin.read()
if True:
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
else:
    print('Syntax error') # Just kidding!

Type 6

import sys
code=sys.stdin.read()
if code:
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
else:
    print('Syntax error')

Type 7

import sys,os
code=sys.stdin.read()
if code=='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
else:
    os.remove(sys.argv[0])

Type 8

import sys
code=sys.stdin.read()
if code!='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
else:
    print('Syntax error')

Type 9

import sys
code=sys.stdin.read()
if code in list('™©®'):
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)

else:
    print('Syntax error')

Type 10

import sys
code=sys.stdin.read()
if code=='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)

Type 11

N

Type 12

import sys
code=sys.stdin.read()
if code in list('™'):
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)

else:
    a=int(input())
    b=int(input())
    print(a+b)

Type 13

import sys
code=sys.stdin.read()
if code in list('™'):
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)

else:
    print("滚!")

Type 14

import sys
code=sys.stdin.read()
if code!='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)

Type 15

import sys
code=sys.stdin.read()
if code=='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
else:
    exec(code)

Type 16

import sys
code=sys.stdin.read()
if code=='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
else:
    print(sys.stdin.read())

Type 17

import sys
from platform import system
from random import randint
from os import system as s
code=sys.stdin.read()
if code=='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
else:
    if system()=='Windows':
        if randint(0,1):
            s('start powershell')
        else:
            s('start')
    else:
        s('/usr/bin/bash')

Type 18

import sys
code=sys.stdin.read()
if code=='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
else:
    print(code)

Type 28

import sys
def bf(code):
    s=[]
    matches={}
    tape=[0]*1000000
    for i,j in enumerate(code):
        if j=='[':
            s.append(i)
        if j==']':
            m=s.pop()
            matches[m]=i
            matches[i]=m
    cp=0
    p=0
    while cp<len(code):
        if code[cp]=='+':
            tape[p]=(tape[p]+1)%256
        if code[cp]=='-':
            tape[p]=(tape[p]-1)%256
        if code[cp]==',':
            c=sys.stdin.read(1)
            tape[p]=(ord(c) if c else 0)%256
        if code[cp]=='.':
            print(chr(tape[p]),end='')
        if code[cp]=='<':
            p-=1
        if code[cp]=='>':
            p+=1
        if code[cp]=='[':
            if not tape[p]:
                cp=matches[cp]
        if code[cp]==']':
            if tape[p]:
                cp=matches[cp]
        cp+=1
code=sys.stdin.read()
if code=='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
else:
    bf(code)

Type 47

import sys
code=sys.stdin.read()
if code=='™':
    x=input()
    if x=='0':
        print(0)
    else:
        while 1:
            print(1)
elif code=='©':
    print(sys.stdin.read())
elif code=='®':
    a=input()
    l=list(a)
    l.reverse()
    print(''.join(l))
elif code=='4':
    print(4,end='')
else:
    print('鲁A济南车鲁B青岛的...') # A lot of characters ommited

Type 48

Exactly the same as type 1 (except that you put code in a file and pass it as command line argument).

Computational Class

Turing-complete

15 27 28 17 32 40 41 42 43

Total

4 11 22

Uncomputable

35

See also

TM

Categories and References

  1. Zillions of Games is a software that covers many board games. To get more, you can access here.