News for hackers. Stuff that matters.
Re:Inspector – A drop-anywhere C++ REPL by seletz on Monday February 12, 2018 @01:50PM (#16360887)
Hmm -- I wonder why they chose to not use Jupyter as an REPL "backend" (Jupyter calls them "kernels").
Re:Inspector – A drop-anywhere C++ REPL by Mic92 on Monday February 12, 2018 @01:53PM (#16360917)
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
Re:Inspector – A drop-anywhere C++ REPL by seletz on Monday February 12, 2018 @02:02PM (#16361016)
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.

Re:Inspector – A drop-anywhere C++ REPL by Mic92 on Monday February 12, 2018 @02:07PM (#16361062)
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
Re:Inspector – A drop-anywhere C++ REPL by bfelds on Monday February 12, 2018 @02:15PM (#16361132)
this exists! recently released: https://github.com/QuantStack/xeus-cling
Re:Inspector – A drop-anywhere C++ REPL by seletz on Monday February 12, 2018 @02:24PM (#16361207)
Oh wow! Even a backend for Jupyter's interactive widgets!
Re:Inspector – A drop-anywhere C++ REPL by SylvainCorlay on Tuesday February 13, 2018 @08:01AM (#16366784)
Check out our blog post on the C++ backend to Jupyter widgets: https://blog.jupyter.org/interactive-workflows-for-c-with-ju...
Re:Inspector – A drop-anywhere C++ REPL by seletz on Monday February 12, 2018 @02:33PM (#16361312)
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.

Re:Inspector – A drop-anywhere C++ REPL by bfelds on Monday February 12, 2018 @05:04PM (#16362757)
it does build on windows. we got it working with windows10 using visual studio 2015 build toolchain
Re:Inspector – A drop-anywhere C++ REPL by seletz on Monday February 12, 2018 @01:52PM (#16360904)
Just noticed that Inspector seems to be related to cling, and cling has a built-in Jupyter kernel IIUC.