Re: fast-read will be merged into devel tomorrow

2018-07-03 Thread Chris George
When I open myLeoSettings.leo the node @outline-data tree-abbreviations 
tells me that it is a clone. It is the only clone in the entire settings 
tree.

So I copy that clone node and paste it back into the tree. Then I delete 
the original node that thinks its a clone.

Then I restart Leo.

And open myLeoSettings.leo and it tells me that @outline-data 
tree-abbreviations is a clone again.

Methinks this is a bug.

Chris

On Tuesday, July 3, 2018 at 9:21:27 AM UTC-7, Chris George wrote:
>
> I write a weekly column for a local online news outlet.
>
> Part of my routine is using an @outline-data tree-abbreviations to create 
> a template.
>
> This worked fine in devel last Tuseday morning (June 26) and does not work 
> at all now. Standard abbreviations work fine.
>
> @outline-data tree-abbreviations still work fine in master.
>
> Chris
>
>
> On Tuesday, June 26, 2018 at 9:01:25 AM UTC-7, Edward K. Ream wrote:
>>
>> On Tuesday, June 26, 2018 at 8:58:31 AM UTC-5, Terry Brown wrote:
>>
>> > It sounds like c.db is no longer specific to the c it's in, something 
>> to do with Edward's changes. 
>>
>> I've just created #934 
>>  for this.
>>
>> Edward
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: updates about new data model

2018-07-03 Thread vitalije


On Tuesday, July 3, 2018 at 6:11:47 PM UTC+2, Kent Tenney wrote:
>
> Wow, that is exciting, a couple reactions.
>
> I looked at the code, don't understand it, but it's so clean I feel like I 
> could if I had to.
>
> The difference between multiple seconds and milliseconds is qualitative, 
> not just quantitative.
>
> Thanks for this comments. Have you looked just in the python code or in 
the blog posts about the new code?

I would like to know if the blog posts are clear and understandable or not?

https://computingart.net/leo-tree-model-4.html
https://computingart.net/leo-tree-model-5.html
https://computingart.net/leo-tree-model-6.html

Vitalije

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: updates about new data model

2018-07-03 Thread vitalije
Here is short video showing experiment with the new data model and new tree 
widget.

https://www.youtube.com/watch?v=TZdNoH0NGHI

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: fast-read will be merged into devel tomorrow

2018-07-03 Thread Chris George
I write a weekly column for a local online news outlet.

Part of my routine is using an @outline-data tree-abbreviations to create a 
template.

This worked fine in devel last Tuseday morning (June 26) and does not work 
at all now. Standard abbreviations work fine.

@outline-data tree-abbreviations still work fine in master.

Chris


On Tuesday, June 26, 2018 at 9:01:25 AM UTC-7, Edward K. Ream wrote:
>
> On Tuesday, June 26, 2018 at 8:58:31 AM UTC-5, Terry Brown wrote:
>
> > It sounds like c.db is no longer specific to the c it's in, something to 
> do with Edward's changes. 
>
> I've just created #934 
>  for this.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: updates about new data model

2018-07-03 Thread Kent Tenney
Wow, that is exciting, a couple reactions.

I looked at the code, don't understand it, but it's so clean I feel like I
could if I had to.

The difference between multiple seconds and milliseconds is qualitative,
not just quantitative.
I love Terry's active-path concept, where a node becomes a file manager.
With enough
speed and scalability, recursively loaded @path nodes at the top of a large
codebase
could get really interesting.

Thanks,
Kent


On Tue, Jul 3, 2018 at 10:33 AM, vitalije  wrote:

> I have just published the code in new repository under leo-editor.
>
> https://github.com/leo-editor/new-leo-model
>
> leo-tree-model.leo file contains among other, four buttons which can be
> used to test new Qt version of NewTreeWidget, widget which draws outline
> using data from new data model.
>
> The first button is `new-tree` which when clicked will copy current
> outline to new data model and then create and insert a NewTreeWidget in
> separate pane. You can click in new tree widget to expand or contract
> nodes, also you can click in any headline and it will select appropriate
> node in Leo tree also.
>
> The second button is `nt-exp-all` which will expand all nodes in new tree
> widget. State expanded/contracted is not propagated to old Leo tree.
>
> The third button is `nt-prom-dem` which will execute 100 times pair of
> promote/demote operations drawing tree after each operation. It should log
> average time in Log tab.
>
> The fourth button is `speed-prom-dem` which will expand all nodes in
> classic Leo tree widget and then perform series of promote/demote commands,
> displaying average time.
>
> I have originally tested this four buttons in LeoPyRef.leo which has more
> than 8000 nodes. With such a large outline Leo needs more than 9 seconds to
> fully expand tree and about 1600ms to execute pair of
> c.demote(p)/c.promote(p) commands. That is why test is performed only 5
> times. Compare this to almost instantaneous expand-all in new tree widget
> and average of 52.7ms for demote/promote cycle.
>
> Note also that in new data model this operations can be executed much
> faster if we just skip repainting widget every time and use just w.update()
> instead of w.repaint().
> In this case new leo data model takes on average 1.8ms for one
> promote/demote cycle. That is 1600 times faster than Leo. Leo currently
> doesn't have functions that would do promote/demote pair without redrawing
> tree, but even if it had I believe they wouldn't be faster than their
> alternatives in new data model.
>
> In this post  I wrote
> about possible integration of this new model in Leo.
>
> The main idea is not to chop new model in pieces and re-implementing piece
> by piece in Leo. That is probably possible to do. However that would mean
> adding even more code to Leo instead of reducing its code size. I believe
> it would be long and cumbersome process with no guarantee that in the end
> Leo would retain backward compatibility and achieve comparable speed as in
> this demo.
>
> Instead, I would suggest to internally integrate new data model and only
> when executing scripts:
>
>1. copy data from new model to c.hiddenRootNode,
>2. execute script
>3. copy data from c.hiddenRootNode back to new data model
>
> That way all scripts will just work. All commands in Leo can be changed
> like this:
> @g.command('some-command')
> def some_command(self):
> if g.NEW_MODEL:
>return self.ltm.some_command()
> ... # rest of command unchanged
>
>
> And then just switch global switch to turn on or off new model.
>
> When creating GUI, this global switch can be checked and if set then build
> NewTreeWidget instead of old one, or they can be both instantiated and only
> one of them set visible (in case some script relies on classic tree widget).
>
> I believe that I can make all these changes in a separate branch and then
> Edward can decide whether he will accept proposed changes or not.
>
> Vitalije.
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: updates about new data model

