8 ms·
C++ Grandmaster Certification
- jevinskie 14y agoThis seems like an insane undertaking for one person. I could understand it with C - that would be difficult enough. But a compliant C++11 compiler? It has taken MSVC, GCC, and clang years to get just partial C++11 compliance! None of them are fully compliant in their current state. How is this course supposed to be tractable!?
- dhaivatpandya 14y agoI agree with this. In fact, it isn't really productive even trying to implement a language as complex as C++ (many might say overly complex).
- niggler 14y ago"More significantly, we are not doing an optimization pass." Most of the legwork in compilers like gcc involves optimizing the output code and targeting multiple architectures -- writing a dumb translator for a single architecture is a far more tractable problem.
- tedunangst 14y agoPoint remains that gcc already has an optimizer and working backend and it's still hard to implement just the necessary changes.
- niggler 14y agoadding C++11 features to GCC is a far more difficult undertaking than it should be because of RMS and his fear of proprietary frontends to GCC (so the plugin system, which is relatively easy to work with in LLVM, is a nightmare in GCC). That was a design decision Quote: "The concern that has long been expressed by the FSF (which owns the copyrights on GCC) is that a general plugin mechanism would make it possible for companies to traffic in binary-only GCC modules. Rather than contribute a new analysis or optimization tool - or a new language - to the community, companies might have an incentive to distribute their work separately under a restrictive license. That runs very much counter to what the FSF is trying to accomplish, so opposition from that direction is not particularly surprising." https://lwn.net/Articles/301135/ https://lwn.net/Articles/301135/
- snogglethorpe 14y ago> adding C++11 features to GCC is a far more difficult undertaking than it should be because of RMS and his fear of proprietary frontends to GCC Whatever you think of RMS's stance on plugins, or gcc's plugin system, they have little relationship with the ease or otherwise of adding C++11 features to gcc. The latter has much more to do with the difficulty of understanding the gcc C++11 front end, the difficulty of understanding the fine details of the C++11 standard sufficiently to implement it, and the amount of manpower available from people who can do both those things (or who have the time to learn). gcc certainly does have a lot of historical baggage in its code base (though this is slowly improving with time), but given its rather complete support for C++11 (on par with clang certainly, and far ahead of MS's compiler and most other proprietary C++ compilers), they're not doing so bad...
- CJefferson 14y agoNo, RMS's stance of plugins does make adding C++11 features to gcc much harder. I have a (basic) understand of clang, which is helped by the fact that there is a very clear, simple and DOCUMENTED boundary into LLVM, which I can ignore the other side of. The interface between gcc front ends and backends is none of clear, simple or documented.
- gsg 14y agoAre you suggesting that C++11 support would be implemented as a plugin, rather than by modifying the existing C++ front end? I'm not sure how seriously to take that.
- CJefferson 14y agoNo, I'm suggesting that understanding and modifying the C++ front end is much easier when the output the front-end produces is in well defined and documented output, rather than the ad-hoc and undocumented results of a gcc front-end.
- 14y ago
- yuushi 14y agoIt doesn't matter, optimized or not, the amount of work this entails is ridiculous. Writing a C++11 compiler requires intimate knowledge of the standard (which is a massive, hard to read tome), implementing pretty much all of the standard library from the ground up, and honestly, good luck writing all of that - that's all the containers (set, vector, list, map, unordered_map, multimap, unordered_multimap, forward_list, stack, deque, tuple), algorithms, time and regex libraries (chrono and regex), threading and thread models, type_traits and so on (actually, I just realized, they have it listed on the right hand side). Honestly, it's worded very poorly. "Compliant with the latest 2011 standard (C++11)" suggests all of this. I have a hard time believing this isn't some kind of joke - there's literally no-one alive that could write all of this in the timeframe of a course.
- Locke1689 14y agoNot only that, but the dragon book is terrible. To quote my adviser, "writing a parser from scratch has no value except as a character building exercise." Anyone who wanted to write their own parser should probably just use a packrat parser (I find it much simpler). Whoever is organizing this course, frankly, is either way out of their depth or holds their 1985 compilers course in far too high esteem.
- wglb 14y agoI disagree about the Dragon book. In particular, the code generation part was very valuable to me in the code generator. But I think I see where you are going with this. Using a parser generator for compiling, in the words of Dave Conroy (author of MicroEmacs and many other things), "A Parser Generator makes the hard part harder and the easy part easier." Edit: Wait--1985? Ah, that is the problem. I used the First dragon book, not the second. I only got the second after I did the compiler work. Was it much worse than the first?
- Locke1689 14y agoNo, even the second edition is hugely out of date. First, note that basically the first half of the book is about parser implementation. Then, it basically just teaches you that there's only one parser and it's called LALR. Of course, they didn't include anything like packrat, but even worse, they pretend like a LALR generator is still better than LR, even though LR was extended to be tractable for large grammars years ago. And even with all that, it's far too high level to be of use in actually engineering a compiler (which, by the way, is a good intro book).
- wglb 14y agoI beg to disagree. For something as complex as C++, writing the preprocessor, the parser, and the code generator is very much beyond a man year.
- niggler 14y agoI wasn't saying that it would take a year or even a few years. I was merely saying that most of the effort in gcc/msvc was related to things like optimizing and maintaining multiple architectures. A simple compliant C compiler that only targets x86_64 and performs no optimization, for example, would be much smaller than GCC.
- wglb 14y agoUnclear to me if that is really the case.
- JoachimSchipper 14y agoConsider tcc, which is indeed much simpler than gcc.
- wglb 14y agoAh, yes. I was still thinking C++ as the discussion seemed to slip over to simple C.
- mossplix 14y agothere are parser generators .. you dont have to build one from scratch
- wglb 14y agoAs noted elsewhere, these usually make the hard part harder. The other part of the issue is building the internal representation so that halfway decent code can be generated, not even thinking about optimization. And, like the syntax and grammar of the language, the semantics of C++ are quite complex.
- pandaman 14y agoIt's kinda like saying that most of the legwork in space exploration goes into space ships and mission logistics so just building a dumb launcher rocket is far more tractable problem. Indeed, building Saturn V is nothing compared to flying men to the Moon and back. Does not mean you can build a Saturn V from scratch. And people who are promising to teach you how either are geniuses or just in denial.
- CJefferson 14y agoLook at clang. In this case they already had, and continue to use, LLVM, so their only job is to turn C++11 into a bytecode, in any way possible. It has still taken a number of the best C++ programmers and compiler designers years to accomplish, and they haven't finished yet.
- damian2000 14y agoThis is a massive undertaking, but the fact you are starting with no baggage from existing systems and don't need to optimise might be some consolation. Assume you're also free to study other compiler designs prior to the course.
- deleted 14y ago[deleted]
- qznc 14y agoAs far as I know, Walter Bright is the only person on this planet who could maybe claim to have written a C++ compiler all by himself [0], though I cannot find an original quote from him. [0] http://www8.cs.umu.se/~isak/snippets/mem.txt http://www8.cs.umu.se/~isak/snippets/mem.txt
- thomasbk 14y agoI think something like this might be a very cool project for those of us who have the time. You get intimate knowledge of C++, compilers, assembly and other close-to-the-metal aspects of programming. I wonder how much time it is going to take; the very simple compiler I had to write in college using yacc/Bison, supplied boilerplating and a trivial output format already took several days of full-time work. Full C++-compliance seems like a _huge_ project. The website is missing some information however: who's behind it? It says: The CPPGM Foundation was formed by a software company that recognized the value to programmer productivity that a good knowledge of language mechanics had to new developers to their team. The C++ Grandmaster Certification began development as an internal training program, and the foundation was founded to offer it publicly. but fails to mention what that company is. Additionally, the domain is registered anonymously... Edit: After some digging, it seems that the only information available on the people behind this is the fact that they emailed the press release to the comp.lang.c++ newsgroup from a residential IP-address in Switzerland. (NNTP-Posting-Host header)
- damian2000 14y agoGoogle? Facebook?
- adamnemecek 14y agoWhy would either do it without putting their name on it.
- Scene_Cast2 14y agoThis also might be a top talent filtering system. If someone is able to complete the absolutely massive amount of work - in their spare time for fun, no less - they are quite likely to be of interest to some of the top companies. In this case, putting a flashy name will lessen the scheme, as it will attract people that will do it with purely career-oriented motives. Or, as another post noted, it might just be a scam.
- 14y ago
- jjm 14y agoSide note, I forgot that CPTTv2 was $101 (for the Kindle version no less).
- niggler 14y agoNo one calls it CPTTv2. Aho and Ullman both refer to it as the dragon book, and even wikipedia recognizes it: https://en.wikipedia.org/wiki/Dragon_Book_(computer_science) https://en.wikipedia.org/wiki/Dragon_Book_(computer_science)
- dinkumthinkum 14y agolol wow when I first read the parent I wondered what book it was! You're right, I've only ever referred to it as the Dragon book.
- jetti 14y agoPfft, I got my copy of the second run first edition for about 4 cents (not including shipping) off Amazon. If you want second edition: http://www.abebooks.com/servlet/BookDetailsPL?bi=9476545617&searchurl=ds%3D30%26isbn%3D9780321486813%26n%3D100121501%26sortby%3D17 http://www.abebooks.com/servlet/BookDetailsPL?bi=9476545617&... it is there for $18.
- jabits 14y agoSubtle. A lot of effort just to prove that there will never be a "C++ Grandmaster".
- jetti 14y agoI signed up and am excited. It is definitely something that will be challenging, but the fact that it is free means that I have nothing to lose and everything to gain. (One would say that time is something I can lose, but this is a better use of my time than Diablo 3). The only hesitation I have is that this is just yet another joke that I'm too naive to recognize. We shall see!
- dinkumthinkum 14y agoGood point. I hope it is not some joke or some way of getting email addresses of programmers. EDIT - Looking a little more, I can't tell exactly but I feel like the people that put this site up should put some more explanation up about who is doing it and ensure it is on the up and up. Surely, they are aware of this HN post so I'm waiting. :)
- dinkumthinkum 14y agoNeat but I will say this, I think the course is mis-named. This seems to be less of a C++ master class and a course on compilers. I would expect such a course as a C++ master class would be more on using the language rather than compiling it. But that doesn't mean the course isn't good, I haven't seen the content. :) - For those criticizing the amount of work ... I tend to agree with you all. However, in the faq this is addressed, take that for what it's worth. However, it's free so it seems like, even if you fail at building a fully working compiler, you could learn a lot, so I say good for them!
- damian2000 14y ago"Written entirely in C++ with no third-party dependencies" -- so your work is writing a C++ compiler, in C++.
- d0m 14y agoTo truly understand a language, one must write a compiler for it - An old sage.
- daurnimator 14y agooff on a tangent: does anyone know a good resource/book for learning C++ from a C background? I've loathed C++ every time I've gone to use it, I'm sure there's something good in there.... i.e. is there a good book "C++ for C programmers who hate the thought of it"
- niggler 14y agoI found the scott meyers books to be good (effective C++ and effective STL)
- yuushi 14y agoThese require some background in C++ before you pick them up, however.
- niggler 14y agoThat is true. Those books take "C programmers with a very basic understanding of some C++ fundamentals" to "C++ programmers"
- wglb 14y agoThey are very good, particularly for the intermediate C++ programmer.
- blablabla123 14y agoI particularly like the -Weffc++ ;)
- BlackJack 14y agoAccelerated C++ (http://www.amazon.com/dp/020170353X http://www.amazon.com/dp/020170353X) is perfect. I learned C++ from a C background and this book is written exactly for people like us.
- srparish 14y agoI'd recommend "C++ Primer". It's been updated for C++11, and is written in precise and clear language. As a C programmer, I find understanding details are important; Accelerated C++ was just too chatty, casual, and vague for my tastes.
- adamnemecek 14y agoOkay I signed up to see what it's all about. But I can't get rid of the feeling that this is a joke of some sort. 1.) There is not a single name of anyone involved in this endeavor. 2.) The sing-up confirmation is a simple alert box? It seems like an XHR request does go out but no email is sent to the email address provided. Also they don't even check for email uniqueness. That seems somewhat...strange. If it is a joke, I will be pretty sad :-(.
- adamnemecek 14y agoAlso there is this announcement message https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.c++.moderated/VMBvvLqMs3I https://groups.google.com/forum/?fromgroups=#!topic/comp.lan... where they say "For press information contact support@cppgm.org". Nevertheless, the domain has no associated MX record. I'm calling it, this is almost definitely not real. And the class has a start date but no end date?
- ariwilson 14y agoIt's probably a recruiter phishing scheme.
- blablabla123 14y agoOr someone wants a fully C++-11 complaint compiler for free. ;)
- 14y ago
- jasonzemos 14y agoConsidering it normally takes 10 years to develop a reasonable standard library alone -- and that's about 10% of what's being asked here -- this is clearly a joke. But it's a humbling and enjoyable trolling for sure. It would be interesting to develop a very limited amount of material for each layer of the stack being addressed here though, that would give some valuable experience.
- virtualwhys 14y ago"Isn't this a huge undertaking, usually done by an entire team of programmers?" ... 'This is a "Grandmaster" level programming course for world-class senior software engineers.' What? One of the prerequisites is 2+ years experience with C++ (or similar language), and on completion one shall demonstrate, "a complete, exhaustive knowledge of the C++ language and C++ standard library". OK, world class senior software engineers and a base point of 2 years experience generally do not go together. Perhaps the author meant, having had at least 2 years C++ experience at one time in one's career.
- praptak 14y agoWorld class senior engineers and having spare time for such an undertaking generally don't go together.
- rorrr 14y agoThat's either a troll or will take decades for each person.
- idupree 14y agoI was tempted until "We ask you to agree, when you start the course, to not release your toolchains source code anywhere but the cppgm site.". Interesting work I do not-for-pay I release as FOSS on github. They're worried about plagiarism (which is fair); they should use anti-plagiarism tools to check whether submitted code matches previous submissions or any known C++ library and compiler code in the wild.
- dinkumthinkum 14y agoI don't think that is that crazy. I'm not saying you are this exactly but I'm saying this position, to me, is one of an ideologue. I feel that I am an intellectual "friend" of FOSS, to be sure, but I just can't bring myself to take the ideology to that serious of an extent. Also, anti-plagiarism tools aren't very good, like Berkeley MOSS. I mean they are great and everything but easily bypassed.
- thomasbk 14y agoGiven the amount of work this project is, I would presume that very few people will get anywhere near completing the course. So it doesn't seem impossible for the people running it to study the submitted solution in some depth and compare it to earlier submissions by hand.
- idupree 14y agoIt's largely practical; I like being able to discuss what I've done with people, including specifics. I make exceptions, but the amount of work that goes into writing a compiler is probably worth more than a certificate is to me. A compiler project would definitely produce things I'd want to discuss with folks and code I'd want to reuse in later projects. One benefit I find of releasing something as FOSS (when permitted to do so) is that I know I'll be able to reuse it later[]. [] (this bit of reasoning deserves more explanation than I've given...)
- webreac 14y agoThey do not want student to copy on each others before deadlines. Even latter, if they want to give the same course a second time, they need students of first session to never publish their homework.
- gills 14y agoI've got to agree with some of the comments here that this is insane. Sounds fun, but insane. There are probably 3 or 4 programming-intensive undergrad courses wound together here, with a more difficult substrate than your average compilers course. Then I remember that this is the Internet, and if it's 'free' you're usually not looking at the product; but you can see it in the mirror.
- cliffbean 14y agoI borrowed a copy of the Dragon Book from a friend and I'm starting to go through some of the parsing exercises as a refresher. I think the undergraduate compiler course I took used MIPS, so this might be a little different, but I always did like AMD. C++ is a big language, but as the FAQ says, we won't be writing an optimizer, and hey, we're not even writing an OS or designing a CPU, so we're only doing a tiny fraction of a complete implementation. I went to a C++ standards committee meeting once. They were having this fascinatingly complex discussion about temporary object lifetimes; it was so amazing how everyone there understood C++ so thoroughly. I'm hoping that taking this course will give me a better appreciation for their art.
- crowhack 14y agoThis looks awesome! Now to read about compilers....
- mikegirouard 14y agoI'm so not a candidate for a class like this, but damn I wish I could take it.
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- wglb 14y agoSo this seems like a pretty enormous task. Having written a couple of compiler code generation phases, I must admit that this challenge is very attractive. However, there is something a little off about this proposal. First, the size of this effort is really quite substantial, even neglecting optimization. Secondly, the phrase The C++ Grandmaster Certification began development as an internal training program, and the foundation was founded to offer it publicly suggests some compiler-writing company heavily involved in the C++ space. How many of those are there really? I mean, it has been 20 years since anyone made any money producing C++ compilers. All for-profit companies do it as a side effect. VC++, for example, in the 90s had 50 people working on just the compiler itself, not counting the Visual part. So it presents a secondary challenge, which is 1) is this a real company 2) what really is the end goal? Edit: Also, the bootstrapping question is not well addressed. What do we have to start with? Regular C? can I do the first phase in Lisp or Arc or Factor? Am I allowed to look at other source, like that of g++ or clang or llvm or objective C? Finally, the apparent copyright terms seem at least unacceptable, if not downright goofy.
- ethereal 14y agoRegarding the company in question -- my own best guess would be one that does static code analysis -- Coverity [0] comes to mind, for example. I can't really think of any other companies that would benefit greatly from having a large stock of employees that all know the C++ standard intimately. Except of course for those that write compilers, but as you say, there aren't many of those around. [0] http://www.coverity.com/ http://www.coverity.com/
- wglb 14y agoAh, a good possibility. I can't find it now, but they published a paper that said "There is no such thing as C" in which they discuss the widely varying implementations and expectations of C, different enough that special flags had to be invented on their tool to get weird programs to pass.
- DannyBee 14y agoGonna go with "recruiter phishing schemes" for $1000, Alex
- gelisam 14y ago"You will also earn the title Certified C++ Grandmaster [CPPGM]." A certificate or title isn't worth anything unless the organization who emits it has the authority to emit them. And if you can truthfully claim to have written a fully-compliant C++11 compiler all by yourself... you're already so badass that throwing in an extra title or certificate won't make a difference.
- cmccabe 14y agoOK, I forked LLVM and libstdc++ on github, and compiled them. In the process I learned about the joys of code reuse, surely what a true grandmaster would use. When can I expect my certificate in the mail?
- nnq 14y agoThe "meat" of the joke imho: ...there is a start date but not an end date for the class :) ...with an end date somewhere in 2023, it might be feasible.
- shin_lao 14y agoIt's a joke. It's hardly doable by a single person. For the record there is currently no fully C++11 compliant compiler. Oh, and I'd like to say that knowing everything about C++11 makes you a language lawyer, not a Grandmaster. Grandmaster is more than knowing the language. It's about using it right.
- PhantomLobe 14y agoWell, it should be a self-hosting compiler, and to do it alone you have to use it right.
- maayank 14y agoWHOIS records are of DomainsByProxy. I use a similar service for my private (not work) domains, but take what you will from it.
- mattgreenrocks 14y agoSince this is probably a joke, is there a comparable class for a simpler language available online? Anyone have any resources for people wanting to self-teach themselves compilers?
- akurilin 14y agoThere's a Stanford compilers class on Coursera. You can supplement it with the dragon book. Another book goes well with it, one of my favorites: Programming Language Pragmatics 3rd ed.
- Jach 14y agoI signed up, but I share the feeling here that this has to be a joke or email harvester or something else... Still, it'll be neat if there's at least an attempt. If it's real, I doubt I'd make it to the end. One aspect of this that is pretty doable and far more important than being a C++ Grandmaster is knowing how to implement the pieces that get basic code (in any language) from text file to the registers on your x86-64 CPU with a Linux kernel managing your program and others. I had a real-time operating systems course a few years ago in which we developed a simple real-time kernel running directly on an arm9 microcontroller board. The toolchain of cross-compiling with gcc and programming the device (and creating the required linker file for the architecture and bootup assembly) was fortunately done for us with source available, and we did a high-level overview of how openOCD works and a whirlwind tour near the end of the course of how we might compile a program independent of our RTOS kernel's program and load the separate program from SD card with the RTOS and run it. We talked about elf files and related topics but didn't go too deep--it'd be nice to revisit some of the topics and especially in the context of Linux. (I would prefer an arm device over x86 though.)
- speeder 14y agoThe fact it took me some time to realize this might be a joke, shows how far from being a Grandmaster I am :(
- aoldoni 14y agoI signed up, but it doesn't feel real.
- justinvh 14y agoGrammar reference: http://www.externsoft.ch/media/swf/cpp11-iso.html http://www.externsoft.ch/media/swf/cpp11-iso.html
- rayiner 14y agoWho in their right mind would write a C++ compiler without getting paid a lot of money to do it? It's an incredibly hairy spec: full of corner cases and ambiguities and nearly impossible to parse. As part of my GSOC project (auto-generating Common Lisp bindings for C++ libraries), I tried to implement parts of the Itanium C++ ABI (http://refspecs.linux-foundation.org/cxxabi-1.83.html#vtable http://refspecs.linux-foundation.org/cxxabi-1.83.html#vtable). Like the language itself, the spec heaps complexity onto the compiler in a pointless effort to save the occasional load or arithmetic operation here and there. Yet ironically, it's faster and simpler to just have a simpler v-table layout and put a PIC in front of it: http://www.jot.fm/issues/issue_2009_01/article4.pdf http://www.jot.fm/issues/issue_2009_01/article4.pdf (see page 233). shivers
- wglb 14y agoWell, when I first dove into compilers, i may have not been in my right mind. Three of us were too inexperienced to know that we couldn't produce a production compiler in a year, so we did. And I pretty much went through a wall to get into the compiler field. I don't disagree with anything you said here, but I admit I am feeling a pull.
- rayiner 14y agoDon't get me wrong: I love hacking on compilers and I do it for fun. And you can ship a production compiler in a year. But for C++ 11? That's a different beast. That's a language that's neither fun to write a compiler for nor do I think it's tractable to write one in a year (but who knows?) Out of curiosity, what was the compiler for?
- wglb 14y agoThe company was Sycor--unlikely anyone has heard of it. They invented the Intelligent Terminal--a data entry device replacing keypunches that could do validation checks on entered data. They were building an 8085 powered computer with their own OS. They hacked the PL/M compiler--actually rewrote it in Fortran to emit the appropriate object code and the rest of their tool chain. They started an effort to rewrite the compiler, but it failed. I came in, and being familiar with XPL (From the book "A Complier Generator"), having finished a port of it for the Xerox Sigma 5 at a previous gig. One other person on the team had finished a PhD in computational complexity and the other had project experience writing COBOL compilers. The project stared with a desire to change the language a bit, so we designed a new language. It wasn't too different from PL/M as it had to be mechanically translatable. The language was named, embarrassingly, Syclops. We started out with batch jobs on a 360/35, writing it in PL/1. They shortly got a PDP-10, which I miss, and we commenced to rewrite the compiler in Bliss-36. So it was essentially a cross-compiler, spitting out 8085 machine code with a very fancy assembler listing, including timings for each basic block. The project was wildly successful, and opened the door to switching processers. For a while, they considered the 6809, but ultimately stuck with the 8085. The CEO was very pleased, at least, to have the opportunity to consider the switch. My favorite activity was taking bug reports from the programmers who always looked at the generated code. The would come in with the listing, saying that the code was wrong. I would go over the code, and the reaction from them always was "wait--that is odd, the code is right. Weird." My boss at the time like to say "A compiler should produce code that an assembly-language programmer would be fired for writing."
- blort 14y agoAnyone gotten an acknowledgement of having signed up?
- pertinhower 14y agoI don't believe this is a joke, but I do think the organizers need to be much more forthcoming. The crucial unanswered question is what timeline they expect to follow. I believe it would be possible for an expert C++ programmer (and this is clearly who they're targeting) to write an essentially compliant ("fully" sounds difficult, and I expect some fudge there) compiler in a year; two, perhaps, if it's a nights and weekends effort. This estimate comes straight out of my bum. It's an intuition. I'm not including the standard library: that would be a multi-year job even for a small team of truly excellent C++ programmers. But if we focus on the compiler, and allow a little fudge in compliancy, I think there are some individuals who could do it in a year. So I don't believe the scope of the task implies a joke. The lack of information on the site raises worries. Do the organizers lack the confidence to reveal themselves? Or are they scamming? They shouldn't leave this a question.