These are chat archives for ipython/ipython

5th
May 2015
Jessica B. Hamrick
@jhamrick
May 05 2015 17:08
Is there a meeting today?
Damian Avila
@damianavila
May 05 2015 17:12
@jhamrick There is a science fair today, IIRC, so not sure (I would bet we will not have one)
Matthias Bussonnier
@Carreau
May 05 2015 17:12
ONly this afternoon.
thomas installing chrome plugin
need restart firefox for updates to take effects.
(sight)
(swear words)
Brian E. Granger
@ellisonbg
May 05 2015 17:14
Let's just cancel the meeting...
Matthias Bussonnier
@Carreau
May 05 2015 17:14
mettign created, but we can't join it :-)
ok, done.
you shoudl have receive invites.
Jonathan Frederic
@jdfreder
May 05 2015 17:15
ok awesome!
send me an invite - jon.freder@gmail.com
Kyle Kelley
@rgbkrk
May 05 2015 19:13
@SylvainCorlay Min mentioned that you have a PR open to install/retrieve resources (JS, CSS) within a kernel's directory?
Which one is that?
Sylvain Corlay
@SylvainCorlay
May 05 2015 19:15
Hum, I don't see what you mean
is it about the requirejs loading of widget modules?
Kyle Kelley
@rgbkrk
May 05 2015 19:17
Sounds about right
I was pestering about loading resources from non-notebook frontends (that were also HTML)
so that they could use widgets
(other notebook centric bits of widgets notwithstanding)
Sylvain Corlay
@SylvainCorlay
May 05 2015 19:19
hum, it was an old PR when thomas implemented the loading of javascript modules for widgets. I proposed an alternative implementation, where the loading of the js module was trigered from the python side, typically on load of the Python package.
Kyle Kelley
@rgbkrk
May 05 2015 19:20
Yeah, that's just what I was wondering about. I proposed it as something that the kernel does on import to register some collection of assets
Sylvain Corlay
@SylvainCorlay
May 05 2015 19:20
But this would not have worked when reloading the page, or the list of modules to reload in that case would have to be stored somewhere. (like local storage)
Kyle Kelley
@rgbkrk
May 05 2015 19:20
(Note: idea gifted by Brian)
For the sake of the notebook, it would have to be stored somewhere I guess
which makes a compelling story for embedding the notebook
Sylvain Corlay
@SylvainCorlay
May 05 2015 19:21
ipython/ipython#6632
Kyle Kelley
@rgbkrk
May 05 2015 19:21
Alternatively, what if the kernel was tracking all the assets and a frontend could ask for the current state
Wouldn't have widget state though
Sylvain Corlay
@SylvainCorlay
May 05 2015 19:26
What kind of assets are you talking about. Is it to handle nbextensions that are not widgets?
Kyle Kelley
@rgbkrk
May 05 2015 19:30
It's more that I want to use widgets outside of any notebook context
If I just pretend that nbextensions stands for jsextenstions, I can just load them from there
@minrk has convinced me that js assets should probably be tied to kernels
Then it's on a specific path and bundled for that version with that kernel.
As a real example, bokeh's bokehjs is used by both bokeh (Python) and rbokeh (R)
It functions outside of the notebook as well (though with some workarounds for dealing with the notebook environment and loading assets)
I've been telling people how great it would be to expand upon the framework that Jupyter / IPython provides
This message was deleted
When I finally got around to tinkering with an alternative frontend, I saw what looked to me like a disconnect.
I'm happy to be wrong here of course
Kyle Kelley
@rgbkrk
May 05 2015 19:36
It all started because I wanted to turn my Atom script package (https://atom.io/packages/script) into something that could rely on Jupyter instead
script is so rudimentary it hurts. I wrote it and have thousands of users, but as soon as people want a real session or anything more dynamic I want to bridge over to Jupyter
Sylvain Corlay
@SylvainCorlay
May 05 2015 19:42
  • Since the backend code for a widget lies with the kernel, the correponding front-end javascript has to correspond to the right version of the backend code for example.
    Hence during the dev meetings in SF, Min agreed that even in the case of remotes kernels (potentially on a different machine than the notebook server), the js code for widgets should lie in a directory corresponding to that kernel spec...
  • There are other js resources than nbextensions that can be connected with a kernel spec, like a codemirror syntax coloring scheme that is not given with codemirror. (let's say for a proprietary language)
Kyle Kelley
@rgbkrk
May 05 2015 19:42

the js code for widgets should lie in a directory corresponding to that kernel spec

:+1:

The second one is exceptionally hard
Since it's about customization of the frontend
rather than a visualization
Sylvain Corlay
@SylvainCorlay
May 05 2015 19:43
yes, I think that it was left for further discussion and we did not come back to it
it is not so sensitive though
Kyle Kelley
@rgbkrk
May 05 2015 19:43
I'm reading through your PR now, figuring out what I should say
Instead of me just saying "subscribe"
;)
Since this was all addressed in detail before
Sylvain Corlay
@SylvainCorlay
May 05 2015 19:46
There has been a lot of discussion on those. I am not sure there is much value in this PR.
Kyle Kelley
@rgbkrk
May 05 2015 19:46
Maybe there will be a better place
We had a mini meeting today (since we were unsure if we would have one)
Now I wish we recorded it or took notes.
;)
Sylvain Corlay
@SylvainCorlay
May 05 2015 19:47
I was simply trying to avoid the propagation of asynchronicity of loading js modules.
Kyle Kelley
@rgbkrk
May 05 2015 19:47
Like some long require js loading chain?
I don't know what you mean.
Sylvain Corlay
@SylvainCorlay
May 05 2015 19:48
no, just that after the PR of thomas, create_child_viewfor example returns a promise for a view.
since it has to load the module with require.
Jason Grout
@jasongrout
May 05 2015 19:49
since then, promises have infected most of our code :)
Sylvain Corlay
@SylvainCorlay
May 05 2015 19:49
all of our code
so our widget library became async in both handling data and instantiating objects (widget models and views)
lol, this PR is really ooolllddd code.
Loader is essentially a promise :)
Kyle Kelley
@rgbkrk
May 05 2015 19:52
Maybe I need to just open an issue
The split makes me unsure of where to add it
I suppose it could go to the widgets for now
but I'm thinking it's a core or kernel thing
Kyle Kelley
@rgbkrk
May 05 2015 20:00
I mean, what I'm asking about is more of a spec thing than anything else
It's clear the trouble, notebook side, is how you load the JS