2018-07-03 Thread vitalije
I have just published the code in new repository under leo-editor.

https://github.com/leo-editor/new-leo-model

leo-tree-model.leo file contains among other, four buttons which can be 
used to test new Qt version of NewTreeWidget, widget which draws outline 
using data from new data model.

The first button is `new-tree` which when clicked will copy current outline 
to new data model and then create and insert a NewTreeWidget in separate 
pane. You can click in new tree widget to expand or contract nodes, also 
you can click in any headline and it will select appropriate node in Leo 
tree also.

The second button is `nt-exp-all` which will expand all nodes in new tree 
widget. State expanded/contracted is not propagated to old Leo tree.

The third button is `nt-prom-dem` which will execute 100 times pair of 
promote/demote operations drawing tree after each operation. It should log 
average time in Log tab.

The fourth button is `speed-prom-dem` which will expand all nodes in 
classic Leo tree widget and then perform series of promote/demote commands, 
displaying average time.

I have originally tested this four buttons in LeoPyRef.leo which has more 
than 8000 nodes. With such a large outline Leo needs more than 9 seconds to 
fully expand tree and about 1600ms to execute pair of 
c.demote(p)/c.promote(p) commands. That is why test is performed only 5 
times. Compare this to almost instantaneous expand-all in new tree widget 
and average of 52.7ms for demote/promote cycle.

Note also that in new data model this operations can be executed much 
faster if we just skip repainting widget every time and use just w.update() 
instead of w.repaint().
In this case new leo data model takes on average 1.8ms for one 
promote/demote cycle. That is 1600 times faster than Leo. Leo currently 
doesn't have functions that would do promote/demote pair without redrawing 
tree, but even if it had I believe they wouldn't be faster than their 
alternatives in new data model.

In this post  I wrote about 
possible integration of this new model in Leo.

The main idea is not to chop new model in pieces and re-implementing piece 
by piece in Leo. That is probably possible to do. However that would mean 
adding even more code to Leo instead of reducing its code size. I believe 
it would be long and cumbersome process with no guarantee that in the end 
Leo would retain backward compatibility and achieve comparable speed as in 
this demo.

Instead, I would suggest to internally integrate new data model and only 
when executing scripts:

   1. copy data from new model to c.hiddenRootNode, 
   2. execute script
   3. copy data from c.hiddenRootNode back to new data model

That way all scripts will just work. All commands in Leo can be changed 
like this:
@g.command('some-command')
def some_command(self):
if g.NEW_MODEL:
   return self.ltm.some_command()
... # rest of command unchanged


And then just switch global switch to turn on or off new model. 

When creating GUI, this global switch can be checked and if set then build 
NewTreeWidget instead of old one, or they can be both instantiated and only 
one of them set visible (in case some script relies on classic tree widget).

I believe that I can make all these changes in a separate branch and then 
Edward can decide whether he will accept proposed changes or not.

Vitalije.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


updates about new data model

2018-07-03 Thread vitalije
I have written some posts describing new data model, and now I am trying to 
push code to github but it says that I don't have access rights for 
leo-model  repo.

Edward what would you like me to do? My intention was to overwrite all 
present code there with the new code. It evolved quite a lot and it would 
not be easy to merge your changes now without breaking new code.

I can publish it somewhere else, but I believe the best placet would be 
under leo-editor.

Vitalije

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Leo's first-issues page

2018-07-03 Thread Edward K. Ream
I use the "first" label to focus my thoughts when there are an intimidating 
number of items assigned to a milestone.

At present, the filter is:issue is:open milestone:5.7.4 label:First 

 
contains 9 issues.  These are what I'll be doing in the next few weeks.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: fast-read branch has been merged into devel

2018-07-03 Thread Edward K. Ream
On Mon, Jul 2, 2018 at 10:32 PM, Terry Brown  wrote:

If I see it happen again I'll try and send it, but it was so
> inconsistent.
>

​Leo's behavior should be much more consistent now that there is no file
caching.

My rule of thumb is *not* to save the .leo file if I see something strange,
but to copy the old version of the file...

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.