Re: Notes from the Ashland get together

2017-04-28 Thread Offray Vladimir Luna Cárdenas
Thanks for this notes and the follow up thread. Is good to see this face 
to face community events happening and creating memories and quick notes 
for those that couldn't be there.


Cheers,

Offray


On 24/04/17 15:52, Edward K. Ream wrote:
I had a great time in Ashland with Kent and Terry. In solidarity with 
other sprinters, we had two pizza's for lunch, but alas, no chips :-)


Kent explained some half-formed ideas, and I encouraged him to accept 
inevitable confusion when attempting to bring something new into being.


Terry talked about a new command: bookmark-find-flattened (bff), 
similar to cff. Imo, this would be a serious alternative to cff 
provided that a standard outline-view of bookmarks replaced the 
present list of bookmarks.  I'll see what I can do.


Terry also demoed an impressive alternative to the Easter Egg 
interface.  It's in the leo_edit_pane branch.


I demoed the curses gui code and discussed how gui code and Leo's core 
are circularly related. This can not be avoided, so it's important 
that key devs understand the most important methods:


- eventFilter and k.masterKeyHandler handle all key events.
- tree.select is unavoidably complex.  Mistakes will lose data.

This was an important discussion, because I was able to explain where 
the tricky parts of the code are, and why they are (and must be) tricky.


There was a discussion of removing chapters to simplify Leo.  I 
explained that the chapters code, while moderately complex in itself, 
adds no complexity  to Leo's core. In contrast, the complexity of 
eventFilter, k.masterKeyHandler, tree.select, c.selectPosition and 
some others, like body.onBodyChanged and tree.onHeadChanged, are 
/much/ more serious. I spend a lot of time worrying about global 
complexity, and almost no time worrying about local complexity.


Except for the just-mentioned discussion of complexity, there wasn't 
much discussion of "big ideas".  We will probably work on 
client/server stuff later this year, but that literally was the extent 
of that discussion.  Instead, we focused on details.  I fixed an 
AttributeError in stickynotes.py that happens only in recent Qt versions.


We discussed the following enhancements.  All will happen soon:

- Put method decorators in @auto headlines.
- A command, say toggle-auto-edit, that properly switches @auto <==> 
@edit, maintaining cursor position both ways. This will allow the user 
to switch easily between a "flat" view of a file (@edit) and a 
structured view of a file (@auto).
- Leo should remember toggle-split-direction the next time it loads a 
.leo file.

- Add the useful freelayout-* and gui-* commands to menus.
- Reorganize Leo's Window menu using sub-menus.

That's all I have in my notes.  Terry, Kent, anything you would like 
to add.


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.


--
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: Notes from the Ashland get together

2017-04-26 Thread Joe Orr
No, just wrap it in node, make a server that can talk to the GUI. 

Joe


On Tuesday, April 25, 2017 at 7:34:28 AM UTC-4, Edward K. Ream wrote:
>
> On Mon, Apr 24, 2017 at 7:37 PM, Joe Orr  
> wrote:
>
> On Monday, April 24, 2017 at 5:12:30 PM UTC-4, Terry Brown wrote:
>>
> ​...​
>  
>
>> Current plan is to finish main features for the reader and then make a 
>> server. The server could start with just simple writes, maybe even creating 
>> basic trees with no directives. Then we can see how hard it is to wrap the 
>> Leo python code and have this talk to the gui. (You're welcome to fork the 
>> viewer and start trying things).
>>
>
> ​Are you talking about converting Leo's core code to javascript?
>
> 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: Notes from the Ashland get together

2017-04-26 Thread Edward K. Ream
On Monday, April 24, 2017 at 3:52:20 PM UTC-5, Edward K. Ream wrote:

> That's all I have in my notes.

One more thing worth mentioning.  Terry pointed out that 'except 
Exception:' can cause problems when intending to catch a *specific* 
exception.  Later, another exception may get caught unexpectedly and 
*silently*.

