7 ms·
C++17 Compiler Bug Hunt
- friendlydude12 9y agoWhat did I just read?
- lysium 9y agoI had a hard time understanding the post, too. AFAICS, kaleidoscope produces random code (which does nothing meaningful) that should compile. Then, they feed the random code into the C++ compilers Clang, gcc, and MSVC. The random code triggers bugs in the compilers, which are summarized in the post. Actually, they don't feed the random code, but kaleidoscope uses the template system to "directly" produce randome code.
- friendlydude12 9y agoI wish there were more technical details on kaleidoscope. Just seems like lots and lots of borderline-meaningless high-level overview.
- dmead 9y agoIs this a stand up fight sir?
- userbinator 9y agoBasically compiler fuzzing. I'm not surprised that bugs were found. Recently, I have run into quite a few issues with different C++17 compilers (actually, I found that none of the compilers-I-tried is really C++17 compliant yet); IMHO the fact that the spec is so complex that it is near impossible to implement it correctly should be a big hint, yet people seem very eager to continually stuff more features into the language, which can interact with all the other features in complex ways.
- blattimwind 9y agoIn a recent project the juniors pushed for C++17 use; I've never seen so many code comments about compiler bugs in a single project that size. It targets only two platforms using GCC and clang. This is not to say that compiler developers do a bad job; however, don't expect complex language revisions to be production grade from the get-go.
- leeter 9y agoGenerally I'd stick to C++14 features but test and consider C++17 library features as those are usually much more stable. Around the C++20 timeframe C++17 should be fully stable.
- ahartmetz 9y agoDon't go too far, or you'll get... auto i = { 1 };
- loup-vaillant 9y agoWait, is that an integer, or an array? Serious question, with initialiser lists I'm not sure any more.
- wyldfire 9y agoDon't sweat it, it's `auto.` Whatever you meant it to be will be deduced by the compiler. ;)
- claudius 9y agoauto i = {5}; is a std::initializer_list<int>, whereas auto i{5}; is an int (as of C++17): https://godbolt.org/g/eXXN3o https://godbolt.org/g/eXXN3o See also https://stackoverflow.com/questions/25612262/why-does-auto-x3-deduce-an-initializer-list https://stackoverflow.com/questions/25612262/why-does-auto-x... .
- ddavis 9y ago
- pubby 9y agoI recall being impressed the last few times I submitted bug reports to GCC. They were really on top of their game.
- 0xFFC 9y agoOne genuine question, is it possible for C++ committe to push for a simpler language by depracating features? Or this policy would have disastrous effect on the community?
- adrianN 9y agoBackwards compatibility is very important.
- jzwinck 9y agoOccasionally something gets deprecated. Like export template, trigraphs or auto_ptr. But pretty much only when there is widespread disuse and displeasure. 99% of features are used by at least 1% of the user base and need to be kept around.
- 0xFFC 9y agoSo why people are nagging about C++ becoming complex? I dont see any other way. Either you have to remove stuff from the language to make it simpler or stop introducing any new features at all. Am I right? Or is there any other way around this? I see people constantly nagging about C++ becoming more and more complex. But I suspect of committe would depracate any features, mostly the same people would start nagging about not having backward compatibility?
- mbel 9y ago> But I suspect of committe would depracate any features, mostly the same people would start nagging about not having backward compatibility? Isn't it reasonable to desire a language that is both backwards compatible and not very complex?
- AnimalMuppet 9y agoSure. It's reasonable to desire a pony, too. But given an already-complex language, you're not going to get a not-very-complex language that is backward compatible, no matter how reasonable it is to want one. It's simply not possible. What people really want is a simpler language that doesn't change the parts they use. But there's nothing hindering them from continuing to do so. Just use the parts you need, and the complexity of the rest doesn't affect you much.
- wyldfire 9y agoThis article is interesting, but its links to the GH project [1] appear to be mishandled somehow because they link to the article itself. [1] https://github.com/ITHare/kscope https://github.com/ITHare/kscope
- stinos 9y agoWhile this is a fairly interesting article and that code is an interesting piece of work as well, I found it a hard read solely because of the way it's presented. The bunnies, the big bold text in between the other text, the oh-so-slight difference in font size to indicate different headings (I think?), nested bullet points with sometimes only one entry in a level, making me wonder why there even is a bullet. Oh and I like humor, but those Job title/Hobbies entries, the <wink/sadface/whatever/>, I don't know, it's like everything but funny to me? Mainly distracting.
- frou_dh 9y agohttps://news.ycombinator.com/item?id=9238739 https://news.ycombinator.com/item?id=9238739
- gameswithgo 9y agoIt is pretty normal that people will bikeshed about blog format on the internet, because people often don't have the technical chops to talk about the content, but why is it that these bikeshed comments get upvoted here?
- stinos 9y agoI'm fairly sure I do have the technical chops to talk about the content, being very used to C++ in all it's glory, but I don't have much to add to the article: once broken down to it's intent/meaning, it's clear to me what it's about and why the code is useful. Which is why I said it's an interesting article. And why I upvoted the post. That being said, to address your concern: this is HN, where in my experience pretty much anything can get discussed, and not-so-topnotch blog formats is one of those things. Upvotes in this case simply mean others have the same feeling with regards to the general readability of the article. Also note that, as far as I recall, there has been more than one post - not just comment - on HN exactly about this: conveying information in a proper manner is an important aspect of the internet in general. Not just bikeshedding. Even more so for technical stuff, imo.
- master-litty 9y agoIt seems trivial but I think it's important to discuss the aesthetic of these types of things. It's not to nitpick, it's not to make fun of a person or belittle their work (I think most people here agree it's a great post!), it's to engage in a communal discussion about what we learned here so we can apply it elsewhere. Isn't that still in the spirit of HN? I don't find the parent comment to be the most constructive example but, ignoring the subjective criticism about the jokes, I agree there's something unusually distracting about the format. For example, the bunnies that highlight content on the right-hand side? If you're reading the entire post, you're going to read some sentences twice over -- So why are these here? For summary? Why couldn't the summary be in a more accessible area like the top?