-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
69 lines (61 loc) · 2.56 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# TODO
- GENERAL GUIDELINE:
Right now I think that this Logo variant should be used mainly to execute
the examples in _Turtle_Geometry_. So if at all possible, it needs all the
functionality that that book's Logo has. Aside from that, we can take a
page or two from Apple Logo. Things like changing the pen color etc, are nice
but not strictly necessary for the book's code, I think.
- Stuff we need soon, language-wise:
- symbol literals? (not sure)
- return statement (OUTPUT in Apple Logo?)
- IF (functional style)
- better error handling at the REPL (e.g. a syntax error should not be fatal)
- introspection (e.g. which words do we know, etc)
- figure out at which point the stack overflows... and if we should fix it,
and how.
- Also:
- more math stuff
- trig functions: SIN, COS, etc.
- Graphics:
- Draw a turtle
- More options for lines, e.g. styles (dashed, etc)
- We might need a command to refresh the Tk window while drawing.
- PENCOLOR should accept (r g b) lists
- We really need a canvas object (probably a record or something) to store
the canvas size in addition to the Tk window. (We need to know the
original size if we want to reliably calculate cartesian coordinates; they
should not change if the user resizes the window (and therefore the
canvas). ... Alternatively, we could prohibit resizing it. :-)
- Write a short explanation of the syntax (and how it relates to Scheme
syntax). (Coming back to this project less than a year after I started it,
I've already forgotten how most of it works. Maybe Python's syntax does have
its benefits, after all... ;-) Also, differences between SHOW and SAY and
everything would be nice as well.
- Logo commands taken from Apple Logo:
- CLEARSCREEN (CS)
- HIDETURTLE, SHOWTURTLE
- HOME
- SETHEADING degrees
- SETPOS x y
- SETX x, SETY y
- HEADING
- POS
- TOWARDS x y
- XCOR, YCOR
- CLEAN
- DOT x y
- FENCE, WINDOW, WRAP
- FILL
- maybe: PENERASE, PENREVERSE
- SETCOLOR
- Meta:
- A Tkinter canvas might not be the best way to draw things... every line
drawn is its own object, and the more the draw, the greater the "load".
Which is, unfortunately, noticeable on this iBook G3. Maybe I should delay
until I have a faster machine again. But then I'll likely develop an iPad
version instead... :-)
- Things that won't be the same as Apple Logo:
- SUM takes a list, not two numbers
- no operator precedence; in fact, there are no operators
- no difference between commands and operations
- Chogo does have strings, not just symbols