Re: [Sugar-devel] Interesting USB-pluggable robots, controller boards, and sensors

2011-03-04 Thread Martin Langhoff
On Fri, Mar 4, 2011 at 3:12 PM, Rafael Ortiz raf...@activitycentral.com wrote:
 We can work together in supporting Arduino for Scratch and TurtleArt.

Emiliano has Arduino + TA working, I think. Needs to be reworked as a
plugin in the new TA plugins model (which seems excellent).

On the Uy/Ceibal side, I really want to know which Arduino they are
using, and the exact sensors too. So we document that in wiki.l.o, buy
the exact same kit here, and fold it into our test plans.

 for Scratch (as listed on the robotics plan page) there is a good project
 that can be integrated.
  http://seaside.citilab.eu/scratch/arduino

Interesting! Somebody needs to look into that scratch stuff and figure
out how to integrate it so that it Just Works.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Interesting USB-pluggable robots, controller boards, and sensors

2011-03-04 Thread Martin Langhoff
On Fri, Mar 4, 2011 at 3:32 PM, Rafael Ortiz raf...@activitycentral.com wrote:
 Emiliano has Arduino + TA working, I think. Needs to be reworked as a
 plugin in the new TA plugins model (which seems excellent).

 Great, IIRC I think that also it's working only serially, i.e you
 cannot download code to the chip in order to have an autonomous system, this
 would be an excellent addition (maybe this was already integrated but i
 dunno)

Correct. The current TA+NXT is based on the nxt_python library, which
works tethered, so the NXT controller acts as a dumb slave of the
XO.

For TA I think it's ok to start like this. Our intention is to

 - add some nxt_python examples to Pippy :-)

 - add nxb, and maybe a Pippy-like NXC editor -- these create programs
that run on the NXT CPU, so you can do unplugged

That's already a ton of work to get right!

After we achieve all that, we can try the (harder) steps to get TA
programming the NXT in unplugged mode

 - teach nxt_python to export NXC code... might be hard

 - teach Emiliano's code to export NXC code, seems easier

TBH, I really like NXC, it's _addictive_ :-)



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [RELEASE] sugar-artwork-0.92.0

2011-02-23 Thread Martin Langhoff
On Wed, Feb 23, 2011 at 5:32 PM, Simon Schampijer si...@schampijer.de wrote:
 * School Server Icon (Martin Abente)

It has a tower, and a bell. Cool!


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH 1/2] shell: handle activities that cycle through windows dlo#10695

2011-02-17 Thread Martin Langhoff
On Wed, Feb 16, 2011 at 12:54 PM, Simon Schampijer si...@schampijer.de wrote:
 the general approach - just a few small comments inline.

Thanks! There's a patch in reply, and a few comments from me here...

 +    def remove_window_by_xid(self, xid):
 +        Remove a window from the windows stack.
 +        for wnd in self._windows:
 +            if wnd.get_xid() == xid:
 +                # must break after changing array

 I think this comment can go away. The code itself should be clear enough.

Sugar developers are smarter than I expect then :-) My concern is
about someone expanding the code inside the loop, and getting bitten
by my doing something that is not quite kosher.

 @@ -510,11 +529,12 @@ class ShellModel(gobject.GObject):
                  home_activity = Activity(activity_info, activity_id,
 window)
                  self._add_activity(home_activity)
              else:
 -                home_activity.set_window(window)
 +                logging.debug('setting new window for existing activity')
 +                home_activity.add_window(window)

 This code gets called for each window including the launcher. To make that
 clear maybe you can come up with another message.

I tried to make things clearer with a comment block for the function,
and more explicit debug lines. HTH.

                  logging.debug('%s launched in %f seconds.',
                      home_activity.get_type(), startup_time)

 With the current logic the debug log does not log what we expect,

Here is where we were crashing in race conditions :-/ Anyway, I had
that as a separate patch (posted together w this one). Now I've merged
this change in the patch too.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] shell: handle activities that cycle through windows dlo#10695

2011-02-17 Thread martin . langhoff
From: Martin Langhoff mar...@laptop.org

Now activities have a stack of windows (Activity._windows). The
lowest still-valid window in the stack is considered the main window.

When a window is closed, the shell finds what activity had that window,
tells it to remove it from its stack. If that was the last window
in the activities' stack, the activity is marked as closed.

With this patch, activities can switch from one window to another
safely, without sugar shell losing track of them. Activities based
on AdobeAIR have been seen to switch windows (perhaps when they navigate
from one SWF to another).

This replaces the one-window = one-activity model, where the moment
an activity closed one window (perhaps one of many) it was considered
closed by the shell.
---
Reworked based on Simon's review -- m
---

 src/jarabe/model/shell.py |  107 ++---
 1 files changed, 71 insertions(+), 36 deletions(-)

diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
index 661e370..63f6173 100644
--- a/src/jarabe/model/shell.py
+++ b/src/jarabe/model/shell.py
@@ -62,11 +62,12 @@ class Activity(gobject.GObject):
 the type of activity being created.
 activity_id -- unique identifier for this instance
 of the activity type
-window -- Main WnckWindow of the activity
+_windows -- WnckWindows registered for the activity. The lowest
+one in the stack is the main window.
 
 gobject.GObject.__init__(self)
 
-self._window = None
+self._windows = []
 self._service = None
 self._activity_id = activity_id
 self._activity_info = activity_info
@@ -74,7 +75,7 @@ class Activity(gobject.GObject):
 self._launch_status = Activity.LAUNCHING
 
 if window is not None:
-self.set_window(window)
+self.add_window(window)
 
 self._retrieve_service()
 
@@ -96,15 +97,19 @@ class Activity(gobject.GObject):
 
 launch_status = gobject.property(getter=get_launch_status)
 
-def set_window(self, window):
-Set the window for the activity
-
-We allow resetting the window for an activity so that we
-can replace the launcher once we get its real window.
-
+def add_window(self, window):
+Add a window to the windows stack.
 if not window:
 raise ValueError('window must be valid')
-self._window = window
+self._windows.append(window)
+
+def remove_window_by_xid(self, xid):
+Remove a window from the windows stack.
+for wnd in self._windows:
+if wnd.get_xid() == xid:
+self._windows.remove(wnd)
+return True
+return False
 
 def get_service(self):
 Get the activity service
@@ -118,8 +123,8 @@ class Activity(gobject.GObject):
 
 def get_title(self):
 Retrieve the application's root window's suggested title
-if self._window:
-return self._window.get_name()
+if self._windows:
+return self._windows[0].get_name()
 else:
 return ''
 
@@ -171,31 +176,44 @@ class Activity(gobject.GObject):
 
 def get_xid(self):
 Retrieve the X-windows ID of our root window
-if self._window is not None:
-return self._window.get_xid()
+if self._windows:
+return self._windows[0].get_xid()
 else:
 return None
 
+def has_xid(self, xid):
+Check if an X-window with the given xid is in the windows stack
+if self._windows:
+for wnd in self._windows:
+if wnd.get_xid() == xid:
+return True
+return False
+
 def get_window(self):
 Retrieve the X-windows root window of this application
 
-This was stored by the set_window method, which was
+This was stored by the add_window method, which was
 called by HomeModel._add_activity, which was called
 via a callback that looks for all 'window-opened'
 events.
 
+We keep a stack of the windows. The lowest window in the
+stack that is still valid we consider the main one.
+
 HomeModel currently uses a dbus service query on the
 activity to determine to which HomeActivity the newly
 launched window belongs.
 
-return self._window
+   if self._windows:
+return self._windows[0]
+return None
 
 def get_type(self):
 Retrieve the activity bundle id for future reference
-if self._window is None:
+if not self._windows:
 return None
 else:
-return wm.get_bundle_id(self._window)
+return wm.get_bundle_id(self._windows[0])
 
 def is_journal(self):
 Returns boolean if the activity is of type JournalActivity
@@ -211,7 +229,9 @@ class Activity(gobject.GObject

Re: [Sugar-devel] [Dextrose] [DESIGN] Reflect internet connectivity in the 'Network' frame icon

2011-02-15 Thread Martin Langhoff
On Mon, Feb 14, 2011 at 9:57 PM, Gary Martin garycmar...@googlemail.com wrote:
 Couldn't we use the presence service (or its equivalent)? I've always
 wanted to see a schoolserver icon in the mesh view... from which the
 user could (re-)register, initiate a backup/restore, open a browser on
 the schoolserver homepage, etc.

 +1 I've wanted to see this for a long time as well, and the stroke  fill for 
 the school server should be based on its identity,

Yes! Let's work together on a bit of UI design for that. For the
internals, I'm happy to work with whomever does the Sugar side, making
sure it makes sense with all the different technical scenarios.

One of the thoughts I have on this specific topic is that we want to
associate the XS icon to the AP, and/or have a badge on any AP that
can reach an XS.

Fork off a discussion for this?



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Reflect internet connectivity in the 'Network' frame icon

2011-02-15 Thread Martin Langhoff
On Thu, Feb 10, 2011 at 10:46 AM, Anish Mangal
an...@activitycentral.org wrote:
 Currently, the 'network' icon on the frame tells us whether we're
 connected to a network or not. Would it make sense for it to test for
 internet connectivity and maybe reflect that by displaying a small
 globe overlaid on the 'Network' icon?

Hi Anish,

Going back to your original post to note something important: these
statuses aren't important _just_ to show in the UI. This should be a
system status property that can be queried by activities and by
cronjobs / cli utils.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Reflect internet connectivity in the 'Network' frame icon

2011-02-15 Thread Martin Langhoff
On Tue, Feb 15, 2011 at 6:37 PM, James Cameron qu...@laptop.org wrote:
 NetworkManager already has sufficient functionality for reporting the
 state of a network connection.

No it doesn't; if it did I'd use it :-)

If we know whether we can see the XS or the internet we can, for example

 - run a backup (or not)
 - enable or disable the register option
 - show an icon on screen too

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Reflect internet connectivity in the 'Network' frame icon

2011-02-14 Thread Martin Langhoff
On Sun, Feb 13, 2011 at 8:59 PM, Michael Stone mich...@laptop.org wrote:
 So what network affordances [1, 2] are we supposed to make discoverable? :)

Let's not get too academic. Reading back the thread:

 - can we reach the internet? (or it might be a controlled WAN)
 - can we reach an XS?

In both cases, ping + HEAD can work. Keep it simple, this is for a
simple, low cost (cognitive _and_ computer-resources wise) indicator.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Reflect internet connectivity in the 'Network' frame icon

2011-02-14 Thread Martin Langhoff
On Mon, Feb 14, 2011 at 12:11 PM, Michael Stone mich...@laptop.org wrote:
 Let's not get too academic.

 FYI, this remark stings rather more than I think you intended.

Apologies. It was short for too long and formal, let's communicate in
shorter messages, I don't need formal or logical proof of every
statement, I need practical  productive.

Personally, I prefer short emails, more code. ask interesting
questions. working code first :-)

You posted very good ideas I agree with on the very specific topic of
this interesting idea from Anish. And then threw some open questions,
that I decline to follow, preferring to KISS. I leave the semantic
meaning of network is up for Sugar v3.0 :-)

More than enough meta for me this week -- I won't post on this
thread anymore. Apologies to Anish and to the whole list for soaking
up everyone's time.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Reflect internet connectivity in the 'Network' frame icon

