4 ms·
Online LLVM-based C++ REPL
- naveen99 10y agoVery 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 https://news.ycombinator.com/item?id=11478301
- VodkaHaze 10y agoDoes it support the entire STL?
- lipun4u 10y agoIt's good, supports concurrency also !!! http://fiddle.jyt.io/github/9a340a40988f79264c3686a90d2d80e3 http://fiddle.jyt.io/github/9a340a40988f79264c3686a90d2d80e3
- karlyfungus 10y agoWhy is the name variable not output in the worker threads?
- thdespou 10y agoOw no, now you have doubled your problems!
- mynegation 10y agoIt 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).
- pjmlp 10y agoHopefully C++20 might get proper modules, until then we only have VC++2015 draft implementation to play with.
- DannyBee 10y agoActually, clang has had modules support (and one of the alternative C++ modules proposals for C++20) for quite a while now.
- pjmlp 10y agoI 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++.
- DannyBee 10y ago"I ignored it on purpose, because it never evolved beyond a proof of concept." This is false, it is used in production at Google for over 200+ million lines of C++. In fact, it's the only modules implementation actually used in production, AFAIK. "It only got production quality for Objective-C and Swift interoperability." Also false :) "Also it relied on an external description files, instead of extending C++." Which means what, precisely? This is a means to compatibility, nothing else. The other proposal basically breaks everything to make modules work (IE a non-modules compiler cannot work with the code once converted to modules). That may or may not be worth the cost compared to enabling incremental transitions. Saying "it didn't extend C++" is a non-sequitur. What the standard accepts are extensions of C++. If the standard accepts that proposal, it's an extension of C++. You could say using header files were "external description files" that didn't extend C++ before they were part of the standard.
- pjmlp 10y ago> This is false, it is used in production at Google for over 200+ million lines of C++. In fact, it's the only modules implementation actually used in production, AFAIK. Not all of us get to see what goes inside Google. The only LLVM talk about modules was several years ago (2012) and then Doug went silent on his work. I never saw a single post on the ISO C++ mailing lists about modules and their progress. > "It only got production quality for Objective-C and Swift interoperability." > > Also false :) When I got to develop on Mac OS X system, it only worked properly with Objective-C code and for the system headers. As far as I am aware you still can't use them with C++ on Sierra, at least there wasn't a single mention of it at WWDC on the LLVM and clang improvements talk. I don't want to rely on external files to declare how #include should behave, I want to you module/import/export keywords and such. Also I am on the side of those that don't want macros to escape modules.
- naveen99 10y agoLicense says beta version says it collects usage info and sends back time and date of each call to jyt. Would be nice to be able to opt out of that.