Jupyter vs Leo + VR3

97 views
Skip to first unread message

Edward K. Ream

unread,
Mar 31, 2020, 7:24:52 AM3/31/20
to leo-editor
Thomas, this post is an indirect response to some of your recent remarks. There is some chance I understand them now ;-)

When I awoke this morning I saw that Leo + vr3 looks to be superior to Jupyter! vr3 adds all essential features of Jupyter notebooks and cells, while retaining Leo's unique features:

1. Interleaved @language directives is way better than the clumsy dropdown menu in Jupyter that selects the default view.

2. vr3 is aware of outline structure.

3. Leo + vr3 naturally retains all of Leo's superior organizational abilities.

4. In the (unlikely?) event that people want to use both Leo and jupyter, Leo can already import/export with jupyter.

No jupyter bridge needed

This page discusses using bokeh with jupyter. I'm not sure what this page is getting at, but the page appears moot.

I had been thinking of resuscitating #1386, but that issue looks like it can remain a "Won'tDo".

Summary

Thomas's vr3 plugin makes every Leo node work like an enhanced jupyter cell.

All comments welcome.

Edward

Thomas Passin

unread,
Mar 31, 2020, 9:19:55 AM3/31/20
to leo-editor


On Tuesday, March 31, 2020 at 7:24:52 AM UTC-4, Edward K. Ream wrote:
Thomas, this post is an indirect response to some of your recent remarks. There is some chance I understand them now ;-)

It's hard to grasp some of these things until you get time to work with VR3 for a while.  I have the advantage there!  One reason that VR3 has good potential here is that I was interested from the start in a literate-programming style capability, to be made as easy as possible.  So I was bound and determined to get the interleaved capability.
 
When I awoke this morning I saw that Leo + vr3 looks to be superior to Jupyter! vr3 adds all essential features of Jupyter notebooks and cells, while retaining Leo's unique features:

1. Interleaved @language directives is way better than the clumsy dropdown menu in Jupyter that selects the default view.

It's also possible to have separate nodes for each thing, the way that Jupyter notebooks do it.  With VR3, you also have the option to have more related things in the same node, which I happen to like.
 
2. vr3 is aware of outline structure.

3. Leo + vr3 naturally retains all of Leo's superior organizational abilities.

For me, this is the main reason I'd like to use Leo rather than Jupyter.  And BTW, if you want to share a program with someone else, and I mean just the code itself, you can choose to render only the code blocks, export to a browser, and copy the program directly from there for pasting into a file.  It would be easy to add an Export Code to File function, and I will probably do that at some point, but I want to keep the UI as simple as possible so I'm waiting until I get a good idea about that.
 
4. In the (unlikely?) event that people want to use both Leo and jupyter, Leo can already import/export with jupyter

