<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">You could send strings for function blocks that can later be eval-ed.<br>
But the eval itself might slow things down a lot. <br></blockquote>yep, also it's not recommended ( <a href="http://javascript.crockford.com/code.html">http://javascript.crockford.com/code.html</a>, look for "eval is evil")<br>
<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Some browsers serialise the JSON to<br>
string and then re-eval it, others send the actual object.<br></blockquote>afaik, ff takes the message and then converts it to JSON..<br><br><br><div class="gmail_quote">2009/8/26 Lucian Branescu <span dir="ltr"><<a href="mailto:lucian.branescu@gmail.com">lucian.branescu@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">You could send strings for function blocks that can later be eval-ed.<br>
But the eval itself might slow things down a lot. You can also send<br>
JSON objects between workers. Some browsers serialise the JSON to<br>
string and then re-eval it, others send the actual object.<br>
<br>
About shared data, try to stay away from it anyway. Message passing is<br>
desirable most of the time.<br>
<br>
2009/8/25 Felipe López Toledo <<a href="mailto:zer.subzero@gmail.com">zer.subzero@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Hi<br>
> in my early post I talked about<br>
> canvas vs SVG (slide #28)<br>
> why not processingJS? (slide #28)<br>
> here some technical stuff:<br>
> ---<br>
> Browser Optimization (slide #29)<br>
> Karma lessons must run under the XO-1.<br>
> Default browser: Browse ( based on Gecko )<br>
> Experimental: Surf ( based on webkit )<br>
> No problem with html elements (div, img, ...)<br>
> What about canvas content?<br>
> Under a normal browser clearing and redrawing the canvas objects may not be<br>
> a problem, but remember that the XO has not that kind of normal resources.<br>
> We must use them efficiently.<br>
> If we have no option, it's preferable to spend cpu than spend memory.<br>
> We emphasize rendering speed over quality<br>
> image-rendering / firefox 3.6 alpha<br>
> webkit has nothing<br>
> Quadrilaterals (<a href="http://karma.sugarlabs.org/quadrilaterals/" target="_blank">http://karma.sugarlabs.org/quadrilaterals/</a>)<br>
> how does it work?<br>
> 2 canvases<br>
> the first for temporal drawing of the current line<br>
> cleared and re drawn when "mousemove"<br>
> the second has the drawn polygon, background, etc..<br>
> Quadrilaterals under Browse has a severe lag problem (unusable)<br>
> Quadrilaterals under Surf works nice<br>
> Surf-106 is faster than Browse-102, should we use Webkit or Gecko?<br>
> --<br>
> Web Workers (slide #30)<br>
> We tried to use web workers to handle animations: an animation core.<br>
> The animation core would be running as a worker thread: doing the neccesary<br>
> calculations for the animated objects and sending messages to the root<br>
> document to manipulate (update) the neccesary html elements (canvas...)<br>
> We try to combine actions with predictable behaviour.<br>
> Problems:<br>
> it's not possible to send functions as worker messages, so, it's hard to use<br>
> callbacks.<br>
> how to share memory (variables) between the root document and the worker<br>
> thread without copying that data?<br>
> --<br>
> 2009/8/21 Christoph Derndorfer <<a href="mailto:christoph.derndorfer@gmail.com">christoph.derndorfer@gmail.com</a>><br>
>><br>
>> Hey guys,<br>
>> I basically agree with the points raised here so far and have a couple to<br>
>> add myself:<br>
>> slide #11: I would also mentioned that you had tried eToys/Squeak<br>
>> slide #24: I'm not sure we agreed on each lesson having to include a<br>
>> tutorial and an exercise. Of course this is a good goal but the question is<br>
>> whether we should really make that a requirement?<br>
>> slide #32: "i81n";-)<br>
>> slide #43: add link to Karma blog at <a href="http://karmaproject.wordpress.com/" target="_blank">http://karmaproject.wordpress.com/</a>,<br>
>> add at least one e-mail address for direct contact, add link to Sugar<br>
>> mailing-list (<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a>)<br>
>> That's all I can think of for now...<br>
>> Christoph<br>
>> 2009/8/21 Felipe López Toledo <<a href="mailto:zer.subzero@gmail.com">zer.subzero@gmail.com</a>><br>
>>><br>
>>> Hi guys<br>
>>><br>
>>> Joshua, Bryan has talked Christoph and me about you, thanks for writing<br>
>>> :)<br>
>>><br>
>>>> * I would update the slide "Nobody Wants to Help", to something like,<br>
>>>> "Flash is a poor longterm solution." I would drop the claim "Flash Devs<br>
>>>> don't like to share." I would<br>
>>>> - Despite the great work of the free software community on projects<br>
>>>> like Gnash and the GameSWF library, there is very little in terms of sharing<br>
>>>> and collaboration of free software Flash projects.<br>
>>><br>
>>> +1<br>
>>>><br>
>>>> - There is no free software Flash development tool,<br>
>>><br>
>>> mmm, I remember MTASC <a href="http://www.mtasc.org/" target="_blank">http://www.mtasc.org/</a><br>
>>>><br>
>>>> instead almost all Flash development is done through the proprietary<br>
>>>> software created by Macromedia.<br>
>>><br>
>>> +1<br>
>>><br>
>>> Bryan, really good draft, here some initial feedback:<br>
>>><br>
>>> 1. SVG vs canvas<br>
>>> I used RaphalJS (<a href="http://raphaeljs.com/" target="_blank">http://raphaeljs.com/</a>) demos to test SVG animatios using<br>
>>> Browse and Surf,<br>
>>> results:<br>
>>> under surf: the XO crashed several times :(<br>
>>> under Browse: the animations look really good, but the performance is<br>
>>> really bad (you will get a several lag when clicking something, etc...)<br>
>>><br>
>>> canvas is low level so, canvas drawing is faster than SVG drawing.<br>
>>> about manipulation, well, It's really easy to manipulate SVG Objects<br>
>>> (everything you draw is an object) but canvas is just a box where you can<br>
>>> draw, Karma provides (some of) that objects.<br>
>>><br>
>>> 2. why not processingjs?<br>
>>> processingjs by default uses processing language, then if you want to use<br>
>>> it you'll need to learn processing syntax... to support that syntax,<br>
>>> processingjs uses a parser, so, it's slower than simple JS.<br>
>>> in fact, you can use javascript to access processingjs objects, but.. the<br>
>>> actual processingjs library is not designed to work under the XO, neither to<br>
>>> work as a jQuery plugin.<br>
>>> I think jresig doesn't encourage to use processing (syntax), he just take<br>
>>> processing because processing was there (looking for the reference)<br>
>>><br>
>>> I will add more info on the technical stuff.<br>
>>><br>
>>> regards<br>
>>><br>
>>> On Thu, Aug 20, 2009 at 7:57 PM, Joshua Gay <<a href="mailto:jgay@ck12.org">jgay@ck12.org</a>> wrote:<br>
>>>><br>
>>>> Bryan,<br>
>>>><br>
>>>> This is looking good so far. Here are some initial thoughts,<br>
>>>><br>
>>>> * It would be good to have a handout that puts all this info on a single<br>
>>>> double side sheet of paper (a suggestion taken from Edward Tufte's essay<br>
>>>> "The Cognitive Style of Powerpoint) for people to read along with and to<br>
>>>> look at afterward.<br>
>>>> * I think overall it can be trimmed down abit when it is being pitched<br>
>>>> to specific groups (e.g., JS crowd).<br>
>>>> * I would update the slide "Nobody Wants to Help", to something like,<br>
>>>> "Flash is a poor longterm solution." I would drop the claim "Flash Devs<br>
>>>> don't like to share." I would<br>
>>>> - Despite the great work of the free software community on projects<br>
>>>> like Gnash and the GameSWF library, there is very little in terms of sharing<br>
>>>> and collaboration of free software Flash projects.<br>
>>>> - There is no free software Flash development tool, instead almost all<br>
>>>> Flash development is done through the proprietary software created by<br>
>>>> Macromedia.<br>
>>>> * I would introduce some more lucid examples of the kinds of things you<br>
>>>> would like to use this library to create.<br>
>>>><br>
>>>><br>
>>>> I had some other thoughts on the internationalization parts, too. I will<br>
>>>> try to respond later with them. The short of it is that I think the examples<br>
>>>> you gave me (in our phone call) about gettext being an overly-burdonsome<br>
>>>> approach for JS made a lot of sense and I think it would also help to<br>
>>>> explain that you are looking for the JS equivalent of gettext; kind of<br>
>>>> abstract this part away from your specific needs as an organization, and<br>
>>>> talk about how this could benefit projects in general.<br>
>>>><br>
>>>> -Josh<br>
>>>><br>
>>>> On Thu, Aug 20, 2009 at 12:51 PM, Bryan Berry <<a href="mailto:bryan@olenepal.org">bryan@olenepal.org</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> josh, kcd, subzero<br>
>>>>><br>
>>>>> 1st off, let me introduce Josh Gay, a js dev and free textbook guru. He<br>
>>>>> is interested to make a presentation about karma to the JS devs group<br>
>>>>> in<br>
>>>>> Boston on Aug 27th.<br>
>>>>><br>
>>>>> here is a more technically-oriented presentation for karma<br>
>>>>><br>
>>>>> It is long on introduction and short on technical details. Much of the<br>
>>>>> first part could be cut out depending on the target audience. I made it<br>
>>>>> longer and more general for my first draft.<br>
>>>>><br>
>>>>> It lacks a lot of technical detail on what we need help w/ for<br>
>>>>> animation, i18n, web workers, localstorage<br>
>>>>><br>
>>>>> --<br>
>>>>> Bryan W. Berry<br>
>>>>> Technology Director<br>
>>>>> OLE Nepal, <a href="http://www.olenepal.org" target="_blank">http://www.olenepal.org</a><br>
>>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Felipe López Toledo<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>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Christoph Derndorfer<br>
>> co-editor, olpcnews<br>
>> url: <a href="http://www.olpcnews.com" target="_blank">www.olpcnews.com</a><br>
>> e-mail: <a href="mailto:christoph@olpcnews.com">christoph@olpcnews.com</a><br>
><br>
><br>
><br>
> --<br>
> Felipe López Toledo<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>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Felipe López Toledo<br>