2011-02-13 Thread Martin Langhoff
On Thu, Feb 10, 2011 at 10:46 AM, Anish Mangal
an...@activitycentral.org wrote:
 Currently, the 'network' icon on the frame tells us whether we're
 connected to a network or not. Would it make sense for it to test for
 internet connectivity and maybe reflect that by displaying a small
 globe overlaid on the 'Network' icon?

I like the idea, but worry also about how to do it. Some thoughts

 - make it hit a configurable (from olpc-os-builder) host, make it
also easy to disable from olpc-os-builder

 - add a similar feature that pings 'schoolserver' and indicates we
have an XS within reach

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Reflect internet connectivity in the 'Network' frame icon

2011-02-13 Thread Martin Langhoff
On Sun, Feb 13, 2011 at 6:38 PM, Michael Stone mich...@laptop.org wrote:
  The Sugar UI should make network health discoverable.

Good point in general. To what is trying to get solved, I'd word it as
Sugar UI should make network _affordances_ discoverable.

We can get a rough initial version with a ping to 'schoolserver', and
a ping to a configurable internet host.



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Reflect internet connectivity in the 'Network' frame icon

2011-02-13 Thread Martin Langhoff
On Sun, Feb 13, 2011 at 8:00 PM, Samuel Greenfeld greenf...@laptop.org wrote:
 For the schoolserver (and other jabber-based environments), wouldn't the
 best check be to see if there is a working gabble connection and that we are
 not on salut?

That only works _after_ you've registered. So no.

I'd be interested in your thoughts on -testing- this stuff.


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH 1/2] shell: handle activities that cycle through windows dlo#10695

2011-02-12 Thread martin . langhoff
From: Martin Langhoff mar...@laptop.org

Now activities have a stack of windows (Activity._windows). The
lowest still-valid window in the stack is considered the main window.

When a window is closed, the shell finds what activity had that window,
tells it to remove it from its stack. If that was the last window
in the activities' stack, the activity is marked as closed.

With this patch, activities can switch from one window to another
safely, without sugar shell losing track of them. Activities based
on AdobeAIR have been seen to switch windows (perhaps when they navigate
from one SWF to another).

This replaces the one-window = one-activity model, where the moment
an activity closed one window (perhaps one of many) it was considered
closed by the shell.
---
 src/jarabe/model/shell.py |   81 +---
 1 files changed, 53 insertions(+), 28 deletions(-)

diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
index 661e370..bd7e367 100644
--- a/src/jarabe/model/shell.py
+++ b/src/jarabe/model/shell.py
@@ -62,11 +62,12 @@ class Activity(gobject.GObject):
 the type of activity being created.
 activity_id -- unique identifier for this instance
 of the activity type
-window -- Main WnckWindow of the activity
+_windows -- WnckWindows registered for the activity. The lowest
+one in the stack is the main window.
 
 gobject.GObject.__init__(self)
 
-self._window = None
+self._windows = []
 self._service = None
 self._activity_id = activity_id
 self._activity_info = activity_info
@@ -74,7 +75,7 @@ class Activity(gobject.GObject):
 self._launch_status = Activity.LAUNCHING
 
 if window is not None:
-self.set_window(window)
+self.add_window(window)
 
 self._retrieve_service()
 
@@ -96,15 +97,20 @@ class Activity(gobject.GObject):
 
 launch_status = gobject.property(getter=get_launch_status)
 
-def set_window(self, window):
-Set the window for the activity
-
-We allow resetting the window for an activity so that we
-can replace the launcher once we get its real window.
-
+def add_window(self, window):
+Add a window to the windows stack.
 if not window:
 raise ValueError('window must be valid')
-self._window = window
+self._windows.append(window)
+
+def remove_window_by_xid(self, xid):
+Remove a window from the windows stack.
+for wnd in self._windows:
+if wnd.get_xid() == xid:
+# must break after changing array
+self._windows.remove(wnd)
+return True
+return False
 
 def get_service(self):
 Get the activity service
@@ -118,8 +124,8 @@ class Activity(gobject.GObject):
 
 def get_title(self):
 Retrieve the application's root window's suggested title
-if self._window:
-return self._window.get_name()
+if self._windows:
+return self._windows[0].get_name()
 else:
 return ''
 
@@ -171,31 +177,44 @@ class Activity(gobject.GObject):
 
 def get_xid(self):
 Retrieve the X-windows ID of our root window
-if self._window is not None:
-return self._window.get_xid()
+if self._windows:
+return self._windows[0].get_xid()
 else:
 return None
 
+def has_xid(self, xid):
+Retrieve the X-windows ID of our root window
+if self._windows:
+for wnd in self._windows:
+if wnd.get_xid() == xid:
+return True
+return None
+
 def get_window(self):
 Retrieve the X-windows root window of this application
 
-This was stored by the set_window method, which was
-called by HomeModel._add_activity, which was called
+This was stored by the add_window method, which was 
+called by HomeModel._add_activity, which was called 
 via a callback that looks for all 'window-opened'
 events.
 
+We keep a stack of the windows. The lowest window in the
+stack that is still valid we consider the main one.
+
 HomeModel currently uses a dbus service query on the
 activity to determine to which HomeActivity the newly
 launched window belongs.
 
-return self._window
+   if self._windows:
+return self._windows[0]
+return None
 
 def get_type(self):
 Retrieve the activity bundle id for future reference
-if self._window is None:
+if not self._windows:
 return None
 else:
-return wm.get_bundle_id(self._window)
+return wm.get_bundle_id(self._windows[0])
 
 def is_journal(self):
 Returns boolean if the activity is of type JournalActivity

[Sugar-devel] [PATCH 2/2] trace flipping windows for debugging purposes dlo#10683

2011-02-12 Thread martin . langhoff
From: Simon Schampijer si...@schampijer.de

badly behaved activities flip windows quickly, add log for
tracing them
---
 src/jarabe/model/shell.py |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
index bd7e367..f01eb8e 100644
--- a/src/jarabe/model/shell.py
+++ b/src/jarabe/model/shell.py
@@ -504,6 +504,9 @@ class ShellModel(gobject.GObject):
 return self._activities.index(obj)
 
 def _window_opened_cb(self, screen, window):
+# badly behaved activities flip windows quickly
+# trace it for debugging purposes dlo#10683
+logging.debug('_window_opened_cb wnd %s' % window)
 if window.get_window_type() == wnck.WINDOW_NORMAL:
 home_activity = None
 
@@ -536,8 +539,8 @@ class ShellModel(gobject.GObject):
 and home_activity.get_launch_status() == 
Activity.LAUNCHING:
 self.emit('launch-completed', home_activity)
 startup_time = time.time() - home_activity.get_launch_time()
-logging.debug('%s launched in %f seconds.',
-home_activity.get_type(), startup_time)
+logging.debug('%s launched in %f seconds.' %
+   (service_name, startup_time))
 
 if self._active_activity is None:
 self._set_active_activity(home_activity)
-- 
1.7.3.4

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar-toolkit] Insert activity root path in front of the reset of sys.path

2011-02-12 Thread Martin Langhoff
On Sat, Feb 12, 2011 at 1:57 PM, Sascha Silbe si...@activitycentral.com wrote:
 The behaviour sought by Aleksey's patch makes sense. I am surprised
 that CWD isn't set to SUGAR_BUNDLE_PATH, maybe that needs to get fixed
 instead.

 Thanks for disproving my assumption that it's something Python 2.x does
 differently and pointing at the actual issue.

 I agree that we should either change the working directory or tweak
 sys.path, but I'm still a bit worried about compatibility.

Hm. AFAICS, when an activity starts under S-0.84 the cwd is set
correctly. I've been debugging an activity that starts from a shell
script (as activities using libsugarize are prone to do) and the
script assumes (correctly) that CWD is the activity directory.

So I am intrigued about Aleksey's patch. Aleksey -- did you prep your
patch in response to an observed behaviour? What was it? Maybe the
problem was misdiagnosed?

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH 1/2] shell: handle activities that cycle through windows dlo#10695

2011-02-12 Thread Martin Langhoff
On Sat, Feb 12, 2011 at 2:09 PM,  martin.langh...@gmail.com wrote:
 diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
 index 661e370..bd7e367 100644

I'd like to recall this particular patch. Apologies, posted the wrong version.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH sugar-toolkit] Insert activity root path in front of the reset of sys.path

2011-02-12 Thread Martin Langhoff
On Sat, Feb 12, 2011 at 6:57 PM, Aleksey Lim
alsr...@activitycentral.org wrote:
 The problem is, if I got it right, that cwd means nothing for searching
 modules, only sys.path(and so) makes sense. After launching Python
 interpreter, the $0 becomes sys.path[0]. But the problem is that
 activities start from sugar-activity command, thus sys.path[0] is
 /usr/bin/. So, there is need in adding SUGAR_BUNDLE_PATH to the sys.path
 manually (ie simulate Python interpreter behaviour). But existed code
 does it wrong (add to the end of sys.path).

OK - so when starting pure Python activities, the shell is never
involved, and we just fork the python interpreter.

In that case, yes, it makes sense to put SUGAR_BUNDLE_PATH in
sys.path[0]. It mimics what Python would normally do.



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Making Sugar Shell smarter with Activities that change window

2011-02-11 Thread Martin Langhoff
Aleksey, Simon,

after tearing my hair off a bit with an app that jumps through various
windows during its lifetime, I came up with what seems to be a
reasonable strategy for handling the situation

In brief summary:

 - change the Activity.window property to an stack.
 - new windows are append()ed, closed windows are remove()d
 - the lowest window in the stack is considered the 'main' window
 - we only consider the activity instance closed once its last window is closed
 - some logging.debug() calls added to trace apps that chew through
windows like a drunken sailor

I mainly wonder about the rough logic I apply to select the 'main'
window. It appeals to my common sense -- it'll be the oldest window
that is still around -- but I know very little about gtk and window
management. Maybe there is a gtk call or convention that we should use
instead?

Trac entry at http://dev.laptop.org/ticket/10695 -- has a pair of
patches that I think are master-worthy...



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity crashes when using libsugarize.so

2011-02-10 Thread Martin Langhoff
On Thu, Feb 10, 2011 at 3:54 AM, Bert Freudenberg b...@freudenbergs.de wrote:
 libsugarize only works for well-behaved simple X11 programs. It relies on 
 certain functions being called that have been redirected to the library's 
 overrides. It's a preload-hack, not a proper library, so I'd expect many 
 programs not to work correctly.

Indeed. At this point, we think the crash comes not so much from
libsugarize but from changing windows very quickly during startup.

If we don't use libsugarize, Sugar doesn't recognize the window as
interesting, and doesn't get the callbacks.

I have a fixed-up libsugarize that doesn't cache the call results in a
static var -- it was caching the window handle too. Not sure why it is
structured like that, it doesn't seem to make sense with apps that may
switch windows.

If we do use libsugarize, Sugar gets the callbacks
(jarabe.model.shell._window_opened_cb()) and crashes querying the
window that was valid a ms ago, and now is no longer valid. This app
(Adobe AIR stuff) seems to trigger 4 window switches (that trigger the
callback) during startup. The crash doesn't always happen -- you gotta
get the timining right for the race condition.

