Albedo

Joined 24 August 2022
Layout and order changed
(→‎Integer Sequence: Ackermann Function added)
(Layout and order changed)
Line 2:
{{mylang|Piet|Intermediate}}
{{mylang|Julia|Beginner}}
{{mylang|Cardinal|Intermediate}}
{{mylangend}}
 
There aren’t any ways to upload images at the moment, so I’llall postexamples linksare torendered theas cloudwikitables. storage place ofSee my PietPNG examplesto onwikitable myconversion usercode page,written within explanationsJulia howat theythe work—hopefullybottom for later integration inof the appropriate places on Rosettacodepage.
 
 
 
==Explanation of shorthand code for Piet examples==
 
To shrink down the size of larger problems, I invented a shorthand text version for explaining the general program flow in a more compact form:
 
NOP ADD DIV GRT DUP INC END
. + / > = c ~
PSH SUB MOD PTR ROL OUN
X - % # @ N
POP MUL NOT SWI INN OUC
? * ! $ n C
 
 
Rendered as wikitable:
 
==Ackermann Function==
Line 384 ⟶ 389:
 
 
 
 
==Integer Sequence==
 
[[Integer_sequence#Piet]]
 
PNG image download:
 
[Image:https://copy.com/TQuwy3dwBRl7nEOL]
 
Rendered as wikitable:
 
{| style="border-collapse: collapse; border-spacing: 0; font-family: courier-new,courier,monospace; font-size: 20px; line-height: 1.2em; padding: 0px"
| style="background-color:#ffc0c0; color:#ffc0c0;" | ww
| style="background-color:#ff0000; color:#ff0000;" | ww
| style="background-color:#c0ffc0; color:#c0ffc0;" | ww
| style="background-color:#ffc0c0; color:#ffc0c0;" | ww
| style="background-color:#ff00ff; color:#ff00ff;" | ww
| style="background-color:#ff00ff; color:#ff00ff;" | ww
| style="background-color:#c000c0; color:#c000c0;" | ww
|-
 
| style="background-color:#000000; color:#000000;" | ww
| style="background-color:#000000; color:#000000;" | ww
| style="background-color:#0000ff; color:#0000ff;" | ww
| style="background-color:#ff00ff; color:#ff00ff;" | ww
| style="background-color:#ff00ff; color:#ff00ff;" | ww
| style="background-color:#ff00ff; color:#ff00ff;" | ww
| style="background-color:#00c0c0; color:#00c0c0;" | ww
|-
 
| style="background-color:#000000; color:#000000;" | ww
| style="background-color:#000000; color:#000000;" | ww
| style="background-color:#0000ff; color:#0000ff;" | ww
| style="background-color:#0000ff; color:#0000ff;" | ww
| style="background-color:#00c0c0; color:#00c0c0;" | ww
| style="background-color:#00ffff; color:#00ffff;" | ww
| style="background-color:#0000ff; color:#0000ff;" | ww
 
|}
 
 
 
 
(7x3 codels)
 
Opcodes:
 
1 PSH NOT DUP OUN 5 PSH
ROL
ADD DUP
PSH 1 OUC ADD
 
Shorthand:
 
1 X ! = N 5 X
@ .
+ =
X 1 C +
 
 
0 \n 1 \n 2 \n 3 OUTPUT
—————————————————————————————————————————————————————————————————————————————
5 5 5
0 5 5 10 1 1 5 5 10 1 2 5 5 10 1 3 STACK
1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 3 3 3 3 ...
—————————————————————————————————————————————————————————————————————————————
1X ! = N 5X = + C 1X + @ = N 5X = + C 1X + @ = N 5X = + C 1X + @ = N ...
| \_____/ | | |
| | | | +—————————— Repeating the Loop
| | | |
| | | +———————————— ROL acting as NOP (stack too small), needed to guide the codel chooser
| | |
| | +—————————————— Count up
| |
| +———————————————————————— 10 = ASCII for \n (newline)
|
+————————————————————————————————— !1=0 (Sequence begins at 0)
 
==Binary Digits==
Line 676 ⟶ 603:
↑ . .
l4 ....
 
 
==Integer Sequence==
 
[[Integer_sequence#Piet]]
 
PNG image download:
 
[Image:https://copy.com/TQuwy3dwBRl7nEOL]
 
Rendered as wikitable:
 
{| style="border-collapse: collapse; border-spacing: 0; font-family: courier-new,courier,monospace; font-size: 20px; line-height: 1.2em; padding: 0px"
| style="background-color:#ffc0c0; color:#ffc0c0;" | ww
| style="background-color:#ff0000; color:#ff0000;" | ww
| style="background-color:#c0ffc0; color:#c0ffc0;" | ww
| style="background-color:#ffc0c0; color:#ffc0c0;" | ww
| style="background-color:#ff00ff; color:#ff00ff;" | ww
| style="background-color:#ff00ff; color:#ff00ff;" | ww
| style="background-color:#c000c0; color:#c000c0;" | ww
|-
 
| style="background-color:#000000; color:#000000;" | ww
| style="background-color:#000000; color:#000000;" | ww
| style="background-color:#0000ff; color:#0000ff;" | ww
| style="background-color:#ff00ff; color:#ff00ff;" | ww
| style="background-color:#ff00ff; color:#ff00ff;" | ww
| style="background-color:#ff00ff; color:#ff00ff;" | ww
| style="background-color:#00c0c0; color:#00c0c0;" | ww
|-
 
| style="background-color:#000000; color:#000000;" | ww
| style="background-color:#000000; color:#000000;" | ww
| style="background-color:#0000ff; color:#0000ff;" | ww
| style="background-color:#0000ff; color:#0000ff;" | ww
| style="background-color:#00c0c0; color:#00c0c0;" | ww
| style="background-color:#00ffff; color:#00ffff;" | ww
| style="background-color:#0000ff; color:#0000ff;" | ww
 
|}
 
 
 
 
(7x3 codels)
 
Opcodes:
 
1 PSH NOT DUP OUN 5 PSH
ROL
ADD DUP
PSH 1 OUC ADD
 
Shorthand:
 
1 X ! = N 5 X
@ .
+ =
X 1 C +
 
 
0 \n 1 \n 2 \n 3 OUTPUT
—————————————————————————————————————————————————————————————————————————————
5 5 5
0 5 5 10 1 1 5 5 10 1 2 5 5 10 1 3 STACK
1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 3 3 3 3 ...
—————————————————————————————————————————————————————————————————————————————
1X ! = N 5X = + C 1X + @ = N 5X = + C 1X + @ = N 5X = + C 1X + @ = N ...
| \_____/ | | |
| | | | +—————————— Repeating the Loop
| | | |
| | | +———————————— ROL acting as NOP (stack too small), needed to guide the codel chooser
| | |
| | +—————————————— Count up
| |
| +———————————————————————— 10 = ASCII for \n (newline)
|
+————————————————————————————————— !1=0 (Sequence begins at 0)
 
 
 
 
136

edits