Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Jason Grout
@jasongrout
The menu waits for an animation frame to show up, IIRC, so it may be some interaction with the scripting software and how animation frames are scheduled in the browser?
Perhaps using whatever command you want directly from the system is more consistent than waiting for the browser to draw UX elements like menus?
Michael Aye
@michaelaye
is it at all possible that the jlab file explorer doesn't list all macOS aliases? I'm perplexed because it does for o/lder ones but not for new aliases i recently created.
yeah, looks like my older ones were proper symlinks, but macOS Finder aliases are invisible.
Jason Grout
@jasongrout
From https://en.wikipedia.org/wiki/Alias_(Mac_OS), it looks like Finder aliases are special files?
jlab just displays whatever the notebook file contents manager gives it. So I guess the question here is if the Jupyter Notebook file contents manager in the notebook server understands these special files.
apparently not?
Wolf Vollprecht
@wolfv
we're trying to create a jupyter server extension which is basically a websocket handler that calls write_message from a thread
which errs with [ERROR] [1591198708.203620]: Exception calling subscribe callback: There is no current event loop in thread '/listener'.
I was wondering if by chance someone else attempted something like this before?
I tried setting AnyThreadEventLoopPolicy but it broke jupyter
Michał Krassowski
@krassowski
Is there a colour picker extension for JupyterLab? I just realised how much time I am wasting when creating plots by not having a built-in colour picker. I know that there are some widgets for specific kernels but like a standalone extension?
Jason Grout
@jasongrout
I don't know of one, but should be pretty easy to make a widget wrapping a js-based color picker
Michał Krassowski
@krassowski
that's what I thought! Like literally a few lines of code. Might be a good example extension (like astronomy picture of the day but highligting other interfaces - i.e.I would like to have it in a sidebar and maybe in the menu).
Fred Mitchell
@fm75
Isn't there one in ipywidgets?
Michał Krassowski
@krassowski
but the ipywidgets one is kernel dependent, isn't it?
Fred Mitchell
@fm75
Yeah
blois
@blois
I keep wanting something like https://github.com/easylogic/codemirror-colorpicker. Presumably could trigger it with color('#aaa'), where color was a function that just returned a string, but was a hint to the editor to highlight the string argument as a color.
Michał Krassowski
@krassowski
wow, that's such a great code mirror extension! just needs a night theme to greatly improve UX!
Vidar Tonaas Fauske
@vidartf
so I guess it is a de-facto standard kind of ?
Steven Silvester
@blink1073
Yeah it was added later and not well documented it seems
Vidar Tonaas Fauske
@vidartf
would you consider it part of that standard that the partial file must be written after receiving chunk: 1 ?
Vidar Tonaas Fauske
@vidartf
or is that purely a detail in the default implementation
Jason Grout
@jasongrout
I would say (conservatively) an implementation detail?
Is there a specific capability you have in mind to make it part of the standard?
Vidar Tonaas Fauske
@vidartf
what I mean is that currently both lab and notebook will send the chunk argument along together with a partial file
any contents managers that do not understand chunk will simply end up overwriting the file with the contents of the final chunk
leading to broken/corrupt files
and no errors
so either I would want to document this as a required part of the contents api standard
or put some flag on the manager classes that the server can check if it receives chunks (and fail with a 4xx/5xx error)
*fail if unsupported
Jason Grout
@jasongrout
I agree about documenting "chunks" as a part of the standard. What I meant was is there a reason to insist that a partial file must be written after getting the first chunk as part of the standard?
Vidar Tonaas Fauske
@vidartf
I see that the LFM does it, and wondered there would ever be a case were some other system relied on it being returned with the dir listing while partial
just a sanity check I guess
since the hanbdler is expected to return a model
Jason Grout
@jasongrout
yeah, I could see that either way. I think a standard thing to do when having a partial file is to store it as a temporary file until the whole file is done, then rename it to the final name, so I would say writing the partial file is an implementation detail
but good point about the handler returning a model...
maybe that forces our hand if you have to return a model. Should we add something to the model indicating the file is partial?
Vidar Tonaas Fauske
@vidartf
I am happy to document the api as "if you choose to use the chunk api, you must regard all intermediate models as invalid until the final chunk is written" ?
Jason Grout
@jasongrout
or maybe the returned model should be basically null until the final chunk? I wonder how many frontends that would break

I am happy to document the api as "if you choose to use the chunk api, you must regard all intermediate models as invalid until the final chunk is written" ?

Sure, or a softer way is to say that the behavior is undefined, but I suppose we all know the tendency to write software assuming undefined behavior, so it's probably better to be clear in the documentation, then back it up in the implementation

in other words, if we document the models as invalid, we should change the implementation to make them invalid
otherwise the implementation does not match the documentation, and as we've seen in the past, with a single major implementation, it becomes the de facto standard, despite what the document says
Vidar Tonaas Fauske
@vidartf
well, it strictly depends on the file type whether a partial file would cause the model to be "invalid" or not (or rather, I guess the model might still be valid?)
the model would be valid for a partially written file, just that the file might possibly be correupt
Jason Grout
@jasongrout
in fact, past discussion about nbconvert has basically been that the de facto standard (i.e., implementation of the standard) overrode the standard when there was a conflict.

the model would be valid for a partially written file, just that the file might possibly be correupt

Yes, I think that's the correct interpretation for our current situation