13 bytes :D

From Esolang
Jump to navigation Jump to search
13 bytes :D
Designed by Esolang1
Appeared in 2022
Dimensions one-dimensional
Computational class Turing complete
Reference implementation See page
Influenced by 16 bytes :P, Python
Influenced 9 bytes :I
File extension(s)

13 bytes :D is an esoteric programming language made by User:Esolang1 inspired by 16 bytes :P, which was inspired by 25 bytes o:. The original goal was to create world's smallest compiler/interpreter.

Instructions

Any valid Python expression is a valid 13 bytes :D program. This excludes conditionals and assignment, but the use of lambda allows for arbitrary lambda calculus expressions to be implemented in 13 bytes :D, thus making 13 bytes :D Turing complete. If, instead of 13 bytes :D source code, user input were run, then 13 bytes :D would be ℒ-complete.

Implementations

Python

The following Python code is the compiler of this language.

eval(input())

While this is the official compiler, it has an error of floating-point arithmetic.

Examples

1 + 1

1 + 1

i

(-1) ** (1 / 2)

Truth-machine

(a:= lambda:(print(1),a()))() if input()=='1'else print(0)

Cat program

print(input())