2Definer
Jump to navigation
Jump to search
- This language is a derivative of Definer.
This is user:Rombito’s 2Definer, an esoteric programming language.
Syntax and Functionality
—: C
A Comment, Noop
C: A = B
Replaces “constants” from Definer
D: B([#1]) = C
Replaces “definitions” from Definer
Cl: -: v Manual W! X, Y, Z -: v Conditional W: B([#n]) ! [#n]
Unique section, stands for classes. Manuals set things under class W by default, for Conditionals, , and yes, class names can have variables, allowing for potentially infinite classes
L: A = B
Unique section, stands for labels, makes it so A is recognized as B and vice-versa.
M: B(A)
Replaces “code” from Definer, stands for “Main”
[], recognition madness: [] could be anything, the following will limit it:
#n, ^n, -n, n, (n), |n
- #n corresponds to the variable recognized as n, could be anything but is fixed once it is substituted or reused
- ^n is a class check, checks if it is recognized as within a class that is recognized as n
- -n is a not operation
- n checks if it is n
- (n) is just parentheses surrounding n, is useful for order and separation
- |n is an elsewhere check, if something is recognized as n elsewhere, then it is recognized
{::}
{::}, if exists, waits for user input and is replaced by that input
How it works
- upon start, constantly switches all instances of constants and definitions with their values until there is nothing to switch (happens within every section, invalid switch if it interferes with syntax or if it sherlocks (A = B -> B = B))
- upon end, switches back the constants, then constantly switches all instances of definitions with their values until there is nothing left to switch and prints the main section.
Examples
M:
{::}
D:
[-1]1 = 11
M:
{::}
Number Representer:
C:
[#n^num]++ = s([#n^num])
D:
0++ = 1
1++ = 2
2++ = 3
3++ = 4
4++ = 5
5++ = 6
6++ = 7
7++ = 8
8++ = 9
[-(^num)]9++ = 10
9++ = ++0
o(0) = -1
o(-[#x]) = -s([#x])
s(-[#x]) = -
o(s([#x])) = [#x]
[#x] + 0 = 0
[#x] - 0 = 0
[#x] + s([#y]) = s([#x] + [#y])
[#x] - s([#y]) = o([#x] - [#y])
Cl:
num! 1, 2, 3, 4, 5, 6, 7, 8, 9, 0
num: [^num][^num] ! [^num][^num]
M:
{::}