Hacker News new | ask | show | jobs
by seletz 3046 days ago
Hmm -- I wonder why they chose to not use Jupyter as an REPL "backend" (Jupyter calls them "kernels").
3 comments

Cling (the underlying just-in-time compiler) supports this. However Cling is more a standalone REPL and has a different execution flow. Here the idea of Inspector is to be executed from within running, compiled programs
Thanks -- I wasn't aware that something like cling exists.

How does Inspector differentiate itself from embedding cling to an application? It's very interesting to me because I've been trying to get something like an IPython console / IPdb prompt inside Java using Jython for a long time, and I'd very much like to read more about some design decisions in that area.

To access local variables, as you can see in the example, Inspector uses libclang ahead of compile-time to generate code that captures all local variables where the REPL is invoked. In JVM you could probably use introspection to achieve the same at run-time. I also gave a brief presentation about the design: https://www.youtube.com/watch?v=Cl5RSlW6xAc
this exists! recently released: https://github.com/QuantStack/xeus-cling
Oh wow! Even a backend for Jupyter's interactive widgets!
Check out our blog post on the C++ backend to Jupyter widgets: https://blog.jupyter.org/interactive-workflows-for-c-with-ju...
Just reading up on xeus (nice name!) -- very exciting! Do you know it xeus happens to build on Windows 10?

I'm thinking about to try to use SWIG to create a JNI wrapper for it.

it does build on windows. we got it working with windows10 using visual studio 2015 build toolchain
Just noticed that Inspector seems to be related to cling, and cling has a built-in Jupyter kernel IIUC.