We're tracing this to strengthen Sugar in the face of flipping
windows -- so it won't crash. But it won't be able to keep track of
the correct window for the app either.

On the other side of the fence, I'm working with the upstream on the
activity side so that it doesn't flip windows faster than the eye can
see.

Where the eye has 'persistence of vision', xorg has race conditions. Progress?



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity crashes when using libsugarize.so

2011-02-10 Thread Martin Langhoff
On Thu, Feb 10, 2011 at 8:50 AM, Martin Langhoff
martin.langh...@gmail.com wrote:
 Indeed. At this point, we think the crash comes not so much from
 libsugarize but from changing windows very quickly during startup.

Wrtiteup of my diagnosis and patches at http://dev.laptop.org/ticket/10683

Note that the patches only shrink the window. Combine them, and the
crash (with this specific program, this hw, this load profile) goes
away. Mostly :-)

Not sure if there's a way to ask gtk.gdk  wnck to query a window in a
sane manner. Maybe this race is bad API in those bindings, maybe it's
just an X11 protocol gotcha.

Where's jg when we need him? ;-)


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Activity crashes when using libsugarize.so

2011-02-09 Thread Martin Langhoff
If a newcomer to Sugar follows the instructions at
http://wiki.sugarlabs.org/go/Running_Linux_Applications_Under_Sugar to
use Albert Calahan's libsugarize.so from a precompiled binary, lots of
funny things happen.

X.org crashes with BadWindow at apparently random times -- some of the
crashes can be tracked down to specific conditions, like opening the
activity right after Sugar has started.

The solution is to grab the src and recompile. That .so is likely old.

I added a rough note in the wiki indicating that a build from src is
needed, but the overall page needs a reorg. Posting here to feed
google, increase awareness, and in case anyone has the time 
motivation to tidyup the wiki...

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity crashes when using libsugarize.so

2011-02-09 Thread Martin Langhoff
On Wed, Feb 9, 2011 at 11:08 AM, Thomas C Gilliard
satel...@bendbroadband.com wrote:
 Last year I experimented with sugarize and stored the files required in a
 local repo:

Right. Could you please change your notes to recommend that people...

 - download libsugarize.c and compile it on the target OS instead of
downloading yours?
 - use the shell version of sugarize instead of the C version?

The libsugarize.so issue is the main one. It probably only works
reliably on the specific Fedora version it was built on.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity crashes when using libsugarize.so

2011-02-09 Thread Martin Langhoff
On Wed, Feb 9, 2011 at 11:45 AM, Jon Nettleton jon.nettle...@gmail.com wrote:
 Any reason not to package both of these into an rpm and provide it in
 the OLPC repos?

Missing: a maintainer who knows and understands that it does, a
maintainer that has time to do maintain it.


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity crashes when using libsugarize.so

2011-02-09 Thread Martin Langhoff
On Wed, Feb 9, 2011 at 12:27 PM, Thomas C Gilliard
satel...@bendbroadband.com wrote:
 I do not know where  libsugarize.c  is stored.

Just follow the link in my email.


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity crashes when using libsugarize.so

2011-02-09 Thread Martin Langhoff
On Wed, Feb 9, 2011 at 10:17 AM, Martin Langhoff
martin.langh...@gmail.com wrote:
 The solution is to grab the src and recompile. That .so is likely old.

Actually, not so much of a solution. Still getting some crashes. May
be related to the program misbehaving.

grr.


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Dextrose] [PATCH sugar-toolkit] Insert activity root path in front of the reset of sys.path

2011-02-07 Thread Martin Langhoff
On Mon, Feb 7, 2011 at 4:40 AM, Sascha Silbe
sascha-ml-reply-to-201...@silbe.org wrote:
 Otherwise it is possible to include, eg, system modules before local ones.

 Which is how Python 2 usually works. Your patch would make us deviate
 from upstream, making it harder to debug.

I've done extensive programming with Python, Perl, PHP and similar
scripting languages over the last, um, 14 years. Local modules/libs
always override system ones.

To wit, note the first entry at

$ python
Python 2.7 (r27:82500, Sep 16 2010, 18:03:06)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type help, copyright, credits or license for more information.
 import sys
 sys.path
['', '/usr/lib/python27.zip', '/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload',
'/usr/lib/python2.7/site-packages',
'/usr/lib/python2.7/site-packages/PIL',
'/usr/lib/python2.7/site-packages/gst-0.10',
'/usr/lib/python2.7/site-packages/gtk-2.0',
'/usr/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info',
'/usr/lib/python2.7/site-packages/webkit-1.0']

The library the developer meant to include is a lot easier to debug
(to the developer involved) than system library changed API
subtly/silently/in a relnote encoded with a reference to a bug number.

The behaviour sought by Aleksey's patch makes sense. I am surprised
that CWD isn't set to SUGAR_BUNDLE_PATH, maybe that needs to get fixed
instead.

cheers,


m
--
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Dextrose] [PATCH sugar-toolkit] Insert activity root path in front of the reset of sys.path

2011-02-06 Thread Martin Langhoff
On Sun, Feb 6, 2011 at 9:39 PM, Aleksey Lim alsr...@activitycentral.org wrote:
 On Sun, Feb 06, 2011 at 07:22:12PM -0500, Samuel Greenfeld wrote:

 Not that would cause much of a slowdown, or that this would handle the
 (hopefully unlikely) case where Python gains modules named identically
 to Activity ones, but:

 What are we trying to solve here?  Are activities bundling third-party
 Python libraries which have to be preferred in most cases over
 system-provided ones (if present)?

 In my mind, the situation when modules that come with activity have
 higher priority than system ones is more natural/predictable.

ACK -- seen this happen in other projects before.


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TB and nxt_python - include or depend

2011-01-31 Thread Martin Langhoff
On Thu, Jan 13, 2011 at 3:04 PM, Martin Langhoff
martin.langh...@gmail.com wrote:
  - There is an nxt_python package for F9, F11 and F14.

So, this nxt_python package already in Fedora was very old. There's an
updated package athttp://dev.laptop.org/~martin/nxt/ which
installs on F14 builds -- can prep a F11 package in a few days.
Working on getting this pkg into Fedora proper.

And I have prepared a version of Emiliano's NXT branch that does not
include the nxt and usb packages.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-18 Thread Martin Langhoff
On Tue, Jan 18, 2011 at 12:41 PM, Erik Blankinship er...@mediamods.com wrote:
 On a dual-boot XO, does it make sense to use the same binary code for sugar
 activities also in gnome applications?  If so, are there guidelines or
 example acti-plications?

The gnome side will most likely be installed via RPMs (or .deb files
on Ubuntu/Fedora setups). So your Sugar app could just use the
libraries, binaries and resources/assets from the RPM.

Examples - Write.xo uses the Abiword libraries. Browse.xo uses
xulrunner (the Firefox libraries  backend). Bert pointed out EToys.

In all those cases, you get code reuse and a small Activity, but the
activity completely depends finding the things it needs.

hth,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] acti-plications: write once, run anywhere?

2011-01-18 Thread Martin Langhoff
On Tue, Jan 18, 2011 at 2:25 PM, Erik Blankinship er...@mediamods.com wrote:
 If my acti-plication has dependencies that are not part of the underlying
 build, do I need to install them on the gnome side first?

It's not technically at the gnome side... you have to install them in
the system :-)

 - Power users, developers with an XO, will use yum (or a GUI frontend
to yum) to install the required libs, and the gnome app.

 - Typical users in an OLPC deployment will often depend on the OS
image having the libs installed -- as it happens now with the examples
I've given earlier.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] TB and nxt_python - include or depend

2011-01-13 Thread Martin Langhoff
Hi Emiliano, Walter,

Looking at the situation with nxt_python on Fedora 11 and earlier OSs...

I think TB should detect availability of nxt_python (effectively
soft-depending n the rpm / deb), because:

 - The nxt_python package will also install the /etc/udev/rules.d
file, one way or another, you need either root access or the OS image
to have the packages installed. There is no way for TA to just work.

 - nxt_python has several dependencies -- you need at least pyusb
(optionally pybluez). Including all of that code, and ensuring it
works across varios Fedora and Debian/Ubuntu releases is... ugh. Right
now, with only pyusb and nxt_python this means around 5K SLOCs
(according to SLOCcount).

 - Bluetooth support also adds requirements -- bluez, pybluez, udev
rules, kmod...

 - There is an nxt_python package for F9, F11 and F14.

 - In Debian/Ubuntu-land 'python-nxt' isn't in the official repos but
a nice package is available here
http://elektranox.org/debian/old/python-nxt/

Overall, I think it's a good idea for TB to find what infra is
available, and use it. Trying to ship all this stack is messy.

In related news, I just built a F11 NBC package (which also includes
NXC) - http://dev.laptop.org/~martin/nbc/

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Conflicts in pootle

2011-01-12 Thread Martin Langhoff
On Wed, Jan 12, 2011 at 1:09 PM, Bert Freudenberg b...@freudenbergs.de wrote:
 On 12.01.2011, at 19:07, Gary Martin wrote:
 So activity developers/maintainers should never ./setup genpot, or commit 
 and push a .pot file when first building an activity?

Gary -- correct. If github allowed hooks, I'd suggest a hook that
rejects pushes that change anything in the .po file (unless the pusher
is Pootle).

 That's a very unusual setup. IMHO it should be the developer's choice when to 
 generate the POT.

Bert - I'm not an expert in PO and POT files, but Pootle seems to make
the assumtion that everything under the po directory, including the
POT file, is under its control.

The POT file is generated automatically, based on your sources, so in
general this should not be an issue. Special cases do exist I am sure
:-)

We could mess around with Pootle, but limited manpower from all sides
says... let's try to avoid it. To wit - I drafted a change that would
allow Pootle to override the POT file when necessary but I commented
out.

One oddity with Pootle is that it seems to treat the POT and PO files
it works on as the main data repository. Initially I thought its main
data was in the DB, and it would export to POT  PO files; but
apparently that's not the case. The PO and POT files are the main data
storage. So I am very hesitant to change how they are managed.

OTOH, I may have misunderstood the Pootle code, we didn't work in
depth on it :-)



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Conflicts in pootle

2011-01-12 Thread Martin Langhoff
On Wed, Jan 12, 2011 at 4:39 PM, Walter Bender walter.ben...@gmail.com wrote:
 Why are conflicts only showing up now, and for only some of my
 activities? Or had Sayamindu been cleaning things up behind the
 scenes?

Well, they've been accumulating for a while, and nobody's noticed
until we looked. When we looked earlier this week, some activities'
translations had been held up for a while.

As Gonzalo pointed out, Pootle reports errors to the end user when
synchronizing, and doesn't log them anywhere, nor report them to
admins that can sort them out. That's why we added scripts to alert
people of conflicts and other issues.

And yes, I think Sayamindu used to helpfully clean up lots of little things :-)

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Conflicts in pootle

2011-01-12 Thread Martin Langhoff
On Wed, Jan 12, 2011 at 4:57 PM, James Simmons nices...@gmail.com wrote:
 In Make Your Own Sugar Activities! I specifically tell people to run
 ./setup.py genpot.  If there's anything wrong in that chapter I'd like
 to correct it.  We need to fix the Spanish version too.

