Re: About undoing commands, especially tree operations

2023-07-15 Thread Thomas Passin
On Saturday, July 15, 2023 at 8:13:11 AM UTC-4 Edward K. Ream wrote: On Sat, Jul 15, 2023 at 7:02 AM Thomas Passin wrote: >> A new data module must be completely compatible will all existing scripts, plugins and Leo's core. I don't believe such a compatible data model is possible. >> Using a

Re: About undoing commands, especially tree operations

2023-07-15 Thread Edward K. Ream
On Sat, Jul 15, 2023 at 7:02 AM Thomas Passin wrote: >> A new data module must be completely compatible will all existing scripts, plugins and Leo's core. I don't believe such a compatible data model is possible. >> Using a completely new data model would basically entail a completely new implem

Re: About undoing commands, especially tree operations

2023-07-15 Thread Thomas Passin
On Saturday, July 15, 2023 at 6:11:59 AM UTC-4 Edward K. Ream wrote: A new data module must be completely compatible will all existing scripts, plugins and Leo's core. I don't believe such a compatible data model is possible. I think this is the key here. Using a completely new data model wou

Re: About undoing commands, especially tree operations

2023-07-15 Thread Edward K. Ream
On Friday, July 14, 2023 at 5:05:40 PM UTC-5 vitalije wrote: > I would argue that just to be able to have stable, simple and incorruptible positions in the outline is worth enough for switching to the new data model. This appears to be the lede that you buried. A new data module must be comple

Re: About undoing commands, especially tree operations

2023-07-15 Thread jkn
putting Edward's response to the side for now at least, I would like to say as a general point that I am always very interested to read anything Vitalije writes here. I seem to remember he has an occasionally-updated blog, i must go and hunt that down... J^n On Saturday, July 15, 2023 at 6:1

Re: About undoing commands, especially tree operations

2023-07-14 Thread Edward K. Ream
On Fri, Jul 14, 2023 at 5:05 PM vitalije wrote: > I don't see how offline data structures help recreate clones. How do they > simulate Leo's low-level VNode operations? > > > In order to see, you have to be willing to look first. > I'm not willing to change Leo's Position and VNode classes in an

Re: About undoing commands, especially tree operations

2023-07-14 Thread vitalije
I apologize if I have just made unnecessary noise with my post. It wasn't my intention. > I don't see how offline data structures help recreate clones. How do they simulate Leo's low-level VNode operations? In order to see, you have to be willing to look first. We had argued about this su

Re: About undoing commands, especially tree operations

2023-07-14 Thread Edward K. Ream
On Fri, Jul 14, 2023 at 11:56 AM Thomas Passin wrote: >> Finally, MORE crashed often. Whatever Leo's problems, it hardly ever just goes away :-) > Well, that was Dave Winer, wasn't it? He and three others sold MORE to Symantec (iirc) for 10 million dollars. Symantec never did anything with M

Re: About undoing commands, especially tree operations

2023-07-14 Thread Thomas Passin
On Friday, July 14, 2023 at 12:14:03 PM UTC-4 Edward K. Ream wrote: I *understated *the performance advantages of VNodes. Leo forms clones in constant time. In comparison, MORE took O(N**2) time to make clones. MORE could be much worse than 100x slower than Leo. Also, MORE made clones by copy

Re: About undoing commands, especially tree operations

2023-07-14 Thread Edward K. Ream
On Fri, Jul 14, 2023 at 9:45 AM Thomas Passin wrote: Leo's VNode class is the heart of Leo. It has a long history. It handles > clones two orders of magnitude faster than the MORE outliner. All of its > complications exist for a purpose. > > > Of course they do. The situation is something like wh

Re: About undoing commands, especially tree operations

2023-07-14 Thread Edward K. Ream
>> Does this mean that code in, say, an existing plugin won't work if it uses the currently-existing before/afterChangeTree calls? > Yes. Those calls are dangerous. Plugins have three ways forward: 1. Replace the existing undo calls with a call to u.clearAndWarn. The code is no longer undoabl

Re: About undoing commands, especially tree operations

2023-07-14 Thread Thomas Passin
On Friday, July 14, 2023 at 9:23:50 AM UTC-4 Edward K. Ream wrote: Leo's VNode class is the heart of Leo. It has a long history. It handles clones two orders of magnitude faster than the MORE outliner. All of its complications exist for a purpose. Of course they do. The situation is somethin

Re: About undoing commands, especially tree operations

2023-07-14 Thread Edward K. Ream
On Fri, Jul 14, 2023 at 7:38 AM Thomas Passin wrote: After reading this, I looked at the VNode class definition for the first > time. Ouch! I think this must be an example of serious technical debt. > No doubt it seemed reasonable or even necessary but as I look at it without > knowing the hist

Re: About undoing commands, especially tree operations

2023-07-14 Thread Edward K. Ream
On Fri, Jul 14, 2023 at 7:42 AM Thomas Passin wrote: Does this mean that code in, say, an existing plugin won't work if it uses > the currently-existing before/afterChangeTree calls? > Yes. Those calls are dangerous. Edward -- You received this message because you are subscribed to the Googl

Re: About undoing commands, especially tree operations

2023-07-14 Thread Thomas Passin
On Friday, July 14, 2023 at 8:24:17 AM UTC-4 Edward K. Ream wrote: On Fri, Jul 14 vitalije wrote: > I just wished to illustrate how dangerous and tricky things can get when we have mutable state buried so deep down in the foundations of Leo's code. I agree. That's what PR #3438

Re: About undoing commands, especially tree operations

2023-07-14 Thread Thomas Passin
After reading this, I looked at the VNode class definition for the first time. Ouch! I think this must be an example of serious technical debt. No doubt it seemed reasonable or even necessary but as I look at it without knowing the history or even much about how it's used, it's not how I try

Re: About undoing commands, especially tree operations

2023-07-14 Thread Edward K. Ream
On Fri, Jul 14 vitalije wrote: > I just wished to illustrate how dangerous and tricky things can get when we have mutable state buried so deep down in the foundations of Leo's code. I agree. That's what PR #3438 fixes, as follows: - The undo

About undoing commands, especially tree operations

2023-07-14 Thread vitalije
I haven't post here for a while, but from time to time, I'm still reading this forum. After reading the recent Edward's post about "big problems with undo/redo tree operations", I've just had to write something about this topic. Personally, I've never had too much confidence in using Leo's undo