LOGO-L> STOP and STOPME 
Author Message
 LOGO-L> STOP and STOPME

Yehuda wrote in reply to Augusto:-

Quote:
>I know absolutely nothing about MicroWorlds, so sorry for asking what
>might be trivial for you:
>I don't understand what you mean by "process". Do you mean "procedure"?

I suppose the new word "process" comes from the fact that MicroWorlds does
emulate parallel processing. MicroWorlds launches independent processes. eg.
click on a button to make a song play, then on a turtle to make a bird fly.

Quote:
>You say that MW runs paralelly several "processes". How is it that done
>on a single-processor computer?

I don't know the technical details of how it is done but I think its a major
improvement. Its more like real life. We walk down the street and hum a song at
the same time in real life, naturally without thinking about it. MicroWorlds
allows us to emulate that on the computer.

Quote:
>Do you think that in MW, STOPME is an essential command and normally one
>can't do without it?

Here is a simple case that arose from the work of a year 9 student the other
day. He had a bird flying and the man walking simultaneously. He wanted the
man to stop when he reached a tree and the bird to keep on flying. He
programmed the colour brown (tree trunk) with stopme and made sure the bird
didn't fly through any brown. It was useful and easier than other ways.

--- Bill Kerr

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





Wed, 08 Dec 1999 03:00:00 GMT  
 LOGO-L> STOP and STOPME

Hello Bill and thank you for your fast reply.

Quote:

> Yehuda wrote in reply to Augusto:-

> >I know absolutely nothing about MicroWorlds, so sorry for asking what
> >might be trivial for you:

> >I don't understand what you mean by "process". Do you mean "procedure"?

> I suppose the new word "process" comes from the fact that MicroWorlds does
> emulate parallel processing. MicroWorlds launches independent processes. eg.
> click on a button to make a song play, then on a turtle to make a bird fly.

Playing music is done apparently by a seperate processor. But I still
can't see how MW can process two programs (except music) paralelly.

Quote:
> >You say that MW runs paralelly several "processes". How is it that done
> >on a single-processor computer?

> I don't know the technical details of how it is done but I think its a major
> improvement. Its more like real life. We walk down the street and hum a song at
> the same time in real life, naturally without thinking about it. MicroWorlds
> allows us to emulate that on the computer.

> >Do you think that in MW, STOPME is an essential command and normally one
> >can't do without it?

> Here is a simple case that arose from the work of a year 9 student the other
> day. He had a bird flying and the man walking simultaneously. He wanted the
> man to stop when he reached a tree and the bird to keep on flying. He
> programmed the colour brown (tree trunk) with stopme and made sure the bird
> didn't fly through any brown. It was useful and easier than other ways.

If so, THROW "TOPLEVEL is not the same as STOPME, as THROW "TOPLEVEL
stops ANY action of Logo, puts it in toplevel, as its name implies, and
returns the command to the user at the keyboard.

But I still wonder: What would happen in your above program had you used
STOP instead of STOPME?

Thank you,

[[Yehuda]]

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





Wed, 08 Dec 1999 03:00:00 GMT  
 LOGO-L> STOP and STOPME

Quote:

>Playing music is done apparently by a seperate processor. But I still
>can't see how MW can process two programs (except music) paralelly.

In effect there is a little timesharing system built into MW.  It spends
a little time on process #1, then switches to #2, then to #3, then (if
there are three processes running) back to #1.  In most timesharing
systems "a little time" means about 1/10 second, but my guess is that
in MW it's measured not in seconds but in primitive procedures invoked.
Process #1 gets to invoke a primitive, then process #2 does, etc.


Wed, 08 Dec 1999 03:00:00 GMT  
 LOGO-L> STOP and STOPME

Quote:
Yehuda Katz writes:
>But I still can't see how MW can process two programs (except music)
>parallely.

The CPU actually doesn't run multiple `processes' at the same time.
It does a little of one, then a little of the other, then a little of
the third etc.  It does this so fast that it gives the illusion of
doing them all simultaneously.  This is a standard technique.  Any
multi-tasking system uses it.

--



Wed, 08 Dec 1999 03:00:00 GMT  
 LOGO-L> STOP and STOPME

Quote:

>Playing music is done apparently by a seperate processor. But I still>
>can't see how MW can process two programs (except music) paralelly.

