CppCast - Build Systems and Modules
Episode Date: October 26, 2017Rob and Jason are joined by Isabella Muerte to talk about her recent talk at CppCon 2017 where she discussed some of her concerns with the Modules TS. Isabella Muerte is a C++ Bruja and Build ...System Trash Goblin. She taught herself to program by writing a build system and immediately regretting the decision. Her first computer ran Windows Millennium Edition and her parents forbade her from upgrading to anything else for 5 years. She is still bitter about this. In her spare time, she is into open source software, tattoos, computer keyboards, and making fake cover bands like 'Rage Against the Abstract Machine' News A use for the poop emoji in C++ C++ Core Guidelines: Class Hierarchies Partitioning with the STL The Coming Software Apocalypse Isabella Muerte @slurpsmadrips Links Millennials Are Killing the Modules TS CppCon 2017: Isabella Muerte "There Will Be Build Systems: I Configure Your Milkshake" Sponsors JetBrains Hosts @robwirving @lefticus
Transcript
Discussion (0)
This episode of CppCast is sponsored by JetBrains, maker of intelligent development tools to simplify
your challenging tasks and automate the routine ones. JetBrains is offering a 25% discount for
an individual license on the C++ tool of your choice, CLion, ReSharper, C++, or AppCode.
Use the coupon code JETBRAINS for CppCast during checkout at jetbrains.com.
Episode 123 of CppCast with guest Isabella Muerte, recorded October 13th, 2017. In this episode, we talk about the coming software apocalypse.
Then we talk to Isabella Muerte.
Izzy talks to us about build systems and her concerns with modules TS. Welcome to episode 124 of CppCast, the only podcast for C++ developers by C++ developers.
I'm your host, Rob Irving, joined by my co-host, Jason Turner.
Jason, how are you doing today?
I'm doing great, Rob. How are you doing?
I'm doing fine. It's been a long week, but I'm good.
So it's Friday. Do you have a beer with you?
No, but I kind of want one. I might need to get one after the show.
Okay.
How about you?
Well, yeah, I have one planned for after
the show myself, actually. That's great. Well, at the time of our episode, like three to piece of
feedback, uh, this week we got a tweet from Paul writing in, uh, thanks for getting Titus on the
show. Looking forward to seeing how abseil can be used in our code base. Uh, beware Twitter
autocorrect. Uh, yeah. Abseil is not a commonly written word. I guess
he ran into some problems with that. That's funny. I wonder what it did.
Yeah, I don't know. But yeah, it was great talking to Titus. And the Abseil library does
look pretty interesting. So I'm curious to see how many people go about implementing it and
pulling it into their codebases and what kind of experience they have with it.
Yeah, if it becomes something like Boost or something
where it's kind of expected that people might be using it.
Who knows?
Yeah, who knows?
Well, we'd love to hear your thoughts about the show.
You can always reach out to us on Facebook, Twitter, or email us
at feedback at cpcast.com.
And don't forget to leave us a review on iTunes.
Joining us today is Isabella Muerte.
Izzy is a C++ bruja and build system trash goblin.
She taught herself to program by writing a build system and immediately regretting the decision.
Her first computer ran Windows Millennium Edition,
and her parents forbade her from upgrading to anything else for five years.
She is still bitter about this.
In her spare time, she has opened into open source software, tattoos, computer keyboards, and making fake cover bands like
Rage Against the Abstract Machine. Izzy, welcome to the show. Happy to be here. Thanks for having
me. You know, you might be either the first guest we've had or the first guest we've had to admit
that your first computer ran Windows MB. It's something that I don't hide. It ran into interesting things.
I know Windows really well as a result.
So I still run it for all these years.
You still run it, you said?
Oh, yeah.
Whether you have a VM or do you have a separate box set up with ME or what?
No, no, no.
Not Windows ME, just Windows.
Oh, okay.
No, God, no.
That's some nostalgia. Yeah, no, but when V Windows. Oh, okay. No, God, no. That's some nostalgia.
Yeah, no, but when Vista came out and everyone was like,
oh, it's the new ME, I'm like, no, it was not.
I used ME.
No, no.
I actually bought ME,
intentionally upgraded a few computers to it.
Yeah, I don't really know why at the time.
Def definitely got used to of that uh uh what was
the feature system restore it was windows 98 with system restore that's all it was
a buggy windows 98 with system restore yeah 98 was so much better and 2000 so much better
the other options at the time i don't know what I was thinking.
Also, a brief moment of silence for AOL Instant Messenger,
which was announced as being shut down in December.
Yeah, I saw that.
Oh, yeah.
Really surprising that it had gone on for that long.
Yeah, actually, I had logged into it like three months ago,
and I was like, I have 500 people on my friends list. I do not know half of who these people are anymore,
but none of them have been online in at least six years and and i was just going through and just deleting old
accounts and i locked that account away behind some random uh uh like email address that i just
like put in and then generated a password deleted it set set sale to it because i was like i'm done
i've got i've got discord now i'm good
there's definitely some logic there for for kind of quietly putting away your aol account just in
case someone were to try to hack it or something later yeah yeah kind of yeah i mean like my my
yahoo account from 2001 was hacked at some point which it it's Yahoo. I'm not expecting anything, but
I can't reactivate it for use
because it's such an old
account. It takes you to a
2002
webpage that no longer exists on the site.
And then when you try to contact the email
address that they give you because it can't find it, it's also
a really old email address that doesn't exist anymore.
So I was just like, eh, whatever.
I'll just change the password.
Who cares?
You can't use this for anything anyways.
But I wanted to delete my personal info because I had my dead name and date of birth in the info.
Right.
Yeah.
Anyways.
Okay.
Well, Izzy, we got a couple news articles to discuss.
Sorry about that.
No, it's fine feel free to comment on any of
these and uh and then we'll start talking to you about uh modules and build systems okay
okay so this first one uh is currently the top post on the cpp subreddit i just found a use for the poop emoji in C++. And I'm just impressed that this code works
and that people on the subreddit community
are enjoying it so much.
So do either of you actually have to work with Unicode
on a regular basis?
I don't think I do.
It depends.
Unicode in the source code, rarely.
Unicode itself, yes. Okay, I don't really have do. It depends. Unicode in the source code? Rarely. Unicode itself? Yes.
Okay, I don't really
have to in C++. I haven't in a while.
It's not fun.
What the code actually
does is if you're running Visual Studio
and you're using Unicode
and you need to have a UTF-8 flag
and if you are trying to use Unicode without
the UTF-8 flag, this code
that makes use of the
poop emoji would uh would throw a static assert okay yeah the uh uh my my discovery that um
c++ did in fact support emoji uh it was sometime in the past like two years and i was like oh
so when swift came out and they're like and you can use emojis as variables and then i was like
oh it'd be kind of neat if we could use that in C++, but it would also be a nightmare.
And then I found out, oh, actually since 1998, you've been able to use any part of the Unicode spectrum minus certain sub-characters like the dollar sign and whatnot.
So you can use, you can't use the dollar sign.
It's not in the supported set of characters, but you can use the full width dollar sign because that's in the Unicode
plane.
Fun fact.
The other interesting
thing about this post
about the poop emoji is
apparently it's not only the current highest
post on the CBP subreddit,
it's actually the highest voted
post of all time.
616 points, apparently.
Yeah.
Which is a little sad that this is
what gets more votes than anything
else. And I looked at what the other top posts
of all time were.
There's also Hitler on
C++17.
And this post where someone
thought Visual Studio was uh some type of tracking
telemetry into their compiled code yeah uh those those are always the fun posts like microsoft is
is tracking me and then they start to spell microsoft with a dollar sign like it's 2003 again
takes me back yeah also i'm not surprised that the memes get up at the top of the of the subreddit
you can't you can't argue about memes you can't say you can't see a meme is done you'll just get
downvoted that's how it works you know i'm pretty i'm pretty sure we actually covered the uh hitler
on c++ 17 as a news item yeah okay that was a long time ago yeah it was a while ago and i remember we covered it because
bjarne made a post uh defending c++ from hitler in the comments fun times right okay so moving on
this next one uh c++ core guidelines class hierarchies and this is on the modern C plus plus blog from Rainier
Grimm. And he's seems to be going through all of the core guidelines and making a post kind of
explaining the different guidelines, giving some sample code about them. So it definitely seems
like a valuable resource that he's putting out here. That sounds like quite the effort to try
to go through all of them. Yeah. And this is the first of the posts that I've seen, but he's putting out here that sounds like quite the effort to try to go through all of them yeah and this is the first of the posts that i've seen but he's on he's going through items 120 to
122 in this post and he's going through each one in a decent amount of detail uh it looks like at
the bottom of the post he's actually at 126 through 128 as well oh yeah that's right yeah you're right okay so i actually don't agree with one of these
core guidelines which one uh maybe i misunderstood it i thought one of them was saying that all
okay this one that says if a base class is used as an interface make it a pure abstract class
and i like mostly agree with this.
They're basically saying don't put any data
in your base class interface.
But if your derived class is a templated class,
then you end up potentially duplicating lots of code
being stamped out by the compiler
in your template instantiations.
And if there's something that you can move
that's shared into the base class, I'm all
for that.
I'm of the opinion that there is no such thing as a pure abstract class in C++.
And that's simply because even if you do the virtual void function equals zero, you can
still actually make an implementation of that function that if it gets called, will actually
end up calling that.
And so there's really no point in having a pure virtual function because it's not actually pure because
you can make an implementation for it as a fallback and i mean all it does is prevent you
from making an instance of that class right right right but some people will be like oh but it also
means you have to implement it every time, and that's not true. Right.
Yeah.
The next article we have is from Fluency++, Partitioning with the STL.
And we've talked about Jonathan Baccarat's blog.
They're always really well-written.
And in this one, he's going through the STL partition algorithms.
I liked that he put his dailyable content stamp at the top of this one that we talked about
when he was on the show.
Oh yeah, I didn't notice that.
Yeah, that's a good point.
So this is something that you go over
in a really quick presentation.
I also, since I know Jonathan's going to listen
to this episode,
will point out that he should have mentioned that stable partition
is able to allocate and the other algorithms don't allocate so be interesting to see if he
responds to that i guess yeah okay and then this last article we have this is a really long one but
i do think it's it's worth reading and this is on the atlantic and it's called the coming software apocalypse and it's kind of hard
to summarize because this article kind of goes in a bunch of different directions did you both
have a chance to read the whole thing uh so i actually did not have a chance to read this but
i kind of already know like just reading the first, I already kind of know what it's about, and it's stuff that I have...
I'm a very snarky person with very strong opinions
about a lot of things, as you can tell
from my posts regarding modules and whatnot.
But they're...
Yeah, I get the general gist of it,
and I agree with probably the entire premise of it.
I'm scrolling through it real quick, and seeing some quotes that yeah yeah i mean they kind of go start off by talking about
some horrible horrible things that have happened because of bad code like you know 9 11 911 systems
going down because someone picked this arbitrary number as the max number of 911 calls to ever get
handled and then the system just kind of silently stopped answering 911 calls.
And then move on to talking about how, you know, in the airline industry,
they apparently don't really write code the traditional way.
They use model-based design where you kind of thoroughly model out the system
and then generate code from that.
And how they don't really have bugs in the software anymore
because of that.
Maybe that's going to be the future of a whole lot more software.
I think my favorite example from that was the radiation treatment machine
that was killing patients because of a bug in the software.
Oh, Therac-25?
Yeah.
Yeah, that's a classic one.
I was not aware of that previously.
There's also another one that's a little less known.
I always get the details of this wrong, but I think it got...
I want to say a couple...
This was during the second Iraq war.
And it was some Patriot Missile software failed
because it was written for 64-bit
software and then basically
rewritten and just
compiled to work, and I'm doing air quotes
right now for listeners,
so that it would run on a 16-bit CPU
that the Patriot missiles would work
off of.
When Saddam Hussein was firing some Scud missiles
at a military base,
the defense Patriot missile thing basically failed twice and the missiles were unable to intercept the Scud missiles and several US service members perished as a result.
Goodness gracious.
Yeah, and with self-driving cars and failing infrastructure in the United States, I can more uh software bugs causing um harm to people in the future if something is i i occasionally have
conversations with people who aren't programmers and i say i i make maybe a bit of a general
generalization and say i don't really know any programmers who would currently trust self-driving
cars uh i know i wouldn't yet as do we do we agree
or is there any dissenting views here i i absolutely do not trust them i also don't trust
uh any of our infrastructure involving like water or gas or electricity or anything like that
because i've uh i've heard things about like oh there's like unprotected wi-Fi systems in the middle of Montana that are running for
Equidox and there's no security or like not broadcasting an SSID for Wi-Fi
automatically makes it secure is like the, you know,
idea that some, some software engineers have of like,
this is good enough security for, for this. And it's like, you know,
people are worried about on, on,
in some political circles are worried about people coming up from the Mexico border.
And it's like,
you should be really more worried about people coming in from Canada and
messing with the infrastructure.
But I don't want,
I don't want to get put on another watch list.
So I'm already,
I'm already on the,
uh,
Comcast watch list.
So,
wow.
Well,
it is worth, uh, worth reading and uh to make you uh afraid of nothing else yeah
yes yeah so izzy um you were at cpp con 2017 and it seems like you got a bit of attention
for raising concerns about the modules ts yeah uh where
should we start with your concerns um i so let's start with uh no one on the committee can agree
as to what a module is um and i think that that's my biggest concern uh so like if i were to ask
either of you like what is a module um i don't think that your answer would be anywhere close
to what it is in the modules TS.
I'm not even going to try to answer.
I'll just say it right now.
Yeah, like it's confusing.
It's kind of, I feel like it does a lot of things that Golang did, the Google Golang,
where it was like, yeah, yeah, we're going to develop this with our heads down and ignore
the past 40 years of, you know, modules and other languages to develop this thing
for this one particular problem
that works for this one particular vendor.
And then everyone else will just have to deal with it
is kind of like the least polite way I have
of phrasing it without cursing.
And, like,
if we can at least get the committee to
agree on what a module is, I would be okay with that.
But as of right now,
for those that don't know about the modules TS,
we have
an interface
module translation unit, and we have an
implementation module translation unit.
And you feel like, wait, isn't that kind of like what
a header and a CPP file are for congratulations you you've made the connection um and this also
leads into the issue that i have which is um you know i can't and this is going to be a really bad
pun but i'm a millennial so i really don't care um but uh uh you know how can i dag on the haters
dependent is a cool graph on the haters um under on the graph on the haters.
Under every compiler right now, yes, there used to be tools like
MakeDepends, but in the past
however many years, certainly
after I started writing software
in the mid-aughts
and whatnot.
The
gist of it is
under current
system, I can name
a CPP file and then
the compiler will
search for the
headers and then I can get that
dependency information in the form of a make file
or a list of includes like through
MSVC some way to tell me
these are the headers that we also need to depend on
and I can create a graph from that
information
and with modules the problem is,
is that right now, there is no way for me to run a compiler once, right? So when I get the
dependency information currently under headers, I compile the file. And also I'm able to get the
header information in that run at the same time. And, and that's all done in like one pass,
if you will. And, you know, there's going to be someone um and that's all done in like one pass if you will and you know
there's going to be someone out there that's like ah the c++ compiler has nine translation phases so
jokes on you but what i'm saying is i only have to run the executable once is what is what my point
is um under modules if i have a statement that says import a um forgetting the fact that there
is no guaranteed way to search for A and where it could be located.
A has to already have an existing compiled binary interface,
or Boris Galbakov calls it a binary module interface.
There's no actual word for it.
Gabby Dos Reyes just calls it an IFC file for, I think, interface container,
something similar to that interface file container.
And that has to exist before you can compile the file.
So I basically have to say, okay, here's my file.
It imports module B.
B has to already have an IFC existing.
And if it doesn't,
then I can't compile the module that's importing it.
So I basically have to go up this massive chain,
find all these files.
And there's also additional issues of, for instance,
the name of the module is not tied to its file.
It's not tied to the directory it's in.
It's not tied to anything.
It's just a unique name that's supposed to represent it,
which I'm fine with. Having your files tied to the directory it's in. It's not tied to anything. It's just a unique name that's supposed to represent it, which I'm fine with.
Having your files tied to that
under the current C++ abstract machine,
I think is a mistake.
But then again, one could also argue that it's 2017.
Files have existed for a long time.
We can't say that the C++ standard
doesn't know what a file is
because we now have the file system sublibrary
as part of the standard.
And that has a concept of what a file is and what a directory is um and at the very least if we could abstract away the concept of you know uh a translation unit can be contained
in some kind of container and then you can have sub collections of those containers inside of
collections of containers basically directories um i think that that would alleviate this issue.
But what's going to probably happen is that there's going to be build systems
that turn the unique names that you have inside of a module
into one format of looking them up.
Another build system will do a completely different mapping.
Some will permit you to map from A to B, A to C, A to D,
whatever mapping you want for these naming conventions.
But I think it's going to fragment things a lot worse.
And I think the committee needs to say something about it.
And you can't be as vague about it.
And some people have said,
well, why don't we just turn the compiler into a build system?
D does that, Rust does that in a way.
And I'm actually not entirely against that.
But if we're trying to keep C++ the standard separate from C++ the tools,
then yes, I would agree in that sense.
But I don't know if this is making any sense.
But there are serious issues.
I've made two posts about it.
One where I gave a small little rant and then one where I made a massive large rant. So if anyone was trying to get me to write more than one blog post a year, congratulations, you won. the past two years um and uh it's it's just um the the defense that i get from people that have
been that are working on the modules ts are in favor of the modules cs is well we'll make our
build systems you know module aware and they don't explain on that um you know what does that mean
like are you going to give it a potion that makes it so it can see modules suddenly?
Here's a mirror so you can find which modules are real and which ones are vampires.
There's no deterministic way of, here's how you find a module.
And there's also been no proof of it at a massive scale.
I know some people have said that we're reusing it in this way at Google,
but the Google implementation of modules is actually completely different from the modules TS. And from what I understand, Richard Smith and company will be putting a new
paper forward in January or February, but
the vote to turn the modules technical specifications into an actual technical specifications
coming up in November, specifically November 6th.
And I think if I wanted to get a paper in to say,
no,
please don't do this unless you fix these things.
Um,
I have three days to write that as of this recording.
I think that's right.
It's Friday the 13th at the moment.
Um,
although I don't know when this episode is going to go up,
but,
um,
so,
but by the time the episode goes up,
I assume that the mailing deadline will have ended.
Deadline will be definitely, yeah.
So, excuse me.
Oh, gosh, that's the coat coming up.
So sorry about that.
It's okay.
Yeah.
So, when you were at CPPCon, did you have a chance to talk to many committee members
I did
so there's this one hotel
the Seattle Marriott Bellevue
which most people will sit in the lobby of
after the talks of the day
and they'll kind of like hash things out
and have conversations about various things
sometimes you get off topic and start talking about music
or you end up talking about in my case build systems
and the modules TS. And I had actually mentioned this in my trip
report. But I had been talking to one person about like my problems with the modules technical
specification and why I thought it was not a good idea and why our build systems need to be better
and just laying all this stuff out over the course of several days. And then someone had
like spoken to me at some other point and they were like, have you spoken to Richard Smith?
You know, he's like one of the people that edits the standard. He's really important to the
community. You should really tell him these things that you've been saying. And I was like, yeah,
hopefully if I get to meet the guy, like I've never met him really. And then as I was sitting
there the day after, the day the conference ended conference ended sitting in the lobby talking to some people
this guy I'd been speaking to came up
and then someone said oh speak of the devil
this is Richard Smith
and so this guy that I had been thinking of
like oh man this guy gets it it's a shame I can't
speak to Richard Smith was in fact Richard Smith
the entire time
so
definitely worth it but I had a chance
to speak to him a couple other people but did a chance to speak to him, uh, Chandler Carew with a couple other people,
but, um, did not get to speak to Gabby Dos Reyes, uh, mostly because after I gave my
talk, uh, since this was the first like talk longer than six minutes I'd ever given at
any conference, um, I was exhausted and basically slept for the next two days.
Uh, so I was not able to find him by the time the conference had ended.
And I had not been able to see... I wanted to fully wait to give my
this-is-going-to-be-bad-or-a-nightmare
decision until I had seen Boris Kalpakov's talk.
He's the creator of Build2,
which is, as of right now, I think the only build system
that actually supports
every implementation of the modules TS out there
for GCC, Clang, and MSVC.
And he does it by having a separate tool run,
which I'm absolutely against,
because I don't think that we should have this black box,
unspecified, non-existent tool as of right now
have to run on our source code,
especially if, you know, like it works for 30 files. Like now have to run on our source code, especially if
it works for 30 files.
You have to open up every file, find where
the module names are and whatnot since they're not tied to
the file name. And someone
can make the argument of, well, you can just make a mapping
for it. Just because
we say that this is what people should
do doesn't mean they actually do.
I think no proof of that
is better than looking at the Qt community. People say you
should keep your headers and your CPP files separate. And if you look at most Qt projects,
they're all in one massive directory. And like that could cause huge problems. If you have,
you know,.axx and.cxx files next to each other for modules, that could definitely go
up a creek real quick without a paddle.
And I think that's the correct phrase.
But regardless, though,
I'm against us having to have a tool not specified by the standard
that has defined our dependencies for us.
And technically, the compiler can do that with headers.
And while people say, well, it's not definitely specified in the standard,
it is specified that you get a unique ID that you give to the preprocessor
and the preprocessor finds that file for you in some implementation defined
way for the platform that you're on.
It doesn't matter that we use file paths.
It could be like a resource fork on a Mac OS classic for all I care. But the compiler, the preprocessor is part of the compiler, it's part
of that translation phase, and it finds that file for us or finds that header file. We also refer
to the fact that there are in fact headers, even if the standard says, well, there's no way to
actually find a header safely. It does have to find some headers like CSTIDIO, you know, ISO 646, you know, the vector header.
These things do exist.
And I think, you know, some people want to stay future compliant and say, oh, well, you know,
like what if in 30 years we're not going to have, what do you call it?
We're not going to have um uh what do you call it we're not going to have these concepts of files they'll
just be like data floating in various like databases like it doesn't matter because even
even then like a directory is a file system is just a database that you can't treat like an sql db
it doesn't doesn't really matter um i think i think the ship has already sailed on that um we've
got and i don't know like when was the first concept of a file on a you know system created
we've got that many decades of it um we haven't seen any changes in how files are handled aside
from like mobile and even then people um you know they still save images to dropbox then dropbox
shows up as a file so they know oh an image is a file. I don't think that the concept of a file is going to go away
anytime soon. I think we should just embrace that with the standard. And just kind of accept that
this is a thing that we need to deal with. And, and probably specify the standard, especially
since, as I said earlier, we have the file system header. So why would we have a file system header
for the C++ abstract machine if the C++ abstract
machine does not understand the concept of a file? It seems like a very strange
contradiction to me.
And I think that something should be decided. That's probably
a very unpopular opinion with a lot of community members.
And frankly, I wouldn't be surprised if it was.
But again, I have very strong opinions about a lot of things.
And I'm 28 and a millennial, so obviously I'm right.
Well, how many people did you get agreeing with you after your talk and in these conversations?
So people agreed with me about a variety of different things people said that the uh the modules ts needs to does need to
have some changes done um other people said build systems need to be fixed as well okay um the build
systems thing i think i'm a little more focused on than the modules um because modules like i'm
one person that's not on the committee that can't afford to be on the committee
and um i'm also not a compiler implementer,
and I also don't have a solution for what modules could be,
aside from tie it to the file system,
which would also upset a million people, too.
Some people don't want that, because they're like,
well, how do I upgrade my source code directories?
To which my response is, carefully.
Carefully, and maybe never,
because it's going to be a while before you get that feature anyways,
before you create your compiler to a modules capable compiler.
Anyhow,
probably I still know of some game developers that are using C++
2003 and it's,
it's like,
well,
like what,
what are you going to do?
And as, three and it's it's like well like what what are you gonna do um and uh uh as as for the modules thing though i did get some i did have some brief tweets uh twitter rants um uh where i then received
some direct messages from people saying like i'm part of this national body so i can't give my
personal opinion as part of the national body but i can state no comment or something similar to that um so uh there are people that are
definitely against the models to us on the committee um i heard word that unless a few
things are changed bloomberg is a no uh but that could be a rumor like don't do not quote me on
that please like i i's kind of late now.
You're on air.
I'm on the record.
Oh, no.
But it's something that needs to be taken care of, I think.
At the very least, we can't have something this important be this vague.
So, for instance instance as an example
you know in 30 files
it's easy to open them up and
scan those files for
their unique names and
if you require a mapping
and your build system requires a mapping fine
whatever but if you go to another project
and it uses a different mapping and a different
naming scheme and it has
or if you are Google and you have like 250 million lines of code.
Or if you have 300,000 files in a single directory
or multiple directories,
you have to have a unique name for every module that you have.
And you can have one interface file
and then you can have as many implementation files
the same way as you can have one header file
and as many CPP files.
And this, this is an issue, I think, in, in that sense of,
sorry, a little bit of a brain fart there. You can, it's, it's hard, because to find this one module, you have to basically scan this entire directory. And if you scan it the first time, fine.
But then you have to constantly be re-scanning it
if anyone makes a change to a file.
And if you have a company like Google,
where they are making massive changes to these directories,
especially for their low-level libraries
where they're adding files or modifying files constantly,
that's going to cause a lot of churn.
And a lot of people say,
well, everyone has an ssd nowadays
that's not true at all um no it is it is not true i uh um you know i i have an ssd but i also work
in tech and this is also a thing that i see in general of people saying oh well you know if you
work in tech you have this but it's it's you know there are kids probably out there that are on 5400
rpm laptops that are hand-me-downs because they're in the Midwest or something like that.
There's people that don't have, you know, anything above DSL speeds in the Midwest, in the United States.
There are people in Eastern Europe, I'm sure, that have less that matters has this. I'm not saying it's classist, but it's making a statement that, well, these people are not as important.
What matters is the people that actually have jobs, not the people that are going to inherit the mindshare for C++.
Because in 20 years, I would argue that most of the people that are currently on the committee are not going to be on the committee anymore.
Either they will have retired, hopefully,
and even if they don't retire, they may die.
Death is a thing that people don't talk a lot about in software.
Dennis Ritchie died three years ago, I think.
That was a couple days ago.
That's a big deal.
Dennis Ritchie, one of the creators of C, does not exist on this plane of existence anymore.
Also, yeah, you know, he's the R in K&R, and he does not exist anymore as a human being.
And this is going to happen to all of these people.
And if you're just like, well, we'll cross that bridge when we come to it it's like we're starting
to get ready to cross that bridge by the time we cross that bridge we need to be able to look back
and see the people that are getting ready to cross the bridge and if they're not there then um you
know there's no point in continuing with it if that makes sense that it's kind of like morbid
the direction i'm going with this but um you know the the point i'm trying to make is that when you have brain drain, you end up with stuff where people are like, no one knows this unless you get on-the-job training.
And COBOL is in that situation.
And I would argue Fortran is going to be in that situation in maybe a couple years, maybe a decade.
There will be people that still use it.
Not experts. years maybe a decade um where there will be people that still use it but um you know so not experts not not experts or uh not people that are using modern fortran uh like fortran 2008 has like
classes and public and private functions and protected inheritance and all those modern
things and i still hear oh yeah i used fortran fortran 77 and you know like that's a completely different language than
fortran 2008 um even on twitter people were telling me yeah fortran modules are a nightmare
to work with um and that's not something that is that is fun to deal with and um like i haven't
even looked at it because like i what what purpose do i have to look at 4chan? I don't write in it. I don't use it. I don't get on-the-job training.
Ada, as a language, is dying.
There's one compiler you can use, really, and that's it.
These languages that are from the 70s are not being used anymore.
They've got Braindrain, and they're going to not die,
but they're going to become less important.
And if you want that for C++, great.
Stay on the committee and do nothing.
And do nothing.
The important thing is do nothing and be on the committee.
But if you want to avoid that,
you need to start thinking about, you know,
the kids and the young people that are getting into C++,
like Sarah Chip's Jewelbots, who she was on the show,
I think a couple months back, maybe.
Yep.
And that's a great project.
And I also got into a brief argument with Titus Winters,
actually, at CppCon, and he was like,
I've taught 18-year-olds, and they come in,
and they don't know what they're doing.
And it's like, well, that's because they're 18-year're 18 year olds like have you met an 18 year old i have i used to be one too
like but but an eight-year-old child does not does not think in the same way as an 18 year
old nerd i think in my opinion a lot easier to teach than um you know uh adult kids in college
they haven't been if you you'll pardon the phrase,
corrupted by the world around them as much.
And I think that that's like,
get them while they're young
is kind of like a weird phrase to say,
but the argument that we can't teach kids C++
or that it's hard to teach kids C++
and that it's an expert's language
is true because of the tooling,
which is something I discussed in my talk.
Because right now,
if I wanted to teach a friend how to program,
I would teach them Python
because they install Python,
they start writing Python,
and then if they need to use anyone else's library,
they just use pip.
That's it.
And with C++,
it's like a 17 and a half stage step and you have to
like sacrifice a goat and hope that it's like you know the uh four days from the summer equinox and
if it's not you have to you know find a patch for gcc so it compiles a new mac os like it's it's
completely random um and things can go wrong and if you don't know how a computer works and how c
works and how auto tools works and how C works and how
auto tools works and all these other build tools,
then you're going to be extremely miserable.
That was something Bjarne brought
up in his talk, wasn't it? How he wanted
to try to make C++ easier
for new users, right? Yeah, and
I absolutely agree with that. I actually wasn't there
for the talk because
I was with...
I'm absolutely going to destroy her name.
I'm so sorry, Nicole.
But Nicole Mercasa.
I don't know how to pronounce her last name either.
I mean, I was hanging out with her a lot
throughout the conference
and she told me several times,
but I'm an idiot.
So sorry, Nicole.
So, but I was showing her my early slides cause I had some,
some jokes that I wanted to run by her cause I had to talk about both systems,
which is extremely boring and I wanted to keep it light so that people would
laugh. Um, so I actually ended up missing that talk, but, um,
caught it on, on YouTube later while I was at the conference.
And yeah, absolutely.
Like if you want to make C++ easier for people,
then don't put the modules.ts in as it currently is, maybe.
Okay.
Just a little bit of an argument.
I'm winking for the people at home.
All right.
Since you can't see me.
So what do you think might be the best path forward?
I mean, are you hoping that it just kind of gets scrapped and rewritten or, you know, maybe it gets voted into the TS and they can still make changes from that point on?
It's not set in stone.
Right, right.
Until C++20 is voted.
Right, right.
But I feel like there's a push to try to get it in as soon as possible.
And if they get it in now, we've got, you know, two, three years to do it.
And we've already had two to three years to get to where we are right now.
I think it was announced in 2015, C++ 2015 maybe.
Maybe a little bit before that.
Somewhere around there but we're already dealing with
people were expecting C++
17 and they said no put it in
TS because we want to see more implementations
we're starting to see those implementations
and I don't feel comfortable with them
whereas coroutines and ranges I think
are going to be fine
a little less
damaging to the system.
But
my
best hope, honestly, would be
just make it work. Python
or Haskell or OCaml
even. I don't care. Just something.
It doesn't have to be the best module system,
but just tie it to a file system so people don't have to give a crap.
There are so many other languages that do this this it's worked out for them great for years
and it's 2017 guys let's just let's just admit that a file in the abstract machine is okay
like you know it doesn't have to exist in an embedded system but like i don't know if anyone that's actually trying to compile for an embedded
system um on on an embedded on an embedded system and you know i've heard of some people saying like
oh with uh you know the nice thing about cmake and bootstrapping is that i can compile it directly
on my like four megabyte you know at mega chip and i'm at mega chip and have my compiler run directly on it. I'm just like, why would you do that?
That's such a terrible idea.
Maybe
if C++ had the concept of the
abstract machine, which you target, and
the concept of a separate machine, which
was the host machine, I'd be okay
with that. But in
the end, it kind of goes back to the joke
that I had in the profile that you said
for me, which was rage against the abstract machine.
I'm just mad about the abstract machine
not having a concept of files.
But then also having a concept of files for
the file system header.
Right.
And I don't think having
a build system...
Like, if a build system knew,
okay, this is the general directory layout that we're going
to have, then I think that it would be a lot easier to implement build systems. We wouldn't
have to have, you know, processes running in the background constantly, turning on people's hard
drives that are, you know, running at 5,400 RPM in the year 2017, because they still exist.
I see them in the Bay Area area especially since i have a very large
swath of friends that have a very wide range of income and um it's this isn't this these aren't
arguments that i have against modules ts at this point it's mostly just a lot of like this does not
solve the problem for everyone this This is creating more problems for
people that are on the edges
of the C++ community
or are not yet in C++ community.
And they may hear, oh,
C++ has modules now. Like Python, this language
that I've been learning, or like Ruby, this language I've been
learning, or Node.js,
JavaScript I've been learning.
And then they come to it and they go, oh, this is not,
this is even more confusing. Like, I heard
C++ was hard, but I didn't know it was going to be this
hard. And that's going to scare them away.
And then they can go over to Rust, where modules
will work more or less the way that they expected them to.
And they do have problems
with their module system, which they've
admitted, and they're working on fixing them.
But at least they have a module system
that, you know, is directory-based or file-based in some way. have admitted and they're working on fixing them um but at least they have a module system that
you know is directory based or file based in some way and i like and part of that is connected to
their build system but um it's also part of the compiler where the compiler knows generally where
to look for dependent information and um i i don't know, I've got, as I said before, I have very strong opinions
about these things and, uh, they're probably not the right opinion, but, but it's what I believe
and it's what I hope would come to pass. But, um, I, I don't, I definitely don't want the way
the models are implemented right now at this moment. Okay. So, uh, I'm kind of curious at the beginning of the interview, you said that
you, uh, basically slept for two days straight after you gave your talk, which I'm sure was a
bit of an exaggeration. Me exaggerating. This is news to me. I've never, right. Never heard of it.
But I am curious, you said it was your first talk. And for the people listening who have not talked at conferences yet, would you say it was worth the effort and the strain and everything?
It was definitely worth it.
It was mostly just like I had a lot of adrenaline leading up to the talk.
And I hadn't actually slept much that morning.
And immediately afterwards, Mathieu R repair uh i absolutely murdered hit the
pronunciation of his name but he said don't worry about it because i don't speak french um yes
but he and i went and spoke for a little bit and i was like as the conversation continued my eyes
were just getting slowly closer to closing and and i was getting a little raspier with my voice
but
it was kind of like
it felt kind of like graduating
almost if that makes sense
there's a lot of excitement there
and then you're just done with it
and you're like yeah okay I could really take a nap right now
that'd be fantastic
relax for the first time in a couple of weeks
yeah yeah and I mean I drove up
from the Bay Area
to Bellevue so that was also like exhausting so I didn't actually have a lot of weeks yeah yeah and and i mean i i drove up from the bay area to uh to the
bellevue so that was also like exhausting so i didn't actually have a lot of time to work on my
slides leading up to uh to the talk although i had been working on them for the for the previous
like month and a half since i'd been confirmed for a talk um and most most of my time at the end
was just like trying out jokes that ended up not landing um and others did others did you
know but i was like trying to to field them to people and they were like that's not a funny joke
at all why would you why would you joke about that um but then the joke would kill in in the
talk and the ones that everyone's like oh that's a really funny joke i hope that really goes off
well for you end up completely bombing in the talk um this is why i don't try to give jokes
anymore in my talks i need to give a joke because it's a build system like if you're if you're there
to listen to build system talk for an hour like you're you're there because you're like i drank
too much last night and i'm here to uh like make it look like i'm attending a talk but i'm not
not awake.
So I haven't been able to watch your talk yet on YouTube.
What exactly did you talk about?
So the name of the talk was There Will Be Build Systems That Configure Your Milkshake. And I had tweeted out prior to the talk, hey, I'm giving a talk today in this room.
Come see it.
It's about why all build systems are garbage and um i also want to briefly state that um i
exaggerate a lot as you can tell from this entire podcast thus far and uh and also just if you read
my twitter ever you would know that i exaggerate a lot but um uh two two things i think happened
because of that one the developer of the Mason build system
did a quote retweet and said challenge accepted.
Which I was like,
well, that's what I get for opening my mouth
and putting my foot into it.
And the other was
I ended up putting a
fake quote
in the intro of my talk where I said,
all build systems are bad, and you can quote me on that.
And then it said, all systems are bad. you can quote me on that and then it said all systems are bad is he muerte 2017 cpp con um and i think some people took that
seriously and i hope that they don't because um as a trash goblin i enjoy garbage uh so so um like
it's it's kind of like um i i do not like the guy but linus torvald said years ago um you know
subversion supposed to be a better cvs and um and like you're starting from a bad a bad thing that
you can't polish um i'm paraphrasing here because i can't remember the exact quote but he said like
you need to start from something brand new sometimes when something is this bad.
And going from the auto-tool CMake approach to build systems and having a DSL and having macros and having a thing that cannot be debugged in this year that we live in, the 21st century, I think is an absolute mistake.
And continuing to go down that path is asking for trouble.
And having a build system that you can't debug is also a problem.
And so, you know, you have GM from Google,
you have CMake, Bazel, Buck,
Premake, WAF, Scones, and Build 2 is
written in C++ and also with its own like make file style
implementation.
So you can technically debug it.
Um,
okay.
Um,
but it's DSL that it has to declare things I am against personally.
I think,
I think,
I think these things should be automatically configurable.
Um,
you know,
Python has a general concept of like,
this is where you place your directories and then you can override that settings file.
Um, but all of these still work off of directives.
Um, and I'm, I'm a fan of data over directives.
You know, you should be listing this stuff out.
Um, if you've ever written a CMake file, I'm sure you've written a, you know, set name
of project underscore sources, and then you just list a bunch of files out.
Then you say add target, you know, or add executable,
name of executable, those files, or add library, whatever.
And it's like, why does that need to be function calls?
Why can't that just be, like, a JSON list,
or a Toml list, or YAML even?
I mean, actually, no.
Let me take that back.
Never use YAML.
YAML's great.
YAML's great if you're okay with weird intricacies with its parsing,
like forgetting to put a space between a colon for the key and its value,
or putting a space between the key and the colon and then having an error
and be like, I don't understand why this is broken.
Why doesn't this work?
It's supposed to be a JSON subset, and it's not.
Right. That's a whole other can of worms. But I kind of agree with the Rust community when
they say Toml is the least terrible. And I say, yes, it absolutely is. And like, I don't see why
I couldn't just say, okay, this is my library. It's going to be called this. And here are the
source files and here are the include files.
And you can find those because they're in guaranteed directory lookups
and go from there.
And not having a directive-based build system
means that you can then move to another build system
because if that build system uses data over directives,
then that data must be serializable in some format,
which means that something else can write a parser for it.
And then we don't end up with these walled gardens
where, like, right now, if you use CMake,
moving to Mison is you run a script
that Mison's developer wrote,
and it kind of, like, parses it,
and it kind of creates a Mison file,
but you still have to do a bunch of work
to make sure it actually works the same way under Mison.
And, you know, auto tools, forget about meson and um you know auto tools forget
about it like moving from auto tools to something else
is like okay i have to read a bunch of m4
macros and try to hope that i can
recreate this one for one and if i screw up
like we probably won't find out for a while
and you're just
it's you know like
um there was someone on the something
awful forums a while back that had actually started
a project where
it was a python back that had actually started a project where
it was a Python script that could parse
AutoTools projects,
and they were able to get, I think,
like 85% of all the GNU projects
to work with it.
And it would just read the AutoTools thing
and then spit out a readable,
workable CMake lists file for it.
And those last 15% were like GCC and bash,
like,
you know,
the oldest tools that they've got,
that sort of a thing.
Um,
oh,
and Ed,
Ed did not work either for some reason,
but you know,
what are you going to do?
Um,
I don't know if I've ever actually used to add it's,
it's the best editor apparently.
Hmm.
Okay.
Uh,
it's,
it's not.
But yeah, it's
the build system I think could be solved.
Actually, Nicole and I did start to
discuss
a prototype because she was working on
something kind of like Rust's Cargo
for C++ and
i had started to work on one like this last year um after cppcon 2016 which informed a lot of a lot
of my talk i had a um i think it was uh the amount of notes i had was somewhere in the range of like
200 000 like words or something like that and that's that's what informed the talk that I gave.
A lot of it was bullshit.
Oh, sorry.
A lot of it was... A lot of it was not good.
And I ended up not making it into the talk
because I was thinking about it later.
And I was like, no, that's not true.
Or that's incorrect.
But the data over directives thing is definitely a really big thing.
And then there's also the other thing of in my talk, I had a comment that I can – actually, I have it here.
I could read it to you if you would like. Sure.
So let me just pull it up real quick here. So the
when I, when I gave like a mini encore talk to Bryce Lobach and a couple other
people,
that's right. This is what I got for. Okay. so when i gave this talk uh again a second time in
the lobby um i had some people ask me so did you source this from actual comments that have been
made on the c++ subreddit um because it sounds a lot like something that you might see because
i've seen people say hey i wrote a new build system and then they posted the c++ subreddit
and it's like you have flown too close to the sun, Chris.
You've already made a mistake.
Like, you are in deep, and you don't even know.
But the first part of this is pretty much like things that I saw,
especially with the Mason build system.
And it says things like,
it doesn't support my current project layout.
I won't use it unless it does.
Why is it written in this language?
Why isn't it written in this other language that I prefer?
Seems like a waste of an opportunity to get more people to work on it,
i.e. the person who's making this comment.
There doesn't seem to be more than one developer working on it either.
This tool is bad and you should feel bad.
You can't beat CMake.
You should just give up now.
9.11 was an inside job.
That sort of a thing.
So that's, yeah. That's sort of a thing. So that's... And that is
in my talk. I do say 9-11 was an
inside job as part of the comment.
Definitely
got some sweet jokes
out of that talk.
But
yeah,
there's a lot of things that
our bill systems could do for us,
and they don't.
Because in the 1990s or the 2000s,
it was like, oh, this is a more important problem
to deal with.
People were more worried about stuff like ccache or diskcc.
There's also things like scons,
refusing to use timestamps by default,
because, well, what if someone wants to touch on your entire build directory?
And to which, by the way, the response should be,
if someone is doing that, you have bigger problems
than the fact that your timestamps are out of date.
You know, like your build system might have been compromised at that point,
and you need to do a security audit, I think, at that point.
And also things like containers didn't exist, really.
You know, it was mostly like you had chroot jails
and a variety of other things,
but nothing was really concrete.
A lot of people didn't want to put the work in
to understand Windows.
Microsoft didn't want to put in the work
for people to understand Windows I would argue I mean like
a lot has changed and
like
as proof for instance I've
you know I'm 28 right now I've used Vim for
14 years of my life literally half of my life
has been as a Vim user and
I'm starting to switch over to VS Code
for my daily driver because it's just much better than Vim,
which is a terrible, terrible thing to say,
but at the same time, the people that have been giving me,
you know, like, guff about it have been Emacs users.
And I'm like, really?
You're going to tell me about a slow-blooded editor?
Really?
All right.
So, Ben Dean
in particular. And yes, Ben, I know that
Emacs isn't an editor, it's an operating system.
Yes.
But if I wanted to run
a virtual box instance
so I could run Emacs,
I would, but I can just run VS Code
instead.
So,
it sounds like it's in early stages but um
where could people find information about this build so nowhere absolutely nowhere nope nope i
i do not want people to see this until it is at least 50 c++ because we are writing it in python
to start off with because there's no well there's no ecosystem for c++ right and it's like part of
my talk was you should be able to run a command and get all your dependencies that you can get
um and and that's what you get in the other languages and that's what you can do in rust and
actually like i i had a brief like three-day depressive period where i was just like unable
to write code because i had spent three hours learning Rust. Those first two
hours were just running through their tutorials.
That last hour was implementing
a Twitch chat client
for the Twitch TV website.
I had implemented that in an hour
because inside of an hour, I had downloaded
an
equivalent request library, an HTTP
library, an OAuth library,
and I was able to focus on the actual problem rather than having to wrangle dependencies.
The most I had to do was go to their website, search for, you know, HTTP requests,
and then get that library and download it.
And then like doing JSON serialization was adding a attribute to a type.
And it's very depressing how far ahead the rust tooling is uh it's also hilarious
to me because sometimes i will see in this in the rust uh subreddit comments like yeah we're kind
of behind the c++ tooling ecosystem and i'm just like what ecosystem are you looking at are you
from another timeline are you from another like planet like where What tools are you talking about? Because it is a desecrated battlefield
filled with just the limbs of build system developers
and dependent acycle graphs
that have been broken in some way.
And it's just...
I was physically depressed
and just stood up, walked away from my computer,
and did not do work for
three days because i just could not at all i was like i just did more work in three hours
than i could do in c++ in two weeks and that is messed up to me because c++ isn't hard to use i
don't have a college degree.
I'm not good at computer science.
I know what a dependent acycle graph is because I taught myself how to program
but I didn't build a system, and that's it.
Because you need to know what a DAG is.
Again, I'm going to make the pun again.
I'm sorry.
So you can DA dag on the haters.
And it's
just depressing
that we don't have something like that,
even just for the basic case for C++.
Like, yes, a large enough
company that is like, sorry, this
build system that you wrote isn't good enough for us?
Great. Best thing about C++ is that
you don't have to use it.
But I think that stuff like,
um,
the beast boost beast,
uh,
uh,
web server,
majority of the boost,
uh,
tools,
um,
stuff like what Victoria Romeo writes,
what,
uh,
Louis,
the own rights,
um,
what I write,
that stuff could very easily be like,
Oh yeah,
it's up on you know
this this uh package manager thing and um you know conan is not a good package manager for that and
i'm i feel bad saying this out loud because uh you know like i've been in contact with Diego since it was B code. Uh, he's, he's one of the founders of, of, uh,
Conan. And, um, the, the issue that I have with it kind of goes into part of my talk, which was
like, if I'm writing the language, I shouldn't have to learn any other language when I'm writing
that. And if I want to write C plus plus, and I want to do cross platform C plus plus, um,
I have to learn C make, rightake. I can't just write C++
and not have my build system
and not understand
what that is and how that works and whatnot.
I have to know the build system's
language, be that a makefile syntax
or
a
Python script or CMake.
CMake is going to be probably the one that people go with
and I have to learn this language that is like Tickle, but worse.
Even though it now comes with Tickle as a dependency
because of CTest and CDash.
And it's disappointing.
And then with Conan, my issue is that it's written in Python.
And so now you have to know C++,
you have to know CMake, and you have to
know Python. And
you have to know how their particular
instance of Python
and their Python API interacts with
CMake.
And that is
like, I feel like
at some point someone's going to be like,
well, actually, we've already seen it.
There's some people that are like,
here's a Python script
that can generate a CMake file for you.
And so now we have meta-meta build systems.
And at some point,
someone's going to be like,
well, the Python for this
is actually kind of tedious.
So here's another thing
that I wrote in C++
to generate Python
that generates CMake
so we can compile our C++.
And at that point,
someone's going to probably
want to raise their hand
and be like, wait,
can we just slow down for a moment?
Because we're going way out of control here.
And someone's going to say, no, we can't do that.
Because you need to focus on what's important, which is running code.
But, you know, our build system is getting in the way of doing that.
And like for instance, as part of my talk, are either of you familiar with the Juicero startup in San Francisco by chance?
Oh, I've heard of it.
Okay.
So the Juicero startup, for the people that don't know, is a company that created a juicer that squeezes packets of juice.
Yeah.
Okay.
Yes.
It squeezes packets of juice and they raised $400 million in funding. And then they went bankrupt because people were like,
wait, it's easier if I just buy the packets of juice
than I just squeeze it myself with my hands
because why would you need a machine to do that for you?
And then on top of that, the Juicero company started to call people
that would hack these juice bags jackers for a portmanteau of juice hacker.
And apparently their CEO went to Burning Man,
like depressed.
And he was like,
I'm here for inspiration.
And then as he left,
he,
he got an interview with tech crunch.
He was like,
I've got my next idea.
It's going to be like Juicero,
but better.
Are you ready for it?
Raw water.
And this is a real thing.
That's,
that's a real thing by the
way but 400 million dollars in funding like imagine if i had gone to making a good build system
like i wouldn't if if 400 million dollars went towards making a good build system i would not
be raising hell about modules because it would be it would be a solved problem because we have
400 million dollars to make a build system that could just deal with the problem. But that's money that's going towards
a juicer
that squeezes packets.
Well,
I think it'd be great to have you on again
if in a couple months you have something
to share with the build system.
But where can listeners go and find you online?
They can find me on Twitter at slurpsmadrips
and that's all together with no underscores.
And my GitHub is slurpsmadrips with two hyphens
in between slurpsmad and madrips.
Okay.
And there's also a story behind that handle as well.
So if anyone ever wants me to explain,
I'm more than willing to.
Okay.
Okay, well, it's been great having you on today, Izzy.
Yeah, thanks so much.
Yeah, thanks for joining us. Yeah, thankzy. Thanks so much. Thanks for joining us.
Thank you.
Thanks so much for listening in as we chat about C++.
I'd love to hear what you think of the podcast.
Please let me know if we're discussing the stuff you're interested in.
Or if you have a suggestion for a topic, I'd love to hear about that too.
You can email all your thoughts to feedback at cppcast.com.
I'd also appreciate if you like CppCast on Facebook and follow CppCast on Twitter.
You can also follow me at Rob W. Irving and Jason at Leftkiss on Twitter. And of course,
you can find all that info and the show notes on the podcast website at cppcast.com.
Theme music for this episode is provided by podcastthemes.com.