Dealing with the lack of regex engine^ is such a tiny part of the monumental task of implementing C++ compiler from scratch - it's like quitting Mt. Everest summit expedition because a three-story hotel on the way there doesn't have elevator.<p>^ - which he probably didn't need to begin with
I know someone who is doing this course. I can understand both the desire to do this course (get a deeper understanding of the C++11 spec) and why this is the course matter (building a compiler will give you a deeper understanding of the spec).<p>Still, as others have noted, C++ is a daunting spec, probably the most complicated of any language. Perhaps they resolved this with C++11 but previous versions of C++ were also ambiguous in certain corner cases [1].<p>What I don't really understand is why you can't publish your code before or after. I guess I understand why: they want to offer this in later years without prepackaged solutions being on github but is that really avoidable?<p>So you have to invest a massive amount of effort into building this. Sure you get some technical knowledge but you don't get any code you can really use at the end.<p>All of this makes me appreciate the relative simplicity of the grammars of, say, Go or Lisp. I see the need for C++ but I can't help but view is as a hideous Frankenstein of a language nonetheless.<p>[1] <a href="http://www.computing.surrey.ac.uk/research/dsrg/fog/FogThesis.pdf" rel="nofollow">http://www.computing.surrey.ac.uk/research/dsrg/fog/FogThesi...</a> p148
There's no shame in admitting that the course is too hard or demanding for you current skill level--I ended up dropping out because I didn't have the time to do the work justice.<p>However, the somewhat whiny tone of the article seems like the author is trying to justify their own shortcomings by complaining about the code sourcing terms and the lack of regex. It seems kind of childish.<p>Here, maybe this will help in the future--a simple regex parser in like 30 lines of vanilla C:<p><a href="http://www.cs.princeton.edu/courses/archive/spr09/cos333/beautiful.html" rel="nofollow">http://www.cs.princeton.edu/courses/archive/spr09/cos333/bea...</a>
I think this touches on something important - rather than writing from scratch some asinine limited use case software, make useful software. You can prove your worth in the useful products you produce, not in the bravado you accrue saying you wrote a compiler from scratch - it is the difference between using a dozen programs a day that I know I've commited patches to and seeing the fruits of your labor or having your standards compliant C++11 compiler rot in some directory on your PC while you still use clang/gcc because the program said you can't even put it in a public git repo and instead of spending 10k lines improving the current best of the crop you reinvented the wheel as a stone brick while major players are comparing rubber treads.
The regex engine is small potatoes in the larger scheme of things, but the reason it's so problematic is the two bigger problems in the CPPGM: the questionable architecture and absolutely insane project plan, which both appear to be "convert the spec directly into code, in printed order".<p>This is no way to approach a complex project with serious technical risk, and willingly signing up for the death-march enterprise project from hell is the kind of thing that disqualifies you from being qualified to take on a project of this scope, let alone a <i>grandmaster</i>, whatever that means.<p>You can see the outcome coming a mile away: "We cut some corners, but it's 80% done. Now all that's left is the impossible part."
I'm suprised. I thought it was a joke:<p><a href="https://news.ycombinator.com/item?id=5148895" rel="nofollow">https://news.ycombinator.com/item?id=5148895</a>
The biggest flaw in all of this is ... Who says you need a course or a certification in order to write a compiler? Go, write a compiler. Use a well-recommended textbook or web-based resources if you need to. But there's nothing to stop you from going out on your own and doing it.<p>The other is... Not going to write a compiler because you don't have regexes? That sounds like major whining. You might as well say you won't write a compiler because you already have a compiler. If learning by re-implementing low-level details is what you're after (in my experience a very helpful exercise), don't complain because you have to do low-level details. OTOH, if you take my first suggestion and not bother with a course or certification, you can define your own rules and you don't have to feel bad about using an external regex library.
Really? Why don't you write your own regex? Regular languages are definitely relevant. It's not that hard to write a basic regex engine (make NFA and convert to DFA). This is a <i>compilers</i> course after all.
For learning the best principles about actually driving (aka coding) in C++, what are the best resources these days? I learned from Stroustrup, Accelerated C++, and on the job programming. However, every company seems to have an idea of what "good C++" looks like and they all disable/enable a varying subset of C++ features to support their individual standards.<p>What's the closest guide out there that's representative of "ideal" C++ code and style?
The author brings up a great point in that C++ really does have a massive lack of modern development tools. I can envision a lot of the language being fixed up from the tooling angle, eliminating a large part of the repetitive and boilerplate work that bogs the language down the most.<p>Could anyone point me in the direction of modern C++ development tools or would be interested in beginning a project to create them, possibly through Sublime plugins and a preprocessor? (email in profile) I'm familiar with CDT & Visual Studio, both of which are hardly satisfactory (not to say they don't do some things well.) I've also written some tools to close some gaps that I see in C++, but nothing too intrusive or ambitious yet. These are here: <a href="https://github.com/personalcomputer/supermake" rel="nofollow">https://github.com/personalcomputer/supermake</a> & <a href="https://github.com/personalcomputer/cppinterp" rel="nofollow">https://github.com/personalcomputer/cppinterp</a>
I wrote a C++ compiler back in 2000. It took me couple of years to polish that. And it was not even the full compiler: parser and semantic analysis, but no code generation in the usual sense. It did, however, support several idiosyncratic compiler dialects.<p>C++ is an ugly, ugly, _ugly_ language. Even C language, the base of C++, is context-dependent, which in practice means that you need to intermix parsing and semantic analysis. Consider for example this code 'T*t'. If 'T' is a type, then this is declaration of variable 't' that is pointer to 'T'. If it is identifier, then it is non-assigned multiplication of 'T' and 't'.<p>C++ added its own quirks on top of that. You have, for example, parse class definitions two times. First, just the declarations and only then inline method bodies. There is no other way to do it correctly.<p>And don't even get me started on semantics.
There is something missing from this post. It seems from the previous thread that people knew what the course involved - so why did he sign up for it in the first place if he philosophically disagrees with it? What changed/what new information came up?
It's a well-known marketing gimmick to make people climb the self-created, artificial ladders to "prove themselves".<p>This approach is one of the most efficient "sucker baits" where "sponsor" or entity behind the certification benefits most.<p>Congrats to be the one who called the bluff. It takes the guts + intelligence combines to see through the smoke screen.
You passed! :)
I'm wondering why I should care. Is completion of this course considered <i>de rigeur</i> in C++ programming circles or is this just a case of someone changing their mind and writing off some course fees?
I will now use this example going forward when someone asks me to explain what I mean by "a team of one is the most efficient possible team, just not the most effective."
What a pussy! I've been working on my c++ compiler compiler for 6 years now and will complete the 1981 c++ specification any day now. I think can get up to 1995 around 2015 now that I've defeated regex. I'll have my certification within the next 5 years! And you'll have what? A regular paying job? Ha! Pussy!