98 points · by int3 · 13y ago · 131 comments
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.
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.
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.
It has still taken a number of the best C++ programmers and compiler designers years to accomplish, and they haven't finished yet.
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.
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."
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.
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)
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.
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 :-(.
The IP pointed to by the A record does have a service running on the SMTP port.
Hopefully nothing involving project planning.
(If it's a joke we might organize a study group ourselves^^)
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.
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.
...with an end date somewhere in 2023, it might be feasible.
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). 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 (see page 233).
shivers
I don't disagree with anything you said here, but I admit I am feeling a pull.
Out of curiosity, what was the compiler for?
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."
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. :)
That will show them!
[
] (this bit of reasoning deserves more explanation than I've given...)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.
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.)
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.
- 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!
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.
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.
i.e. is there a good book "C++ for C programmers who hate the thought of it"
http://yosefk.com/c++fqa/index.html isn't a book, but the author shares your disgust for C++ and it's fairly detailed. As he says somewhere, he knows C++ better than it deserves to be known. I also don't like C++ as much as C (and I'd like to replace ever having to use either of them with Rust, hence Rust is my language-of-the-year to learn for 2013), and I found the FQA immensely useful for understanding the craziness and defectiveness of C++.
I'd also recommend http://www.amazon.com/The-Standard-Library-Tutorial-Referenc... I own the first edition and found it useful.
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.
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?