Live data from Hacker News

Online LLVM-based C++ REPL

fiddle.jyt.io

1–10 of 19 posts

Re: Online LLVM-based C++ REPL

#4
It is a great idea in general and a technical feat in itself. It is just that C++ is not the best language for that type of programming. It may work OK for toy to lower-middle size of projects, but for big projects compilation time starts to pile up pretty quickly. One reason for that is C legacy of header files that are recompiled for each and every translation unit (yes there are PCH but they are unwieldy and require a lot of babysitting and sometimes take back almost all of the time you gain from their usage). Another is C++ language grammar: C++ requires 3 (three!) syntax passes to be parsed correctly. Then there is also all the template and metaprogramming magic which is Turing complete (Just look at Facebook Fatal C++ library - I am still undecided if they are for real or it is an elaborate trolling).

Re: Online LLVM-based C++ REPL

#5

It is a great idea in general and a technical feat in itself. It is just that C++ is not the best language for that type of programming. It may work OK for toy to lower-middle size of projects, but for big projects compilation time starts to pile up pretty quickly. One reason for that is C legacy of header files that are recompiled for each and every translation unit (yes there are PCH but they are unwieldy and requi…

Hopefully C++20 might get proper modules, until then we only have VC++2015 draft implementation to play with.

Re: Online LLVM-based C++ REPL

#6

It is a great idea in general and a technical feat in itself. It is just that C++ is not the best language for that type of programming. It may work OK for toy to lower-middle size of projects, but for big projects compilation time starts to pile up pretty quickly. One reason for that is C legacy of header files that are recompiled for each and every translation unit (yes there are PCH but they are unwieldy and requi…

This tool is best to teach someone c++, a kid or to someone who won't setup c++ in the desktop.

This is small, probably supports most things.

This can be used to show small hacks about programming(c++ has many of them) and share with others. The developer can experiment in the browser.

Re: Online LLVM-based C++ REPL

#7

It is a great idea in general and a technical feat in itself. It is just that C++ is not the best language for that type of programming. It may work OK for toy to lower-middle size of projects, but for big projects compilation time starts to pile up pretty quickly. One reason for that is C legacy of header files that are recompiled for each and every translation unit (yes there are PCH but they are unwieldy and requi…

but isn't that the point ? If recompiling takes a long time, you don't want to recompile, if all you want to do is add a few function calls to explore an api or inspect state.

cern uses a c interpreter for real. This is just bringing it to a wider audience with a friendlier interface.

i wonder if it works with cuda... http://llvm.org/docs/CompileCudaWithLLVM.html

Re: Online LLVM-based C++ REPL

#8
post #2

Very nice ! I played around with it a little. It doesn't crash on errors, just prints a helful error message. Time for one more attempt at teaching my son programming, with c++ this time ! previous discussion with more info: https://news.ycombinator.com/item?id=11478301

Does it support the entire STL?

Re: Online LLVM-based C++ REPL

#9
post #5

It is a great idea in general and a technical feat in itself. It is just that C++ is not the best language for that type of programming. It may work OK for toy to lower-middle size of projects, but for big projects compilation time starts to pile up pretty quickly. One reason for that is C legacy of header files that are recompiled for each and every translation unit (yes there are PCH but they are unwieldy and requi…

Hopefully C++20 might get proper modules, until then we only have VC++2015 draft implementation to play with.

Actually, clang has had modules support (and one of the alternative C++ modules proposals for C++20) for quite a while now.

Re: Online LLVM-based C++ REPL

#10
post #9
post #5

Earlier quoted context omitted.

Hopefully C++20 might get proper modules, until then we only have VC++2015 draft implementation to play with.

Actually, clang has had modules support (and one of the alternative C++ modules proposals for C++20) for quite a while now.

I ignored it on purpose, because it never evolved beyond a proof of concept.

It only got production quality for Objective-C and Swift interoperability.

Also it relied on an external description files, instead of extending C++.

Post reply on HN