Skip to content

Commit 0c4560d

Browse files
committed
Revert "Merge pull request #448 from ThijsRay/euclidian_algorithm_in_piet"
This reverts commit 0435b24, reversing changes made to fb4f592.
1 parent 8d34d4a commit 0c4560d

8 files changed

+0
-166
lines changed

CONTRIBUTORS.md

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ This file lists everyone, who contributed to this repo and wanted to show up her
3737
- Ken Power
3838
- PaddyKe
3939
- nic-hartley
40-
- Thijs Raymakers
4140
- crafter312
4241
- Christopher Milan
4342
- Vexatos

book.json

-4
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,6 @@
167167
{
168168
"lang": "lolcode",
169169
"name": "LOLCODE"
170-
},
171-
{
172-
"lang": "piet",
173-
"name": "Piet"
174170
}
175171
]
176172
}

contents/euclidean_algorithm/code/piet/euclidian_algorithm.piet

-146
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

contents/euclidean_algorithm/euclidean_algorithm.md

-15
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two
6363
[import:25-40, lang="LOLCODE"](code/lolcode/euclid.lol)
6464
{% sample lang="bash" %}
6565
[import:24-38, lang="bash"](code/bash/euclid.bash)
66-
{% sample lang="piet" %}
67-
> ![](code/piet/subtract/euclidian_algorithm_subtract_large.png) ![](code/piet/subtract/euclidian_algorithm_subtract.png)
6866
{% endmethod %}
6967

7068
Here, we simply line the two numbers up every step and subtract the lower value from the higher one every timestep. Once the two values are equal, we call that value the greatest common divisor. A graph of `a` and `b` as they change every step would look something like this:
@@ -134,8 +132,6 @@ Modern implementations, though, often use the modulus operator (%) like so
134132
[import:9-23, lang="LOLCODE"](code/lolcode/euclid.lol)
135133
{% sample lang="bash" %}
136134
[import:10-22, lang="bash"](code/bash/euclid.bash)
137-
{% sample lang="piet" %}
138-
> ![](code/piet/mod/euclidian_algorithm_mod_large.png) ![](code/piet/mod/euclidian_algorithm_mod.png)
139135
{% endmethod %}
140136

141137
Here, we set `b` to be the remainder of `a%b` and `a` to be whatever `b` was last timestep. Because of how the modulus operator works, this will provide the same information as the subtraction-based implementation, but when we show `a` and `b` as they change with time, we can see that it might take many fewer steps:
@@ -221,17 +217,6 @@ and modulo method:
221217
[import, lang="LOLCODE"](code/lolcode/euclid.lol)
222218
{% sample lang="bash" %}
223219
[import, lang="bash"](code/bash/euclid.bash)
224-
{% sample lang="piet" %}
225-
A text version of the program is provided for both versions.
226-
#### Subtraction
227-
> ![](code/piet/subtract/euclidian_algorithm_subtract_large.png) ![](code/piet/subtract/euclidian_algorithm_subtract.png)
228-
229-
[import:23-107](code/piet/euclidian_algorithm.piet)
230-
231-
#### Modulo
232-
> ![](code/piet/mod/euclidian_algorithm_mod_large.png) ![](code/piet/mod/euclidian_algorithm_mod.png)
233-
234-
[import:126-146](code/piet/euclidian_algorithm.piet)
235220
{% endmethod %}
236221

237222
<script>

0 commit comments

Comments
 (0)