July 28th, 2024

Is there something like Jupiter for C/C++

Cling and Jupyter with the xeus-cling kernel offer interactive C++ coding environments, enabling state retention, JIT compilation, and iterative development, similar to the experience provided by Jupyter for Python.

Is there something like Jupiter for C/C++

There are several tools and environments similar to Jupyter for C++ that allow for interactive coding, JIT compilation, and maintaining state over time. One notable option is Cling, an interactive C++ interpreter built on top of LLVM and Clang. Cling allows users to execute C++ code interactively, maintaining the state between commands, which is useful for iterative development and testing of metrics without needing to re-read large files repeatedly.

Another option is C++ notebooks, which are part of the Jupyter ecosystem. By using the `xeus-cling` kernel, you can run C++ code in Jupyter notebooks, benefiting from the same interactive features as Python notebooks. This setup allows you to keep data in memory and iterate on your analysis without the overhead of reloading data each time.

Additionally, there are other environments like CMake-based projects with integrated REPLs or IDEs that support interactive coding, such as Visual Studio with its C++ REPL extension. These tools can also provide a similar experience, though they may not be as seamless as Jupyter for rapid prototyping and data exploration.

In summary, Cling and Jupyter with the xeus-cling kernel are excellent choices for achieving a Jupyter-like experience in C++, allowing for long-lived processes, state retention, and JIT compilation.

Related

Link Icon 4 comments
By @a2128 - 3 months
There is a Jupyter kernel for the C++ interpreter cling. I tried it once but my experience was that C++ doesn't work very well in a notebook environment. Honestly I would suggest getting the data into a format compatible with NumPy or something similar and using Python, or at least do it at a smaller scale in Python to figure out your metrics.
By @brudgers - 3 months
It sounds like the issue is IO not interface.