root-project / cling

The cling C++ interpreter
Other
3.52k stars 269 forks source link

Execution result and Syntax highlighting in Jupyter notebooks #216

Open shyam-jagannathan opened 6 years ago

shyam-jagannathan commented 6 years ago

I've rebuilt CLING from source and installed C++ kernels to Jupyter notebooks. While everything is perfect, I am annoyed by two issues.

  1. How do I hide execution results? For example, in the attached snapshot, after a cell is executed I see unwanted execution results even without a print statement.

  2. For some reason, when I start a new notebook and start typing code, I don't see the syntax getting highlighted. Its as if the cell type is "Raw NBConvert" instead of being "Code". But interestingly, when I close the notebook and re-open, I see that syntax is highlighted properly.

Can someone please help me how to get around it?

Tool versions, Anaconda - conda 4.3.29 jupyter - 4.3.0 ipython - 6.1.0

OS - Ubuntu 14.04, 64-bit gcc - 5.4.1 20160904 clang - 5.0.0 cling - 0.6~dev

Please let me know if you need more information.

new notebook re-opened notebook

zhiruiwang commented 6 years ago

Can you successfully give user input through std::cin in the jupyter notebook? There is no input field appears like executing input function in Python after executing std::cin. This might be the third issue...