LOGO-L> Re: Multiple Turtles 
Author Message
 LOGO-L> Re: Multiple Turtles

Quote:

> > George,

> > I made a figure with several turtles. My current turtle in No. 1. I want
> > to connect it with, for instance, turtle 2. Can this be accomplished
> > from my position? (I mean, WITHOUT asking explicitly any of the turtles
> > about its POS and AFTER it connecting the two points.)

> > In other words: What FUNCTION gives me the POS, or HEADING of a turtle,
> > while I'm activating another turtle?
> Think like a carpenter. If the tool does not exist to
> do the job, then build a tool (a jig) to make it so.

> to posturtle :t
> localmake "st turtle
> setturtle :t
> localmake "tp pos
> setturtle :st
> op :tp
> end

> You can do distturtle, headingturtle, orientationturtle, towardsturtle
> setposturtle, in the same fashion. I could spend a life time expanding
> the library.

George,

This must be in Logo proper, not in the library, in light of the
importance of functional programming.

I'm expecting a *primitive* function (instead of the 5 suggested library
functions), named maybe TURTLE, that will enable commands like:

        SETXY TURTLE 5, SETH TOWARDS TURTLE 4, etc.

If I recall well, that was the situation in LogoWriter. I don't know how
is it in PC Logo or MicroWorlds. Deserves a check.

Thank You,

[[Yehuda]]

---------------------------------------------------------------





Mon, 13 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles

Quote:


> > > George,

> > > I made a figure with several turtles. My current turtle in No. 1. I want
> > > to connect it with, for instance, turtle 2. Can this be accomplished
> > > from my position? (I mean, WITHOUT asking explicitly any of the turtles
> > > about its POS and AFTER it connecting the two points.)

> > > In other words: What FUNCTION gives me the POS, or HEADING of a turtle,
> > > while I'm activating another turtle?

> > Think like a carpenter. If the tool does not exist to
> > do the job, then build a tool (a jig) to make it so.

> > to posturtle :t
> > localmake "st turtle
> > setturtle :t
> > localmake "tp pos
> > setturtle :st
> > op :tp
> > end

> > You can do distturtle, headingturtle, orientationturtle, towardsturtle
> > setposturtle, in the same fashion. I could spend a life time expanding
> > the library.

> George,

> This must be in Logo proper, not in the library, in light of the
> importance of functional programming.

> I'm expecting a *primitive* function (instead of the 5 suggested library
> functions), named maybe TURTLE, that will enable commands like:

>         SETXY TURTLE 5, SETH TOWARDS TURTLE 4, etc.

> If I recall well, that was the situation in LogoWriter. I don't know how
> is it in PC Logo or MicroWorlds. Deserves a check.

> Thank You,

> [[Yehuda]]

This attitude that everything must be a primitive to make it "ok"
is nonsense.

That's part of the reason why Logo has so many of it's functions
come in pairs, so you can expand the "Library" your liking.

That's why Brian invested so much time in the Library, BURY command
and MACROs.

Part of "expanding" the library could be part of the learning process.

Think like a carpenter. If a carpenter needed a Bench and Bosch
didn't make one, would he work on the floor? Would the bench
he built be any less a bench because he built it. However, he
would have to work on the floor to build his bench :-)

--
===============================================================
George Mills

http://www.softronix.com
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------





Tue, 14 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles

Quote:


> > > > I made a figure with several turtles. My current turtle in No. 1. I want
> > > > to connect it with, for instance, turtle 2. Can this be accomplished
> > > > from my position? (I mean, WITHOUT asking explicitly any of the turtles
> > > > about its POS and AFTER it connecting the two points.)

> > > > In other words: What FUNCTION gives me the POS, or HEADING of a turtle,
> > > > while I'm activating another turtle?

> > > Think like a carpenter. If the tool does not exist to
> > > do the job, then build a tool (a jig) to make it so.

> > > to posturtle :t
> > > localmake "st turtle
> > > setturtle :t
> > > localmake "tp pos
> > > setturtle :st
> > > op :tp
> > > end