This came to mind because the pylint 'broad-except' checker that will catch 
'except Exception:'.  However, some quick research indicates that enabling 
this checker would not be a good idea.  Indeed, cff finds 250 instances of 
'except Exception:'.  But most are perfectly harmless, for the following 
reasons:

1. Some occur during startup.  The computed value doesn't matter nearly as 
much as not crashing :-)

2. Many others are followed by some error message, so they will never fail 
silently.  More importantly, many occur to catch *unspecified* and 
*unknowable* exceptions in scripts or plugins.

3. A few instances might be replaced with Python's relatively new 'with' 
statement. I might get around to simplifying the code, but there is surely 
no urgency in doing so.

*Summary*: Leo has a surprisingly large number of 'except Exception:' 
clauses, but little or nothing would be gained by trying to remove them.  
Enabling the 'broad-except' checker would do more harm than good.

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: Notes from the Ashland get together

2017-04-25 Thread Edward K. Ream
On Tue, Apr 25, 2017 at 8:34 AM, Kent Tenney  wrote:

> Edward seemed to imply he's not a huge fan of javascript ...
>

​Heh.  Let's leave that alone :-)

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: Notes from the Ashland get together

2017-04-25 Thread Kent Tenney
Edward seemed to imply he's not a huge fan of javascript ...

On Tue, Apr 25, 2017 at 6:34 AM, Edward K. Ream  wrote:

> On Mon, Apr 24, 2017 at 7:37 PM, Joe Orr  wrote:
>
> On Monday, April 24, 2017 at 5:12:30 PM UTC-4, Terry Brown wrote:
>>
> ​...​
>
>
>> Current plan is to finish main features for the reader and then make a
>> server. The server could start with just simple writes, maybe even creating
>> basic trees with no directives. Then we can see how hard it is to wrap the
>> Leo python code and have this talk to the gui. (You're welcome to fork the
>> viewer and start trying things).
>>
>
> ​Are you talking about converting Leo's core code to javascript?
>
> 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.
>

-- 
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: Notes from the Ashland get together

2017-04-25 Thread Edward K. Ream
On Mon, Apr 24, 2017 at 7:37 PM, Joe Orr  wrote:

On Monday, April 24, 2017 at 5:12:30 PM UTC-4, Terry Brown wrote:
>
​...​


> Current plan is to finish main features for the reader and then make a
> server. The server could start with just simple writes, maybe even creating
> basic trees with no directives. Then we can see how hard it is to wrap the
> Leo python code and have this talk to the gui. (You're welcome to fork the
> viewer and start trying things).
>

​Are you talking about converting Leo's core code to javascript?

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: Notes from the Ashland get together

2017-04-24 Thread Joe Orr


On Monday, April 24, 2017 at 5:12:30 PM UTC-4, Terry Brown wrote:
>
> On Mon, 24 Apr 2017 13:52:20 -0700 (PDT) 
> "Edward K. Ream"  wrote: 
>
>
> Question for Joe - the JavaScript Leo work - any intent to connect to 
> an instance of Leo running on a server (thus allowing editing and 
> execution of Leo stuff) or focusing on reading / displaying .leo files? 
>
> It occurs to me there's a middle way - allowing editing of 
> headlines / body text without a Python application, so missing a lot of 
> Leo functionality, but still potential very useful. 
>
> Yes, was thinking of that. Would be very simple to make a server to write 
edits, and replace the content pane with Ace editor. 

Current plan is to finish main features for the reader and then make a 
server. The server could start with just simple writes, maybe even creating 
basic trees with no directives. Then we can see how hard it is to wrap the 
Leo python code and have this talk to the gui. (You're welcome to fork the 
viewer and start trying things).

However, I think having LeoViewer just do viewing is going to be best. It 
will have a lot of features that no one will want in an editor, like D3 
trees, page navigation, revealjs, etc. It will also be optimized for 
readers, not content creators. I think getting a web gui for the Leo Editor 
is a very good idea but probably a different codebase, maybe a version of 
Atom. 

Joe
 

> Cheers -Terry 
>

-- 
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: Notes from the Ashland get together

