emojicode.github.io icon indicating copy to clipboard operation
emojicode.github.io copied to clipboard

Control Flow Documentation Issues

Open flwyd opened this issue 4 years ago • 1 comments

  1. The code example for the 🔁 For-in loop is incorrect. It starts a list declaration with 🍨 rather than 🍿.
  2. The explanation of 🔁 For-In compiled bytecode is a bit confusing because it appears before 🔁 Repeat-While is introduced.
  3. The 🙅↪️ Else-If section is confusing. The sentence "However, unlike ↪️, it will execute that alternative expressions only if the ↪️ expression is 👍" doesn't make much sense: both ↪️ and 🙅↪️ execute a block if the associated expression is 👍. (Additionally, "that" and "expressions" disagree in grammatical case; it should either be "that alternative expression" singular or "those alternative expressions" plural, though maybe it should actually be talking about an "alternative block"?) Perhaps this should be reworded to say that 🙅↪️ evaluates its expression if no previous 🙅↪️ or ↪️ in the sequence evaluated to 👍.
  4. The Markdown-generated header tags have an id attribute based on the section title. Emoji in that title are replaced with -. This results in multiple HTML elements with the same id when a section header doesn't have any ASCII text. This makes fragment links to that section impossible. For example, <h3 id="-">🙅</h3> and <h3 id="-">🙅↪️</h3> conflict for the fragment in https://www.emojicode.org/docs/reference/controlflow.html#-
  5. The comments in the code example for ⏩ ranges don't properly explain the use of step. The first comment says "Prints numbers 0 through 8 (including)" but it actually only prints the even numbers (0 2 4 6 8). The 100 -10 -10 example might be more illustrative if it were 100 -15 10 which would (a) help convey that the second argument is the end and the third is the step and (b) illustrate the surprising behavior when abs(end - start) is not a multiple of step (the range seems to go from start to end - step inclusive, rather than from start to end exclusive).

(Code observations based on Emojicode-1.0-beta.2-Darwin-x86_64.)

flwyd avatar Dec 27 '20 22:12 flwyd

Hi Crissov. Could you direct me toward some literature about Engineering Projection? I'm not familiar with it. Thanks.

mjhorvath avatar May 24 '19 00:05 mjhorvath

For dimetric axonometric drawings in engineering, ISO 5456-3, section 5.2, specifies a projection with skewing from the horizon by 42° and 7° and scaling of the former (i.e. depth) axis by ½. The standard does not say so, but these angles are apparently rounded from arcsin(⅛) and arccos(¾), respectively, which are sometimes (e. g. in the German DIN adoption of the standard) given more precisely as 7°10′ and 41°25′, respectively.

DIN ISO 5456-3 (1998) Bild 7 dimetrisch DIN ISO 5456-3 (1998) Bild 8 dimetrisch

Wikipedia: Axonometry with 90° + 42 ° = 132° and 90° + 7° = 97°, i. e. angles measured from the vertical / height / z axis instead of the horizon.

Crissov avatar May 24 '19 14:05 Crissov

Okay, it will take me a while. Usually I start with camera orientations and work my way from there. In this case I will be doing the reverse.

mjhorvath avatar May 26 '19 10:05 mjhorvath