Re-2: Stef, BotsInc problem...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re-2: Stef, BotsInc problem...

Frank Urbach
Hi David,

I was digging a little bit in the code of the MicroWorkspace. I saw
that Stef changed the behavior of the execution for the content of
this Workspace by clicking on the button. Every execution is bounded
with the execution of a block. This block forks. So I didn't see the
behavior of stepping in this morph but this would explain why the script
is still running after a halt.
I do not know enough to see why Stef did it in this way.
And after all I guess that the programming environment is not the goal
of the book and BotsInc.

Cheers,
  Frank

-------- Original Message --------
Subject: Re: [Newbies] Stef, BotsInc problem... (24-Jan-2007 5:19)
From:    David Mitchell <[hidden email]>
To:      [hidden email]

> I downloaded the ReadyPC image from the SCGSmallWiki site and I am able
> to repeat the problem.
>
> I think it is something wrong with the Bot Workspace. I am able to
> repeat your bug if I click the Do It or Do It All buttons in the Bot
> Workspace.
>
> The good news is you can workaround the problem (by not using the
> buttons). Instead, press Alt+D or (Command+D on Mac) to invoke the do it
> command. This is what I normally do and explains why I didn't notice the
> problem when working through the book.
>
> The Bot Workspace was added for the book. I bet the buttons worked at
> one point and a code change broke them. Went unnoticed because a lot of
> Squeakers already use the right-click context menus or the keyboard
> shortcuts.
>
> I'm running windows. Can someone test on Mac and/or Linux?
>
> I downloaded the ReadyPC image from
>
> Blake wrote:
>
> > On Mon, 22 Jan 2007 19:19:55 -0800, David Mitchell  
> > <[hidden email]> wrote:
> >
> >> That's true enough, but the stack you are debugging shouldn't continue.
> >>
> >> Unfortunately, I can't think what might be wrong. I've gone through
> >> Bots  Inc without hitting this one.
> >
> >
> > I haven't had a chance to try this out but if it doesn't
> > work...reinstall?
> > _______________________________________________
> > Beginners mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> >
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re-2: Stef, BotsInc problem...

Ned Konz
Frank Urbach wrote:

> Hi David,
>
> I was digging a little bit in the code of the MicroWorkspace. I saw
> that Stef changed the behavior of the execution for the content of
> this Workspace by clicking on the button. Every execution is bounded
> with the execution of a block. This block forks. So I didn't see the
> behavior of stepping in this morph but this would explain why the script
> is still running after a halt.
> I do not know enough to see why Stef did it in this way.
> And after all I guess that the programming environment is not the goal
> of the book and BotsInc.

The reason for the fork is simple (though the implementation is not):
Morphic is single threaded, while Stef wanted to allow multiple
independent programs written in straight Smalltalk for the purpose of
his book.

And he wanted to present things like loops and make it relatively
student-proof.

So the approach that he took was to fork each script and arrange for the
UI to be updated from time to time as the individual scripts are running.

>
> -------- Original Message --------
> Subject: Re: [Newbies] Stef, BotsInc problem... (24-Jan-2007 5:19)
> From:    David Mitchell <[hidden email]>
> To:      [hidden email]
>
>> I downloaded the ReadyPC image from the SCGSmallWiki site and I am able
>> to repeat the problem.
>>
>> I think it is something wrong with the Bot Workspace. I am able to
>> repeat your bug if I click the Do It or Do It All buttons in the Bot
>> Workspace.
>>
>> The good news is you can workaround the problem (by not using the
>> buttons). Instead, press Alt+D or (Command+D on Mac) to invoke the do it
>> command. This is what I normally do and explains why I didn't notice the
>> problem when working through the book.
>>
>> The Bot Workspace was added for the book. I bet the buttons worked at
>> one point and a code change broke them. Went unnoticed because a lot of
>> Squeakers already use the right-click context menus or the keyboard
>> shortcuts.
>>
>> I'm running windows. Can someone test on Mac and/or Linux?
>>
>> I downloaded the ReadyPC image from
>>
>> Blake wrote:
>>
>>> On Mon, 22 Jan 2007 19:19:55 -0800, David Mitchell  
>>> <[hidden email]> wrote:
>>>
>>>> That's true enough, but the stack you are debugging shouldn't continue.
>>>>
>>>> Unfortunately, I can't think what might be wrong. I've gone through
>>>> Bots  Inc without hitting this one.
>>>
>>> I haven't had a chance to try this out but if it doesn't
>>> work...reinstall?
>>> _______________________________________________
>>> Beginners mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>>
>> _______________________________________________
>> Beginners mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>