> > > You can do distturtle, headingturtle, orientationturtle, towardsturtle
> > > setposturtle, in the same fashion. I could spend a life time expanding
> > > the library.

> > George,

> > This must be in Logo proper, not in the library, in light of the
> > importance of functional programming.

> > I'm expecting a *primitive* function (instead of the 5 suggested library
> > functions), named maybe TURTLE, that will enable commands like:

> >         SETXY TURTLE 5, SETH TOWARDS TURTLE 4, etc.

> > If I recall well, that was the situation in LogoWriter. I don't know how
> > is it in PC Logo or MicroWorlds. Deserves a check.

> > Thank You,

> > [[Yehuda]]

> This attitude that everything must be a primitive to make it "ok"
> is nonsense.

George,

I didn't say that "everything must be a primitive". All I said was that
the above TURTLE (or whatever you might call it) must be a *primitive*
and not library procedure(s).

Regards...

[[Yehuda]]

---------------------------------------------------------------





Tue, 14 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles

Quote:



> > > > > I made a figure with several turtles. My current turtle in No. 1. I want
> > > > > to connect it with, for instance, turtle 2. Can this be accomplished
> > > > > from my position? (I mean, WITHOUT asking explicitly any of the turtles
> > > > > about its POS and AFTER it connecting the two points.)

> > > > > In other words: What FUNCTION gives me the POS, or HEADING of a turtle,
> > > > > while I'm activating another turtle?

> > > > Think like a carpenter. If the tool does not exist to
> > > > do the job, then build a tool (a jig) to make it so.

> > > > to posturtle :t
> > > > localmake "st turtle
> > > > setturtle :t
> > > > localmake "tp pos
> > > > setturtle :st
> > > > op :tp
> > > > end

> > > > You can do distturtle, headingturtle, orientationturtle, towardsturtle
> > > > setposturtle, in the same fashion. I could spend a life time expanding
> > > > the library.

> > > George,

> > > This must be in Logo proper, not in the library, in light of the
> > > importance of functional programming.

> > > I'm expecting a *primitive* function (instead of the 5 suggested library
> > > functions), named maybe TURTLE, that will enable commands like:

> > >         SETXY TURTLE 5, SETH TOWARDS TURTLE 4, etc.

> > > If I recall well, that was the situation in LogoWriter. I don't know how
> > > is it in PC Logo or MicroWorlds. Deserves a check.

> > > Thank You,

> > > [[Yehuda]]

> > This attitude that everything must be a primitive to make it "ok"
> > is nonsense.

> George,

> I didn't say that "everything must be a primitive". All I said was that
> the above TURTLE (or whatever you might call it) must be a *primitive*
> and not library procedure(s).

Why is it that being built into the .EXE versus the library make
it valid. There are 100's of functions that can be written at this
similar level of convenience. The POSTURTLE above is perfectly clean.

Actually a more general function TALKTOTURTLE :turtle :command would
be fun to write.

By the way your email server is "bouncing" your mail back to
me on almost every message for the past few days.

--
===============================================================
George Mills

http://www.softronix.com
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------





Tue, 14 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles

Pardon me for jumping in...Am I missing something here?

One of the delights of Logo has always been the ability to create new
primitives to suit personal needs. Even LadyBug Logo let you create
your own commands and load them with the Preface procedure.

Quote:
> > If I recall well, that was the situation in LogoWriter. I don't know how
> > is it in PC Logo or MicroWorlds. Deserves a check.

Are you talking about TELL and/or ASK?

Regards...Jim


Date: Fri, 26 Sep 1997 19:28:03 +0200



Subject: LOGO-L> Re: Multiple Turtles


Quote:


> > > > I made a figure with several turtles. My current turtle in No. 1. I want
> > > > to connect it with, for instance, turtle 2. Can this be accomplished
> > > > from my position? (I mean, WITHOUT asking explicitly any of the turtles
> > > > about its POS and AFTER it connecting the two points.)