Good point. I'm not sure what happens when you start a new activity.
It's probably harmless.

Once it's hooked up to Pootle, however, the whole po directory should
only be managed by Pootle.

I am not sure about the .gitignore suggestion -- it may mess up Pootle.


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] New Dextrose 2 build: os438dx

2011-01-11 Thread Martin Langhoff
On Sat, Jan 8, 2011 at 11:19 PM, Bernie Innocenti ber...@codewiz.org wrote:
 This release of Dextrose 2 is intended for beta testing. Images for the
 XO-1 and XO-1.5 can be downloaded here:

  http://wiki.sugarlabs.org/go/Dextrose

Congrats!

 The major highlight in this release is a simple automated updater based
 on yum which will hopefully enable us to deploy small updates

Interesting. Any pointers to how it works / design and or src?

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2011-01-10 Thread Martin Langhoff
On Sun, Jan 9, 2011 at 7:44 PM, Emiliano Pastorino
epastor...@plan.ceibal.edu.uy wrote:
 Oh! I meant we hadn't had time to prepare the kits for the kids, just that.

Ok. Can you list/describe of what base kit you give the kids? Maybe
put it on a page on wiki.laptop.org?

I'd like to buy an arduino kit set for a basic robot, with the same
motors and sensors as you're using. So we can test here in the office
:-)

 yes -- I've seen it. And I have an NXT at home, will be testing it
 soon. I may have a few patches for you...

 I'll appreciate those patches. Do you want me to add you as a committer?

I'll publish to dev.l.o and send you a pull request.

 That's good, but I found some incompatibilities between the latest commit
 of nxt-python and python 2.5.1, so I had to modify a few lines.

Yeah - we can patch it on a suitable rpm for F9 builds. Are you still
targetting F9-based builds?

 Other thought about this point... wouldn't nxt-python package become a
 dependency for TurtleArt if we don't include it in the activity?

Yes, but you always need some root-privileged preparation to get to
the /dev node.

So include nxt-python in the dextrose build, or install the
/etc/udev/rules.d file. I think it makes sense to simplify things and
depend on nxt-python.

nxt-python sets the /dev node to 'lego' group, so you'll need to add
the 'olpc' user to that group.

I plan to do all of the above for our F14 release :-)

  - I've just packaged nbc / nxc for Fedora, which is almost like C,
 and is a very nice way to program the robot. It even allows for
 concurrent programming.

 Mmm... I'd like to get my hands on that code.

http://dev.laptop.org/~martin/nbc/

Fedora is pushing for more robotics tools in the distro --
http://fedoraproject.org/wiki/SIGs/Robotics --


  - And I'm happy to help on the NXT / TA patch (as a personal project,
 not OLPC sponsored).

 He he... personal interests since xmas maybe?

Exactly :-)


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2011-01-10 Thread Martin Langhoff
On Mon, Jan 10, 2011 at 10:29 AM, Walter Bender walter.ben...@gmail.com wrote:
 Here is what I am thinking re TA extensions:

That'd work. But I am trying to think what the right user experience is.

Will they appear...

 - the NXT/Arduino/other is plugged to USB (so the /dev/ node
exists?... what about bluetooth?)

 - if a NXT/Arduino/other was seen once on this laptop?

 - if a file using NXT/Arduino/other extension is opened?

 - if a file using NXT/Arduino/other extension has ever been opened on
this laptop?

 - if the libraries/tools needed are present?

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2011-01-10 Thread Martin Langhoff
On Mon, Jan 10, 2011 at 11:37 AM, Walter Bender walter.ben...@gmail.com wrote:
 That is up to whatever gets coded as the device detection algorithm.
 My strategy is to move that decision out from tawindow.py where it
 currently sits.

Perhaps, but in any case, it should be consistent across external
devices that trigger new/different blocks.

 That is a good question. Because presumably this is a shared resource
 and kids might want to hack on their projects without the device.

Exactly my thoughts.

  - if a file using NXT/Arduino/other extension is opened?

 Not sure what you mean here.

What happens when I open a file with NXT/Arduino/other blocks? I've
never connected to the device on my XO.

 I presume we will include all the necessary libraries in the bundle.

Some elements we cannot put in the bundle -- for example, see my
suggestion to Emiliano to depend on the nxt_python rpm, because it
installs a /etc/udev/rules.d/ file that is needed to get to the device
node.

One way or another, you do require that the underlying distro has bits of infra.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Work on Pootle today

2011-01-10 Thread Martin Langhoff
= Managing conflicts =

/var/lib/pootle/checkouts has several conflicts that are preventing
synchronization in both directions. The main source of trouble is
maintainers committing changes in the po directory -- ignoring the
warning against it in the wiki.

We've added some diagnostics scripts that will nag Gonzalo when
something is wrong.

There is a way for Pootle to override changes in the po directory, but
it's somewhat risky, so at this time I prefer not to do it -- code
block present, but commented out, in pogenerator.py

= Crontabs to /etc/cron.d =

We moved crontabs to /etc/cron.d/pootle, this is much easier to find,
to edit, and to track with etckeeper.

Crontabs now go to Gonzalo. Arun, you are welcome to be copied as well :-)

= Timeouts when pushing =

When a language administrator attempted a commit or update from git,
the operation would usually timeout.

With help from alsroot and bernie, this has been diagnosed and fixed.
This was a firewall(ufw) breaking IPv6. So git push waited for
a 1m timeout, which in turn timed out on the HTTP side.

= Error logging =

We wanted to get better error logging, in the end we found (almost?)
all the problems, and added specific diagnosis for them as per above.

= Adding activities =

Can be automated, or at least documented. For the time being,  Gonzalo
will talk with Sayamindu to get this documented.

= Duplicate headers in PO files =

Sometimes (but not always) pootle gets its panties in a knot, and PO
files end up with many duplicate headers in one go. Example:
http://git.sugarlabs.org/memorize/mainline/commit/d8720afb4fc57341fe40722d82aae20894a0fd88

We grepped around and the responsible code seems to be
local_apps/pootle_store/models.py -- either mergefile() or
update_store_header() . Something to report upstream.





m

--
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2011-01-09 Thread Martin Langhoff
On Sun, Jan 9, 2011 at 8:58 AM, Emiliano Pastorino
epastor...@plan.ceibal.edu.uy wrote:
 We're working on a project to introduce robotics to school and high-school
 kids this year.

Excellent!

 Sayamindu's clone at
  http://git.sugarlabs.org/~sayaminfu/turtleart/arduino-support , but

Wow! I didn't know this existed!  What do you mean when you say hw
wasn't ready?

 Right now, we've a fully working version of TurtleArt with NXT support at
 http://git.sugarlabs.org/~emiliano/turtleart/nxt-support

yes -- I've seen it. And I have an NXT at home, will be testing it
soon. I may have a few patches for you...

 It uses nxt-python (http://code.google.com/p/nxt-python/) to communicate
 with the brick

Here's some complementary good news:

 - nxt-python is packaged and maintained for Fedora 14, and we can
backport the package. You don't need to include it, and the rpm
contains the udev/rules file.

 - I've just packaged nbc / nxc for Fedora, which is almost like C,
and is a very nice way to program the robot. It even allows for
concurrent programming.

 - There's an overall push to get more robotics stuff into Fedora, so
upstream is keen to help

 - And I'm happy to help on the NXT / TA patch (as a personal project,
not OLPC sponsored).

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2011-01-08 Thread Martin Langhoff
On Thu, Dec 30, 2010 at 7:23 PM, Martin Langhoff
martin.langh...@gmail.com wrote:
 I would recommend as a place to start simply adding a set of blocks to
 control the motors and access the sensor data. And leave the programming
 logic to the Sugar Activity.

 Right - but I will need to write an exporter that spits out NXC, and
 perhaps some glue commands that try to export it to the USB-connected
 Brick...

Well, as it happens, I just spotted Emiliano's new repository and
commit. It looks exactly like what I was planning to do!

The meat is at
http://git.sugarlabs.org/turtleart/nxt-support/commit/69da7620d1d5ec0560f344c5b52859c9a534d8a6

Emiliano, you're ahead of me! Tell us more about your project!




m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2011-01-07 Thread Martin Langhoff
On Tue, Jan 4, 2011 at 11:55 AM, Rafael Enrique Ortiz Guerrero
raf...@sugarlabs.org wrote:
 Not enterely related but some of us were working on
 an arduino TA conection (now only working serially),
 the next step  is to be able to program the arduino chip,
 downloading bytecode generated from TA.

Rafael -- and whomever is working on this Arduino project --

is there a standard-ish Arduino robot + sensots kit I can buy? I don't
want to spend time playing with the robot itself, but if we are
collaborating on this between NXT and Arduino kit, it'll be good to
have an Arduino kit.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2011-01-07 Thread Martin Langhoff
On Fri, Jan 7, 2011 at 4:32 PM, Rafael Enrique Ortiz Guerrero
raf...@sugarlabs.org wrote:
 is there a standard-ish Arduino robot + sensots kit I can buy? I don't
...
 No that i know, best shot for now is hacking or working with
 handmade analogue and digital sensors, like the ones used for turtle-art
 sensors.

Hmmm. Looking at the NXT, and the little I know of Arduino, it's clear
that to work in a user-friendly manner in something like TA, you have
to make some assumptions about which sensor goes into each input;
which motor to which controller, and how to pair up the tachometers
with the right motor.

That is because in a graphical programming environment, you want to
offer easy sensor and motion blocks. To make that happen, you need
those assumptions.

For a full-blown programming env (C, python, etc), where users are
expected to have variables, and can call functions with many named
parameters, it's ok to use raw input/output ports. It's up to the
user to map those using variables or constants.

So for example, in the case of NXT, if you are going to use the
graphical NXT-G you have to put the right sensor in the right port,
same with motors. So NXT-G has a read distance sensor block  that
you can put in an if condition. And run left motor block. And run
both motors forward, synchronized via tachometer.

Those blocks make it easy and fun and that's where I think we need to be headed.

So I'd strongly suggest (for an initial implementation) settling on an
arduino set that has a couple of sensors, and 2 motors with
tachometers. Light-color sensors are great because you can get started
with follow the border of the thick black line programs.

If we go that way, we can have various modes, matching the robot and
motor/sensor configurations -- NXT, various Arduino models, etc.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2011-01-04 Thread Martin Langhoff
On Tue, Jan 4, 2011 at 11:55 AM, Rafael Enrique Ortiz Guerrero
raf...@sugarlabs.org wrote:
 Not enterely related but some of us were working on
 an arduino TA conection (now only working serially),

That's cool! Very related!

Walter mentioned your in private email. From what I see, for both
Arduino and NXT we need

 - A special mode that loads and shows some special blocks, hides the
Turtle, and offers compile-and-copy-to-robot buttons. We need to
make our own blocks and compile/copy support, but the special mode
might need some support from TA itself.

 - An exporter -- in your case to Arduino, in my case to NXT. I am
looking at the talogo.py src, and plan to  export some NXC.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2011-01-04 Thread Martin Langhoff
On Tue, Jan 4, 2011 at 12:37 PM, Mike Lee curious...@gmail.com wrote:
 I'd like to also put in a plug for the LEGO's low-cost WeDo robotics

Oh, wishes wishes :-)