2017-04-24 Thread Terry Brown
On Mon, 24 Apr 2017 13:52:20 -0700 (PDT)
"Edward K. Ream"  wrote:

> Terry talked about a new command: bookmark-find-flattened (bff),
> similar to cff. Imo, this would be a serious alternative to cff
> provided that a standard outline-view of bookmarks replaced the
> present list of bookmarks. I'll see what I can do.

I think you mean "was available in addition to", rather than
"replaced" ;-)

> Terry also demoed an impressive alternative to the Easter Egg
> interface. It's in the leo_edit_pane branch.

Actually it's in the qt_docks branch.

> We discussed the following enhancements.  All will happen soon:
> 
> - Put method decorators in @auto headlines.
> - A command, say toggle-auto-edit, that properly switches @auto <==>
> @edit, maintaining cursor position both ways. This will allow the
> user to switch easily between a "flat" view of a file (@edit) and a
> structured view of a file (@auto).
> - Leo should remember toggle-split-direction the next time it loads
> a .leo file.
> - Add the useful freelayout-* and gui-* commands to menus.
> - Reorganize Leo's Window menu using sub-menus.

Nothing big springs to mind.

https://github.com/leo-editor/leo-editor/blob/leo_edit_pane/leo/core/signal_manager.py
does some publish/subscribe stuff in the leo_edit_pane branch.

Question for Joe - the JavaScript Leo work - any intent to connect to
an instance of Leo running on a server (thus allowing editing and
execution of Leo stuff) or focusing on reading / displaying .leo files?

It occurs to me there's a middle way - allowing editing of
headlines / body text without a Python application, so missing a lot of
Leo functionality, but still potential very useful.

Cheers -Terry

-- 
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.


Notes from the Ashland get together

2017-04-24 Thread Edward K. Ream
I had a great time in Ashland with Kent and Terry. In solidarity with other 
sprinters, we had two pizza's for lunch, but alas, no chips :-)

Kent explained some half-formed ideas, and I encouraged him to accept 
inevitable confusion when attempting to bring something new into being.

Terry talked about a new command: bookmark-find-flattened (bff), similar to 
cff. Imo, this would be a serious alternative to cff provided that a 
standard outline-view of bookmarks replaced the present list of bookmarks.  
I'll see what I can do.

Terry also demoed an impressive alternative to the Easter Egg interface.  
It's in the leo_edit_pane branch.

I demoed the curses gui code and discussed how gui code and Leo's core are 
circularly related. This can not be avoided, so it's important that key 
devs understand the most important methods:
   
- eventFilter and k.masterKeyHandler handle all key events.
- tree.select is unavoidably complex.  Mistakes will lose data.

This was an important discussion, because I was able to explain where the 
tricky parts of the code are, and why they are (and must be) tricky.

There was a discussion of removing chapters to simplify Leo.  I explained 
that the chapters code, while moderately complex in itself, adds no 
complexity  to Leo's core. In contrast, the complexity of eventFilter, 
k.masterKeyHandler, tree.select, c.selectPosition and some others, like 
body.onBodyChanged and tree.onHeadChanged, are *much* more serious. I spend 
a lot of time worrying about global complexity, and almost no time worrying 
about local complexity.

Except for the just-mentioned discussion of complexity, there wasn't much 
discussion of "big ideas".  We will probably work on client/server stuff 
later this year, but that literally was the extent of that discussion.  
Instead, we focused on details.  I fixed an AttributeError in 
stickynotes.py that happens only in recent Qt versions.

We discussed the following enhancements.  All will happen soon:

- Put method decorators in @auto headlines.
- A command, say toggle-auto-edit, that properly switches @auto <==> @edit, 
maintaining cursor position both ways. This will allow the user to switch 
easily between a "flat" view of a file (@edit) and a structured view of a 
file (@auto).
- Leo should remember toggle-split-direction the next time it loads a .leo 
file.
- Add the useful freelayout-* and gui-* commands to menus.
- Reorganize Leo's Window menu using sub-menus.

That's all I have in my notes.  Terry, Kent, anything you would like to add.

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.