4 ms·
Cling has been largely upstreamed as `clang-repl`. All distributions of clang+tools has it now, and unlike Cling this supports the latest Clang features. Howeve
by Conscat 3y ago
Cling has been largely upstreamed as `clang-repl`. All distributions of clang+tools has it now, and unlike Cling this supports the latest Clang features. However Cling still has some special features for GPGPU that `clang-repl` doesn't.
- whizzter 3y agoGreat to hear, I had to build cling myself a some years before the pandemic for a classroom and each and every time it was a race with A/V software starting to trigger everything when X number of people started running a "new" executable.
- mbwgh 3y agoInteresting to see that I had a C++ REPL on my system, installed with clang by default, all along. From the documentation, it seems this is primarily aimed at incremental compilation on demand via Compiler As A Service. Indeed, for an end-user, calling this a REPL seems to be a stretch. There's no auto-completion or special commands like showing docs or the checking the type of things, you even have to #include <iostream> to manually print the results of simple expressions. So I guess read-eval-loop would be more fitting :)
- senkora 3y agoI use it on occasion. Invoking it with rlwrap makes it a little nicer by giving it readline support. I think there is a lot of low-hanging fruit for someone to make an IPython-inspired repl around it.
- asvitkine 3y agoNice! TIL. Exciting to see this upstream - something I didn't get around to with ccons which was one of the early prototypes of this built on top of clang (2009). Back then clang C++ support was still being worked on, so ccons targetted C. Later, I collaborated a bit with the Cling folks who I think did take some inspiration from some of my approaches (and likely some of the clang/llvm changes that I landed upstream for supporting functionality / bug fixes). Exiting to see this in the tree now! https://raw.githubusercontent.com/asvitkine/ccons/master/docs/ccons-presentation.pdf https://raw.githubusercontent.com/asvitkine/ccons/master/doc...