It’s been a few days since I got back from CppCon 2017. As a millennial, I easily cave to peer pressure and because everybody else is doing it, I figured I might as well write a trip report too.
This was my third CppCon, and now that several attendees recognize my face, they no longer feel threatened and break eye contact when I ask them where I can score some weed. As C++ improves as a language, I’m pleased to see that the community grows with it. I was able to meet and chill with a variety of people whose work I respect at both the conference and in unrecorded discussions. I’m definitely of the opinion that CppCon inspires collaborative work and important discussions about the future and direction of the language, tooling, and community.
I’ll be mentioning the content of some of these discussions because I am a vapid diva looking for attention now that I’m on a platform where I’ve thrown off the shackles of Twitter’s character limits. More importantly, as the conference continued and I spoke with various people, I came to the conclusion that the Modules TS needs more scrutiny and is in dire need of fixing, or we’re all going to regret it.
As a weirdo who enjoys not only discussing build systems, but designing and writing them, most of the talks I attended this year were on said subject. I also gave a talk myself on build systems and why they’re all garbage.
The talk was titled There Will Be Build Systems: I Configure Your Milkshake. As of this post, the video is not up on YouTube yet. I’ll talk about it a bit at the end of the post, but I feel like the entire talk can be summed up with this tweet.
I nominate this for "most cathartic talk". Simultaneously demoralizing and invigorating. 11/7 would build again— Daniel Strommen 🐀 (@nerdile) September 28, 2017
If you’ve read other’s discussion of the keynotes, then you already have a pretty good idea of how they went down. I’m going to discuss other talks instead. That said, I enjoyed Titus Winter’s C++ As A “Live At Head” Language. It made me rethink some aspects of my talk, which resulted in my removing a whole set of slides regarding package management. That said, he did state that SemVer does not work well. Frankly, I agree and I’m also of the opinion that it is terrible for all non-dynamically typed languages.
Matt Godbolt’s talk was also excellent, and I ran into him on a regular basis during the conference. He’s a chill dude who is 100% ok with someone (i.e., me) unironically using the phrase “grab some ‘za” in reference to acquiring pizza.
I was definitely on a unique track this year so I’ll mention some of the talks I saw that I’ve not seen discussed elsewhere.
Scott Wardle’s talk, EA’s Secret Weapon: Packages and Modules, was a great talk that discussed several issues with build systems and packages at EA over the years. He also discussed the Modules TS and EA’s attempt to use them in production, and the challenges therein. If you’re looking to use the Modules TS because you want those sweet, sweet import statements, you should definitely watch this talk once its available.
Rong Lu’s talk, C++ Development with Visual Studio Code, was another talk I enjoyed quite a bit. I don’t want to spoil the contents of the talk too much. The live demo was impressive, and while I can’t ever see myself using VS IDE as a development tool, VS Code is shaping up to be a “not garbo” editor that I’ve been using daily. I haven’t used it for single file editing all that much, but I don’t typically edit a single file. It’s not really “a thing” I do. I’m most likely going to switch to VS Code as my primary editor, especially for C++. Given that I’ve been using Vim for literally half of my life (I’m 28), this might come as a shock to some folks. Ben Deane in particular was a little flabbergasted and confused why anyone would choose a “bloated, slow starting editor”. However, I learned that Ben uses Emacs. Glass houses, Ben. Glass houses.
James McNellis’ talk Everything You Ever Wanted to Know About DLLs was
another favorite. He discussed quite a bit of information on DLLs, some of which
was new information to me, such as
__declspec(dllimport) not being
necessary nowadays, unless its for global data members. Again, I don’t want to
spoil things, but there’s quite a bit of interesting information for those who
might be writing cross platform code, and want to know more about Windows.
Nicole Mazzuca’s talk Objects, Lifetimes, and References, oh my was a great high level primer on the C++ Object Model. Nicole is also known as ubsan in the Rust community and she’s smart as a whip. She pointed out several inconsistencies in the C++ Object Model. Why these are a bad thing, I won’t say. You’ll have to watch the talk on YouTube.
Boris Kolpackov’s talk Building C++ Modules should absolutely be watched by people who are interested in how C++ module support (according to the Modules TS) can be used by your build system. Boris’ talk was the day after mine, and I think we have a large difference in ideology regarding modules. Hopefully, my hyperbolic foot-in-mouth bullshit won’t cause any animosity between us. Writing build systems are hard and his work is something to take seriously from an engineering standpoint. As far as I know, there isn’t any other build system out there that can currently support modules. That’s a feat unto itself, whether the upcoming Modules TS is good or not.
Hotel And Dinner Chats
The dinner and hotel chats are some of my favorite parts of CppCon. This is where unplanned discussion happens, while also giving you time to reflect on the day’s various talks. Because I have a one track mind, I mostly spoke about build systems, and modules. These are two things, but if you’re surprised by off by one error jokes at this point in your career, I don’t know what to tell you.
A majority of these discussions took place in a hotel bar. Eventually, the number of people in this general area became so great, that people broke off for sub discussions, and in some cases to simply tell “war stories”. I, of course, got to tell several people about why I don’t contract as a freelance developer anymore. The reason being that the first and last time I did any freelancing, my client was kidnapped, tortured, mutilated, and left for dead in the Mojave Desert. He survived, but after that event, I decided “Maybe I should get a job and leave this behind because I’m done.” I know I’ve placed some jokes in this post. This is a real thing that happened.
Regardless, I did enjoy discussing hardware limitations, “bad code”, and
revealing to everyone my crippling addiction to computer keyboards. I do want to
expand upon further about modules and build systems so (hopefully) I’ll
write a more drawn out post. One thing I found extremely interesting is that no
one can actually tell me what a module is, how it fits into the translation
phases of the compiler, or what some things in the current proposal mean.
Specifically, I have yet to find any form of comment, behavior, semantics, or
reasoning behind why :code:
extern module is valid syntax. What does it do? Why
was it added? Who added it? Why is there no easily accessible record of its
addition? Was David Lynch just straight up fucking with me in Season 3 of Twin
Peaks? Is Ted Cruz the Zodiac Killer? I had so many questions, and almost all of
them were not answered in any way.
I also had quite a few people walk up to me and compliment me on the [lightning talk] I gave at CppCon 2016. I hadn’t ever given a talk before which is why I’m constantly out of breath and talking way too fast. Still, it was nice to know that people got some use out of it and went out of their way to tell me.
Overall, I received quite a bit of positive feedback and I hope that it, and the
various discussions I had with people, will help kick off some initiatives to
improve the currently desecrated landscape that is the C++ build ecosystem. I
also had the
malice opportunity to force let my victims audience
listen to Rage Against The Machine’s “Killing In The Name” via the room’s
sound system to set the mood. Next time, I’ll play Powerman 5000’s “When
Worlds Collide”. You can’t stop me. It will happen.
To give a brief description of the presentation, I spoke at length of how our ecosystem is driving people away from C++. Yes, C++ is difficult. But there is no reason to require that the tooling surrounding the language also be difficult.
I later had the opportunity to give this same talk again after the conference to several people who had missed the talk. I had of course lamented that I hadn’t had time to speak about modules to Richard Smith or Gabriel Dos Reis. However, I had been discussing my issues with build systems and modules with one person from the LLVM team at Google. He’d been nodding and agreeing with me for the most part. Internally, I’d thought hah, this guys gets it. During this encore presentation I learned he was in fact Richard Smith. There is no lesson here, I just thought this was a neat anecdote displaying my ignorance.
Since CppCon ended, I gathered all my notes together on build system design, and have placed them into a private repository. Nicole Mazzuca and I have agreed to collaborate on a prototype build system/package manager combo for C and C++. This will likely take us both some time to get a working usable tool out for others to try out. We’ll be using a lot of the design approach I discussed in my talk, while attempting to have a simple upgrade path from the prototype to a full fledged usable product. We were going to be quiet about it, but we unofficially announced the project on Twitter. As we work out various pieces and subtools for this prototype, we’ll hopefully release them to the community at large. However, because we are prototyping these tools, we will be violating some of the design principles we want for the 1.0 release. This will be a long ways off, and I wouldn’t recommend getting excited. We do not, after all, have anything to show. Yet.