Re: [Sugar-devel] Network version of Abecedarium: why and how
Hi Tom, Very good idea! Dont tested but yes it should works. The WebView already reference the home page using file://bundlepath/html/index.html. I dont see any reason it cant access local images on USB key. Of course, it require one USB key for each XO. Lionel. De : Thomas Gilliard [mailto:satel...@bendbroadband.com] Envoyé : mercredi 24 avril 2013 23:20 À : Walter Bender Cc : Lionel Laské; Sugar-dev Devel; satel...@bendbroadband.com Objet : Re: [Sugar-devel] Network version of Abecedarium: why and how Could the HTML5 files be addressed to a locally inserted USB? file:/// file:///\\ .. Tom Gilliard satellit On 04/24/2013 01:42 PM, Walter Bender wrote: Another thing you may consider is breaking it up into several activities (essentially removing one level hierarchy) and sharing a common database (on the school server or locally). -walter On Wed, Apr 24, 2013 at 4:38 PM, lio...@olpc-france.org mailto:lio...@olpc-france.org wrote: Hi all, Ive released last week my Abecedarium activity for Sugar 0.96+. One issue with this activity is that, due to number of contents (1500 images and sounds), its size is about 100Mo. We want to deploy the activity on our Nosy Komba deployment this year: 150 XO-1 and 50 XO-1.5. Because weve got other activities to deploy, we compute: - The free space on a XO-1 and XO-1.5 with Sugar 0.96 without any activity: 550 Mo for XO-1, 2645Mo for XO-1.5. - The size of all activities that we planned to install, see the spreadsheet [1]. Unfortunately 100 Mo is too big for the XO-1 with some other big activities (GCompris, Tuxmath, TurtleArt, Speak, ). So I choose to develop a new version named Abecedarium Net [2] without any content included, so with a size of only 6Mo. The idea is to deploy all contents on a school/web server instead of into the activity. A config file in the activity has to be set with the URL of the content, or it could be set from a dialog popup. The activity test the network regularly and display the status. Because Abecedarium is wrote in HTML5, deploying the web server just mean to copy the content of the full activity on the server. Ive explained the full process in the activity description. I will test it myself on our School Server at Madagascar but do not hesitate in the meantime to test it and give me feedback. Best regards from France. Lionel. [1] https://docs.google.com/spreadsheet/ccc?key=0ApkC1NVMZoZodDg5em1vaS04VC1vSDd oZ1Z5SHNJUXc#gid=0 [2] http://activities.sugarlabs.org/en/sugar/addon/4661 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org mailto:Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org mailto:Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Network version of Abecedarium: why and how
Hi Gonzalo, Hmmm, interesting. Youre right its a good way to explore to reduce the package size. Plus, most of the times images are displayed in the game at maximum 70% of the real size. So, Im not sure reducing quality will be visible. Im going to try. About list of contents, it could be find here: [1]. Best regards from France. Lionel. [1] https://docs.google.com/spreadsheet/ccc?key=0ApkC1NVMZoZodGF1X2lwRERIcTBrN2N oMFMtejgxbHc#gid=0 De : godi...@gmail.com [mailto:godi...@gmail.com] De la part de Gonzalo Odiard Envoyé : mercredi 24 avril 2013 23:31 À : Lionel Laské Cc : Sugar-dev Devel Objet : Re: [Sugar-devel] Network version of Abecedarium: why and how Hi Lionel, Almost 65 MB are in the html/images/database directory, I think you can reduce the size of these images to 1/4 of the actual size, just saving as gif or jpg and playing a little with the properties, without loosing too much quality. I tried with one on gimp, but you can use imagemagick or similar to reprocess all the directory Look: [gonzalo@localhost abc]$ ls -l total 152 -rw-rw-r--. 1 gonzalo gonzalo 19228 abr 24 17:59 accountant2.jpg -rw-rw-r--. 1 gonzalo gonzalo 16029 abr 24 17:59 accountant3.jpg -rw-rw-r--. 1 gonzalo gonzalo 21789 abr 24 17:56 accountant.gif -rw-rw-r--. 1 gonzalo gonzalo 28391 abr 24 17:57 accountant.jpg -rw-r--r--. 1 gonzalo gonzalo 62549 dic 9 22:57 accountant.png (accountant2.jpg is with quality 70% and accountant3.jpg with 50%) I don't know about the audio, but maybe is possible improve there too. I would like have the list of words represented on these images on pootle. I imagine many activities can use this if is a shared resource. On Wed, Apr 24, 2013 at 5:38 PM, lio...@olpc-france.org mailto:lio...@olpc-france.org wrote: Hi all, Ive released last week my Abecedarium activity for Sugar 0.96+. One issue with this activity is that, due to number of contents (1500 images and sounds), its size is about 100Mo. We want to deploy the activity on our Nosy Komba deployment this year: 150 XO-1 and 50 XO-1.5. Because weve got other activities to deploy, we compute: - The free space on a XO-1 and XO-1.5 with Sugar 0.96 without any activity: 550 Mo for XO-1, 2645Mo for XO-1.5. - The size of all activities that we planned to install, see the spreadsheet [1]. Unfortunately 100 Mo is too big for the XO-1 with some other big activities (GCompris, Tuxmath, TurtleArt, Speak, ). So I choose to develop a new version named Abecedarium Net [2] without any content included, so with a size of only 6Mo. The idea is to deploy all contents on a school/web server instead of into the activity. A config file in the activity has to be set with the URL of the content, or it could be set from a dialog popup. The activity test the network regularly and display the status. Because Abecedarium is wrote in HTML5, deploying the web server just mean to copy the content of the full activity on the server. Ive explained the full process in the activity description. I will test it myself on our School Server at Madagascar but do not hesitate in the meantime to test it and give me feedback. Best regards from France. Lionel. [1] https://docs.google.com/spreadsheet/ccc?key=0ApkC1NVMZoZodDg5em1vaS04VC1vSDd oZ1Z5SHNJUXc#gid=0 [2] http://activities.sugarlabs.org/en/sugar/addon/4661 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org mailto:Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Network version of Abecedarium: why and how
Hi, Lionel Besides any other optimizations, for a really quick and remorseless fix, you can run your images through Trimage, http://trimage.org/ , which uses some lossless compression libraries and seems to work nicely with your png resources (see attachment for an admittedly too small sample of results from your files, with impossible recursion added for fun). Best regards, David Rodriguez. El jue, 25-04-2013 a las 08:54 +0200, lio...@olpc-france.org escribió: Hi Gonzalo, Hmmm, interesting. You’re right it’s a good way to explore to reduce the package size. Plus, most of the times images are displayed in the game at maximum 70% of the real size. So, I’m not sure reducing quality will be visible. I’m going to try. About list of contents, it could be find here: [1]. Best regards from France. Lionel. [1] https://docs.google.com/spreadsheet/ccc?key=0ApkC1NVMZoZodGF1X2lwRERIcTBrN2NoMFMtejgxbHc#gid=0 De : godi...@gmail.com [mailto:godi...@gmail.com] De la part de Gonzalo Odiard Envoyé : mercredi 24 avril 2013 23:31 À : Lionel Laské Cc : Sugar-dev Devel Objet : Re: [Sugar-devel] Network version of Abecedarium: why and how Hi Lionel, Almost 65 MB are in the html/images/database directory, I think you can reduce the size of these images to 1/4 of the actual size, just saving as gif or jpg and playing a little with the properties, without loosing too much quality. I tried with one on gimp, but you can use imagemagick or similar to reprocess all the directory Look: [gonzalo@localhost abc]$ ls -l total 152 -rw-rw-r--. 1 gonzalo gonzalo 19228 abr 24 17:59 accountant2.jpg -rw-rw-r--. 1 gonzalo gonzalo 16029 abr 24 17:59 accountant3.jpg -rw-rw-r--. 1 gonzalo gonzalo 21789 abr 24 17:56 accountant.gif -rw-rw-r--. 1 gonzalo gonzalo 28391 abr 24 17:57 accountant.jpg -rw-r--r--. 1 gonzalo gonzalo 62549 dic 9 22:57 accountant.png (accountant2.jpg is with quality 70% and accountant3.jpg with 50%) I don't know about the audio, but maybe is possible improve there too. I would like have the list of words represented on these images on pootle. I imagine many activities can use this if is a shared resource. On Wed, Apr 24, 2013 at 5:38 PM, lio...@olpc-france.org wrote: Hi all, I’ve released last week my Abecedarium activity for Sugar 0.96 +. One issue with this activity is that, due to number of contents (1500 images and sounds), its size is about 100Mo. We want to deploy the activity on our Nosy Komba deployment this year: 150 XO-1 and 50 XO-1.5. Because we’ve got other activities to deploy, we compute: - The free space on a XO-1 and XO-1.5 with Sugar 0.96 without any activity: 550 Mo for XO-1, 2645Mo for XO-1.5. - The size of all activities that we planned to install, see the spreadsheet [1]. Unfortunately 100 Mo is too big for the XO-1 with some other big activities (GCompris, Tuxmath, TurtleArt, Speak, …). So I choose to develop a new version named “Abecedarium Net” [2] without any content included, so with a size of only 6Mo. The idea is to deploy all contents on a school/web server instead of into the activity. A config file in the activity has to be set with the URL of the content, or it could be set from a dialog popup. The activity test the network regularly and display the status. Because Abecedarium is wrote in HTML5, deploying the web server just mean to copy the content of the full activity on the server. I’ve explained the full process in the activity description. I will test it myself on our School Server at Madagascar but do not hesitate in the meantime to test it and give me feedback. Best regards from France. Lionel. [1] https://docs.google.com/spreadsheet/ccc?key=0ApkC1NVMZoZodDg5em1vaS04VC1vSDdoZ1Z5SHNJUXc#gid=0 [2] http://activities.sugarlabs.org/en/sugar/addon/4661 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- David Rodriguez Communications Infrastructure
Re: [Sugar-devel] Network version of Abecedarium: why and how
Nice, looking forward to do something with this. Gonzalo On Thu, Apr 25, 2013 at 3:54 AM, lio...@olpc-france.org wrote: ** ** Hi Gonzalo, ** ** Hmmm, interesting. You’re right it’s a good way to explore to reduce the package size. Plus, most of the times images are displayed in the game at maximum 70% of the real size. So, I’m not sure reducing quality will be visible. I’m going to try. About list of contents, it could be find here: [1]. ** ** Best regards from France. ** ** Lionel. ** ** ** ** [1] https://docs.google.com/spreadsheet/ccc?key=0ApkC1NVMZoZodGF1X2lwRERIcTBrN2NoMFMtejgxbHc#gid=0 ** ** *De :* godi...@gmail.com [mailto:godi...@gmail.com] *De la part de*Gonzalo Odiard *Envoyé :* mercredi 24 avril 2013 23:31 *À :* Lionel Laské *Cc :* Sugar-dev Devel *Objet :* Re: [Sugar-devel] Network version of Abecedarium: why and how*** * ** ** Hi Lionel, Almost 65 MB are in the html/images/database directory, I think you can reduce the size of these images to 1/4 of the actual size, just saving as gif or jpg and playing a little with the properties, without loosing too much quality. I tried with one on gimp, but you can use imagemagick or similar to reprocess all the directory Look: [gonzalo@localhost abc]$ ls -l total 152 -rw-rw-r--. 1 gonzalo gonzalo 19228 abr 24 17:59 accountant2.jpg -rw-rw-r--. 1 gonzalo gonzalo 16029 abr 24 17:59 accountant3.jpg -rw-rw-r--. 1 gonzalo gonzalo 21789 abr 24 17:56 accountant.gif -rw-rw-r--. 1 gonzalo gonzalo 28391 abr 24 17:57 accountant.jpg -rw-r--r--. 1 gonzalo gonzalo 62549 dic 9 22:57 accountant.png ** ** (accountant2.jpg is with quality 70% and accountant3.jpg with 50%) I don't know about the audio, but maybe is possible improve there too. ** ** I would like have the list of words represented on these images on pootle. I imagine many activities can use this if is a shared resource. ** ** ** ** On Wed, Apr 24, 2013 at 5:38 PM, lio...@olpc-france.org wrote: Hi all, I’ve released last week my Abecedarium activity for Sugar 0.96+. One issue with this activity is that, due to number of contents (1500 images and sounds), its size is about 100Mo. We want to deploy the activity on our Nosy Komba deployment this year: 150 XO-1 and 50 XO-1.5. Because we’ve got other activities to deploy, we compute: - The free space on a XO-1 and XO-1.5 with Sugar 0.96 without any activity: 550 Mo for XO-1, 2645Mo for XO-1.5. - The size of all activities that we planned to install, see the spreadsheet [1]. Unfortunately 100 Mo is too big for the XO-1 with some other big activities (GCompris, Tuxmath, TurtleArt, Speak, …). So I choose to develop a new version named “Abecedarium Net” [2] without any content included, so with a size of only 6Mo. The idea is to deploy all contents on a school/web server instead of into the activity. A config file in the activity has to be set with the URL of the content, or it could be set from a dialog popup. The activity test the network regularly and display the status. Because Abecedarium is wrote in HTML5, deploying the web server just mean to copy the content of the full activity on the server. I’ve explained the full process in the activity description. I will test it myself on our School Server at Madagascar but do not hesitate in the meantime to test it and give me feedback. Best regards from France. Lionel. [1] https://docs.google.com/spreadsheet/ccc?key=0ApkC1NVMZoZodDg5em1vaS04VC1vSDdoZ1Z5SHNJUXc#gid=0 [2] http://activities.sugarlabs.org/en/sugar/addon/4661 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ** ** ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [PATCH] G_MIN/MAX constants have been moved into GObject overrides
From: Simon Schampijer si...@laptop.org See pygobject c2aa6f0d0ed4c4e60f081b106dc7a65513963fce --- extensions/deviceicon/battery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py index 21dc5f3..6bf27ef 100644 --- a/extensions/deviceicon/battery.py +++ b/extensions/deviceicon/battery.py @@ -177,7 +177,7 @@ class BatteryPalette(Palette): class DeviceModel(GObject.GObject): __gproperties__ = { 'level': (int, None, None, 0, 100, 0, GObject.PARAM_READABLE), -'time-remaining': (int, None, None, 0, GObject.constants.G_MAXINT32, 0, +'time-remaining': (int, None, None, 0, GObject.G_MAXINT32, 0, GObject.PARAM_READABLE), # unit: seconds 'charging': (bool, None, None, False, GObject.PARAM_READABLE), 'discharging': (bool, None, None, False, GObject.PARAM_READABLE), -- 1.8.1.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] G_MIN/MAX constants have been moved into GObject overrides
The patch works with the latest Pygobject 3.8.x but as well in the 3.4.x series. Actually, using GLib.MAXINT32 would work as well. I will ask on #python what the correct/better one is. Regards, Simon On 04/25/2013 12:45 PM, Simon Schampijer wrote: From: Simon Schampijer si...@laptop.org See pygobject c2aa6f0d0ed4c4e60f081b106dc7a65513963fce --- extensions/deviceicon/battery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py index 21dc5f3..6bf27ef 100644 --- a/extensions/deviceicon/battery.py +++ b/extensions/deviceicon/battery.py @@ -177,7 +177,7 @@ class BatteryPalette(Palette): class DeviceModel(GObject.GObject): __gproperties__ = { 'level': (int, None, None, 0, 100, 0, GObject.PARAM_READABLE), -'time-remaining': (int, None, None, 0, GObject.constants.G_MAXINT32, 0, +'time-remaining': (int, None, None, 0, GObject.G_MAXINT32, 0, GObject.PARAM_READABLE), # unit: seconds 'charging': (bool, None, None, False, GObject.PARAM_READABLE), 'discharging': (bool, None, None, False, GObject.PARAM_READABLE), ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [GSoC] Mentor association
JZA: Please just jump into any of the discussion threads you find interesting. We all need help with mentoring. regards. -walter On Thu, Apr 25, 2013 at 12:21 AM, Alexandro Colorado j...@oooes.org wrote: Any comments? On 4/12/13, Alexandro Colorado j...@oooes.org wrote: Oh btw I am JZA on #sugar if you want to chat about the project and need more interactivity. On 4/12/13, Alexandro Colorado j...@oooes.org wrote: Hi I want to contribute to sugar as a mentor, I could do some co-mentorship or something similar. My Google-Melange linkdID is jza Anyone needing a backup, can drop me an email, and give me some pointers to get on board with the project at hand. -- Alexandro Colorado Apache OpenOffice Contributor http://es.openoffice.org -- Alexandro Colorado Apache OpenOffice Contributor http://es.openoffice.org -- Alexandro Colorado Apache OpenOffice Contributor http://es.openoffice.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] G_MIN/MAX constants have been moved into GObject overrides
On 04/25/2013 12:53 PM, Simon Schampijer wrote: The patch works with the latest Pygobject 3.8.x but as well in the 3.4.x series. Actually, using GLib.MAXINT32 would work as well. I will ask on #python what the correct/better one is. Regards, Simon Confirmed on #python, we should use GLib.MAXINT32 as those are pulled in directly from GI. diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py index 6bf27ef..362822d 100644 --- a/extensions/deviceicon/battery.py +++ b/extensions/deviceicon/battery.py @@ -177,7 +177,7 @@ class BatteryPalette(Palette): class DeviceModel(GObject.GObject): __gproperties__ = { 'level': (int, None, None, 0, 100, 0, GObject.PARAM_READABLE), -'time-remaining': (int, None, None, 0, GObject.G_MAXINT32, 0, +'time-remaining': (int, None, None, 0, GLib.MAXINT32, 0, GObject.PARAM_READABLE), # unit: seconds 'charging': (bool, None, None, False, GObject.PARAM_READABLE), 'discharging': (bool, None, None, False, GObject.PARAM_READABLE), Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] [SLOBS] meeting reminder
We have a Sugar Oversight board meeting at 18:00 EST (22:00 UTC) today (Thursday. 25 April). Please join us on #sugar-meeting (irc.freenode.net) or chat.sugarlabs.org. regards. -walter -- Walter Bender Sugar Labs http://www.sugarlabs.org ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] G_MIN/MAX constants have been moved into GObject overrides
+1 let's push this. 2013/4/25 Simon Schampijer si...@schampijer.de: On 04/25/2013 12:53 PM, Simon Schampijer wrote: The patch works with the latest Pygobject 3.8.x but as well in the 3.4.x series. Actually, using GLib.MAXINT32 would work as well. I will ask on #python what the correct/better one is. Regards, Simon Confirmed on #python, we should use GLib.MAXINT32 as those are pulled in directly from GI. diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py index 6bf27ef..362822d 100644 --- a/extensions/deviceicon/battery.py +++ b/extensions/deviceicon/battery.py @@ -177,7 +177,7 @@ class BatteryPalette(Palette): class DeviceModel(GObject.GObject): __gproperties__ = { 'level': (int, None, None, 0, 100, 0, GObject.PARAM_READABLE), -'time-remaining': (int, None, None, 0, GObject.G_MAXINT32, 0, +'time-remaining': (int, None, None, 0, GLib.MAXINT32, 0, GObject.PARAM_READABLE), # unit: seconds 'charging': (bool, None, None, False, GObject.PARAM_READABLE), 'discharging': (bool, None, None, False, GObject.PARAM_READABLE), Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- .. manuq .. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH] G_MIN/MAX constants have been moved into GObject overrides
Thanks, pushed to master and 0.98 (as F19 will package 0.98 and we need that fix there). Simon On 04/25/2013 02:38 PM, Manuel Quiñones wrote: +1 let's push this. 2013/4/25 Simon Schampijer si...@schampijer.de: On 04/25/2013 12:53 PM, Simon Schampijer wrote: The patch works with the latest Pygobject 3.8.x but as well in the 3.4.x series. Actually, using GLib.MAXINT32 would work as well. I will ask on #python what the correct/better one is. Regards, Simon Confirmed on #python, we should use GLib.MAXINT32 as those are pulled in directly from GI. diff --git a/extensions/deviceicon/battery.py b/extensions/deviceicon/battery.py index 6bf27ef..362822d 100644 --- a/extensions/deviceicon/battery.py +++ b/extensions/deviceicon/battery.py @@ -177,7 +177,7 @@ class BatteryPalette(Palette): class DeviceModel(GObject.GObject): __gproperties__ = { 'level': (int, None, None, 0, 100, 0, GObject.PARAM_READABLE), -'time-remaining': (int, None, None, 0, GObject.G_MAXINT32, 0, +'time-remaining': (int, None, None, 0, GLib.MAXINT32, 0, GObject.PARAM_READABLE), # unit: seconds 'charging': (bool, None, None, False, GObject.PARAM_READABLE), 'discharging': (bool, None, None, False, GObject.PARAM_READABLE), Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Bidirectional communication javascript -local server
On 20 April 2013 15:36, Daniel Narvaez dwnarv...@gmail.com wrote: Hi, I think it could work but out-of-process communication inside the same process is weird. I just realized that it's not actually the same process, because in WebKit2 (and any modern web browser) javascript is running in a separate process. So this could actually be pretty good, we should give it a try :) In an ideal world I think we would just provide minimal dbus bindings directly in the content process, but that's quite a bit of work, and it wouldn't allow us to reuse the presence code in the python toolkit. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] GSoC Translation Server Proposal
Hey Aneesh, Thanks a for going through, I'll try to answer your questions and clarify a bit for anyone else who's interested. Comments / criticisms from others on the mailing list are very welcome! I do apologize for the length of my messages, I wanted to be as specific as possible. It would be good if you could add the expected time you'll require to complete each of these phases below. Also, leave a buffer of 3 days between phases for review + feedback + other additions. Okay, will do. I think I'll have to wait until I figure out exactly what will be required in order to make an informed analysis of the time, but I expect the server / translation backend components to occupy the first half of the allocated time, finishing up some time around the midterm assessments. The client API should be a much simpler process, and will hopefully take no longer than 2 weeks. Again, I'll refine this to be far more specific when some more decisions are finalized. ...snip... The first of these plug-ins would be using Apertium, the FOSS project already used by Sugar through the #meeting-es irc channel on freenode. Next, Bing Translate will likely be added, due to it being one of the major web translators that provides a free API key. Just FYI: Bing only provides free service for upto 2 million characters per month. ( https://datamarket.azure.com/dataset/1899a118-d202-492c-aa16-ba21c33c06cb) Yeah, and the cost for the next 2 million ($40 USD) is pretty prohibitive in my view. Still, 2 million characters per month is not terrible if it's being used by a relatively small distribution of XOs / students. I do agree though that if there is a more free service, it should take preference. How about Bablefish? They don't have an API, but there is nothing which prevents you from creating one. And it seems like 20 lines of python code to me. Assuming you're talking about babelfish.com since there appear to be a couple services named babelfish. I didn't notice anything in their terms of use that prohibited screen scraping, so this definitely may look like a service to look in to. I'm not at all familiar with the quality of the translations though. I'm also a little wary of the fact that there appears to be so little information on them as a service. It seems that for all intents and purposes, the site barely exists. There's also babelfish.de which looks somewhat promising, but prohibits using automated scripts to grab data without the owner's permission. Google Translate is another high priority service due to its quality, but will not be added initially because its API has no free tier for usage. Do their terms and condition state that we can't make more than n requests? I read some threads on SO where people mentioned that they used some PHP code to make post requests to the google translate server. I just want to know that will this be illegal or will it void some of their terms and conditions? Google deactivated their free Translate API a few years back, so there's no official way to get a free translation from the service any more. It is possible (and very easy) to screen scrape Google Translate, but it's explicitly prohibited by the terms of service. Going against that would look bad for Sugar Labs, especially considering that this would be a Google Summer of Code project. I personally am very much against the idea of going around any terms of service agreement, but if someone really wanted to, there's nothing stopping someone from developing a third-party plug-in for the server independently of this project. - How do the clients become aware of the server? Is it configured, or is there some kind of auto-detection? I'd say we setup a public domain and hardcode it in the code! I'm not sure I understand your intent here. By this, you mean having only one server globally? In my mind, that would undermine the goal of having a server in the first place. Sure, having a default server run by Sugar Labs (or whoever) would make things more convenient, but I don't think it should be the only service. Part of the idea of this project is to allow users to create their own servers customized to what they need to do. Obviously having every activity that uses the API to rediscover the translation server is far from ideal, and would result in a lot of duplication. I'm not sure here, perhaps discovery could somehow be tied into the jabber server the XO is connected to? - Is it reasonable to establish large servers with more resources to be used by XO users who may not have access to a server or the technical abilities to manage one? How would abuse be prevented? What abuse? By abuse, I mean someone taking advantage of the server to provide them with unlimited translations. This is essentially only problematic when the server operator uses non-free translation services that may be limited by number of characters or is rate-limited. You also obviously don't want malicious
Re: [Sugar-devel] Network version of Abecedarium: why and how
Hi David, Cool! I didn't know that tool. I'm going to try. Lionel. -Message d'origine- De : David Rodríguez Álvarez [mailto:dar...@activitycentral.com] Envoyé : jeudi 25 avril 2013 09:31 À : lio...@olpc-france.org Cc : 'Gonzalo Odiard'; 'Sugar-dev Devel' Objet : Re: [Sugar-devel] Network version of Abecedarium: why and how Hi, Lionel Besides any other optimizations, for a really quick and remorseless fix, you can run your images through Trimage, http://trimage.org/ , which uses some lossless compression libraries and seems to work nicely with your png resources (see attachment for an admittedly too small sample of results from your files, with impossible recursion added for fun). Best regards, David Rodriguez. El jue, 25-04-2013 a las 08:54 +0200, lio...@olpc-france.org escribió: Hi Gonzalo, Hmmm, interesting. You’re right it’s a good way to explore to reduce the package size. Plus, most of the times images are displayed in the game at maximum 70% of the real size. So, I’m not sure reducing quality will be visible. I’m going to try. About list of contents, it could be find here: [1]. Best regards from France. Lionel. [1] https://docs.google.com/spreadsheet/ccc?key=0ApkC1NVMZoZodGF1X2lwRERIc TBrN2NoMFMtejgxbHc#gid=0 De : godi...@gmail.com [mailto:godi...@gmail.com] De la part de Gonzalo Odiard Envoyé : mercredi 24 avril 2013 23:31 À : Lionel Laské Cc : Sugar-dev Devel Objet : Re: [Sugar-devel] Network version of Abecedarium: why and how Hi Lionel, Almost 65 MB are in the html/images/database directory, I think you can reduce the size of these images to 1/4 of the actual size, just saving as gif or jpg and playing a little with the properties, without loosing too much quality. I tried with one on gimp, but you can use imagemagick or similar to reprocess all the directory Look: [gonzalo@localhost abc]$ ls -l total 152 -rw-rw-r--. 1 gonzalo gonzalo 19228 abr 24 17:59 accountant2.jpg -rw-rw-r--. 1 gonzalo gonzalo 16029 abr 24 17:59 accountant3.jpg -rw-rw-r--. 1 gonzalo gonzalo 21789 abr 24 17:56 accountant.gif -rw-rw-r--. 1 gonzalo gonzalo 28391 abr 24 17:57 accountant.jpg -rw-r--r--. 1 gonzalo gonzalo 62549 dic 9 22:57 accountant.png (accountant2.jpg is with quality 70% and accountant3.jpg with 50%) I don't know about the audio, but maybe is possible improve there too. I would like have the list of words represented on these images on pootle. I imagine many activities can use this if is a shared resource. On Wed, Apr 24, 2013 at 5:38 PM, lio...@olpc-france.org wrote: Hi all, I’ve released last week my Abecedarium activity for Sugar 0.96 +. One issue with this activity is that, due to number of contents (1500 images and sounds), its size is about 100Mo. We want to deploy the activity on our Nosy Komba deployment this year: 150 XO-1 and 50 XO-1.5. Because we’ve got other activities to deploy, we compute: - The free space on a XO-1 and XO-1.5 with Sugar 0.96 without any activity: 550 Mo for XO-1, 2645Mo for XO-1.5. - The size of all activities that we planned to install, see the spreadsheet [1]. Unfortunately 100 Mo is too big for the XO-1 with some other big activities (GCompris, Tuxmath, TurtleArt, Speak, …). So I choose to develop a new version named “Abecedarium Net” [2] without any content included, so with a size of only 6Mo. The idea is to deploy all contents on a school/web server instead of into the activity. A config file in the activity has to be set with the URL of the content, or it could be set from a dialog popup. The activity test the network regularly and display the status. Because Abecedarium is wrote in HTML5, deploying the web server just mean to copy the content of the full activity on the server. I’ve explained the full process in the activity description. I will test it myself on our School Server at Madagascar but do not hesitate in the meantime to test it and give me feedback. Best regards from France. Lionel. [1] https://docs.google.com/spreadsheet/ccc?key=0ApkC1NVMZoZodDg5em1vaS04V C1vSDdoZ1Z5SHNJUXc#gid=0 [2] http://activities.sugarlabs.org/en/sugar/addon/4661 ___
[Sugar-devel] Prototype python - js IPC
Hello, I wrote a quick prototype for a possible python - js IPC. sugar-toolkit-gtk3 patch https://github.com/dnarvaez/sugar-toolkit-gtk3/commit/5ba4e19732b4eec688dd73be8408c0d8e6a91299 hello-world patch https://github.com/dnarvaez/hello-world/commit/d102639bd43a99904d431210028a1ede66237427 You need the latest sugar-build if you want to give it a try. Though having a look at the code would be useful as well, it's pretty simple. Some notes: * It is based on websockets. I should note that we need some kind of IPC in any case because in WebKit2 and in modern browsers in general, the process where javascript is running and the UI process are separate. * This is communicating with the activity. I think in an ideal world the javascript code would communicate directly with system services. Though we have a lot of code which runs inside Activity to implement telepathy-based collaboration and we would have to rewrite it in javascript or somehow expose it as a service on dbus, which is going to make things even more fragile then they are already (it would be return of sugar-presence-service, sort of). I tend to think communicating with the activity process is a good compromise for now. The only way to avoid proxying through another process and talk directly to telepathy would be to implement dbus bindings in a WebKit extension, which I think at the moment would be too much work. * I'm not too convinced about introducing a dependency on twisted (I haven't measured memory usage/startup time though). It should not be too hard to write a basic GSocket based websocket server, we can look at the gtk broadway code for inspiration. * I have not picked a secondary protocol yet, autobahn implements WAMP for example. It shouldn't be hard anyway and easy to change. * The websocket server should authenticate the clients. WAMP would make that easy. The python code would generate a token and pass it to the start() call. The token would then be used to authenticate clients. In general, I need help thinking through the security implications here, not an expert! * I'm not sure finding a free port by trial and error is fine. Maybe the shell should manage a pool of ports. * This is all private to Sugar-on-linux. It should be wrapped inside the javascript API. * I don't know much about websockets performance. If anyone does please speak up :) At least they support binary transfers which we will need for collab. -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Prototype python - js IPC
On Thu, Apr 25, 2013 at 3:59 PM, Daniel Narvaez dwnarv...@gmail.com wrote: Hello, I wrote a quick prototype for a possible python - js IPC. I am missing some background here. In what cases do we need such IPC? The two cases that spring to mind are journal and collaboration. I think in an ideal world the javascript code would communicate directly with system services. I agree. To me, gobject-introspectionis the obvious choice here, and it can be used from javascript (in some form at least). How hard would it be to make it available here? Daniel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Prototype python - js IPC
On 26 April 2013 00:54, Daniel Drake d...@laptop.org wrote: On Thu, Apr 25, 2013 at 3:59 PM, Daniel Narvaez dwnarv...@gmail.com wrote: Hello, I wrote a quick prototype for a possible python - js IPC. I am missing some background here. In what cases do we need such IPC? The two cases that spring to mind are journal and collaboration. Those are the two main cases I have in mind. There might also be smaller stuff like being able to get the xo color setting. I think in an ideal world the javascript code would communicate directly with system services. I agree. To me, gobject-introspectionis the obvious choice here, and it can be used from javascript (in some form at least). How hard would it be to make it available here? Using an extension, it might be possible to run a seed context ( https://live.gnome.org/Seed) inside the web content process and then have the web context communicate with it through postMessage. Chrome is doing something similar with extensions/context scripts. I'm not sure how well exchanging binary streams would work with that approach (it's going to be important both for datastore and collaboration). In theory, since they use the same javascript interpreter, using seed it might even be possible to give access to gobject-introspection (or part of it) directly from the web context. Though that starts to feel messy. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Prototype python - js IPC
On 26 April 2013 02:36, Daniel Narvaez dwnarv...@gmail.com wrote: Using an extension, it might be possible to run a seed context ( https://live.gnome.org/Seed) inside the web content process and then have the web context communicate with it through postMessage. Chrome is doing something similar with extensions/context scripts. I'm not sure how well exchanging binary streams would work with that approach (it's going to be important both for datastore and collaboration). About binary streams, there is very likely a way to do it efficiently. ArrayBuffers for example looks like they might be helpful. In theory, since they use the same javascript interpreter, using seed it might even be possible to give access to gobject-introspection (or part of it) directly from the web context. Though that starts to feel messy. This is not possible using seed public API at least. Understandably they don't expose the js core context anywhere. All in all I'm getting to like seed-context-inside-web-process idea. Might be worth trying it out. -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Prototype python - js IPC
On 26 April 2013 03:01, Daniel Narvaez dwnarv...@gmail.com wrote: All in all I'm getting to like seed-context-inside-web-process idea. Might be worth trying it out. Actually why not a python context inside the web process? That would allow to reuse the presence service toolkit code, which I don't really want to rewrite. Sounds almost perfect... I must be missing something, /me goes to sleep :) ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel