[squeak-dev] Making morphs scriptable

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

[squeak-dev] Making morphs scriptable

rhawley
There is an eToys scriptable DiceMorph and an eToys scriptable CalculatorMorph on SqueakMap. I'd welcome comments or bug reports.

The calculator can be driven entirely from scripts, which makes it quite fun and potentially interesting for schools.

The DiceMorph is a reasonably simple example of how to make a morph scriptable.

I am surprised there aren't more eToys scriptable morphic objects available. Is there a coherent repository that I have yet to discover?

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Making morphs scriptable

Bert Freudenberg
Am 10.07.2008 um 07:25 schrieb Robert Hawley:

> There is an eToys scriptable DiceMorph and an eToys scriptable  
> CalculatorMorph on SqueakMap. I'd welcome comments or bug reports.
>
> The calculator can be driven entirely from scripts, which makes it  
> quite fun and potentially interesting for schools.
>
> The DiceMorph is a reasonably simple example of how to make a morph  
> scriptable.
>
> I am surprised there aren't more eToys scriptable morphic objects  
> available. Is there a coherent repository that I have yet to discover?

No - the Etoys community is even less organized than the Squeak  
community in general ;)

Current Etoys discussion takes place at

        http://lists.laptop.org/listinfo/etoys

We plan to switch to a community-driven development style so now is  
the perfect time to join the efforts. A public repository for  
contributions will be one of the first steps.

- Bert -



Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] Making morphs scriptable

rhawley
Thanks for the reply - I'll post this on the other list too.

Bob
________________________________________
From: Bert Freudenberg [[hidden email]]
Sent: 10 July 2008 10:54
To: Robert Hawley
Cc: The general-purpose Squeak developers list
Subject: Re: [squeak-dev] Making morphs scriptable

Am 10.07.2008 um 07:25 schrieb Robert Hawley:

> There is an eToys scriptable DiceMorph and an eToys scriptable
> CalculatorMorph on SqueakMap. I'd welcome comments or bug reports.
>
> The calculator can be driven entirely from scripts, which makes it
> quite fun and potentially interesting for schools.
>
> The DiceMorph is a reasonably simple example of how to make a morph
> scriptable.
>
> I am surprised there aren't more eToys scriptable morphic objects
> available. Is there a coherent repository that I have yet to discover?

No - the Etoys community is even less organized than the Squeak
community in general ;)

Current Etoys discussion takes place at

        http://lists.laptop.org/listinfo/etoys

We plan to switch to a community-driven development style so now is
the perfect time to join the efforts. A public repository for
contributions will be one of the first steps.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Making morphs scriptable

Bert Freudenberg
In reply to this post by Bert Freudenberg
Am 21.09.2008 um 03:51 schrieb Robert Hawley:

> Hi Bert
>
> I wrote a timesRepeatMorph and put it on SqueakMap but have found  
> the one in OLPC etoys and that is better.

Hehe - kudos to Scott :) But he also went through several iterations,  
see below.

>  Is there progress on the repository you mentioned before?

Not that I know of - Michael would be the person to talk to about the  
details going forward.

