<br><br><div class="gmail_quote">On Tue, Aug 10, 2010 at 12:34 AM, Serge Stinckwich <span dir="ltr">&lt;<a href="mailto:Serge.Stinckwich@gmail.com" target="_blank">Serge.Stinckwich@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div>On 22/06/10 09:59, Clinton Blackmore wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Greetings again.<br>
<br>
I&#39;m hacking on Scratch, which is based on MIT Squeak, which is based on<br>
Squeak 2.8.  I want to collaborate with others on a project.<br>
<br>
Monticello appears to require Squeak 3.1 or later.  Is there a way for<br>
me to upgrade an image?<br>
<br>
If not, is there a sensible way to use a revision control system?<br>
<br>
It appears to me that:<br>
<br>
1) collaborators could each create change sets, and e-mail them to each<br>
other, for every one to file in (which sounds like it would be<br>
confusing; surely I am not understanding something)<br>
<br>
or<br>
<br>
2) every class in the code could be filed out into a directory, standard<br>
version control systems could be used, and then every class could be<br>
filed back in (which likewise seems daunting).<br>
<br>
<br>
What sort of workflows would you recommend?<br>
</blockquote>
<br>
<br></div></div>
Another idea (not the easiest) is to port Scratch to a Squeak 4.1 or Pharo 1.1. I have already put all the code in a metacello repository.<br>
<br>
Regards,<br><font color="#888888">
<br>
-- <br>
Serge Stinckwich<br>
UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam<br>
Every DSL ends up being Smalltalk<br>
<a href="http://doesnotunderstand.org/" target="_blank">http://doesnotunderstand.org/</a></font></blockquote></div><div><br></div><div>I had contemplated porting the code, but was not up to the task.  In these last couple of months of slowly working on my project, I&#39;ve gone from saying, &quot;What the heck is this thing (referring to Squeak)?&quot; to saying &quot;How did I ever live without live debugging and an environment like this?  This is awesome!&quot;  And that&#39;s with a Squeak that is ten years old.<br>

</div><div><br></div><div>This is the first I&#39;ve heard of Metacello, and it wouldn&#39;t hurt me to re-read the Monticello section in Squeak By Example.  I&#39;ve installed Metacello and started on the tutorial.  How do I access your repository for Scratch?  Does it run at all for you?</div>
<div><br></div><div><br></div><div>Going back to the original question, this is the partial solution I came up with; I would&#39;ve mentioned it here earlier but for one significant shortcoming.</div><div><br></div><div>1 - I added code to go through almost all classes in the image, and check the timestamp on each selector.  If it was newer than January 1, 2010 [the Scratch source was released in fall 2009], it files out the class, using cr/lf line-endings, with a number in front marking the depth in the class hierarchy.  The modified classes are all filed out to the same directory, which can be managed with version control tools that have no idea what an image is.</div>
<div>2 - I wrote another routine to look at all the files in the Classes folder, and import them based on the order of the number in front -- ensuring that superclasses are imported before subclasses.  <br></div><div><br>
</div><div>The big shortcoming is that I have not got a good way to deal with deleting selectors or classes.  If you create a class, export it, and commit it to an external version control system, and then delete it, I have no obvious way to tell the external system that a class or method has been removed.  I&#39;m coming to the point now where that would be useful.  Conceivably I could make some sort of manual, error-prone list of timestamps for when things are deleted, and, on importing code, look at the timestamps, and, if they proceed the deletion time, delete the method or class.</div>
<div><br></div><div>I have written up how to use this system for my small team here:  </div><div><a href="http://robotclub.ab.ca/articles/31/jumpstart-guide-to-using-enchanting-with-bazaar-version-control">http://robotclub.ab.ca/articles/31/jumpstart-guide-to-using-enchanting-with-bazaar-version-control</a></div>
<div><br></div><div><br></div><div>Incidentally, Serge, seeing as you are interesting in robotics, I thought it&#39;d be worth mentioning that an important aim of my project is to allow children to program their LEGO Mindstorms Robots in a Scratch-like environment.  I am close now to being able to take a stack of Scratch blocks and export them as real Java code, which could, in turn, be compiled with LeJOS and uploaded to a Mindstorms NXT robot running custom firmware.<br>
</div><div><br></div><div>Cheers,</div><div>Clinton Blackmore</div><div><br></div>