New page wikitext, after the edit (new_wikitext) | '{{WIP}}
{{Stub}}
'''MODULARBALL''' is an esoteric programming language based around [[User:Aadenboy/Self-equaling squares|self-equaling powers]].
== Modulo and floor ==
For the purposes of this esolang, <math>\mathrm{mod}</math> is implemented as <math>a \ \mathrm{mod} \ b = a - b \cdot \lfloor \frac{a}{b} \rfloor</math>, and <math>\lfloor a + bi \rfloor</math> is implemented as <math>\lfloor a \rfloor + \lfloor b \rfloor \cdot i</math>.
== Balls ==
The program operates on a set of several "balls". Each ball has a certain value on it (<math>n</math>), and a maximum size (<math>s</math>). Rolling a ball by some amount (<math>r</math>) around an axis corresponds to a certain operation. When the direction is counterclockwise, <math>s = -s</math>.
{| class="wikitable"
! Axis
! Operation
|-
| X axis
| <math>n^{r} \ \mathrm{mod} \ s</math>
|-
| Y axis
| <math>n^{r} \ \mathrm{mod} \ si</math>
|-
| Z axis
| <math>n^{r} \ \mathrm{mod} \ (s+si)</math>
|}
== Commands ==
{| class="wikitable"
! Command
! Description
! Parameters
|-
| <code>▹<i>a</i></code>
| Returns a real number.
| <dl><dt>a<dd>The real part.</dd></dt></dl>
|-
| <code>▸<i>b</i></code>
| Returns an imaginary number.
| <dl><dt>b<dd>The imaginary part.</dd></dt></dl>
|-
| <code>▹<i>a</i>▸<i>b</i>
| Returns a complex number.
| <dl>
<dt>a<dd>The real part.</dd></dt>
<dt>b<dd>The imaginary part.</dd></dt>
</dl>
|-
| <code>◯<i>name</i>◠<i>value</i>◠<i>size</i></code>
| Creates a new ball.
| <dl>
<dt>name<dd>The name of the ball, used to refer to it later.</dd></dt>
<dt>value<dd>The value of the ball.</dd></dt>
<dt>size<dd>The size of the ball.</dd></dt>
</dl>
|-
| <code>◘<i>name</i></code>
| Returns the current value of a ball.
| <dl><dt>name<dd>The name of the ball.</dd></dt></dl>
|-
| <code>◙<i>name</i></code>
| Returns the size of a ball.
| <dl><dt>name<dd>The name of the ball.</dd></dt></dl>
|-
| <code>◍<i>name</i>◠<i>axis</i>◠<i>amount</i></code>
| Rotates a ball.
| <dl>
<dt>name<dd>The name of the ball.</dd></dt>
<dt>axis<dd>The axis to rotate around. 1 corresponds to X, 2 to Y, 3 to Z. Use a negative to rotate counterclockwise.</dd></dt>
<dt>amount<dd>The amount to rotate it by.</dd></dt>
</dl>
|-
| <code>□<i>name</i></code>
| Gets rid of a ball.
| <dl><dt>name<dd>The name of the ball.</dd></dt></dl>
|-
| <code>◐<i>line</i>◠<i>value</i></code>
| Jumps to a line if the value is equal to zero.
| <dl>
<dt>line<dd>The line to jump to. Treated as a real number.</dd></dt>
<dt>value<dd>The value to check.</dd></dt>
</dl>
|-
| <code>◬<i>value</i></code>
| Outputs a value as a Unicode character. Treated as a real number.
| <dl><dt>value<dd>The value to output.</dd></dt></dl>
|-
| <code>◊</code>
| Takes input.
| None.
|}
== Examples ==
=== [[Truth machine]] ===
<pre>
◐▹4◠◊
◬▹1
◐▹2◠▹0
◬▹0
</pre>
[[Category:Languages]] [[Category:2025]]' |
Lines added in edit (added_lines) | [
0 => '{{WIP}}',
1 => '{{Stub}}',
2 => ''''MODULARBALL''' is an esoteric programming language based around [[User:Aadenboy/Self-equaling squares|self-equaling powers]].',
3 => '',
4 => '== Modulo and floor ==',
5 => 'For the purposes of this esolang, <math>\mathrm{mod}</math> is implemented as <math>a \ \mathrm{mod} \ b = a - b \cdot \lfloor \frac{a}{b} \rfloor</math>, and <math>\lfloor a + bi \rfloor</math> is implemented as <math>\lfloor a \rfloor + \lfloor b \rfloor \cdot i</math>.',
6 => '',
7 => '== Balls ==',
8 => 'The program operates on a set of several "balls". Each ball has a certain value on it (<math>n</math>), and a maximum size (<math>s</math>). Rolling a ball by some amount (<math>r</math>) around an axis corresponds to a certain operation. When the direction is counterclockwise, <math>s = -s</math>.',
9 => '',
10 => '{| class="wikitable"',
11 => '! Axis',
12 => '! Operation',
13 => '|-',
14 => '| X axis',
15 => '| <math>n^{r} \ \mathrm{mod} \ s</math>',
16 => '|-',
17 => '| Y axis',
18 => '| <math>n^{r} \ \mathrm{mod} \ si</math>',
19 => '|-',
20 => '| Z axis',
21 => '| <math>n^{r} \ \mathrm{mod} \ (s+si)</math>',
22 => '|}',
23 => '',
24 => '== Commands ==',
25 => '{| class="wikitable"',
26 => '! Command',
27 => '! Description',
28 => '! Parameters',
29 => '|-',
30 => '| <code>▹<i>a</i></code>',
31 => '| Returns a real number.',
32 => '| <dl><dt>a<dd>The real part.</dd></dt></dl>',
33 => '|-',
34 => '| <code>▸<i>b</i></code>',
35 => '| Returns an imaginary number.',
36 => '| <dl><dt>b<dd>The imaginary part.</dd></dt></dl>',
37 => '|-',
38 => '| <code>▹<i>a</i>▸<i>b</i>',
39 => '| Returns a complex number.',
40 => '| <dl>',
41 => '<dt>a<dd>The real part.</dd></dt>',
42 => '<dt>b<dd>The imaginary part.</dd></dt>',
43 => '</dl>',
44 => '|-',
45 => '| <code>◯<i>name</i>◠<i>value</i>◠<i>size</i></code>',
46 => '| Creates a new ball.',
47 => '| <dl>',
48 => '<dt>name<dd>The name of the ball, used to refer to it later.</dd></dt>',
49 => '<dt>value<dd>The value of the ball.</dd></dt>',
50 => '<dt>size<dd>The size of the ball.</dd></dt>',
51 => '</dl>',
52 => '|-',
53 => '| <code>◘<i>name</i></code>',
54 => '| Returns the current value of a ball.',
55 => '| <dl><dt>name<dd>The name of the ball.</dd></dt></dl>',
56 => '|-',
57 => '| <code>◙<i>name</i></code>',
58 => '| Returns the size of a ball.',
59 => '| <dl><dt>name<dd>The name of the ball.</dd></dt></dl>',
60 => '|-',
61 => '| <code>◍<i>name</i>◠<i>axis</i>◠<i>amount</i></code>',
62 => '| Rotates a ball.',
63 => '| <dl>',
64 => '<dt>name<dd>The name of the ball.</dd></dt>',
65 => '<dt>axis<dd>The axis to rotate around. 1 corresponds to X, 2 to Y, 3 to Z. Use a negative to rotate counterclockwise.</dd></dt>',
66 => '<dt>amount<dd>The amount to rotate it by.</dd></dt>',
67 => '</dl>',
68 => '|-',
69 => '| <code>□<i>name</i></code>',
70 => '| Gets rid of a ball.',
71 => '| <dl><dt>name<dd>The name of the ball.</dd></dt></dl>',
72 => '|-',
73 => '| <code>◐<i>line</i>◠<i>value</i></code>',
74 => '| Jumps to a line if the value is equal to zero.',
75 => '| <dl>',
76 => '<dt>line<dd>The line to jump to. Treated as a real number.</dd></dt>',
77 => '<dt>value<dd>The value to check.</dd></dt>',
78 => '</dl>',
79 => '|-',
80 => '| <code>◬<i>value</i></code>',
81 => '| Outputs a value as a Unicode character. Treated as a real number.',
82 => '| <dl><dt>value<dd>The value to output.</dd></dt></dl>',
83 => '|-',
84 => '| <code>◊</code>',
85 => '| Takes input.',
86 => '| None.',
87 => '|}',
88 => '',
89 => '== Examples ==',
90 => '=== [[Truth machine]] ===',
91 => '<pre>',
92 => '◐▹4◠◊',
93 => '◬▹1',
94 => '◐▹2◠▹0',
95 => '◬▹0',
96 => '</pre>',
97 => '',
98 => '[[Category:Languages]] [[Category:2025]]'
] |