IfSharp icon indicating copy to clipboard operation
IfSharp copied to clipboard

Jupyter Widgets

Open sylvanc opened this issue 9 years ago • 9 comments

Can we and should we enable Jupyter widgets in IF# ?

https://github.com/ipython/ipywidgets/blob/6b1e0901260409e166ed1763db06122dedeb4b89/docs/source/examples/Widget%20Low%20Level.ipynb

It looks like it is built on top of comm messages.

A collection of widget examples:

https://github.com/ipython/ipywidgets/tree/6b1e0901260409e166ed1763db06122dedeb4b89/docs/source/examples

sylvanc avatar Jan 17 '17 16:01 sylvanc

I do like the Mathematica manipulate command: http://reference.wolfram.com/language/ref/Manipulate.html if we could enable terse syntax to generate widgets which communicate to the kernel that would be very engaging and potentially very useful.

cgravill avatar Jan 19 '17 12:01 cgravill

Plotly allows interactive widgets so it might be possible to extend XPlot.Plotly to use them. https://plot.ly/python/slider-widget/

npmurphy avatar Jan 19 '17 13:01 npmurphy

@npmurphy Re Plotly - yes, that indicates a small ecosystem of widgets, very strong motivator

dsyme avatar Jan 26 '17 13:01 dsyme

There's some potentially useful details here: https://blog.jupyter.org/authoring-custom-jupyter-widgets-2884a462e724

cgravill avatar Mar 05 '18 19:03 cgravill

Please look at my implementation of CheckBox widget. https://github.com/IvanAntipov/IfSharp.Widgets

IvanAntipov avatar May 27 '18 14:05 IvanAntipov

@IvanAntipov that's pretty neat, but the implementation should integrate with the existing widget system

Is anyone else working on this?

I think I finally understand the protocol that is being used. I have coded up a prototype and pasted a screenshot below.

image

prosconi avatar Jan 15 '19 02:01 prosconi

I don't think anyone is working on this and it looks like you've made some great progress.

cgravill avatar Jan 18 '19 09:01 cgravill

@prosconi I was porting a notebook from Python to F# and ran into the need to have interactive widgets enabled. I see you have a nice WIP solution. Curious, how much is left to do there, and maybe I could help with this work?

w0lya avatar Apr 14 '20 23:04 w0lya

@w0lya I honestly don't remember, feel free to take the code from my branch that I made.

prosconi avatar Apr 18 '20 15:04 prosconi