>  Is there any problem with lifting the code for the OLPC timesRepeat  
> and putting it into SqueakMap so that it can be imported to Squeak  
> Morphic?  (It would be good to have it there, but I don't want to  
> tread on someone else's toes unnecessarily).

No, on the contrary, we'd love for the Etoys changes to be merged back  
into mainstream Squeak (and vice versa), but sadly there never seems  
to be enough time for doing that.

Anyway, all the Etoys change-sets are mirrored here:

http://etoys.laptop.org/src/changesets/

and looking at the full ChangeLogs at

http://etoys.laptop.org/src/

indicates these to be relevant for times-repeat:

=== 1146timesRepeat-sw.cs ===
Change Set:             timesRepeat-sw
Date:                   20 December 2006
Author:                 Scott Wallace

Adds a 'Repeat' tile to etoys.

Caution:  All the indicated repetitions of the code in the Do section  
are run atomically when the Repeat complex is run.   I
t is tantalizing to contemplate an implementation in which the  
repetitions are distributed across successive ticks of a tick
ing script, but that is not what we have here.

NB There are still some glitches to be ironed out -- see below -- but  
the feature is usable.

Obtain a Repeat...Times tile from either of two places:
   -- a Scriptor's menu
   -- the 'miscellaneous' category in a Viewer

Still faulty:
   --  Drop-zone-highlight [green] feedback often not properly offered  
in the TIMES areas.
   --  Extension arrow is presented but nothing actually happens when  
you click on it yet.

=== 1381timesCarets-sw.cs ===
Change Set:             timesCarets-sw
Date:                   15 June 2007
Author:                 Scott Wallace

Makes the 'times' part of the Times-Repeat unit conducive to suffix  
arrow and re
tract-arrow use.

Because of the significant structure change, the new times-repeat tile  
is embodi
ed in a new classs, TimesRepeatTile, as a replacement fot  
TimesRepeatMorph.  For
  the moment at least we leave the latter in place, unchanged, for  
backward compa
tibility, though this may turn out not to have been entirely wise.

=== 1385timesRepeatFixes-sw.cs ===
Change Set:             timesRepeatFixes-sw
Date:                   23 June 2007
Author:                 Scott Wallace

Avoid error when generating code for empty-Times-area case.
Avoid error when Times area evaluates to non-integer.
Note:  The obsolete TimesRepeatMorph also has its code-generating code  
fixed her
e.

=== 2005timesRepeatFixes-sw.cs ===
Change Set:             timesRepeatFixes-sw
Date:                   28 May 2008
Author:                 Scott Wallace, Karl Ramberg

TRAC 7044:       TimesRepeat tile is not translated.

This update makes the Times, Repeat, and Do labels on Times/Repeat  
tiles translatable, but it will take a while for actual t
ranslations to catch up...

Also fixes a bug that resulted in an unwanted pale green spacer on the  
Times tile, as well as a bug that resulted in the tem
porary positioning of the extension arrow before the 2 on a nascent  
times tile (rather than after the 2, as expected) ... th
anks to Karl for both of those fixes.


- Bert -

>
> Yours
>
> Bob
> (Robert Hawley)
> ________________________________________
> From: Bert Freudenberg [[hidden email]]
> Sent: 10 July 2008 10:54
> To: Robert Hawley
> Cc: The general-purpose Squeak developers list
> Subject: Re: [squeak-dev] Making morphs scriptable
>
> Am 10.07.2008 um 07:25 schrieb Robert Hawley:
>
>> There is an eToys scriptable DiceMorph and an eToys scriptable
>> CalculatorMorph on SqueakMap. I'd welcome comments or bug reports.
>>
>> The calculator can be driven entirely from scripts, which makes it
>> quite fun and potentially interesting for schools.
>>
>> The DiceMorph is a reasonably simple example of how to make a morph
>> scriptable.
>>
>> I am surprised there aren't more eToys scriptable morphic objects
>> available. Is there a coherent repository that I have yet to  
>> discover?
>
> No - the Etoys community is even less organized than the Squeak
> community in general ;)
>
> Current Etoys discussion takes place at
>
>        http://lists.laptop.org/listinfo/etoys
>
> We plan to switch to a community-driven development style so now is
> the perfect time to join the efforts. A public repository for
> contributions will be one of the first steps.
>
> - Bert -
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Making morphs scriptable

Karl Ramberg
In reply to this post by rhawley
Robert Hawley wrote:

> There is an eToys scriptable DiceMorph and an eToys scriptable CalculatorMorph on SqueakMap. I'd welcome comments or bug reports.
>
> The calculator can be driven entirely from scripts, which makes it quite fun and potentially interesting for schools.
>
> The DiceMorph is a reasonably simple example of how to make a morph scriptable.
>
> I am surprised there aren't more eToys scriptable morphic objects available. Is there a coherent repository that I have yet to discover?
>
>
>  
Hi,
 
