Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish object logo #21

Open
jrincayc opened this issue Jan 3, 2020 · 8 comments
Open

Finish object logo #21

jrincayc opened this issue Jan 3, 2020 · 8 comments
Labels
enhancement New feature or request

Comments

@jrincayc
Copy link
Owner

jrincayc commented Jan 3, 2020

Finish the object oriented logo additions. These are in #ifdef OBJECTS blocks.

@jrincayc jrincayc added the enhancement New feature or request label Jan 3, 2020
@jrincayc
Copy link
Owner Author

Note that this is being worked on in the fork: https://github.com/pahihu/ucblogo-code

@jrincayc
Copy link
Owner Author

jrincayc commented Feb 3, 2020

A lot of these problems have been fixed thanks to @pahihu The configure script now has a --enable-objects argument.

The manual does not mention things like kindof

So, besides the manual, is there anything else that needs to be fixed to close this bug?

@brianharvey
Copy link
Collaborator

Just make sure USUAL works. The canonical example is

make "double-turtle kindof turtle
talkto :double.turtle
to forward :dist
usual.forward 2*:dist
end

make "dashed.turtle kindof turtle
talkto :dashed.turtle
to forward :dist
if :dist < 10 [usual.forward :dist stop]
penup
usual.forward 5
pendown
usual.forward 5
forward :dist-10
end

make "turtle1 (oneof :double.turtle :dashed.turtle)
tell :turtle1 [pendown forward 100]

make "turtle2 (oneof :dashed.turtle :double.turtle)
tell :turtle2 [pendown forward 100]

What should happen is that they both move 200 steps, but turtle1 does 20 length-5 dashes while turtle2 does 10 length-10 dashes.

If this all actually works I'll add the object primitives to the manual. I'll just copy the ones from the Object Logo manual. Pretty sure I wrote that section anyway... :)

Oh this depends on having turtles as a primitive object class. Is that implemented? I'll try reading the code.

@pahihu
Copy link
Collaborator

pahihu commented Feb 4, 2020 via email

@jrincayc
Copy link
Owner Author

jrincayc commented Feb 5, 2020

@pahihu Thanks, I made a merge request out of it.

@brianharvey
Copy link
Collaborator

So, I realized later that there's no TURTLE primitive because ucblogo doesn't have multiple turtles. There's actually a whole bunch of "system objects" in Object Logo, at least some of which might be interesting. See attached chart. Files, turtles, windows, menus, menu items are things it would be great to have in version 7.0. Maybe I can throw some students at that.
system-objects

@pahihu
Copy link
Collaborator

pahihu commented Feb 7, 2020 via email

@brianharvey
Copy link
Collaborator

Excellent! Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants