
Cling : C++ REPL using Clang and LLVM - mm_mm
http://root.cern.ch/drupal/content/cling
======
udp
"C++ REPL using Clang" gets me thinking...

I wonder if it'd be possible to compile Clang and Emscripten _with_ Emscripten
and make an (albeit slow) in-browser REPL for C.

~~~
ewencp
Not exactly what you're suggesting, but <https://github.com/jterrace/js.js> is
in a similar vein: SpiderMonkey -> LLVM -> emscripten -> JS to run a JS within
JS.

------
powersurge360
Does this work for C too? I notice that it mentions replacing CINT, which is C
& C++.

I'm a scrub to C and it'd really bum me out if I find out about an interpreter
to play with just in time for it to no longer be viable.

~~~
dpwm
CINT was designed to be a scripting language for the ROOT analysis
environment. CINT is neither C nor C++ -- it departs subtly from both, but
there is no exhaustive documentation of these departures from the respective
standards (see <http://root.cern.ch/root/html/cint/limitati.html> for a few of
them).

From their own site, one of the main goals of Cling is to be backward
compatible with CINT. This will also mean propagating CINT's numerous
idiosyncracies, reducing Cling's scope considerably.

~~~
werkshy
CINT is really rather silly as the main interface to ROOT. ROOT is awesome,
and huge, and you do need to use C++ to take full advantage of it, but it is
also accessible from Python which is a far more sensible language to use in a
REPL or in small scripts. I always did C++ for longer scripts or to integrate
with other C/C++ work, but Python for quick scripts and REPL exploration.

Nice to see CINT evolving and using clang for better conformance (and
performance, presumably), and hopefully this will free some time that was
being spent on CINT but if you find yourself using this more than once for
physics analysis, do yourself a favor and try python instead.

~~~
kzrdude
Is ROOT awesome? It is also full of base classes with a million member
functions, home-built introspection, strings for every option instead of
enums.

~~~
biggus_dictus
It may not be awesome. But it works.

------
biggus_dictus
[http://root.cern.ch/drupal/content/do-we-need-yet-another-
cu...](http://root.cern.ch/drupal/content/do-we-need-yet-another-custom-c-
interpreter)