One way to see this issue is that you could build these widgets out of
etoys instead of handing out "black box magic objects".
That is because it is a learning project more than a production system.
But some objects are too complex and the etoys system is not general and
fast enough to build usable objects.
So it is a balancing act between what is useful and what is it that you
want to achieve.
The general way of sharing etoys objects is with projects with included
change set. And in theory document them so they are reproducible and
give a little info of the issue at hand :-)

I made a page where I published some projects I made at
http://wiki.laptop.org/go/Etoy_Project_sampler.
Feel free to use that page to publish stuff.

Karl
 

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Making morphs scriptable

Karl Ramberg
In reply to this post by rhawley
Robert Hawley wrote:

> There is an eToys scriptable DiceMorph and an eToys scriptable CalculatorMorph on SqueakMap. I'd welcome comments or bug reports.
>
> The calculator can be driven entirely from scripts, which makes it quite fun and potentially interesting for schools.
>
> The DiceMorph is a reasonably simple example of how to make a morph scriptable.
>
> I am surprised there aren't more eToys scriptable morphic objects available. Is there a coherent repository that I have yet to discover?
>
>
>  
Oh, thanks for very nice morphs !

Karl


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Making morphs scriptable

Edgar J. De Cleene
In reply to this post by Bert Freudenberg



El 9/21/08 5:28 AM, "Bert Freudenberg" <[hidden email]> escribiรณ:

> No, on the contrary, we'd love for the Etoys changes to be merged back
> into mainstream Squeak (and vice versa), but sadly there never seems
> to be enough time for doing that.
>
> Anyway, all the Etoys change-sets are mirrored here:
>
> http://etoys.laptop.org/src/changesets/
>
> and looking at the full ChangeLogs at
>
> http://etoys.laptop.org/src/


I take all changes and put in SqueakLigtII.

As at this point no 3.11 image, no 4.0 image, this is the facto more new
thing.

I do a preview for students in UTN Rosario.
Also I plan to do a presentation in Smaltalks 2008.

Stay tuned for last notice.

Edgar




Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Making morphs scriptable

Karl Ramberg
In reply to this post by Bert Freudenberg
The issue with the TimesRepeatTile is that it is running atomic, no
other stuff happens while it is running, so it basically blocks the ui
and all other stuff and if you tell it to run 100.000 times it will make
users think the system crashed.
I don't have a fix for this. But I guess you could wrap the tile in a
process and hide the quite tricky stuff behind the scenes.
It would be cool if someone tackled this issue.

Also a related is runaway processes/ scripts in general in etoys that
can happen and could use a solution.
Also a etoy debugger would be cool, where you could step trough the
tiles and follow the execution.
This would help in understanding the system and why and where stuff happen.

Karl

Bert Freudenberg wrote:

