Good Artists Copy; Great Artists Steal 
<http://quoteinvestigator.com/2013/03/06/artists-steal/>--unknown/various

tl;dr: pyzo is the work of a programming genius.  I'll use that genius to 
improve Leo.

Pyzo contains absolutely brilliant code that I shall be "borrowing" 
freely.  The pyzo code is covered by the new BSD license, so that will have 
to be reflected in various places.  No big deal.

After studying pyzo briefly, four or five areas for improving Leo present 
themselves:


*ipython integration*
pyzo defines and uses the yoton client/server library.  Leo will likely use 
yoton just like pyzo does. This will be a major project, but imo it is the 
future of Leo. It will make Leo a first-class IPython/Jupyter editor, just 
as pyzo is. This project should reduce or eliminate the need for Leo's 
IPython bridge. 

*syntax coloring*

pyzo's syntax coloring looks to be more than 10x faster than Leo's.  And 
it's so much simpler. Leo simply must use this scheme.  It will take 
considerable adapter code.

In particular, pyzo uses brilliantly simple token-based parsers to guide 
syntax coloring. These parsers use regex's to generate tokens.  At present, 
pyzo can only colorize python and c. Leo will have to generate regex's for 
each language using files in leo/modes.

This project is worth any amount of work. It should allow us to remove the 
odious "big text" buttons.

*autocompletion*

pyzo's autocompletion is simpler, faster and just plain better than Leo's. 
I'm not sure yet whether it depends on ipython, but I'll use as much of the 
pyzo code as possible.

*key handling*

Parts of Leo's key handling code is scandalously complex.  The pyzo code is 
much simpler.  I'll check whether the front end of Leo's key handling code 
can be simplified using the pyzo code as a model.


*Tree handling*
pyzo's tree handling code is super simple, but that's because the pyzo code 
doesn't need to do much. In particular, the pyzo code need only respond to 
mouse clicks and standard keys--it doesn't have to deal with events 
generated by custom keys or python scripts.  Still, the code will be worth 
a close look, to see if Leo's code could be improved.

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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to