What other language kernels (other than Python) support jupyter widgets?

112 views
Skip to first unread message

Christian Schafmeister

unread,
Sep 3, 2018, 3:42:44 PM9/3/18
to Project Jupyter

We've ported several jupyter widgets to Common Lisp so that we can use jupyter widgets from our kernel written in Common Lisp.
This has involved translating about 15,000 lines of Python into Common Lisp - and dealing with translating traitlets and multithreaded code.

It's going to be a maintenance burden for us - but we have the basic jupyter widgets, nglview, and bqplot widgets ported.

I haven't been able to find any but are there any other languages that have made this investment? Julia? R? Ruby? 

If so - I'm curious to see how you approached it.

Best,

Christian Schafmeister,
Professor, Chemistry Department
Temple University.

Sylvain Corlay

unread,
Sep 3, 2018, 6:01:35 PM9/3/18
to Project Jupyter
Hi Christian,

(Responding on mailing list for the record even though we also connected through other channels).

In terms of language backends for Jupyter widgets, I should mention

 - xwidgets, the C++ implementation of the Jupyter widgets protocol, which includes all the controls from ipywidgets. Backends for bqplot (xplot), ipyleaflet (xleaflet) and pythreejs (xthreejs) were built upon xwidgets. These widget libraries can be used with the C++ kernel. 

   Here are a few binder links for trying out these libraries:


 - I should also mention the beakerx project, which includes kernels and widget backends for multiple languages of the JVM world.

 - The Interact.jl project enables a lot of the controls of the base ipywidgets package for the Julia programming language.

Best,

Sylvain

Christian Schafmeister

unread,
Sep 5, 2018, 10:22:21 PM9/5/18
to Project Jupyter
Thank you very much!  We will take a look at these.

I'm especially curious how you mimicked traitlets and how you plan to keep these up to date.
The JavaScript code for these libraries continues to develop - it's a moving target to keep up with them.

Best,

Christian Schafmeister,
Professor, Chemistry Department
Temple University

Sylvain Corlay

unread,
Sep 6, 2018, 3:55:57 AM9/6/18
to jup...@googlegroups.com
In the case of pythreejs, the traitlets code is generated by a spec file, which was then used to generate other backends.

For the general case, the plan is to generate a JSON spec from the reference implementation or from the JS frontend and check that language backends support all properties.

S.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/d1736add-7806-40d3-8140-2632e930062c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tony Hirst

unread,
Sep 6, 2018, 6:05:37 AM9/6/18
to Project Jupyter
The JuniperKernel (an R kernel alternative to IRkernel) also looks like it runs xwidgets: https://github.com/JuniperKernel/JuniperKernel

--tony

Jason Grout

unread,
Sep 6, 2018, 10:31:24 AM9/6/18
to jup...@googlegroups.com
1. There is a PR open for making the core widget attributes a JSON document, like Sylvain mentioned: https://github.com/jupyter-widgets/ipywidgets/pull/2193. It needs review and merging. You're right that the attributes keep being added to, but we also try hard to signal the spec changes in the version numbers (for example, adding a new widget attribute that is backwards compatible is a minor version bump in ipywidgets).
2. I believe interact.jl in Julia implements their own widget system, not the Jupyter widgets system. Other than that, the implementations listed above are the current widget implementations I know about (C++, Juniper R kernel (using xwidgets), BeakerX)

Jason


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.

Vidar Tonaas Fauske

unread,
Sep 19, 2018, 6:36:33 AM9/19/18
to jup...@googlegroups.com
I have some reasonably polished code for auto-generating widget definitions here: https://github.com/vidartf/widget-gen/  It will take care of declaring the synced traits, but does not look at validators/business logic at all. It hasn't really been battle tested though, so I would love any feedback on it!

Vidar

Reply all
Reply to author
Forward
0 new messages