Both arduino and nxt are within reach because others have laid the
foundations. You can easily program them from Linux. Here, we're
talking about adding glue between TA and existing tools to program
those 'bots.

AFAICS, for WeDo there is currently no way to program them from Linux.
That's kind of a stumbling block. Maybe it has a similar controller
brick or is close enough that you can work with the NXC/NXB people to
get it supported...

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2011-01-04 Thread Martin Langhoff
On Tue, Jan 4, 2011 at 3:28 PM, Mike Lee curious...@gmail.com wrote:
 I can tell you that it works very well!

And tell us -- does it run under Linux/Sugar? Linux/Gnome?


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2011-01-04 Thread Martin Langhoff
On Tue, Jan 4, 2011 at 4:00 PM, Mike Lee curious...@gmail.com wrote:
 It is a Sugar activity (Linux/Sugar).

Niiice.



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Wikipedia bundle in other languages

2011-01-04 Thread Martin Langhoff
Yes -- see the WikiBrowse / Wikipedia Activity page in wiki.l.o . The
process isn't perfect... and is not very well document it.

I didn't create (this process) but have been trying to improve it a
bit recently, so will be happy to help a bit along the way.

cheers,



m

On Tue, Jan 4, 2011 at 12:44 PM, Sameer Verma sve...@sfsu.edu wrote:
 I'd like to bundle the Hindi version of Wikipedia into an offline
 activity. 
 http://hi.wikipedia.org/wiki/%E0%A4%AE%E0%A5%81%E0%A4%96%E0%A4%AA%E0%A5%83%E0%A4%B7%E0%A5%8D%E0%A4%A0
 Do we have a set process/scripts to do so?

 cheers,
 Sameer
 --
 Dr. Sameer Verma, Ph.D.
 Associate Professor, Information Systems
 Director, Campus Business Solutions
 San Francisco State University
 http://verma.sfsu.edu/
 http://opensource.sfsu.edu/
 http://cbs.sfsu.edu/
 http://is.sfsu.edu/
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] moving datastore projects via usb sticks?

2010-12-30 Thread Martin Langhoff
On Thu, Dec 30, 2010 at 8:25 AM, Erik Blankinship er...@mediamods.com wrote:
 In my video game, I am saving game state resources into a tar file, which is
 then saved to the journal / datastore.

Hi Erik!

on the 10.1.3 release track we've made some improvements in this area
(which was rather broken). What version of sugar is this happening
with? Can you test one of our recent 10.1.3 builds on an XO? Say
http://build.laptop.org/10.1.3/xo-1.5/os360a/

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] A heads up for the major changes that will appear in Fedora 15 / SoaS 5

2010-12-30 Thread Martin Langhoff
On Thu, Dec 30, 2010 at 9:05 AM, Gary Martin garycmar...@googlemail.com wrote:
 This is the monstrous gaping maw of doom, from my perspective. Just about 
 every Activity and much of the Sugar UI will break.

AIUI, from discussions with Simon and Tomeu that's not the case. Gnome
people are not that insane, the old APIs will still work and be
supported.

They won't be the latest coolest API wiz-bang so support may be
weaker, and/or we may get ah, well, the bug you mention is fixed in
the introspection API, migrate to that instead of a fix to the
problem you report.

Personally, I don't mind *not* being in the bleeding edge for one cycle :-)



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] A heads up for the major changes that will appear in Fedora 15 / SoaS 5

2010-12-30 Thread Martin Langhoff
On Thu, Dec 30, 2010 at 3:21 PM, Walter Bender walter.ben...@gmail.com wrote:
 I don't think that is what people are saying. I think they are saying that
 we need not resolve all of our potential GNOME 3.0 issues immediately as the
 2.0 libraries will still be present. Is that not the case?

Yep.

AIUI, Sugar is not forced to switch to the new GNOME 3 API right now
to work on F15.  The v2 API will be available.

In other words -- people are mistakenly imagining a flag day; instead
there'll just be a new-vs-old API. The old API will be deprecated at
some point but that happens over a longer timeframe.

There's a good chance to flesh it all out at FUDCon -- I hope people
working on gobject introspection will be there.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2010-12-30 Thread Martin Langhoff
Hi Walter, list,

[ disclaimer: this is a hobby project, likely to proceed at very slow
pace, given insane amounts of real work around XOs ;-) ]

I got a lego nxt 2.0 for xmas! Looking around for how to use it from
Linux, I found NXC (a variant on NQC -- 'not quite C' that compiles to
NXT bytecode). It looks like a really pleasant programming language.

It's the most compelling env for various reasons -- but the
interesting thing is that there is no GUI for Linux, and that the
MacOSX/Windows GUI looks a lot like Turtle Blocks (but doesn't seem to
be as good ;-) ).

Here's a good visual summary, put together by a teacher:
http://www.nebomusic.net/rosettastone.html

What I am wondering is what is the smartest path to a TB mode or a
friendly fork of TB that exports NXC code?

After browsing the TB src (looking at master), my observations are

 - I'm very pleased there's a turtleart.py that runs w/o Sugar! Very nice!

 - talogo.py could be an inspiration

 - NXT has very different actions, and fairly specific sensors -- it'd
make sense to have a very different set of blocks available. Also some
blocks have many options. Not sure how to handle these issues.

Ideas?

= Notes on languages and NXT tools =

Notes for anyone else looking into NXT... from most interesting to least

 - NBC/NXC is the most popular tool by all accounts, actively
maintained, and jspaleta is planning to get it into F15. NBC/NXC
creates programs that download to the NXT CPU and run there -- it's a
nice ARM CPU. Fully features, well documented (free online docs). The
author of NBC/NXC has also published an apparently good book.

  http://bricxcc.sourceforge.net/nbc/
  http://www.amazon.com/exec/obidos/ASIN/0973864974/

  Found this tutorial best outline of NXC usage
  http://bricxcc.sourceforge.net/nbc/nxcdoc/NXC_tutorial.pdf

 - There is a python module for it, but it's for Python 2.4, looks
unmaintained, seems very limited in features and it's not clear
whether it creates programs that will execute on the NXT CPU, or just
controls it remotely. Others have reused it and extended it for file
transfers, but it all looks dated; if the NBC/NXC toolchain handles
the actions we need, better.

   http://www.danbbs.dk/~kibria/nxt/nxtsh.py
   
http://chromiteblue.com/archive/projects/nxt/nxt_pull-a-companion-program-for-nxt_push/

 - Big chart of options
   http://www.teamhassenplug.org/NXT/NXTSoftware.html

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2010-12-30 Thread Martin Langhoff
On Thu, Dec 30, 2010 at 6:35 PM, Walter Bender walter.ben...@gmail.com wrote:
 I had a similar conversation with the Arduino team in .uy last month. We

Interesting!

 I would recommend as a place to start simply adding a set of blocks to
 control the motors and access the sensor data. And leave the programming
 logic to the Sugar Activity.

Right - but I will need to write an exporter that spits out NXC, and
perhaps some glue commands that try to export it to the USB-connected
Brick...

 Happy to help any way I can. (BTW, v106, not yet released, but in git, has
 support for the XO camera as an additional sensor... a request from a
 teacher in .uy.)

Thanks! Yes, I spotted that in the git repo -

Happy 2011!



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] moving datastore projects via usb sticks?

2010-12-30 Thread Martin Langhoff
On Thu, Dec 30, 2010 at 7:06 PM, Bernie Innocenti ber...@codewiz.org wrote:
 What particular bug was fixed? Is that something that we may want to
 steal in Dextrose?

http://dev.laptop.org/ticket/9658
http://dev.laptop.org/ticket/9657

it's a deal, it's a steal!



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] TurtleBlocks driving lego NXT 2.0 -

2010-12-30 Thread Martin Langhoff
On Thu, Dec 30, 2010 at 5:34 PM, Martin Langhoff
martin.langh...@gmail.com wrote:
  - NBC/NXC is the most popular tool by all accounts, actively

RPM at http://dev.laptop.org/~martin/nbc/

  - There is a python module for it, but it's for Python 2.4, looks
 unmaintained, seems very limited in features and it's not clear

nxt_python is in Fedora actually, has been for a long time.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] conection for usb-RJ45 xo-pc. no ip

2010-12-15 Thread Martin Langhoff
On Wed, Dec 15, 2010 at 4:27 PM, James Cameron qu...@laptop.org wrote:
 I think you've found an interesting problem, similar to #9544 or #9768,
 but for USB ethernet instead of wireless.

Agreed. If you take a vanilla F11, and plug in your USB-Ethernet, does
this happen automagically? What do NM logs say?

We may need to give NM some hints on what to do.



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Messages notification

2010-12-07 Thread Martin Langhoff
On Tue, Dec 7, 2010 at 5:40 AM, Walter Bender walter.ben...@gmail.com wrote:
 I like both approaches, actually. The first, with the badges, closely
 associates the notification with its context and the corner history
 let's you get an overview.

I like the first approach, for the same reasons as Walter. Much more
than the corner alternative.

The corner is super-valuable -- it's the easiest location to hit with
a mouse/tp so let's preserve it, or use it for something uniquely
important.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Share Journal entries over external devices #1636

2010-11-30 Thread Martin Langhoff
On Tue, Nov 30, 2010 at 8:27 AM, Simon Schampijer si...@schampijer.de wrote:
 Note about the hidden files on windows: I looked a bit around, and there is
 no way to set that attribute on Linux, AFAIK.

IIRC, Windows hides .files . In any case, there are Windows laptops
around here so I can run a quick test  in a couple hs.


 AFAIK the school server currently handles the backup by rsync [2] (Martin?).
 Are there future plans for fine grained backup (per entry)?

It uses rsync and then the XS has code to read the metadata (for
listings) and then auto-assembles JEBs for restore.

So from Sugar's PoV, the XS uses JEBs.

cheers,



m
-- 
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Messages notification

2010-11-17 Thread Martin Langhoff
On Sat, Nov 6, 2010 at 2:07 AM, Martin Abente
martin.abente.lah...@gmail.com wrote:
 * Why the user should start an activity to know what is happening?

Why/when does the user want to know what's happening? Users are busy
doing something interesting...

We should interrupt/hassle the user never. Or extremely seldom.




m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [DESIGN] Messages notification

2010-11-17 Thread Martin Langhoff
On Wed, Nov 17, 2010 at 1:10 PM, David Farning dfarn...@gmail.com wrote:
 This patch has a place in Dextrose.  Dextrose is looking at the
 question, How can we provide support staff the necessary information
 to effectively fix and/or report problems to a higher level of service
 and support?

Let's not jump to conclusions.

Can this be limited to... when the user _wants_ it?




m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Report on Sl# 2080 , Pulsing icon delayed by 5 seconds or so.

2010-11-05 Thread Martin Langhoff
On Fri, Nov 5, 2010 at 6:35 AM, Martin Dengler mar...@martindengler.com wrote:
 Again, thanks for this summary.  I think the thing to do is merge my
 patch for #2080 and then address the other issues.  I'll do that soon.

Hi Martin.

would it make sense to change (in toolkit) jarabe/view/icon.py to
optionally return the cairo object, instead of paint()ing it?

Then you can render the SVG once or twice (for zoom effect?), keep
those raster images cached in the pulsingicon object, and use Cairo's
paint_with_alpha() instead of straight paint().

