<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<br>
<font face="DejaVu Sans Mono">Hi Robert,<br>
<br>
I will inline comments:<br>
<br>
</font><br>
<blockquote type="cite" cite="mid:web-413593@2rosenthals.com">
<div id="_htmlarea_default_style_" style="font:10pt
arial,helvetica,sans-serif">
<div align="left">Thank-you for the response. The script you
provided did not work exactly as you gave it to me, but I was
able to create a similar
one. I will tinker a bit more with it. </div>
</div>
</blockquote>
<br>
Tinkering is the master way to learning: great. But, I usually copy
and paste my examples, so, it should just work. You should
definitely check examples in the last stable release of Squeak which
at the moment is 5.2.<br>
<br>
From Amazon i see the 'Robot book' is old, 2006. It is a geological
era in computer science. So, be ready to do a lot of tweaking.<br>
<br>
I would reccomend against learning on an older version of Squeak.
Because when you will ask for help you will be in double-troubles.<br>
<br>
<blockquote type="cite" cite="mid:web-413593@2rosenthals.com">
<div id="_htmlarea_default_style_" style="font:10pt
arial,helvetica,sans-serif">
<div align="left">As you said, it can be instructive. The one
thing that did not happen as you described though
was the slow down of execution. It just kept speeding on. It
did pop up the window as expected, but as you pointed out, the
UI was
unresponsive until I did the Ctrl-. which was very handy!</div>
<div align="left"><br>
</div>
</div>
</blockquote>
<br>
Umm, consider a modern computer runs on the order of Ghz, that is,
can do some 1,000,000,000 simple calculations per seconds. That
program is counting to ~2,000 and you can see it! You shouldn't be
able to see it progressing. The take home lesson here is 'if you
want to be fast, don't print stuff, just compute' ;)<br>
<br>
Since you are preparing a lesson, you may compare the speed of
printing and the speed of the program printing only even lines, then
printing only 1/5 of the lines and so on.<br>
<br>
This knowledge is valid for all programming languages. <br>
<br>
<blockquote type="cite" cite="mid:web-413593@2rosenthals.com">
<div id="_htmlarea_default_style_" style="font:10pt
arial,helvetica,sans-serif">
<div align="left">I will continue to tinker with this and
perhaps construct my lesson based on your example here instead
of what is in the book.</div>
</div>
</blockquote>
<br>
Great! Also, to the best understanding of your students, I would
recommend not to use the local variables, but Workspace variables.
They greatly increase the tinkerability of the snippets. See my
notes here:<br>
<a href="https://wiki.squeak.org/squeak/6629">https://wiki.squeak.org/squeak/6629</a><br>
<br>
I have made a few videos for beginners in the last months which may
be of help, see the list here: <br>
<a href="https://wiki.squeak.org/squeak/6624">https://wiki.squeak.org/squeak/6624</a><br>
<br>
bye<br>
Nicola<br>
<br>
<br>
<br>
<br>
<br>
<br>
<blockquote type="cite" cite="mid:web-413593@2rosenthals.com">
<div id="_htmlarea_default_style_" style="font:10pt
arial,helvetica,sans-serif">
<div align="left"><br>
</div>
<div align="left">Robert
Kuropkat</div>
<div align="left"><br>
</div>
<div align="left">P.S. Chris Game also replied that he hit the
same snag and reported it awhile
back. I missed his original post, so will go back and look at
it also. I may also tinker with other versions of Squeak to
see if any of
them behave as described in the book.<br>
<br>
<br>
On Tue, 4 Feb 2020 19:07:59 -0800<br>
Nicola Mingotti <a class="moz-txt-link-rfc2396E" href="mailto:nmingotti@gmail.com"><nmingotti@gmail.com></a> wrote:<br>
>
<br>
> Hi,<br>
> <br>
> I never red the book of Robots, but I see a lot of <br>
>people name it.<br>
> <br>
> Anyhow, here is a simple
script that loops over integers <br>
>and stops<br>
> when it reaches the arbitrary number "1567". It stops by
<br>
>opening<br>
> a
debugger.<br>
> <br>
> In the debugger look for UndefinedObject>>doIt to
see <br>
>your code.<br>
> <br>
> This script is an example
of bad code. Indeed it will <br>
>lock your interface until it finishes its jobs. And, if <br>
>you look in the Transcript window you will see the
<br>
>counting is going on very very slowly.<br>
> <br>
> But, being so bed is instructive, because you can try to
<br>
>call the debugger
with Alt+. (try also Ctrl+. or Cmd+. it <br>
>depends on the OS) in cases like this, when the <br>
>interface gets stuck. Many times you are
going to save <br>
>your session ;)<br>
> <br>
> |i|<br>
> i := 0.<br>
> [true] whileTrue: [<br>
> i := i + 1.<br>
>
(i = 1567) ifTrue: [self halt].<br>
> Transcript ensureCr; show: ('number: {1}' format: <br>
>{i.}).<br>
>
].<br>
> <br>
> <br>
> bye<br>
> Nicola<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> On 2/4/20 10:16 AM,
Robert Kuropkat wrote:<br>
>> All,<br>
>><br>
>> I am working my way through the Squeak: Learn <br>
>>Programming with Robots and
I hit some unexpected <br>
>>behavior with the halt method in Chapter 15. I am not
at <br>
>>that computer at the moment so cannot say
exactly which <br>
>>3.x version of the VM I am using. It is using the <br>
>>Ready.image and the V3.sources
files.<br>
>><br>
>> According to the book, the halt method should cause <br>
>>execution to stop and invoke the debugger. It
does in <br>
>>fact invoke the debugger, however, it also skips past
and <br>
>>keeps executing. Is there by chance some setting
<br>
>>somewhere telling the program to skip that method and
<br>
>>keep executing?<br>
>><br>
>> I can follow-up later tonight
with better details, but <br>
>>thought I'd through the question out in case there was
in <br>
>>fact an easy
answer...<br>
>><br>
>> Robert Kuropkat<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>>
Beginners mailing list<br>
>> <a class="moz-txt-link-abbreviated" href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
>>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
>
<br>
> <br>
> -- <br>
> This email was Anti Virus checked by Astaro Security <br>
>Gateway. <a class="moz-txt-link-freetext" href="http://www.sophos.com">http://www.sophos.com</a><br>
<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>