<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Very cool looking. How does it compare to ccons (<a href="http://code.google.com/p/ccons/">http://code.google.com/p/ccons/</a>), and any chance we could get C and Objective-C/Objective-C++ support eventually?<div><br></div><div>-Daniel</div><div><br><div><div>On Jul 25, 2011, at 12:28 PM, Axel Naumann wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br><br>As we announced before<br><<a href="http://www.llvm.org/devmtg/2010-11/Naumann-Cling.pdf">http://www.llvm.org/devmtg/2010-11/Naumann-Cling.pdf</a>>, we (people from<br>CERN and Fermilab) are working on the C++ interpreter(*) cling<br><<a href="http://cern.ch/cling">http://cern.ch/cling</a>> that's based on clang and llvm. This is in the<br>context of ROOT <<a href="http://root.cern.ch">http://root.cern.ch</a>> and CINT<br><<a href="http://root.cern.ch/cint">http://root.cern.ch/cint</a>>, our current C++ interpreter.<br><br>We have gotten to a stage where we believe cling is actually useful: it<br>behaves like a regular interpreter!<br><br>[cling]$ #include <cmath><br>[cling]$ double x = std::sin(3.1)<br>(double) 4.158066e-02<br>[cling]$ .L libz<br>[cling]$ #include "zlib.h"<br>[cling]$ zlibVersion()<br>(const char * const) "1.2.3.4"<br><br>or simply<br><br>$ echo 'extern "C" const char* zlibVersion();<br> zlibVersion()' | cling -lz<br><br>(const char * const) "1.2.3.4"<br><br>and even<br><br>$ cat t.cxx<br>#include "cling/Interpreter/Interpreter.h"<br>void t() {<br> gCling->processLine("gCling->getVersion()");<br>}<br>$ cling<br>[cling]$ .x t.cxx<br>(const char * const) "$Id: Interpreter.cpp 40322 2011-07-21 14:20:14Z<br>axel $"<br><br>We would like to know whether it's just us finding this spectacular :-)<br>or whether there is general interest. Our aim is to get it included in<br>the clang repository.<br><br>For us, this is just the first step; we need to integrate it into the<br>rest of our software wildlife here at CERN, and we need to continue to<br>work on robustness and features, e.g. reloading of code. I.e. I expect<br>we will maintain and continue to develop it for years to come.<br><br>Here is the code:<br>svn co <a href="http://root.cern.ch/svn/root/branches/dev/cling">http://root.cern.ch/svn/root/branches/dev/cling</a><br><br>Let us know what you think!<br><br>Best regards,<br>the cling team (Vassil, Philippe, Paul, Lukasz and Axel).<br><br>(*) Yes, it's not an interpreter, it's really an incremental compiler<br>with an interactive shell with (eventually) features like automatic<br>library loading and late variable binding. But it smells like an<br>interpreter :-)<br>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></div></blockquote></div><br></div></body></html>