Which will be fast. (Load/render your sprites only once, get creative
in how you blit them... )

The pulsing color combinations change (get simpler) with this.

To get back to what we have now (or an approximation) you could render
to blackwhite (and a reverse) and use them as masks, painting with
masked full color fills. A bit more work.

I'm following this tutorial -- mask() and paint_with_alpha() should be
enough. I am disappointed that I cannot see more advanced blitting
opts.

http://www.tortall.net/mu/wiki/CairoTutorial



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Browse scaling for XO display

2010-11-04 Thread Martin Langhoff
Hi Walter,

older builds had a nasty xulrunner patch, forcing dpi to 133, possibly
as a workaround to xulrunning ignoring configured DPIs.

I don't think that it's been carried forward -- I suspect xulrunner
now obeys configured DPIs better.

Given that configured DPI is the key element here, I don't think from
the server vs from disk is likely to make a difference. A CSS
definition set in points, % or picas is lurking somewhere... it is in
an external file whose url works or breaks on disk or server.

hth


m

On Thu, Nov 4, 2010 at 12:27 AM, Walter Bender walter.ben...@gmail.com wrote:
 Does anyone recall what we did to make Browse rescale web pages for
 the XO display? Here in Peru there is a series of pages that scale
 properly from a server but not from the file system with Browse 108 on
 Sugar 0.84 but Browse on 703 rescales both sources properly. (Sorry, I
 don't know which version of Browse was on 703).

 -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




-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Edit/audit wikipedia activity

2010-11-03 Thread Martin Langhoff
On Tue, Oct 26, 2010 at 4:51 PM, Martin Langhoff
martin.langh...@gmail.com wrote:
 On Thu, Oct 21, 2010 at 12:06 PM, Martin Langhoff
 martin.langh...@gmail.com wrote:
 Unfortunately, there is a clear need to organise a facility to
 audit/edit the wikipedia snapshots we have and repack the archive.

 Some simple rough mods to server.py to allow local edits

Now with a few minor updates and fixes. Documentation at

   http://wiki.laptop.org/go/WikiBrowse_Editing

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Dextrose] [PATCH v5 sugar] Pulsing icon delayed by 5 seconds or so SL#2080

2010-10-29 Thread Martin Langhoff
On Thu, Oct 28, 2010 at 1:42 PM, Martin Dengler
mar...@martindengler.com wrote:
 There is a better way: use cProfile and gprof2dot.py.  You will get
 graphs (and of course the raw data) like this:

 http://www.martindengler.com/tmp/sl.o-2080/pulsingicon.py-stats-graph.png

Excellent graph.

But following this conversation... I think we are looking at the
problem slightly wrong.

The same (potentially complex) SVG is being rendered in 2 tones, many
times. This is nonsense.

Render it once to a B/W grayscale raster. Then use/abuse whatever
cairo bitblit blend operators.

And yes, of course, cache that grayscale rasterized version in the fs :-)

Maybe I am making wild assumptions about the bitblt ops you have available...


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Edit/audit wikipedia activity

2010-10-26 Thread Martin Langhoff
On Thu, Oct 21, 2010 at 12:06 PM, Martin Langhoff
martin.langh...@gmail.com wrote:
 Unfortunately, there is a clear need to organise a facility to
 audit/edit the wikipedia snapshots we have and repack the archive.

Some simple rough mods to server.py to allow local edits -- start
server.py with an additional argument (a path to an existing
directory) and it'll save its results there.

Start it like

  ./server.py 8080 /home/martin/wikiedits

The server shows the changed files, which will go into a 'wiki'
subdirectory there.

You can check the edits thus:

  diff -ur /home/martin/wikiedits/wiki.orig /home/martin/wikiedits/wiki

And mergeupdates.py to... um, merge those updates

bzcat es_PE.xml.bz2.processed | tools/mergeupdates.py //wiki | bzip2
 es_PE.xml.bz2.processed.changed

You'll have to re-create the indexes (look at what woip/sh/process
does right after processing the file).

git clone git://dev.laptop.org/users/martin/wikiserver

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Dextrose] Pending patchs for Paint

2010-10-25 Thread Martin Langhoff
On Sat, Oct 23, 2010 at 4:21 AM, Sascha Silbe
sascha-ml-reply-to-201...@silbe.org wrote:
 If something's controversial it may not be on 'master' but there's no
 reason to have it in the sugarlabs git repos where everyone looks for
 src.

 I suppose this should have read *not* to have it?

The dastardly double-negative. You're right.



m

-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Edit/audit wikipedia activity

2010-10-22 Thread Martin Langhoff
Hi Chris,

(while Mitch does his magic on 1.75... I distract you a bit...)  -- I
am looking at reproducing the re-compile current es_PE Wikipedia
Bundle process.

Looking at the instructions in http://wiki.laptop.org/go/WikiBrowse,
it's not 100% clear. For a trivial example, if I have an updated
blacklist, how would I  re-run the process? Where are the source files
for wikipedia content and traffic stats?

I have a checkout of http://dev.laptop.org/git/projects/wikiserver/
and looking at http://dev.laptop.org/~cjb/eswiki/

My intention is to understand the process better to see how we edit or
override content.

thanks!



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Dextrose] Pending patchs for Paint

2010-10-22 Thread Martin Langhoff
On Fri, Oct 22, 2010 at 12:45 PM, Sascha Silbe
sascha-ml-reply-to-201...@silbe.org wrote:
 I certainly hope that each bundle released by Sugar Labs or associated

Sure. Not everything's perfect. Let's make sure we drag things back to
normality.

If something's controversial it may not be on 'master' but there's no
reason to have it in the sugarlabs git repos where everyone looks for
src.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Edit/audit wikipedia activity

2010-10-21 Thread Martin Langhoff
Hi list,

we are getting interesting news of not-quite-good content in Wikipedia
content included in the Wikipedia activities.

Unfortunately, there is a clear need to organise a facility to
audit/edit the wikipedia snapshots we have and repack the archive.

Do we have any easy way to do this? Is any of the many static
wikipedia project already working on audit/edit/polish facilites we
can reuse (that accepts our format)?

Has anyone been working on this area at all?

Is anyone interested in working on this area?

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Memory leak in Sugar -- how to dump Py data structures?

2010-10-07 Thread Martin Langhoff
See http://dev.laptop.org/ticket/10386 for details. The sugar-session
process in 10.1.2 grows slowly...

There's some form of leak somewhere. Maybe we are triggerin a real
python leak, maybe we have reference loops. How do we trace this?



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Memory leak in Sugar -- how to dump Py data

2010-10-07 Thread Martin Langhoff
On Thu, Oct 7, 2010 at 10:47 AM, Michael Stone mich...@laptop.org wrote:
 Tomeu wrote some instructions here:

  http://wiki.laptop.org/go/Memory_leak_testing
  http://wiki.sugarlabs.org/go/Development_Team/Memory/Leak_testing  (mirror)

Great. thanks! Setup a test machine and keeping an eye on it.




m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Memory leak in Sugar -- how to dump Py data

2010-10-07 Thread Martin Langhoff
On Thu, Oct 7, 2010 at 11:53 AM, Martin Langhoff
martin.langh...@gmail.com wrote:
 Great. thanks! Setup a test machine and keeping an eye on it.

Even without waiting much, it's clear we're leaking objects referred
to the UI representation of the access points.

`iwlist scan ` spots 37 APs, and that's roughly what you see in the
UI. Some with weak signal appear and disappear --

How did I find this? Using heapy, I see that the top 3 entries have
120, 120 and 363 objects, and they grow in concert.  When I dump
the entries of the top one with .theone, the object looks like a UI
widget for an AP. If I do

for n in range(120):
hp.heap()[0].byid[n].theone['_primary_text']

what I see is the ESSIDs of the APs -- repeated multiple times.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Proposal of dotted activity version number

2010-10-06 Thread Martin Langhoff
On Wed, Oct 6, 2010 at 4:47 PM, C. Scott Ananian csc...@laptop.org wrote:
 On Wed, Oct 6, 2010 at 6:58 AM, Gonzalo Odiard gonz...@laptop.org wrote:
 Then I plan to ignore the customization when I  compute the order.

 So why is it there?

To allow identification. But what Gonzalo pointed out is that in the
case of 1.1-peru vs 1.1-argentina, vs 1.1, it makes sense to match
them as equal. They shouldn't trigger an upgrade from one to the
other.

I had a long chat with Gonzalo on the topic of versioning.

Initially, I advocated strongly for something with the expresiveness
of dpkg's versioning. However, that's wrong. We need to use a clear
_subset_ of what dpkg, rpm, portage(... etc) can do, so the distro
packager retains its flexibility (see: epoch).

It is true, dpkg considers 1.1-peru to be an upgrade over
1.1-argentina, due to alpha ordering. But that has no useful meaning.

 Either solve the problem correctly, or solve it as simply as possible.

This solves it as simply as possible.



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Proposal of dotted activity version number

2010-10-04 Thread Martin Langhoff
On Mon, Oct 4, 2010 at 5:25 PM, James Cameron qu...@laptop.org wrote:
 I agree with the proposal.

+1

-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Replacing Illegal character ':' in username (SL #2152)

2010-10-01 Thread Martin Langhoff
On Fri, Oct 1, 2010 at 3:00 PM, Dipankar Patro dipan...@seeta.in wrote:
 I am following this site for XS installation:

I thought you already had an XS. You have the right URLs but
installing an XS for this will be too much work. As Bernie suggested,
just install idmgr on a fedora box.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Replacing Illegal character ':' in username (SL #2152)

2010-09-30 Thread Martin Langhoff
Hi Dipankar,

the XS will use the serial number provided by Sugar as the
'username'. The nickname is used to set the GECOS information.

Background info -- what's the GECOS? It's where you normally wrte your
full name. So on my laptop, my username is 'martin', my GECOS is
Martin Langhoff.

$ grep martin /etc/passwd
martin:x:1000:1000:Martin Langhoff,,,:/home/martin:/bin/bash

For the test process, I am asking that you

 - run the failing test case
 - monitor the XMLRPC traffic -- is the XMLRPC msg sent valid?
 - monitor the idmgr daemon for errors -- is idmgr complaining about anything?

cheers,


martin
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [ANNOUNCE] 0.90 tarballs available

2010-09-30 Thread Martin Langhoff
Great stuff! Congratulations to all involved!



m

On Thu, Sep 30, 2010 at 12:21 PM, Simon Schampijer si...@schampijer.de wrote:
 Dear Packagers,

 we are proud to let you know that the 0.90 Sucrose tarballs are
 available. We are currently still working on the release notes [1] but
 for those of you who want to start packaging already here are the
 sources [2].

 In behalf of the sugar community,
     Your Release Team

 [1] http://wiki.sugarlabs.org/go/0.90/Notes
 [2] http://wiki.sugarlabs.org/go/0.90/Notes#Getting_the_sources


 === Glucose modules ===
 *
 http://download.sugarlabs.org/sources/sucrose/glucose/sugar/sugar-0.90.1.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/glucose/sugar-datastore/sugar-datastore-0.90.0.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/glucose/sugar-toolkit/sugar-toolkit-0.90.0.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/glucose/sugar-base/sugar-base-0.90.1.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/glucose/sugar-presence-service/sugar-presence-service-0.90.1.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/glucose/sugar-artwork/sugar-artwork-0.90.0.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/glucose/etoys/etoys-4.1.2388.tar.gz
 *
 http://download.sugarlabs.org/sources/sucrose/glucose/hulahop/hulahop-0.7.1.tar.bz2

 === Fructose modules ===
 *
 http://download.sugarlabs.org/sources/sucrose/fructose/Pippy/Pippy-37.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/fructose/Browse/Browse-118.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/fructose/Calculate/Calculate-34.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/fructose/Etoys/Etoys-116.tar.gz
 *
 http://download.sugarlabs.org/sources/sucrose/fructose/Chat/Chat-68.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/fructose/TurtleArt/TurtleArt-98.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/fructose/Jukebox/Jukebox-20.tar.bz2
 * http://download.sugarlabs.org/sources/sucrose/fructose/Log/Log-24.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/fructose/ImageViewer/ImageViewer-15.tar.bz2
 *
 http://download.sugarlabs.org/sources/sucrose/fructose/Write/Write-71.tar.bz2

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Dextrose 1 report from Paraguay

2010-09-30 Thread Martin Langhoff
Hi Martín, team,

great -- your efforts are definitely worthwhile. Some questions below...

On Thu, Sep 30, 2010 at 12:25 PM, Martin Abente
mabe...@paraguayeduca.org wrote:
 * Only 21 Activities selected by our education team. These activities are
 protected (can not be erased using the user interface).

How are you achieving that? (Link to ticket or code welcome :-) )

  * Kids are now aware of the backup facilities. Now they can backup and
 restore the journal whenever they want.

How do they deal with the posibility of losing newer local files? Or
is that issue resolved?

 4. Decent stability state, this contributed on how teachers perceive Sugar
 as a Education tool.

Bravo! :-)

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Replacing Illegal character ':' in username (SL #2152)

2010-09-29 Thread Martin Langhoff
On Wed, Sep 29, 2010 at 1:32 PM, Dipankar Patro dipan...@seeta.in wrote:
 With reference to bug : http://bugs.sugarlabs.org/ticket/2152

The diagnosis of the bug is incorrect. We never use the user-selected
'nickname' as a username in the XS. We do provide it as in the GECOS
info, and there may be a bug in that.

I strongly recommend that you focus on digging for more info on where
the bug triggers

 - is the registration code on the sugar side building an invalid xmlrpm msg?

 - is the registration code on the XS side not escaping the nickname?

 - is the problem somewhere else?

If the problem is in any of the 2 spots I mention, then the ':'
character is the least of our worries ;-)

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Mesh networking not working in my XO's

2010-09-28 Thread Martin Langhoff
On Tue, Sep 28, 2010 at 9:10 AM, Harpreet Sareen
author.blog...@gmail.com wrote:
 I tried the instructions from the link -
 http://wiki.sugarlabs.org/go/Features/Ad_hoc_Networking
 The XO 1.5 was connected itself to Mesh Network 1 and on hovering on the
 Network Icon, te message pops saying Connected to simple mesh IP Address:
 169.254.6.47

That strategy won't work. Try this

 - In the XO-1, you wil need a newer build -- download and install
10.1.2 (see http://wiki.laptop.org/ )

 - For consistency, install 10.1.2 on the XO-1.5 (note: it's a
different image do download!)

 - With both laptops running 10.1.2...

 - Start with the XO-1.5, use the create a new network option from the frame.

 - On the XO-1, in the neighbourhood view, you should see a new
network with the name of the other XO. Select it...

 - Now you're both in a shared ad-hoc network.


m

 The XO 1 laptop shows a yellow dot hovering over which shows the name
 olpc-mesh and hovering over the network icon shows
 olpc-mesh connected.
 Create a new wireless network
 Channel 1:
 IP Address: 169.254.10.32
 But when I start a new Record activity on XO 1.5 and share it with my
 neighbourhood, it doesn't show up in the neighbourhood of XO 1. Am I doing
 something wrong?

 Regads
 Harpreet

 On Tue, Sep 28, 2010 at 6:23 PM, Harpreet Sareen author.blog...@gmail.com
 wrote:

 Hi,
 I was discussing here about using Telepathy Framework with DBus bindings
 i.e collaboration on XO's using C#.
 If I am able to do that, will the solution be the same for Mesh networking
 and Ad-hoc networking or would I have to concentrate on any one of them
 first?

 Regards
 Harpreet

 On Tue, Sep 28, 2010 at 6:04 PM, Simon Schampijer si...@schampijer.de
 wrote:

 On 09/28/2010 02:26 PM, Harpreet Sareen wrote:

 Hi,
 To share between XO-1s and XO-1.5s you have to use Ad-hoc networks.
 You
 can
 create one by using the option in the frame wireless device.
 Could you please explain that in detail?
 Thanks!


 --Harpreet--


 http://wiki.sugarlabs.org/go/0.86/Notes#Ad_hoc_Networking

 Regards,
   Simon



 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel





-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Mesh networking not working in my XO's

2010-09-28 Thread Martin Langhoff
Harpreet,

you've got the build details backwards. 201 customised is XO-1.5,
and 802 is for XO-1.

cheers,


m
On Tue, Sep 28, 2010 at 8:12 AM, Tomeu Vizoso to...@sugarlabs.org wrote:
 On Tue, Sep 28, 2010 at 14:08, Harpreet Sareen author.blog...@gmail.com 
 wrote:
 Hi,
 Here's the info about OS versions on my XO laptops.

 XO 1:
 Build: 201 customised
 Sugar: 0.84.2
 Firmware: Q3A36
 Wireless Firmware: 9.70.7.p0

 XO 1.5
 Build: 802
 Sugar: 0.32.1
 Firmware: Q2E41
 Strange, there's no wireless firmware listed here unlike the XO 1.0
 What to do?

 I think this should be enough. Someone here or in
 http://lists.laptop.org/listinfo/devel will be able to tell you if
 those versions should be able to create a network without
 infrastructure.

 Regards,

 Tomeu

 Regards
 Harpreet


 On Tue, Sep 28, 2010 at 12:58 PM, Tomeu Vizoso to...@sugarlabs.org wrote:

 On Tue, Sep 28, 2010 at 04:13, Harpreet Sareen author.blog...@gmail.com
 wrote:
  Hi,
  I have tow XO laptops (XO 1 and XO 1.5) which I want to connect together
  through mesh networking. I currently don't use WiFi hotspot/Access
  Point/Wired Network for the internet rather 3G EVDO. So, unfortunately,
  I
  cannot connect both these XO's through the XO -- AP -- XO. I had to
  consider
  the XO -- XO mesh for networking.
  XO 1 shows only one dot in the Neighbourhood named as olpc-mesh and XO
  1.5
  shows three dots namely, MeshNetwork1, MeshNetwork6 and
  MeshNetwork11
  in the Neighbourhood. I tried sharing the Record activity between the
  XO's
  by starting the activity on XO 1.5 but XO 1.5 is not discovered in the
  neighbourhood of XO 1.0.
  What could be the problem or how it could be troubleshooted? Why isn't
  the
  laptop being discovered int the neghbourhood?

 First thing you need to do is to say which OS versions you are running
 on each machine.

 Regards,

 Tomeu

  Regards
  Harpreet
  ___
  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




-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [IAEP] Child in charge of FOSS or Sugar

2010-09-21 Thread Martin Langhoff
On Tue, Sep 21, 2010 at 9:21 AM, Teemu Leinonen teemu.leino...@aalto.fi wrote:
 The issue is even more important when the project is claiming to
 promote FLOSS culture, like in the case of Sugar. In my definition of

That is _not_ the primary goal of Sugar. Sugar aims for lots of goals,
first and foremost, is about children as users, and their learning.

One of the key aspects of the FOSS culture that is very visible in
Sugar is that it is something explorable, learnable, hackable (as
opposed to a black-box).

Other aspects of FOSS are less applicable to primary-school age
children and their learning, so...

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [IAEP] Child in charge of FOSS or Sugar

2010-09-17 Thread Martin Langhoff
On Fri, Sep 17, 2010 at 9:27 AM, Søren Hougesen
soren.houge...@gmail.com wrote:
 For about a month ago, I asked as a curious outsider, if kids were actually
 hacking sugar.

Two factors are important here:

 - We all have very high and complex expectations for Sugar, so Sugar
itself is internally complex; and that trend is increasing. So to
actually hack in the core of Sugar you have to make a long trip of
discovery and learning. (Activities are a lot easier to hack.)

 - Sugar (and XOs) have not been in use for long enough! Sugar users
have only started their journey. Will they travel all the way to
hacking Sugar? Hard to know! If they are working on TurtleArt /
TurtleBlocks, EToys, Scratch or Pippy, they are on the right track.

hth,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] flashing time xo-1.5

2010-09-17 Thread Martin Langhoff
Hi Esteban,

we had exactly the same question asked by Guadalupe :-) -- Wad posted
our answers / notes on de...@lists.laptop.org earlier today.

[ It has nothing to do with Dextrose, and everything to do with the
size of the image and the write speed of the SD card... ]

In that thread you'll find some background on why it takes 20m, and
some ideas on how to speed it up.

cheers,


m

On Wed, Sep 15, 2010 at 8:17 AM, Esteban Arias
ear...@plan.ceibal.edu.uy wrote:
 Hi,

 it is possible reduce the time of flashing xo-1.5?
 Dextrose version, delays 20 mins.

 thanks,

 --
     Esteban Arias
     Investigación y Desarrollo - Plan Ceibal
     Avda. Italia 6201
     Montevideo - Uruguay.
     Tel.: 2601.57.73 Interno 2228
     E-mail : ear...@plan.ceibal.edu.uy


 ___
 Devel mailing list
 de...@lists.laptop.org
 http://lists.laptop.org/listinfo/devel





-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] #2141 UNSP: Memory and CPU status indicator for the frame.

2010-09-15 Thread Martin Langhoff
On Wed, Sep 15, 2010 at 11:36 AM, Benjamin M. Schwartz
bmsch...@fas.harvard.edu wrote:
 I don't think this is a good enough heuristic.

Agreed -- that's a terrible heuristic. And happy/sad face is a
terrible UI. The computer is not happy or sad; it's _working_.

Honestly, there is a base problem here: simplifying things to a
happy/sad does not lead anywhere useful. The metaphor is completely
mismatched -- full use of the laptop resources is not a bad thing in
any sense and should not lead to a sad face.

Empty/full metaphors may work better. However, I think this change is
not leading towards a useful outcome -- at best it gives the user a
complex-to-interpret input, and no clear action to take.

The actual *useful* change is to automatically close activities that
are backgrounded.

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] What should system mood really mean? (forked from #2141 UNSP: Memory and CPU status indicator for the frame.)

2010-09-15 Thread Martin Langhoff
On Wed, Sep 15, 2010 at 10:53 AM, Anish Mangal
anishmangal2...@gmail.com wrote:
 How about extending the meaning of 'system mood' to more than just the
 memory and cpu usage metrics.

As I've mentioned in the other thread, this is not a good metaphor.

If you have a box, as long as things _fit_ in it, you're ok. An
almost-full box cannot be said to be happy or unhappy -- very often
you are trying to maximise its use.

Three problems

 - the metaphor is a really bad match

 - mixing many variables is problematic

 - for the few problems this may help diagnose, there is no link to
the responsible system component, and no link to the action

I think we need to work on this area, and that your work in it is
invaluable. I do think it is showing that this particular path is
clearly not being productive.



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] known issues with collaboration in XS 0.5.2