> Am 21.09.2008 um 03:51 schrieb Robert Hawley:
>
>> Hi Bert
>>
>> I wrote a timesRepeatMorph and put it on SqueakMap but have found the
>> one in OLPC etoys and that is better.
>
> Hehe - kudos to Scott :) But he also went through several iterations,
> see below.
>
>>  Is there progress on the repository you mentioned before?
>
> Not that I know of - Michael would be the person to talk to about the
> details going forward.
>
>>  Is there any problem with lifting the code for the OLPC timesRepeat
>> and putting it into SqueakMap so that it can be imported to Squeak
>> Morphic?  (It would be good to have it there, but I don't want to
>> tread on someone else's toes unnecessarily).
>
> No, on the contrary, we'd love for the Etoys changes to be merged back
> into mainstream Squeak (and vice versa), but sadly there never seems
> to be enough time for doing that.
>
> Anyway, all the Etoys change-sets are mirrored here:
>
> http://etoys.laptop.org/src/changesets/
>
> and looking at the full ChangeLogs at
>
> http://etoys.laptop.org/src/
>
> indicates these to be relevant for times-repeat:
>
> === 1146timesRepeat-sw.cs ===
> Change Set:             timesRepeat-sw
> Date:                   20 December 2006
> Author:                 Scott Wallace
>
> Adds a 'Repeat' tile to etoys.
>
> Caution:  All the indicated repetitions of the code in the Do section
> are run atomically when the Repeat complex is run.   I
> t is tantalizing to contemplate an implementation in which the
> repetitions are distributed across successive ticks of a tick
> ing script, but that is not what we have here.
>
> NB There are still some glitches to be ironed out -- see below -- but
> the feature is usable.
>
> Obtain a Repeat...Times tile from either of two places:
>   -- a Scriptor's menu
>   -- the 'miscellaneous' category in a Viewer
>
> Still faulty:
>   --  Drop-zone-highlight [green] feedback often not properly offered
> in the TIMES areas.
>   --  Extension arrow is presented but nothing actually happens when
> you click on it yet.
>
> === 1381timesCarets-sw.cs ===
> Change Set:             timesCarets-sw
> Date:                   15 June 2007
> Author:                 Scott Wallace
>
> Makes the 'times' part of the Times-Repeat unit conducive to suffix
> arrow and re
> tract-arrow use.
>
> Because of the significant structure change, the new times-repeat tile
> is embodi
> ed in a new classs, TimesRepeatTile, as a replacement fot
> TimesRepeatMorph.  For
>  the moment at least we leave the latter in place, unchanged, for
> backward compa
> tibility, though this may turn out not to have been entirely wise.
>
> === 1385timesRepeatFixes-sw.cs ===
> Change Set:             timesRepeatFixes-sw
> Date:                   23 June 2007
> Author:                 Scott Wallace
>
> Avoid error when generating code for empty-Times-area case.
> Avoid error when Times area evaluates to non-integer.
> Note:  The obsolete TimesRepeatMorph also has its code-generating code
> fixed her
> e.
>
> === 2005timesRepeatFixes-sw.cs ===
> Change Set:             timesRepeatFixes-sw
> Date:                   28 May 2008
> Author:                 Scott Wallace, Karl Ramberg
>
> TRAC 7044:       TimesRepeat tile is not translated.
>
> This update makes the Times, Repeat, and Do labels on Times/Repeat
> tiles translatable, but it will take a while for actual t
> ranslations to catch up...
>
> Also fixes a bug that resulted in an unwanted pale green spacer on the
> Times tile, as well as a bug that resulted in the tem
> porary positioning of the extension arrow before the 2 on a nascent
> times tile (rather than after the 2, as expected) ... th
> anks to Karl for both of those fixes.
>
>
> - Bert -
>
>>
>> Yours
>>
>> Bob
>> (Robert Hawley)
>> ________________________________________
>> From: Bert Freudenberg [[hidden email]]
>> Sent: 10 July 2008 10:54
>> To: Robert Hawley
>> Cc: The general-purpose Squeak developers list
>> Subject: Re: [squeak-dev] Making morphs scriptable
>>
>> Am 10.07.2008 um 07:25 schrieb Robert Hawley:
>>
>>> There is an eToys scriptable DiceMorph and an eToys scriptable
>>> CalculatorMorph on SqueakMap. I'd welcome comments or bug reports.
>>>
>>> The calculator can be driven entirely from scripts, which makes it
>>> quite fun and potentially interesting for schools.
>>>
>>> The DiceMorph is a reasonably simple example of how to make a morph
>>> scriptable.
>>>
>>> I am surprised there aren't more eToys scriptable morphic objects
>>> available. Is there a coherent repository that I have yet to discover?
>>
>> No - the Etoys community is even less organized than the Squeak
>> community in general ;)
>>
>> Current Etoys discussion takes place at
>>
>>        http://lists.laptop.org/listinfo/etoys
>>
>> We plan to switch to a community-driven development style so now is
>> the perfect time to join the efforts. A public repository for
>> contributions will be one of the first steps.
>>
>> - Bert -
>>
>>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Making morphs scriptable