> > > > In other words: What FUNCTION gives me the POS, or HEADING of a turtle,
> > > > while I'm activating another turtle?

> > > Think like a carpenter. If the tool does not exist to
> > > do the job, then build a tool (a jig) to make it so.

> > > to posturtle :t
> > > localmake "st turtle
> > > setturtle :t
> > > localmake "tp pos
> > > setturtle :st
> > > op :tp
> > > end

> > > You can do distturtle, headingturtle, orientationturtle, towardsturtle
> > > setposturtle, in the same fashion. I could spend a life time expanding
> > > the library.

> > George,

> > This must be in Logo proper, not in the library, in light of the
> > importance of functional programming.

> > I'm expecting a *primitive* function (instead of the 5 suggested library
> > functions), named maybe TURTLE, that will enable commands like:

> >         SETXY TURTLE 5, SETH TOWARDS TURTLE 4, etc.

> > If I recall well, that was the situation in LogoWriter. I don't know how
> > is it in PC Logo or MicroWorlds. Deserves a check.

> > Thank You,

> > [[Yehuda]]

> This attitude that everything must be a primitive to make it "ok"
> is nonsense.

George,

I didn't say that "everything must be a primitive". All I said was that
the above TURTLE (or whatever you might call it) must be a *primitive*
and not library procedure(s).

Regards...

[[Yehuda]]

---------------------------------------------------------------



---------------------------------------------------------------





Tue, 14 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles

ftp://cher.media.mit.edu/pub/logo/software/mswlogo/LOGO32.ZIP

Note LOGO32.ZIP is upper case (it is an .EXE only)

This might take care of your "Beep" problem and your "Hebrew"
text problem.

--
===============================================================
George Mills

http://www.softronix.com
The www page contains some very powerful educational software.
Our single most important investment is our kids.



Tue, 14 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles

Quote:

>I'm expecting a *primitive* function (instead of the 5 suggested library
>functions), named maybe TURTLE, that will enable commands like:

>        SETXY TURTLE 5, SETH TOWARDS TURTLE 4, etc.

I don't understand the semantics of this proposed function.  Does this
example mean "set the current turtle's position to turtle 5's position,
and set the current turtle's heading towards turtle 4's position"?

But I gather that it doesn't always mean the position.  Do you expect
to be able to say

        SETH TURTLE 4

to mean "set the current turtle's heading equal to turtle 4's heading"?
Because if so, then TURTLE is not a proper function; its result depends
on something other than the arguments you give, namely, the context in
which you use it.  (That is, if you just said SETH it returns a heading;
if you just said SETXY it returns... two numbers?  I think that example
would have to be SETPOS anyway.)

Starting in LogoWriter and even more in Microworlds, LCSI has hacked up
their syntax quite a bit so that it's no longer true that everything is
a procedure call.  Their goal has been to make the notation "do the
right thing" in common cases, at the cost of making the syntax itself
quite tricky if you really look at it.

I dunno if I'd want to go down that path.



Tue, 14 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles

Quote:


> >I'm expecting a *primitive* function (instead of the 5 suggested library
> >functions), named maybe TURTLE, that will enable commands like:

> >        SETXY TURTLE 5, SETH TOWARDS TURTLE 4, etc.

> I don't understand the semantics of this proposed function.  Does this
> example mean "set the current turtle's position to turtle 5's position,
> and set the current turtle's heading towards turtle 4's position"?

Brian,

Thank your for your input.

My proposed TURTLE :N function reports the location ( as a list) of that
turtle.
So, saying SETPOS TURTLE 5 (not SETXY, sorry) is exactly as unique as
SETPOS [100 100],
SETH TOWARDS TURTLE 4 is exactly as unique as SETH TOWARDS [100 100],
DIST TURTLE 5 is exactly as unique as DIST [100 100]..

Quote:
> But I gather that it doesn't always mean the position.

What I propose is always the position, and only the position.

