Live data from Hacker News

JupyterLite: a JupyterLab distribution that runs in the browser

github.com

41–50 of 58 posts

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#41
post #17
post #2

JupyterLite is such an incredible piece of software. It came out of the Pyodide project, which first got Python compiled to WebAssembly working in the browser. It really is astonishing that they've managed to get the full data science Python stack - a lot of it based around custom C extensions (numpy, Pandas etc) running entirely in the browser.

it's neat, but it's kinda slow (25x slower than native when I tested it) In a JupyterLyte notebook: import numpy as np a = np.random.randn(128,128) b = np.random.randn(128,128) %timeit a @ b 1.5 ms ± 3.3 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each) On my command line: $ python3 -m timeit --setup 'import numpy as np; a = np.random.randn(128,128); b = np.random.randn(128,128)' 'a @ b' 5000 loops, best of…

While this is obviously a great demonstration as to why you wouldn't do something silly like build an entire code editor in the browser for day to day use (because it would be slow and clunky and have all sorts of issues), it's great for a accessibility when you don't need performance at all.

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#42
post #2

JupyterLite is such an incredible piece of software. It came out of the Pyodide project, which first got Python compiled to WebAssembly working in the browser. It really is astonishing that they've managed to get the full data science Python stack - a lot of it based around custom C extensions (numpy, Pandas etc) running entirely in the browser.

No post body was provided.

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#44

Earlier quoted context omitted.

On my machine parents test is; python command line 247µs local jupyter lab 274µs jupyter lite 4ms (about 16 times slower than the other two) Honestly considering how jupyter lite is working, I still feel this is pretty good.

I’m shocked the local instance is so tight with the interpreter. I assumed jupyter injected itself all over the place to allow halting loops and what have you. I do not care about the performance of jupyer lite - that it runs at all is a miracle. That it is acceptable performance for doing demos/teaching from a browser is simply magic.

Jupyter is incredibly powerful. I think a lot of the surprise (which I also had) is when you come from compiled languages and see the huge difference between running a compiled machine code vs just some faux interpreter. Python doesn’t have that. Everything is an interpreter (in a very loose sense). Jupyter, ipython, the shell etc all typically work similarly. If you think the overhead of rendering a webpage should slow down Jupyter, that is not the case. The “kernel” running your code and what’s handling your interactivity with Jupyter are separate processes.

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#45
post #43

Whatever happened to collaborative editing in these notebooks? It would be a great usecase for JupyterLite but last I saw the only project for real-time sharing of notebooks over the network was slurped up into Google Colab any open version was abandoned.

Oh it's happening! https://jupyterlite.readthedocs.io/en/latest/howto/configure...

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#46

JupyterLite is a great project! Addressing some other comments: the main limitation you'll find is probably the filesystem. WASM File System APIs are not extremely well evolved and (i think?) they're still in-memory FSs.

JupyterLite has a binding between the browser local storage and the WASM File System, so you can create a file from Python and it will be saved in the browser local storage for next time you come

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#47
the overall effort could be a game changer for data science education. the barriers have dropped considerably since open source data science stacks based on python, R or julia became widely used but it is still quite a hassle to setup an environment for non-technical people

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#48
post #39
post #29

JupyterLite is great! I use it heavily with my middle school math students — wonderful to have NumPy, matplotlib, and friends available without needing to set up accounts. I created a package called jupy5 that provides Turtle graphics and a p5.js-inspired sketchbook for JupyterLite as well.

jupy5 sounds pretty awesome!

Thanks! And big thanks to martinRenou1 for his work on ipycanvas!! He did most of the heavy lifting.

Re: JupyterLite: a JupyterLab distribution that runs in the browser

#50
post #17

Earlier quoted context omitted.

it's neat, but it's kinda slow (25x slower than native when I tested it) In a JupyterLyte notebook: import numpy as np a = np.random.randn(128,128) b = np.random.randn(128,128) %timeit a @ b 1.5 ms ± 3.3 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each) On my command line: $ python3 -m timeit --setup 'import numpy as np; a = np.random.randn(128,128); b = np.random.randn(128,128)' 'a @ b' 5000 loops, best of…

While this is obviously a great demonstration as to why you wouldn't do something silly like build an entire code editor in the browser for day to day use (because it would be slow and clunky and have all sorts of issues), it's great for a accessibility when you don't need performance at all.

Is this a snide comment on Atom and VS code? (I do think they're "slow" but not necessarily more than non-web rich IDEs - just compared to something like vim with conservative config/plug-ins).
Post reply on HN