2010-09-08 Thread Martin Langhoff
On Wed, Sep 8, 2010 at 5:02 AM, Tomeu Vizoso to...@sugarlabs.org wrote:
 Note that those are registered users, there's only a dozen online.

Ah! Then no, the behaviour is 100% bogus.

 I guess in that case you won't accumulate lots of registered users
 either, so this behavior shouldn't matter in the field.

Well, you do, just that they are segregated in groups. But the
registered, not online users should not be in memory at all, unless
they've been seen by ejabberd since it started and it's not perhaps
purging its roster?

Are you seeing the bug after a long run?

 Will consider purging registered users weekly or daily from public
 jabber servers such as jabber.sugarlabs.org.

Does a restart of ejabberd make this better?

[ My questions are a bit hazy here, as I am chasing a few matters at
this moment and I cannot devote the time to repro and diagnose/debug
this... apologies. ]

cheers,


m
-- 
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] known issues with collaboration in XS 0.5.2

2010-09-07 Thread Martin Langhoff
On Tue, Sep 7, 2010 at 10:44 AM, Tomeu Vizoso to...@sugarlabs.org wrote:
 With the script attached, some GetProperties queries take a few
 seconds, others more than 25 seconds (the default dbus timeout). It
 should be invoked like this: dbus-launch --exit-with-session python
 gabble_test.py

Hmmm, great that we have a test script -- thanks! I don't have an XS
at hand at this very moment, but I do believe what you're saying and
it makes sense -

 There are presently 2573 registered users and the ejabberd version is
 ejabberd-xs-2.0.3-11.fc9.olpc.i386 , which is the last one I see in
 http://fedora.laptop.org/xs/testing/olpc/9/i386/

Ok - so you're on the right version of ejabberd. The datastructures
get very inefficient when the number of nodes is moderately high --
some messages travel fast, others show huge latency. I thought of
refactoring the handling of @all@ inside of ejabberd (if we
special-case it a bit, we can avoid the mess of copied
datastructures).

But it's a daunting prospect. And our neighbourhood view doesn't
behave well with 2.5K users either. So my approach has been to split
up the groups in courses, via Moodle. In my (unverified) experience,
this makes ejabberd _much_ happier.

cheers,



m
-- 
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [Dextrose] Stability stuff

2010-09-03 Thread Martin Langhoff
On Fri, Sep 3, 2010 at 11:23 AM, Martin Abente
mabe...@paraguayeduca.org wrote:
 for sugar. In the field you already know thats not the case. Also... even
 when
 the activities are being implemented in python through the Activity Class,
 the
 read and write methods needs to be implemented by the programmer. That
 means it
 depends on the activity specifics again.

Well, if the activity doesn't save on close,it won't save on close and
will be messing up user data left-and-right.

We cannot design the system for brokenness...

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] known issues with collaboration in XS 0.5.2

2010-09-03 Thread Martin Langhoff
On Fri, Sep 3, 2010 at 12:43 PM, Tomeu Vizoso to...@sugarlabs.org wrote:
 I have a local XS 0.6 that is working fine but I'm finding that the XS
 0.5.2 at jabber.sugarlabs.org is not returning some results for some
 of the queries that I make.

There are very important bugfixes in the final ejabberd that is in
olpcxs-testing repo for xs-0.6

I should release a 0.6.1 with the contents of olpcxs-testing, but
things haven't been kind to me lately.

You aren't telling us exactly what problems you saw on the old
ejabberd. All I can say is: that old ejabberd (+patches) had plenty of
gremlins and unexplainable behaviours. The ejabberd in olpcxs-testing
has been 100% reliable in behaviour, and I reworked the patches until
I didn't see any buggy behaviour.

Highly recommended. Should work with just a rebuild if you're not on F9.

I cannot confirm that the right patches are in the latest ejabberd on F13.

cheers,


m
-- 
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Making OLPC / Sugar Labs more approachable

2010-08-09 Thread Martin Langhoff
On Mon, Aug 9, 2010 at 12:46 AM, Neil Graham l...@screamingduck.com wrote:
 Perhaps what is needed is a KDE to olpc's gnome in order to lift the
 game of both.

We do a ton of things in relationship with our 'community' (or perhaps
our different 'communities'). For example, we engage in this thread
with you.

As with most projects, it's up to you to help, participate positively, or not.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Making OLPC / Sugar Labs more approachable (was: Re: OLPC 10.1.2 Release Candidate 1)

2010-08-09 Thread Martin Langhoff
On Sun, Aug 8, 2010 at 5:09 PM, Christoph Derndorfer
christoph.derndor...@gmail.com wrote:
 I know I'm repeating myself here but I find the attitude expressed in these
 instructions and particularly point 3 troublesome and a continued source of
 frustration for me as well as other people I've talked to. Even more so I
 think it's a very clear symptom of the much-discussed disconnect between
 developers and end-users in the OLPC and Sugar Labs context.

Not really. There is a lot of glue people that can help bridge the
gap between teachers / nontechie deployers and developers.

I am one of them. I am sure you are one too. Deployments need to have
a (small) technical team that also fits this role.

Such bridge people are needed to boil down end users' reports into
something that looks like a usable bugreport.

Being a bridge person, a translator between the two worlds is
sometimes frustrating (can't these people talk to eachother
directly?) but the barriers are real. Rejoice in being able to do it
(at least I do).

And sure -- we need to get more hands (ears/eyes) into this role. It
is essential social glue.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Making OLPC / Sugar Labs more approachable

2010-08-09 Thread Martin Langhoff
On Mon, Aug 9, 2010 at 4:17 PM, Neil Graham l...@screamingduck.com wrote:
 And yet, Developers on this list [olpc-devel] have complained when
 people have done that, because this is not the place for it.  Of course,
 there isn't any other place for it.

Don't take every complaint seriously ;-)

 I really don't want to get combative here.   This may come off as You
 guys all suck but what I want is for things to improve.

We all do. But we are damned swamped with things, and we do a ton with
the community. You might not see it right now but we do.

...

 but a friend of mine who attended PyCon came back and said he was amazed
 with just how many people he met who felt burned by OLPC.

Having been an external volunteer first, I can attest that it is hard
to contribute to OLPC. A lot of that is because OLPC has chosen to do
hard things. OLPC requires a lot of time investment. All the other
open proects I know that have similarly hard goals are known to burn
people out.

Don't know if there's a fix for that overall problem :-/

Are there specific issues you are hoping for support with, what are they?

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Killing activities when memory gets short

2010-08-08 Thread Martin Langhoff
On Sun, Aug 8, 2010 at 4:01 AM, Tomeu Vizoso to...@sugarlabs.org wrote:
 I tihnk I have been sloppy with my words, so let me clarify two things:

 - killing processes should be done only to avoid OOM (because
 currently the kernel kills the wrong thing most of the time).

Can't we just _close it nicely_?

I have extremely rarely seen a Sugar app not closing. Sugar shell can
decide it's a good idea to close an activity because too many are open
and system is under memory pressure.

Sugar apps auto-save, so closing nicely should work very nicely...

cheers,



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Killing activities when memory gets short

2010-08-08 Thread Martin Langhoff
On Sun, Aug 8, 2010 at 9:33 AM, Tomeu Vizoso to...@sugarlabs.org wrote:
 Can't we just _close it nicely_?

 When you are about to get into OOM?

Early on so we avoid OOM for most cases. Right now our OOM use cases
have nothing to do with misbehaved activities.

Once you're in about to get into OOM, sugar-shell is unlikely to get
many cycles (and python is a bad lang to try handling this). If you
can seed the OOM scores of the process early on, you have a chance
that OOM will kill a reasonably correct one. (Not sure what the
state of play is with seeding the OOM scores from userland).

 point we should have given the activities and/or the user the option
 to avoid this situation.

I think it's the only thing we can reasonably do. And [if possible],
seed OOM scores.

When things get tight, only the kernel has a standing chance to run code.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Killing activities when memory gets short

2010-08-08 Thread Martin Langhoff
On Sun, Aug 8, 2010 at 11:42 AM, Martin Langhoff
martin.langh...@gmail.com wrote:
 (Not sure what the
 state of play is with seeding the OOM scores from userland).

http://linux-mm.org/OOM_Killer

The pid of the activity should have its oomadj bumped up a bit -- so
OOM knows to spare sugar-shell and friends...




m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Killing activities when memory gets short

2010-08-08 Thread Martin Langhoff
Hi Tomeu,

in general, I think we are saying the same thing :-)

With one exception -- OOM happens because memory is allocated.
Sugar-shell cannot (and I say should not) try to arbitrage in there.
If we try to do it from sugar-shell, all we can do is poll. If we poll
infrequently, we won't catch them, if we poll frequently, we'll burn
battery, introduce random lags... and still not catch many.

When the shell is in the bg, IMHO it should be as dormant as possible.

There are some opportunities for the shell to step-in in a friendly
manner -- activity open, activity switch, I propose that those events
are a natural place; and if a delay happens there is not very
disruptive for users. Between those events checking for low-mem and
seeding the OOM killer to catch runaways, we'll have something.

I don't know of there's a way to ask the OOM killer to run a process
on a lower threshold -- or send a signal to an existing one, that'd
make more sense :-) . If it does, we could have a tight C process
listening there of OOM warnings and sending friendly close now plz
dbus signals.

cheers,


m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Killing activities when memory gets short

2010-08-08 Thread Martin Langhoff
On Sun, Aug 8, 2010 at 12:36 PM, Tomeu Vizoso to...@sugarlabs.org wrote:
 Well, we certainly should not poll, I started this thread because
 recent kernels have a mechanism for getting notified when a certain
 threshold of free memory is reached (see below).
...
 http://lists.sugarlabs.org/archive/sugar-devel/2010-August/025851.html

u. apologies for wasting bandwidth. Over the course of the thread
I missed that bit. Excellent info.

thanks for your patience!



m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Killing activities when memory gets short

2010-08-07 Thread Martin Langhoff
On Sat, Aug 7, 2010 at 1:31 PM, Bernie Innocenti ber...@codewiz.org wrote:
 El Sat, 07-08-2010 a las 18:14 +0200, Tomeu Vizoso escribió:

 So we would have a periodic wakeup? The test would be the amount of
 free memory plus buffers and caches?

 A polled design is clearly inferior to a proper notification system, but

I think we can just win big time without polling and without killing.

 - grab the python code from ps_mem.py. We' ll be reading mem usage
from our own processes (w/o rainbow at least) so I suspect no need for
priv operation

 - when the user opens a new activity, poll used/free memory with some
pre-set constants and if warranted send a 'close' signal to the best
candidate (weighed LRU + mem usage score)

 -- depends on closing without asking for a document name...

 - Opportunistic checks on activity switch, view change can complement this.

The above matches what my Android phone does and as a user, works great.

cheers,




m
-- 
 martin.langh...@gmail.com
 mar...@laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


<    1   2   3   4   5   6   7   >