Bert Freudenberg

Am 21.09.2008 um 15:03 schrieb Karl Ramberg:

> The issue with the TimesRepeatTile is that it is running atomic, no  
> other stuff happens while it is running, so it basically blocks the  
> ui and all other stuff and if you tell it to run 100.000 times it  
> will make users think the system crashed.
> I don't have a fix for this. But I guess you could wrap the tile in  
> a process and hide the quite tricky stuff behind the scenes.
> It would be cool if someone tackled this issue.

Well, it's a fundamental shortcoming of the current Etoys design.  
Tweak Etoys solves this rather nicely. Yoshiki also made something  
like you suggest for the current Etoys, but we consider that too risky  
to add at this point.

> Also a related is runaway processes/ scripts in general in etoys  
> that can happen and could use a solution.
> Also a etoy debugger would be cool, where you could step trough the  
> tiles and follow the execution.
> This would help in understanding the system and why and where stuff  
> happen.
>
> Karl

That would definitely be very nice, yes. We have no intent to work on  
this for the current Etoys so feel free to invent something :)

- Bert -

> Bert Freudenberg wrote:
>> Am 21.09.2008 um 03:51 schrieb Robert Hawley:
>>
>>> Hi Bert
>>>
>>> I wrote a timesRepeatMorph and put it on SqueakMap but have found  
>>> the one in OLPC etoys and that is better.
>>
>> Hehe - kudos to Scott :) But he also went through several  
>> iterations, see below.
>>
>>> Is there progress on the repository you mentioned before?
>>
>> Not that I know of - Michael would be the person to talk to about  
>> the details going forward.
>>
>>> Is there any problem with lifting the code for the OLPC  
>>> timesRepeat and putting it into SqueakMap so that it can be  
>>> imported to Squeak Morphic?  (It would be good to have it there,  
>>> but I don't want to tread on someone else's toes unnecessarily).
>>
>> No, on the contrary, we'd love for the Etoys changes to be merged  
>> back into mainstream Squeak (and vice versa), but sadly there never  
>> seems to be enough time for doing that.
>>
>> Anyway, all the Etoys change-sets are mirrored here:
>>
>> http://etoys.laptop.org/src/changesets/
>>
>> and looking at the full ChangeLogs at
>>
>> http://etoys.laptop.org/src/
>>
>> indicates these to be relevant for times-repeat:
>>
>> === 1146timesRepeat-sw.cs ===
>> Change Set:             timesRepeat-sw
>> Date:                   20 December 2006
>> Author:                 Scott Wallace
>>
>> Adds a 'Repeat' tile to etoys.
>>
>> Caution:  All the indicated repetitions of the code in the Do  
>> section are run atomically when the Repeat complex is run.   I
>> t is tantalizing to contemplate an implementation in which the  
>> repetitions are distributed across successive ticks of a tick
>> ing script, but that is not what we have here.
>>
>> NB There are still some glitches to be ironed out -- see below --  
>> but the feature is usable.
>>
>> Obtain a Repeat...Times tile from either of two places:
>>  -- a Scriptor's menu
>>  -- the 'miscellaneous' category in a Viewer
>>
>> Still faulty:
>>  --  Drop-zone-highlight [green] feedback often not properly  
>> offered in the TIMES areas.
>>  --  Extension arrow is presented but nothing actually happens when  
>> you click on it yet.
>>
>> === 1381timesCarets-sw.cs ===
>> Change Set:             timesCarets-sw
>> Date:                   15 June 2007
>> Author:                 Scott Wallace
>>
>> Makes the 'times' part of the Times-Repeat unit conducive to suffix  
>> arrow and re
>> tract-arrow use.
>>
>> Because of the significant structure change, the new times-repeat  
>> tile is embodi
>> ed in a new classs, TimesRepeatTile, as a replacement fot  
>> TimesRepeatMorph.  For
>> the moment at least we leave the latter in place, unchanged, for  
>> backward compa
>> tibility, though this may turn out not to have been entirely wise.
>>
>> === 1385timesRepeatFixes-sw.cs ===
>> Change Set:             timesRepeatFixes-sw
>> Date:                   23 June 2007
>> Author:                 Scott Wallace
>>
>> Avoid error when generating code for empty-Times-area case.
>> Avoid error when Times area evaluates to non-integer.
>> Note:  The obsolete TimesRepeatMorph also has its code-generating  
>> code fixed her
>> e.
>>
>> === 2005timesRepeatFixes-sw.cs ===
>> Change Set:             timesRepeatFixes-sw
>> Date:                   28 May 2008
>> Author:                 Scott Wallace, Karl Ramberg
>>
>> TRAC 7044:       TimesRepeat tile is not translated.
>>
>> This update makes the Times, Repeat, and Do labels on Times/Repeat  
>> tiles translatable, but it will take a while for actual t
>> ranslations to catch up...
>>
>> Also fixes a bug that resulted in an unwanted pale green spacer on  
>> the Times tile, as well as a bug that resulted in the tem
>> porary positioning of the extension arrow before the 2 on a nascent  
>> times tile (rather than after the 2, as expected) ... th
>> anks to Karl for both of those fixes.
>>
>>
>> - Bert -
>>
>>>
>>> Yours
>>>
>>> Bob
>>> (Robert Hawley)
>>> ________________________________________
>>> From: Bert Freudenberg [[hidden email]]
>>> Sent: 10 July 2008 10:54
>>> To: Robert Hawley
>>> Cc: The general-purpose Squeak developers list
>>> Subject: Re: [squeak-dev] Making morphs scriptable
>>>
>>> Am 10.07.2008 um 07:25 schrieb Robert Hawley:
>>>
>>>> There is an eToys scriptable DiceMorph and an eToys scriptable
>>>> CalculatorMorph on SqueakMap. I'd welcome comments or bug reports.
>>>>
>>>> The calculator can be driven entirely from scripts, which makes it
>>>> quite fun and potentially interesting for schools.
>>>>
>>>> The DiceMorph is a reasonably simple example of how to make a morph
>>>> scriptable.
>>>>
>>>> I am surprised there aren't more eToys scriptable morphic objects
>>>> available. Is there a coherent repository that I have yet to  
>>>> discover?
>>>
>>> No - the Etoys community is even less organized than the Squeak
>>> community in general ;)
>>>
>>> Current Etoys discussion takes place at
>>>
>>>       http://lists.laptop.org/listinfo/etoys
>>>
>>> We plan to switch to a community-driven development style so now is
>>> the perfect time to join the efforts. A public repository for
>>> contributions will be one of the first steps.
>>>
>>> - Bert -
>>>
>>>
>>
>>
>>
>
>




Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Making morphs scriptable

Tapple Gao
In reply to this post by rhawley
On Thu, Jul 10, 2008 at 06:25:10AM +0100, Robert Hawley wrote:
> There is an eToys scriptable DiceMorph and an eToys scriptable CalculatorMorph on SqueakMap. I'd welcome comments or bug reports.
>
> The calculator can be driven entirely from scripts, which makes it quite fun and potentially interesting for schools.
>
> The DiceMorph is a reasonably simple example of how to make a morph scriptable.

I made a somewhat simple one for a school project. It is a
circular/eliptical gauge derived from SimpleSliderMorph and
WatchMorph. It's value, min/max value, and some drawing
parameters are etoys scriptable. I extensively commented it.

http://www.squeaksource.com/gauge/Otter-mtf.5.mcz

After loading that, use this project. It only works in Squeak
3.9 and above. The fonts are messed up for some reason
http://www.public.asu.edu/~mtfulmer/GaugeProject.002.pr

> I am surprised there aren't more eToys scriptable morphic objects available. Is there a coherent repository that I have yet to discover?

--
Matthew Fulmer -- http://mtfulmer.wordpress.com/