Quote:
> Do you expect
> to be able to say

>         SETH TURTLE 4

> to mean "set the current turtle's heading equal to turtle 4's heading"?

No, SETH TURTLE 4 is exactly as meaningless as SETH [100 100], so you
will get a "did not output" error message.

Quote:
> Because if so, then TURTLE is not a proper function; its result depends
> on something other than the arguments you give, namely, the context in
> which you use it.  
> (That is, if you just said SETH it returns a heading;

No, as I said, SETH TURTLE 4 will give an error message.  

Quote:
> I think that example would have to be SETPOS anyway.)

Correct, sorry about that.

Quote:
> Starting in LogoWriter and even more in Microworlds, LCSI has hacked up
> their syntax quite a bit so that it's no longer true that everything is
> a procedure call.  Their goal has been to make the notation "do the
> right thing" in common cases, at the cost of making the syntax itself
> quite tricky if you really look at it.

> I dunno if I'd want to go down that path.

What about going the path I propose?

Regards...

[[Yehuda]]

---------------------------------------------------------------





Wed, 15 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles

Quote:



> > >I'm expecting a *primitive* function (instead of the 5 suggested library
> > >functions), named maybe TURTLE, that will enable commands like:

> > >        SETXY TURTLE 5, SETH TOWARDS TURTLE 4, etc.

> > I don't understand the semantics of this proposed function.  Does this
> > example mean "set the current turtle's position to turtle 5's position,
> > and set the current turtle's heading towards turtle 4's position"?

> Brian,

> Thank your for your input.

> My proposed TURTLE :N function reports the location ( as a list) of that
> turtle.
> So, saying SETPOS TURTLE 5 (not SETXY, sorry) is exactly as unique as
> SETPOS [100 100],
> SETH TOWARDS TURTLE 4 is exactly as unique as SETH TOWARDS [100 100],
> DIST TURTLE 5 is exactly as unique as DIST [100 100]..

> > But I gather that it doesn't always mean the position.

> What I propose is always the position, and only the position.

> > Do you expect
> > to be able to say

> >         SETH TURTLE 4

> > to mean "set the current turtle's heading equal to turtle 4's heading"?

> No, SETH TURTLE 4 is exactly as meaningless as SETH [100 100], so you
> will get a "did not output" error message.

That would not be the error. It would be "SETH does not like [100 100]".

SETH TOWARDS TURTLE 4

Would be the correct way to use it.

But to make it less ambiguous POSTURTLE (or TURTLEPOS) makes most
sense and TURTLE (in MSWLogo) already returns the TURTLE number.

But ASK (ASKTURTLE) would be the most general purpose.

SETH ASKTURTLE 5 [HEADING]

This is in the Logo Rule book on page 453.

- Show quoted text -

Quote:

> > Because if so, then TURTLE is not a proper function; its result depends
> > on something other than the arguments you give, namely, the context in
> > which you use it.

> > (That is, if you just said SETH it returns a heading;

> No, as I said, SETH TURTLE 4 will give an error message.

> > I think that example would have to be SETPOS anyway.)

> Correct, sorry about that.

> > Starting in LogoWriter and even more in Microworlds, LCSI has hacked up
> > their syntax quite a bit so that it's no longer true that everything is
> > a procedure call.  Their goal has been to make the notation "do the
> > right thing" in common cases, at the cost of making the syntax itself
> > quite tricky if you really look at it.

> > I dunno if I'd want to go down that path.

> What about going the path I propose?

> Regards...

> [[Yehuda]]

> ---------------------------------------------------------------




--
===============================================================

http://www.softronix.com/
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------





Wed, 15 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles

Quote:

> Pardon me for jumping in...Am I missing something here?

Jim,

You are welcome any time.

Quote:
> One of the delights of Logo has always been the ability to create new
> primitives to suit personal needs. Even LadyBug Logo let you create
> your own commands and load them with the Preface procedure.

