Re: Improving Leo using pyzo code

2017-01-12 Thread john lunzer
Happy to point somebody in the direction of Flexx. It is an amazing piece 
of software. I am very excited for it. I believe that it too (along with 
parts of Pyzo) has a future with Leo some day.

On Wednesday, January 11, 2017 at 10:21:37 PM UTC-5, Satish Goda wrote:
>
> I installed Flexx yesterday and it is brilliant!
>
> On Wednesday, January 11, 2017 at 7:43:44 PM UTC+8, Edward K. Ream wrote:
>>
>>
>>
>> On Sun, Jan 8, 2017 at 3:17 PM, john lunzer  wrote:
>>
>>> So awesome that you made this discovery, I've wanted to try Pyzo out for 
>>> some time now. You may be aware that the author of Pyzo is also the author 
>>> of Flexx.
>>
>>
>> ​No I didn't know that. Almar Klein is a busy guy 
>> .
>> ​
>>  
>>
>>> It's great to see great artists getting inspiration from other great 
>>> artists. Can't wait to see what comes of these developments. The syntax 
>>> highlighting speed is one of the last big warts, would love to see it 
>>> lopped off.
>>>
>> ​
>> I'll be working on this off and on until it is finished.
>>
>> 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: Improving Leo using pyzo code

2017-01-11 Thread Satish Goda
I installed Flexx yesterday and it is brilliant!

On Wednesday, January 11, 2017 at 7:43:44 PM UTC+8, Edward K. Ream wrote:
>
>
>
> On Sun, Jan 8, 2017 at 3:17 PM, john lunzer  > wrote:
>
>> So awesome that you made this discovery, I've wanted to try Pyzo out for 
>> some time now. You may be aware that the author of Pyzo is also the author 
>> of Flexx.
>
>
> ​No I didn't know that. Almar Klein is a busy guy 
> .
> ​
>  
>
>> It's great to see great artists getting inspiration from other great 
>> artists. Can't wait to see what comes of these developments. The syntax 
>> highlighting speed is one of the last big warts, would love to see it 
>> lopped off.
>>
> ​
> I'll be working on this off and on until it is finished.
>
> 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: Improving Leo using pyzo code

2017-01-11 Thread Edward K. Ream
On Sun, Jan 8, 2017 at 3:17 PM, john lunzer  wrote:

> So awesome that you made this discovery, I've wanted to try Pyzo out for
> some time now. You may be aware that the author of Pyzo is also the author
> of Flexx.


​No I didn't know that. Almar Klein is a busy guy
.
​


> It's great to see great artists getting inspiration from other great
> artists. Can't wait to see what comes of these developments. The syntax
> highlighting speed is one of the last big warts, would love to see it
> lopped off.
>
​
I'll be working on this off and on until it is finished.

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: Improving Leo using pyzo code

2017-01-09 Thread Satish Goda
Hello Edward.

Really nice to see that you are moving forward with this. I am very happy 
and glad that I referred Pyzo, although I was a bit reluctant to mention it 
with the assumption that it would disrupt the Leo/PlantUml discussion. 

One use case in Pyzo that I really used a lot in my previous movie project 
was the multiple interpreters feature in Pyzo. After looking at Leo, Leo 
could support multiple interpreters in the same session be defining them 
across two trees in the same outline. The Top level could define the 
interpreter settings etc and nodes below that could be cells.


On Saturday, January 7, 2017 at 9:21:19 PM UTC+8, Edward K. Ream wrote:
>
> Good Artists Copy; Great 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 are 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 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: Improving Leo using pyzo code

2017-01-08 Thread john lunzer
Just had to post again after reading the other recent post with Offray. 
Everything you talked about integration into Leo will be amazing. Full 
IPython/Jupyter integration will super charge Leo. If all of Leo's internals 
are exposed via a fully integrated IPython kernel the interactivity of Leo will 
be astounding.

Very excited 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: Improving Leo using pyzo code

2017-01-08 Thread john lunzer
So awesome that you made this discovery, I've wanted to try Pyzo out for some 
time now. You may be aware that the author of Pyzo is also the author of Flexx. 
It's great to see great artists getting inspiration from other great artists. 
Can't wait to see what comes of these developments. The syntax highlighting 
speed is one of the last big warts, would love to see it lopped off.

-- 
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: Improving Leo using pyzo code

2017-01-08 Thread Edward K. Ream
On Saturday, January 7, 2017 at 8:21:19 AM UTC-5, Edward K. Ream wrote:

> pyzo is the work of a programming genius.  I'll use that genius to 
improve Leo.

The leo/external/pyzo folder now contains copies of the pyzo code 
pertaining to syntax coloring. I had to repackage some things.  Originally, 
importing any pyzo file started pyzo itself!  The culprit was 
pyzo/__init__.py. Overall, the changes are minor.

Some test code (not pushed yet) defines a wrapper class that integrates the 
pyzo code into Leo's existing colorizing scheme. The code now appears to 
work, except that everything is colored black.  That's actually a nit ;-)

This is exciting. Among other things, the default colors are (will be) 
solarized colors!  The code works directly on QTextEdit widgets, so it 
should work as is with the LeoQTextBrowser class that holds Leo's body pane.

There is lots of interesting and useful code in pyzo.   Pyzo can change 
margins, handle auto-completion, paren matching, etc.  And Pyzo integrates 
that code with QTextEdit directly, unlike Leo's existing code where the 
various wrapper classes get in the way. 

So Pyzo code should indeed simplify major parts of Leo.  For now, I'll 
focus on syntax coloring.  If that can be made to work I'll leave other 
improvements on the back burner.  Integration with IPython and Jupyter 
seems like a higher priority.  But long term, Pyzo points the way to much 
better editor code for Leo.

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.