--
Ned Konz
[hidden email]
http://bike-nomad.com
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re-2: Stef, BotsInc problem...

Blake-5
> The reason for the fork is simple (though the implementation is not):  
> Morphic is single threaded, while Stef wanted to allow multiple  
> independent programs written in straight Smalltalk for the purpose of  
> his book.
>
> And he wanted to present things like loops and make it relatively  
> student-proof.
>
> So the approach that he took was to fork each script and arrange for the  
> UI to be updated from time to time as the individual scripts are running.

I figured it was something like this. I probably could've worked it out  
had I dug in but I'm more focussed on teaching at the moment. (And I think  
it's good for the problem to be known. I thought I read somewhere that  
Stef's not reading the lists regularly, though, so perhaps I should e-mail  
it directly.)
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re-2: Stef, BotsInc problem...

tblanchard
In reply to this post by Ned Konz
I often wish Squeak worked that way by default.

Too many times I've kicked off a doit that ran for too long, then began to wonder what it was doing, but the UI was frozen.  This is also true of fileins, etc.  I would strongly support an effort to do much less work in the UI thread and a clean feedback mechanism for displaying progress and killing/suspending/debugging runaway items.



On Jan 24, 2007, at 7:39 PM, Ned Konz wrote:

So the approach that he took was to fork each script and arrange for the UI to be updated from time to time as the individual scripts are running.



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re-2: Stef, BotsInc problem...

David T. Lewis
Actually, Ned's ProcessBrowser does a good job of this right now.
Try playing around with it, you will be surprised at how easy
it is to pause and restart a background process, inspect it,
and interrupt it in a debugger.

Note also <http://bugs.impara.de/view.php?id=1578>, which makes
MVC and Morphic work the same way for background processes that
update the UI (it also has a small ProcessBrowser fix).

Dave

On Thu, Jan 25, 2007 at 12:54:14PM -0800, Todd Blanchard wrote:

> I often wish Squeak worked that way by default.
>
> Too many times I've kicked off a doit that ran for too long, then  
> began to wonder what it was doing, but the UI was frozen.  This is  
> also true of fileins, etc.  I would strongly support an effort to do  
> much less work in the UI thread and a clean feedback mechanism for  
> displaying progress and killing/suspending/debugging runaway items.
>
>
>
> On Jan 24, 2007, at 7:39 PM, Ned Konz wrote:
>
> >So the approach that he took was to fork each script and arrange  
> >for the UI to be updated from time to time as the individual  
> >scripts are running.

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re-2: Stef, BotsInc problem...

tblanchard
Yes, I've gotten familiar with this tool - very useful.

Except that MC loads, fileins, doits, etc.... all run in the UI  
thread preventing access to the ProcessBrowser to see what is going on.

So when something runs amok - you're hosed.


On Jan 27, 2007, at 9:42 AM, David T. Lewis wrote:

> Actually, Ned's ProcessBrowser does a good job of this right now.
> Try playing around with it, you will be surprised at how easy
> it is to pause and restart a background process, inspect it,
> and interrupt it in a debugger.
>
> Note also <http://bugs.impara.de/view.php?id=1578>, which makes
> MVC and Morphic work the same way for background processes that
> update the UI (it also has a small ProcessBrowser fix).
>
> Dave
>
> On Thu, Jan 25, 2007 at 12:54:14PM -0800, Todd Blanchard wrote:
>> I often wish Squeak worked that way by default.
>>
>> Too many times I've kicked off a doit that ran for too long, then
>> began to wonder what it was doing, but the UI was frozen.  This is
>> also true of fileins, etc.  I would strongly support an effort to do
>> much less work in the UI thread and a clean feedback mechanism for
>> displaying progress and killing/suspending/debugging runaway items.
>>
>>
>>
>> On Jan 24, 2007, at 7:39 PM, Ned Konz wrote:
>>
>>> So the approach that he took was to fork each script and arrange
>>> for the UI to be updated from time to time as the individual
>>> scripts are running.
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners