Some folks from CERN and Fermilab are working on cling, a C++ interpreter based on llvm and clang.
It works as advertised (you have to build it as part of the llvm tree, near clang) and it's amazingly cool:
It works as advertised (you have to build it as part of the llvm tree, near clang) and it's amazingly cool:
llvm diciu$ ./Release+Asserts/bin/cling
**** Welcome to the cling prototype! ****
* Type C code and press enter to run it *
* Type .q, exit or ctrl+D to quit *
*****************************************
[cling]$ FILE * f = fopen("/dev/random", "r");
[cling]$ unsigned char rnd;
[cling]$ int i=0;
[cling]$ while(++i<10) { fread(&rnd, sizeof(rnd), 1, f); printf("%03d\n", rnd); }
201
161
186
086
056
092
125
063
203
[cling]$ .q