Re: [Edu-sig] FYI: PataPata postmortem link

On Wed, 29 Nov 2006 10:29:30 -0600, Ian Bicking wrote: [Constrained objects and persistence]
In particular cases it might be more reasonable. For instance, consider glade (http://glade.gnome.org/) -- it's an XML description of a GUI. For an application that uses Glade and given an editor specific to that, you could edit the "objects" and then the XML is automatically written out. You'd be doing simultaneous editing of the in-process objects and the "source code", in this case the XML description of the layout.
Sure. The interesting things begin when you start to (ab)use these layout tools to describe processes. For example, using Qt Designer's signals and slots editor to describe higher-level actions in an application.
Glade isn't magic, of course -- you could add automatic serialization to any kind of object, or recreate something like Glade in Python. For a small number of basic Python objects this is already possible; mostly functions. Modules and classes are not nearly so simple.
Rather than serialising Python objects, it's possibly easier to think about describing components that can be implemented in Python. This means that you're no longer editing Python, but tweaking parameters for some set of components in a flowchart, and optionally rearranging them to do different things. Maybe that's a step too far.
But really if we can cover a set of compelling things that children would want to edit, an incomplete in-process editing system could be valuable.
I agree.
Forking would clone a process.
I'm not really interested in cloning the process. I'm thinking about restarting individual "smaller" processes - that is, processes with fewer responsibilities than normal applications. You would need more than one of these to do interesting things, and they would communicate through interfaces. [Reloading modules]
As a result there's lots of references to the old objects. For every class there is now two instances of the class. Any imports like "from mod import Foo" will still be pointing at the old Foo. There might be references to functions, bound methods, etc, and old instances with a __class__ pointing to the old definition.
Sure. That's why it would be interesting to use clearly-separated components that can be reconfigured and (re)started.
People have implemented fancier reloaders that do better. For instance, recursively replacing the __dict__ of classes, instead of just creating a new class. There are always cases in which these fail.
That said, if we could identify those cases and give warnings we'd be getting a lot further. Current reloaders are optimistic and ignore detectable problems. Once the warnings are in, and given alternate methods (e.g., alternatives to mutable class-level variables), we would be encouraging people to write reloadable code.
Or maybe just turn everything into separated components; or use a different way to describe discrete packages of Python, perhaps inspired by an existing XML format for GUIs. There's lots of scope for different approaches, but it's quite easy to get distracted by the detailed techniques required to achieve them. As PataPata has perhaps taught us, I think it's important to establish some limits on what you want to achieve and remain focused on that. David

On 30-Nov-06, at 3:44 PM, David Boddie wrote:
On Wed, 29 Nov 2006 10:29:30 -0600, Ian Bicking wrote:
[Constrained objects and persistence]
In particular cases it might be more reasonable. For instance, consider glade (http://glade.gnome.org/) -- it's an XML description of a GUI. For an application that uses Glade and given an editor specific to that, you could edit the "objects" and then the XML is automatically written out. You'd be doing simultaneous editing of the in-process objects and the "source code", in this case the XML description of the layout.
It's unfortunate that Glade (and Renaissance for Cocoa, and XUL for Mozilla, and BML for Java and etc.) are all so closely tied to their respective toolkits. It makes it harder to get good re-use. And having a declarative, HTML-like language for UI building could be quite powerful. [snip]
Rather than serialising Python objects, it's possibly easier to think about describing components that can be implemented in Python. This means that you're no longer editing Python, but tweaking parameters for some set of components in a flowchart, and optionally rearranging them to do different things. Maybe that's a step too far.
This sounds like a Smalltalk image.
But really if we can cover a set of compelling things that children would want to edit, an incomplete in-process editing system could be valuable.
I agree.
Oberon, Self, and Hypercard allowed you to get "behind" the widgets to see the code they would invoke, and the code that created them. HTML and the current desktop-widget tools do this too. It requires some additional work on the UI framework to support this, but a UI that was built from Python or XML should be able to support it.
Forking would clone a process.
I'm not really interested in cloning the process. I'm thinking about restarting individual "smaller" processes - that is, processes with fewer responsibilities than normal applications. You would need more than one of these to do interesting things, and they would communicate through interfaces.
Interestingly enough, Stackless Python can do this now. You can create "tasklets" which are lightweight processes that can be serialized, sent over a network, restarted, and communicate with each other. [rest of dicussion snipped. Interesting, but I don't have anything to add] --Dethe "Any idea that couldn't stand a few decades of neglect is not worth anything." --Gabriel Garcia Marquez
participants (2)
-
David Boddie
-
Dethe Elza