You can write library procedures, not primitives. Not everything you can
achieve by a lib. procedure: Try DOTCOL to find what's the color at a
given location, and see that you can't do it as a lib. procedure.

Quote:
> > > If I recall well, that was the situation in LogoWriter. I don't know how
> > > is it in PC Logo or MicroWorlds. Deserves a check.

> Are you talking about TELL and/or ASK?

I'm talking about a missing PRIMITIVE that reports the position of a
turtle DIRECTLY, with the need to go phisically to its position.

I don't really know TELL and/or ASK. But try it yourself: How you find
the distance between two given turtles? In my proposed primitive all you
would have to say is:

        PR DIST TURTLE 1 TURTLE 2

("TURTLE" is my suggested name for the primitive, but it can be anything
other).

Regards...

[[Yehuda]]

---------------------------------------------------------------





Wed, 15 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles

Quote:

>> Starting in LogoWriter and even more in Microworlds, LCSI has hacked up
>> their syntax quite a bit so that it's no longer true that everything is
>> a procedure call.  Their goal has been to make the notation "do the
>> right thing" in common cases, at the cost of making the syntax itself
>> quite tricky if you really look at it.

>> I dunno if I'd want to go down that path.

I'm not sure what you mean.  Could you give some examples?

-Michael

--------------------------------------------------------
Michael Tempel                    tel: 212 579 8028
Logo Foundation                   fax: 212 579 8013

New York  NY 10024
http://el.www.media.mit.edu/groups/logo-foundation/

---------------------------------------------------------------





Wed, 15 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles

Quote:

>>> Starting in LogoWriter and even more in Microworlds, LCSI has hacked up
>>> their syntax quite a bit so that it's no longer true that everything is
>>> a procedure call.
>I'm not sure what you mean.  Could you give some examples?

I suppose mainly I'm thinking about the
                turtle3,
notation to mean "ask turtle 3".


Wed, 15 Mar 2000 03:00:00 GMT  
 LOGO-L> Re: Multiple Turtles
Quote:
-----Original Message-----

Sent:   Saturday, September 27, 1997 7:32 AM
To:     Jim Muller


Subject:        Re: LOGO-L> Re: Multiple Turtles

I don't really know TELL and/or ASK. But try it yourself: How you find
the distance between two given turtles? In my proposed primitive all you
would have to say is:

        PR DIST TURTLE 1 TURTLE 2

("TURTLE" is my suggested name for the primitive, but it can be anything
other).

[RAY CATZEL]  The following is extracted from the MicroWorlds documentation and
shows the neat way LCSI deals with this issue.  It has defined a primitive
called "distance".......

distance turtle-name

Reports the distance between the current turtle and the turtle indicated. See
towards.
Example:
In this example, there are two turtles on the page.

t1,
show distance "t2

122    Your answer will be different.

towards "t2

fd distance "t2      T1 meets t2.

Set t1 to go Many Times and define the go procedure as follows. T1 will be
"trapped" around t2:

to go

fd 1
if 100 < distance "t2 [towards "t2]
end

Ray Catzel
President  ComputerPals

Internet:  http://www.computerpals.on.ca/~pals

---------------------------------------------------------------






Wed, 15 Mar 2000 03:00:00 GMT  
 
 [ 16 post ]  Go to page: [1] [2]

 Relevant Pages 

1. LOGO-L> Multiple Turtles

2. LOGO-L> Multiple Turtles

3. LOGO-L> Multiple turtles

4. LOGO-L>My DOS turtle needs to become an NT turtle

5. Searching for Geo-Logo / Turtle Math / Turtle Paths

6. Searching for Geo-Logo / Turtle Math / Turtle Paths

7. Searching for Geo-Logo / Turtle Math / Turtle Paths

8. LOGO-L> Total Turtle Trip

9. LOGO-L> Total Turtle Trip

10. LOGO-L> Re: Total Turtle Trip

11. LOGO-L> Re: Total Turtle Trip

12. LOGO-L> changing and saving turtle shapes

 

 
Powered by phpBB® Forum Software