Here I differ.  Leo cannot import/export anything Jupyter-ish but text nodes (and maybe code, I'm not sure).  Not code execution results, and certainly not live interaction outputs.  That's why I posted that we would need to improve import/export to be able to properly share with non-Leo Jupyter folks.  And even then, I don't see that we'd want to try to duplicate Jupyter's %-magic machinery. 
 
No jupyter bridge needed

Yes!  Exactly what I've been saying.  Glad you see it too!  Although there is one scenario where it might be worthwhile using a Jupyter kernel server.  That would be if you wanted to execute a very long calculation.  You'd want to do that asynchronously, so you don't tie Leo up waiting for it to finish, and Jupyter is designed to do that.

Edward K. Ream

unread,
Mar 31, 2020, 9:28:01 AM3/31/20
to leo-editor
On Tue, Mar 31, 2020 at 8:19 AM Thomas Passin <tbp1...@gmail.com> wrote:

Thomas, seems like we agree on points 1 through 3.

>> 4. In the (unlikely?) event that people want to use both Leo and jupyter, Leo can already import/export with jupyter

> Here I differ.  Leo cannot import/export anything Jupyter-ish but text nodes (and maybe code, I'm not sure). 

Are you talking about the .ipynb importer?

> Not code execution results, and certainly not live interaction outputs.

Are you sure? Don't .ipynb include everything?

> That's why I posted that we would need to improve import/export to be able to properly share with non-Leo Jupyter folks.  And even then, I don't see that we'd want to try to duplicate Jupyter's %-magic machinery.

Better importers and exports are always welcome.
 
No jupyter bridge needed

Yes!  Exactly what I've been saying.  Glad you see it too! 

Oh good :-)
Although there is one scenario where it might be worthwhile using a Jupyter kernel server.  That would be if you wanted to execute a very long calculation.  You'd want to do that asynchronously, so you don't tie Leo up waiting for it to finish, and Jupyter is designed to do that.

Does vr3 needs to support this? Couldn't users use popen to run calculations in a separate process? Or they could just use jupyter...

Edward

Thomas Passin

unread,
Mar 31, 2020, 12:35:15 PM3/31/20
to leo-e...@googlegroups.com
On Tuesday, March 31, 2020 at 9:28:01 AM UTC-4, Edward K. Ream wrote:
On Tue, Mar 31, 2020 at 8:19 AM Thomas Passin <tbp1...@gmail.com> wrote:

Thomas, seems like we agree on points 1 through 3.

>> 4. In the (unlikely?) event that people want to use both Leo and jupyter, Leo can already import/export with jupyter

> Here I differ.  Leo cannot import/export anything Jupyter-ish but text nodes (and maybe code, I'm not sure). 

Are you talking about the .ipynb importer?

> Not code execution results, and certainly not live interaction outputs.

Are you sure? Don't .ipynb include everything? 

I tried importing a notebook using the importer from the Files/Import Files menu.  It didn't bring everything in, just the text cells.  If there is another importer, I don't know of it so I didn't try it.

Edward K. Ream

unread,
Mar 31, 2020, 6:42:01 PM3/31/20
to leo-editor


On Tue, Mar 31, 2020 at 11:35 AM Thomas Passin <tbp1...@gmail.com> wrote:

I tried importing a notebook using the importer from the Files/Import Files menu.  It didn't bring everything in, just the text cells.  If there is another importer, I don't know if it so I didn't try it.

There is only one importer ;-) As of ced8b2e in devel the import-jupyter-notebooks command has some chance of working. Clearly, nobody has used this command recently.

As you say, at present the ipynb.do_cell method (in importers/ipynb.py) doesn't save much. It should be easy to save more, if you would like that.

Edward

Thomas Passin

unread,
Mar 31, 2020, 9:00:24 PM3/31/20
to leo-editor

On Tuesday, March 31, 2020 at 6:42:01 PM UTC-4, Edward K. Ream wrote:
As you say, at present the ipynb.do_cell method (in importers/ipynb.py) doesn't save much. It should be easy to save more, if you would like that.

Easy, perhaps, but I would go slowly, because we need to look at how best to fit it into VR3-style node trees, and also to see if we can have a hope of round-tripping with good fidelity.  Of course, I have only a general idea of how the notebook structure works, and I'm sure you are way ahead of me there.

 Tom

Edward K. Ream

unread,
Apr 1, 2020, 4:34:53 AM4/1/20
to leo-editor
On Tue, Mar 31, 2020 at 8:00 PM Thomas Passin <tbp1...@gmail.com> wrote:

On Tuesday, March 31, 2020 at 6:42:01 PM UTC-4, Edward K. Ream wrote:
As you say, at present the ipynb.do_cell method (in importers/ipynb.py) doesn't save much. It should be easy to save more, if you would like that.

Easy, perhaps, but I would go slowly, because we need to look at how best to fit it into VR3-style node trees, and also to see if we can have a hope of round-tripping with good fidelity.

I agree.
Of course, I have only a general idea of how the notebook structure works, and I'm sure you are way ahead of me there.

Almost all you need to know is that .ipynb files are json. And that's about all I remember.

Edward

Offray Vladimir Luna Cárdenas

unread,
Apr 1, 2020, 1:40:29 PM4/1/20
to leo-e...@googlegroups.com

Hi,

Nice to see this theme become alive again, as Jupyter interactive alike experiences combining with Leo outiling alike experience have been discussed before. We could have interactive emergent computing. I have been a log advocate of them and it was the reason I prototyped Grafoscopio[1], after long trying to get such experience using Python based technologies and dealing with a lot of incidental complexity.

[1] https://mutabit.com/grafoscopio/en.html

At some point I suggested Leo interacting with Jupyter and other projects not by importing and exporting files from/to them, but by establishing bridges (similar to Pyzo, AFAIK) that let Leo talk with such programs and import results as "@output" cells/nodes. Maybe the vr3 is the missing piece that would allow such interactive outlining computing.

I'm having problems these days running Leo on my Manjaro Linux. There is any screenshot to share about how Leo + vr3 plugin looks like, for example, in the context of scientific computing (lets say combining a calculation, an equation, some Markdown/ReST, and a plot?).

Cheers,

Offray

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/7d2b9eac-6baa-4cb3-b22c-e1a22163219b%40googlegroups.com.

Thomas Passin

unread,
Apr 1, 2020, 6:15:15 PM4/1/20
to leo-editor
Hi, I see you found us on another thread.  Here is a longer example.  It's a real one that I did for myself some time ago.  It is too long to show in a single image, so I exported it to the browser and printed to pdf. The page breaks aren't the best, but it was quick and simple.  It whets your appetite, doesn't it?

Enjoy!
perils_of_extrapolation.pdf

Offray Vladimir Luna Cárdenas

unread,
Apr 1, 2020, 6:59:42 PM4/1/20
to leo-e...@googlegroups.com

It looks pretty cool in fact :-).

Thanks,

--
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+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages