Bert, we did have Squeak programmers but they all emigrated and are difficult to get in touch with.<div><br></div><div>I will bother Surendra, who you met, to see if he can help<br><br><div class="gmail_quote">On Sat, Jan 9, 2010 at 9:57 PM, Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Well, OLE Nepal does have Squeak programmers, and it should be rather simple for them to write a snippet that exports images and sounds from a loaded project.<br>
<br>
It's just a bit harder (but I guess not too much) to load each project in a folder and export assets found there (the trick would be to just load the project but not enter it).<br>
<br>
Extracting them without Squeak is rather infeasible.<br>
<font color="#888888"><br>
- Bert -<br>
</font><div><div></div><div class="h5"><br>
On 09.01.2010, at 16:39, Tomeu Vizoso wrote:<br>
><br>
> Adding sugar-devel to CC in case Bert wants to say anything<br>
><br>
> On Sat, Jan 9, 2010 at 16:36, Peter Gijsels <<a href="mailto:peter.gijsels@gmail.com">peter.gijsels@gmail.com</a>> wrote:<br>
>> Vaibhaw,<br>
>><br>
>> You seem to imply that there is a (difficult) way to extract them,<br>
>> could you elaborate?<br>
>><br>
>> Do you think it would be useful to have a simple way to extract these<br>
>> assets from a .pr file?<br>
>><br>
>> I can try to see if I can come up with something. I'm not guaranteeing<br>
>> anything, but I think it might be worth a shot. I think it would be<br>
>> more fun than cropping screenshots. ;-)<br>
>><br>
>> I have two possible approaches in mind:<br>
>> 1) There is probably a central place where the .pr is being read in<br>
>> and Morph objects are being constructed. If we intercept objects of<br>
>> the correct type we can dump their image data to a file. The trick is<br>
>> to find the code that does the deserializing which can be rather<br>
>> frustrating in Smalltalk if you are not familiar with the code.<br>
>><br>
>> 2) The second approach would be to just walk over all objects, see if<br>
>> they are an image, and dump them to files.<br>
>><br>
>> Do you have a Squeak development image (with development tools like<br>
>> the browser and inspector) from which I can read in these .pr files so<br>
>> that I can poke around a bit?<br>
>><br>
>> Regards,<br>
>> Peter<br>
>><br>
>> On Sat, Jan 9, 2010 at 3:04 PM, Vaibhaw (Bob) Poddar<br>
>> <<a href="mailto:vaibhawp@yahoo.co.uk">vaibhawp@yahoo.co.uk</a>> wrote:<br>
>>> Afraid not. There is no (easy) way to extract the info from the .pr files. I<br>
>>> have been just cropping the images out from the screen shots so far.<br>
>>><br>
>>> Vaibhaw (Bob) Poddar<br>
>>><br>
>>> Nepal Cell. +977.98510.61345<br>
>>> India Cell. +91.99999.15661<br>
>>> US of A Cell. +1.415.508.4503<br>
>>><br>
>>> <a href="http://HimalayanTechies.com" target="_blank">http://HimalayanTechies.com</a><br>
>>><br>
>>> On 1/9/2010 7:43 PM, Peter Gijsels wrote:<br>
>>><br>
>>> Bryan, Vaibhaw,<br>
>>><br>
>>> I've got epaath working on my windows machine.<br>
>>><br>
>>> Do I understand correctly that all of the materials of a lesson are<br>
>>> contained in one .pr file, e.g. <a href="http://6_English_actionVerb_3.018.pr" target="_blank">6_English_actionVerb_3.018.pr</a>? The<br>
>>> epaath.image running on the squeak vm loads in that file.<br>
>>><br>
>>> Is there an easy way to extract the pictures and sounds from the .pr<br>
>>> file of the lesson?<br>
>>><br>
>>> Regards,<br>
>>> Peter<br>
>>><br>
>>> On Thu, Jan 7, 2010 at 5:45 AM, Vaibhaw (Bob) Poddar<br>
>>> <<a href="mailto:vaibhawp@yahoo.co.uk">vaibhawp@yahoo.co.uk</a>> wrote:<br>
>>><br>
>>><br>
>>> Step to get Squeak working on a Windows machine (not sure how on a Linux<br>
>>> distribution).<br>
>>><br>
>>> Download and install squeak<br>
>>> <a href="http://www.squeakland.org/download/" target="_blank">http://www.squeakland.org/download/</a><br>
>>><br>
>>> Replace the etoys.image inside the Etoys/Etyos.app/Contents/Resources with<br>
>>> the image file from the E-Paath.<br>
>>><br>
>>> That should be it. If you run into any issues I would be happy to look at<br>
>>> that.<br>
>>><br>
>>> Thanks<br>
>>><br>
>>> Vaibhaw (Bob) Poddar<br>
>>><br>
>>> Nepal Cell. +977.98510.61345<br>
>>> India Cell. +91.99999.15661<br>
>>> US of A Cell. +1.415.508.4503<br>
>>><br>
>>> <a href="http://HimalayanTechies.com" target="_blank">http://HimalayanTechies.com</a><br>
>>><br>
>>> On 1/7/2010 7:44 AM, Bryan Berry wrote:<br>
>>><br>
>>> here is the file <a href="http://karma.sugarlabs.org/Squeak.tar.bz2" target="_blank">http://karma.sugarlabs.org/Squeak.tar.bz2</a><br>
>>><br>
>>> These are all the Squeak files in the current EPaath. I am not sure how to<br>
>>> actually view the individual projects.<br>
>>> Vaibhaw: how do we do that? My Squeak skills are rusty<br>
>>><br>
>>> On Thu, Jan 7, 2010 at 7:06 AM, Bryan Berry <<a href="mailto:bryan@olenepal.org">bryan@olenepal.org</a>> wrote:<br>
>>><br>
>>><br>
>>> hey Peter,<br>
>>> first could u use <a href="http://pastie.org" target="_blank">pastie.org</a> or <a href="http://jsbin.com" target="_blank">jsbin.com</a> for small code samples? makes it<br>
>>> easier for everyone to view and comment on your code<br>
>>><br>
>>> On Thu, Jan 7, 2010 at 3:47 AM, Peter Gijsels <<a href="mailto:peter.gijsels@gmail.com">peter.gijsels@gmail.com</a>><br>
>>> wrote:<br>
>>><br>
>>><br>
>>> Hi Bryan,<br>
>>><br>
>>> I had a look at the Karma.rand() and Karma.shuffle() functions and<br>
>>> have some remarks.<br>
>>><br>
>>> Here is a link to some code illustrating the comments below:<br>
>>> <a href="http://dl.dropbox.com/u/3249723/js-shuffle.tgz" target="_blank">http://dl.dropbox.com/u/3249723/js-shuffle.tgz</a><br>
>>><br>
>>> It contains the current Karma implementation of these two functions,<br>
>>> an alternative implementation (AlternativeKarma) and some code to<br>
>>> print some histograms.<br>
>>><br>
>>> 1) The values returned by Karma.rand(min, max) are not uniform: the<br>
>>> probability of getting min is half of any other element between min<br>
>>> and max. The same goes for max. If you use Math.floor i.s.o.<br>
>>> Math.round (and adjust the argument to Math.random) you have a uniform<br>
>>> distribution.<br>
>>><br>
>>><br>
>>> Good point! Let's use your code<br>
>>> do you have any idea how we could write a unit test to check that values<br>
>>> aren't uniform? That way I don't change it back to a crappy implementation<br>
>>> by accident later<br>
>>><br>
>>><br>
>>><br>
>>> 2) The Karma.shuffle(array) function does not return each permutation<br>
>>> with equal probability. If you work through the math for a three<br>
>>> element array you can derive this. Or you can simply make a histogram<br>
>>> ;-) In the code linked above I make a histogram and you can see that<br>
>>> not every permutation is equally probable. The alternative<br>
>>> implementation uses the Fisher-Yates algorithm, and does not have this<br>
>>> problem.<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> 3) The unit test for Karma.shuffle is not deterministic: it will fail<br>
>>> with a probability 5/5! = 1/24. I do not know of a good way to test<br>
>>> these kind of functions. You could do something like the histogram<br>
>>> thing in the code above and check that the distribution is roughly<br>
>>> uniform. But then the test is still not deterministic and if you want<br>
>>> a small chance of failure, running the test would take a bit of time.<br>
>>> Maybe one thing that you should check is that the result of calling<br>
>>> shuffle() contains the same elements as the original (sort both and<br>
>>> see that they have the same elements in the same position).<br>
>>><br>
>>><br>
>>> Ouch, you can tell that my CS fundamentals are pretty weak ;)<br>
>>> I think that shuffling only 5 elements isn't really a valid test, better<br>
>>> to shuffle 25 elements and see if it fails out of 100 tests. I think 1/500<br>
>>> is a tolerable failure rate, what do u think?<br>
>>> let me test that out now<br>
>>><br>
>>><br>
>>> On an unrelated note, did you have time to prepare a download link<br>
>>> with the Squeak stuff? Tomorrow evening I have some time to have a<br>
>>> look at it.<br>
>>><br>
>>> Regards,<br>
>>> Peter<br>
>>><br>
>>><br>
>>> Sorry I uploaded most of the files but forget to upload one important<br>
>>> file, the squeak image ;). I will upload that now and send you the link<br>
>>> shortly<br>
>>><br>
>>><br>
>>><br>
>>> No virus found in this incoming message.<br>
>>> Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a><br>
>>> Version: 9.0.725 / Virus Database: 270.14.127/2603 - Release Date: 01/06/10<br>
>>> 13:20:00<br>
>>><br>
>>><br>
>>><br>
>>>><br>
>>><br>
>>><br>
>>> No virus found in this incoming message.<br>
>>> Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a><br>
>>><br>
>>> Version: 8.5.432 / Virus Database: 270.14.131/2609 - Release Date: 01/09/10<br>
>>> 07:35:00<br>
>>><br>
>>><br>
>><br>
><br>
><br>
><br>
> --<br>
> «Sugar Labs is anyone who participates in improving and using Sugar.<br>
> What Sugar Labs does is determined by the participants.» - David<br>
> Farning<br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Sugar-devel mailing list<br>
> <a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
> <a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br>
<br>
<br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</div></div></blockquote></div><br></div>