the music is just one example.
MW can launch different turtles and procedures independently, using the MW
launch primitive
Hopefully, someone else can provide the technical details but to be sure
parallel processing is a major improvement over earlier versions of logo IMHO.
It was much more difficult to teach kids how to do multiple animations using
earlier version such as LogoWriter, where you had to talk to one turtle, ask it
move a bit, then talk to the other one, ask it to move a bit, then put a repeat
outside of the whole thing.

Quote:

>> >Do you think that in MW, STOPME is an essential command and normally one
>> >can't do without it?

>> Here is a simple case that arose from the work of a year 9 student the other
>> day. He had a bird flying and the man walking simultaneously. He wanted the
>> man to stop when he reached a tree and the bird to keep on flying. He
>> programmed the colour brown (tree trunk) with stopme and made sure the bird
>> didn't fly through any brown. It was useful and easier than other ways.
>But I still wonder: What would happen in your above program had you used
>STOP instead of STOPME?

Stop could be used in the walking man procedure to achieve the same effect, ie.
put it in the procedure rather than program the colour. It seems to me that
this is another instance where MW is forward looking because it is teaching
students to think in an object-orientated fashion. The code naturally belongs
on the object on the page (the colour brown, tree) which simulates a natural
process, "I'm going to stop when I reach the tree". At any rate I think its
educational advantageous to cater for the different learning styles --
procedural, logical on the one hand; object based on the other.

MW has 3 stop based primitives, they are:-

stop :stops the procedure that is running, can only be used in a procedure
stopall: stops all running procedures and processes including turtles and
buttons, eg. you can use stopall on a button

stopme: stops the process in which this command was run.

In the example I have given stopme can be used to program the colour but stop
can't because stop can only be used in a procedure. Stopall is inappropriate
because that would stop the bird flying as well as the man walking.

-- Bill Kerr

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





Thu, 09 Dec 1999 03:00:00 GMT  
 LOGO-L> STOP and STOPME


Quote:
> MW has 3 stop based primitives, they are:-

> stop :stops the procedure that is running, can only be used in a procedure
> stopall: stops all running procedures and processes including turtles and
> buttons, eg. you can use stopall on a button

> stopme: stops the process in which this command was run.

Hi Bill,

Thank you for those clarifications.

I didn't know about the existence of STOPALL: This one seems to be the
equivalent of THROW "TOPLEVEL in UCBLogo.

Now I also can see the usefulness of STOPME.

Regards and thank you,

[[Yehuda]]

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





Thu, 09 Dec 1999 03:00:00 GMT  
 LOGO-L> STOP and STOPME

Is this done in a multi-threaded way or is it handled
internally to Microworlds?  In other words, is
MicroWorlds handling the scheduling, or is the
operating system?

Just curious....

        Erik



Quote:

> >Playing music is done apparently by a seperate processor. But I still
> >can't see how MW can process two programs (except music) paralelly.

> In effect there is a little timesharing system built into MW.  It spends
> a little time on process #1, then switches to #2, then to #3, then (if
> there are three processes running) back to #1.  In most timesharing
> systems "a little time" means about 1/10 second, but my guess is that
> in MW it's measured not in seconds but in primitive procedures invoked.
> Process #1 gets to invoke a primitive, then process #2 does, etc.



Fri, 10 Dec 1999 03:00:00 GMT  
 LOGO-L> STOP and STOPME

Quote:

>Is this done in a multi-threaded way or is it handled internally to
>Microworlds?  In other words, is MicroWorlds handling the scheduling, or is
>the operating system?

Operating system?  What operating system?  We're talking MacOS and
Windows 95 here!  I'm sure Microworlds does it itself.


Fri, 10 Dec 1999 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. LOGO-L> STOP and STOPME

2. LOGO-L> Apple logo/MSW Logo

3. LOGO-L> Reseach Machines Logo (RM LOGO)

4. WTD: 'ls -lR '->HTML code

5. Gawk 3.1: What are adump and stopme?

6. LOGO-L> Welcome to logo-l

7. LOGO-L> Re: Dynamic scope in Logo

8. LOGO-L> INFO re SIG-LOGO

9. LOGO-L> Logo speed

10. LOGO-L> Logo foundation site

11. LOGO-L> Logo Workshops

12. LOGO-L> Logo for MAC

 

 
Powered by phpBB® Forum Software