Episode 377 of CppCast with guest Patrick Quest recorded 16th February 2024. This episode is sponsored by Sona, the home of Clean Coat. Music In this episode, we talk about package managers, the Lakers rule, and about an interesting C++ interview question. Then we are joined by Patrick Quest. Patrick talks to us about how Compiler Explorer works under the hood. Welcome to Episode 377 of CppCast, the first podcast for C++ developers by C++ developers.
I'm your host Timur Doumler, joined by my co-host Phil Nash. Phil, how are you doing today? All right, Timur, how are you doing? Yeah, I'm not too bad. Thanks. There's some kind of talking about the weather against some kind of snowstorm coming up here in Finland, but right now it still looks fine. So let's see how it goes, but I'm in mentide, so I should be fine. How are you? Storm in Finland, you see.
Right. How are you doing? Yeah, well, actually, I'm going to go into borough listeners, but I'm still a bit under the weather myself, but I think my voice is a bit better this week, just a bit of a coughing and sneezing. So we'll hopefully that will get better soon. Are you any, have any travel plans, any exciting travel plans in the near future? Not for a while, actually. I managed to keep the start of this year fairly free. I think my first travel would be ACCU. I'll be there. I'll be there.
Yeah, I sure see you there. Amazing. Yeah, that's going to be fun. I hope to see if you have a listeners there as well. Yes, yes, it should be fun. Yeah. Yeah, so I'm actually leaving soon to London. I'm going to fly there in a couple weeks,
so I hopefully see you there. And from there, I'm flying to Tokyo, actually. So for the committee meeting, for the CSOS committee meeting, and we decided to kind of make it a family holiday and just go there together and like arrive like two weeks earlier and, kind of just enjoy Japan for a little bit. Right. We'll enjoy. Thank you. Thank you. Thank you.
So let's see how it's going to go with like recording the next couple episodes, because I'm going to be on the road, basically, for all of March. Yeah. But we'll figure it out, right? Yeah. Well, we'll fix it in post. All right. So at the top of every episode, we'd like to read a piece of feedback this time. It's not a reading a piece of piece of feedback. I'm going to pass on with a fill who has like a little bit of meta feedback, I guess.
Yeah. Well, we didn't have any feedback specifically about the last show, but I was looking back and I noticed that on Reddit, because every show is posted on Reddit, that the previous episode about reflection with David Benderboard, that's had the highest number of comments on Reddit. Certainly since we took over the show, I think we had to go back a couple of years to see any bigger discussion. So it was a little bit outsized.
It was interesting, not quite sure why that took off quite so much. We usually have a handful of comments there. So keep the feedback coming, but if there's no feedback, that's not necessarily a bad thing either. All right. So we'd like to hear thoughts about the show. You can always reach out to us on xmastodonlinkedin or email us at feedback at tbbcast.com. Joining us today is Patrick
Quist. Patrick is a Dutch software developer who primarily has worked with Delphi, but Davels and C++ and other languages and works as a developer and admin for Compilax Blura. Patrick, welcome to the show. Hello, thanks. I'm glad to be here. Now what we're talking most about C++ here, but your bio does mention that you mostly
worked with Delphi. I hadn't actually realized we're still in active development. I should check the Wikipedia page and there's been some quite big releases over even racing years. So you're still actively working with Delphi? I am. Yes. I worked since school, I guess, since my internships with Delphi and I'm enjoying it a lot. And I'm especially glad that it's been improving language wise and getting more feature, language features instead of
just libraries and other things. Yeah, I know back in the day, it was very popular, at least until.net came along doing a lot of the same sort of thing. So it's still a good environment to work in. Well, the IDE is always complicated, but because it really centers around that concept that the IDE solves a lot of problems for you, but also causes a lot of headaches. But yeah, the language is still fine. Good to you.
All right, Patrick, so we'll get more into your work in just a few minutes, but first we have a couple of news articles to talk about. So feel free to comment on any of these. This time there wasn't actually quite as much going on in the world of C++ from what I could tell as there is other times. However, there were a few blog posts that caught my attention. The first one was by Christopher MacArthur called C++ Package Manager, the
ultimate roundup, which I thought was an intriguing title. There was a Reddit post about this blog post, which had another title for it, which says, how deep is dependency hell? I thought that wasn't a good title as well. But anyway, so it is a blog post about all the different package managers that are around. And I certainly learned something there because I was only aware about the two ones. VC Package and Conan, which this blog post does discuss in
quite in some detail. But it also mentions so many lesser known ones like X-Repolves, back Hunter, Buccarus, CPM. I've never heard of what any of these. I don't know if Patrick Phil, if you've ever heard of what any of these heard of some of them, but no familiarity with how they work. And so it says, well, there's a relationship
between Package Managers and build systems. So there's also a roundup of build systems that talks about me, Zon and Basil and built two and Skons and Tipeee build and Pixie and Mumba and Graidel and Condah and Nick's or S and all kinds of things that I've never heard about. So I thought that was very, very interesting, broadened my horizon a little bit of what are the tools out there floating around in dependency hell. It also mentions
C-Makes fetch content as like a kind of Package Manager E kind of thing. So yeah, I thought it was kind of very interesting overview, which kind of certainly I opening in a sense of there's actually a lot more tools out there that people are using actually than I knew. So that was quite interesting. But how to choose one? That's the question.
Well, finally enough, the very end of the post says, ultimately, the best way to choose a C++ Package Manager is to try out a few different options and see which one you like the best, which sounds sensible advice. But I think we put that in the context of most projects don't use any sort of good management, then just going to something is like to be a big step up. So don't encourage people to try something. Right. So we had another blog post that I thought was interesting by Mira Palmo called
demystifying the lake whose rule via visualization and how could it relate to const expert. So I thought that was really cool. Like the lake whose rule obviously is a design guideline for library APIs. It's been around for a while. But like I was like, how can you visualize that? That's not interesting. And like, how does it, what does it have to do with const expert? That sounds even more interesting. And so it's an interesting take on the topic.
And when you say, obviously, in there, but I don't think we've talked about the lake course rolling in depth for a while. Do you want to give a very quick sketch of what it is? So the idea is that if you have a function that you know is not going to throw an exception, a lot of people put no accept on that. It turns out that if that function has
a narrow contract, and by that we mean the function has a precondition. And if you divide it the precondition, you hit UB, things like vector operate as square bracket, it's UB to call it out of bounds within index out of bounds or vector front. It's UB to call that on an empty vector. Like it doesn't check that you're doing the right thing. It's just crashes if you do. So things like that, if you have a function like that, you don't
put no accept on it, even even if it never throws an exception. And the reason for that is that you want to, I mean, one of the reasons for that is that you want to be able to test. If you have an assert in there that actually then checks the precondition in debug mode, for example, you want to be able to write a test that that assert is actually being hit. And then you have that bounce check in there. And the only kind of scalable, portable way
of doing this that I know of is to throw an exception. So you want to say that, you know, this thing doesn't throw an exception when you call it correctly, but it might throw an exception if you call it the wrong way because it's UB, anything could happen, right, including, including throwing an exception. So that's a good way of testing it or maybe
recovering from an error in systems where you can't just terminate. And so by just springing no accept all over your code, you'd kind of just completely disabling that approach. And so, yeah, the guideline, the lake of rule says don't do that. Don't put no accept on functions that, you know, might, might have preconditions. Now, I have my own thoughts on this that maybe we'll dig into another time. Don't want
to be realist right now. But it's important that you say that was the only scalable solution that you know of to these two exceptions because you're pretty much quoted as saying as much in the post as a reference to your CPB con talk last year. Oh, am I quoted in there? I haven't actually read the whole thing. I kind of skimmed it. I thought that was interesting, but I didn't actually read the entire thing. So that's
interesting. So they say in there and they're that I'm wrong about everything. No. Right. So no, the blog post is kind of cool because like it visualizes this idea of having a wide contract where you accept all the input and having a narrow contract where there's certain input, which is just not valid for your function. So and that they kind of visualized it with like vent diagrams and stuff like that. And I thought it was a
very nice way to explain it, which I've never seen before. So yeah, I did read it, but I didn't understand anything about it. But when you just explained it, I got a lot more and that was the start of the post actually started with a lot of people explain this with an example, but I went to explain it in a 3D abstract way. But I'm apparently one of those people that learns by example and gets a lot more out of that.
Right. So the other bit on that blog post was that it somehow relates to const expert, which I have never kind of considered that with const expert, you can kind of also see as a contract, right? So you can call this thing. It is either valid or not valid to call this like at compile time or not at compile time. And it's kind of similar. It's not
quite the same thing, but yeah, I thought that was that was interesting. Yeah. Okay. And so the last blog post that I want to mention is a huge blog post by Cybrand, who is a developer advocate at Microsoft and is usually covering like all the seedless tools that Microsoft does, like Visual Studio, VSCode, VC package. And this blog post is called a year of seedless development in Visual Studio, VSCode and VC package. And so I stumbled upon
it because he wrote on Twitter. I wrote a massive blog post containing many of the things as a staff team at Microsoft work on last year. And so yeah, I had a look at that. And it's really a lot of stuff they have done some quite amazing work over the last year. There were some areas that they were focusing on things like ARM64 support, like Unreal Engine support, code safety, cross-platform development, but there's just a lot more.
And we kind of covered bits and pieces of it, I think, over the last year, but it was kind of nice to see, okay, this is all the stuff that they have done for developers, kind of or for super-strust developers, but specifically like over the last year. And it's kind of a bit very impressive how far they've got. Yeah. You went exaggerating when you said it
was a huge blog post. So one of the biggest of this type, both I've seen. And having worked on similar posts myself, and I think you have as well, Tim, I know just how much work goes into that. Just putting the blog post together. The actual work done on the features themselves over the year. So yeah, very impressive. Yeah, I thought that blog post always took me forever, you know, when I was doing this developer advocate thing. I think it has to do with the fact that English is just not
my first language. So even though my English is okay, but like just writing in English just takes like three times as much time as writing in my native language. So. Not just you. All right. So now great blog post. If you're into Microsoft's developer tools, you should check it out. So you're up to date on what their tools can do for you. And so the last, the very last thing that I want to mention in the new section is a thing on a Reddit that
I stumbled upon. And it's something that I think is, you don't cover this type of thing very often here, but I think when I do see it, I find it quite interesting. So somebody, somebody was interviewing for a senior position at Nvidia and got rejected basically, but then they said, here was this one one question that I couldn't answer. And you know, that might have
something to do with the fact that, you know, I failed to interview. And so the question that they couldn't answer that the posts that on Reddit was, what can be done to remove binary code bloat that occurs when you have too many different types, instantiations of a template function? And then, and then the person was like, where do you even learn the stuff? Like, like, what? Like, and then obviously there was like a long discussion on Reddit. And yeah, I thought that was
quite interesting. I think most of the comments converged on the solution of, you know, factoring out the parts that are not dependent on template parameters into base classes or external functions, which is pretty much what I would do as well. But I'd like to throw a one person summarize all about which is, well, did you try not using templates where you don't need them? So, so with this kind of thing, obviously when you read like the answer, you're like, oh, this
is obvious. That's what, you know, everybody should be doing. That's what I'm doing in my code, of course, because I'm writing good code, right? But like, I'm not sure I would have answered that question when asked that in an interview setting correctly. So it's kind of, yeah, me neither. Yeah, I'm not sure I would have done that. So yeah, that's kind of interesting to see these types of things being discussed. And now you can pass an interview for an interview.
I'm sure they've seen the takes. I'm sure that's not all it takes. And I'm also sure that they've seen this red like blogged by post post by now because it generated quite a few replies. So I see if that code size goes down. Right, right. So this covers the news items for this episode. And so our main topic for today is actually continuing our series of tools related episodes, which we started a while ago and then kind of for a while didn't have any episodes.
I think it's another green topic to come back to from time to time anyway. So we had one on Conan. We had one on C Lion. I think we had a couple more. And then so today, we're going to talk about Compile Explorer and our friend Matt who's been here on the show. A few times is obviously a great person to talk to, but we thought, hey,
you know, actually Matt is not the only person working on Compile Explorer. So it would be really cool to hear about how it works and where it is now and how it's being maintained and what you can do with it kind of from somebody else's perspective. And so we invited Patrick on the show today. And thank you again so much for joining us. Today we're very, very excited to have you here. Yeah, I'm glad to hear. I have to talk about anything you want to talk about concerning
our product Explorer. Thank you. So I don't think our paths have really crossed on the past, but I think over the years I always saw like your tweets in my kind of Twitter feed. And there was quite a lot of good stuff in there. So oh, my random tweets. You know, I just want to thank you again for for that. So I did appreciate that. I was like, how maybe, maybe this is like this person, like they write a lot of interesting stuff with us. Maybe they were all paths will cross one day.
And so now they have. So that's that's kind of cool. Yeah. Yeah. Yeah. Well, I think we, well, I did see you at see Sunsea last year, I think that you didn't see me. I guess. I think I wasn't there very long. I think it was kind of a bit about the hectic conference. I had to like come late and leave early and didn't have much time to talk to anybody, which was a bit of a shame. This is how it goes sometimes. Well, before we get started, we should probably just
verify what compiler Explorer is because I know 99% of our listeners are familiar with it. But maybe there's always one or two that have been living under a rock and don't know. Or maybe you don't know that compiler explorer is the official name for what you probably think of as just God. Well, so the website you go to where you can just put C++ code in, see what it compiles down to.
And that's the basic idea. And the original premise was that you could, you could see the generated code and tie that back up to the top level code and the original C++ and experiment and see what optimizations occur and that sort of thing and verify your assumptions. It's grown to be a lot more than that as we're going to probably talk about a bit more during this show. But I still a primary use case, I think. So yeah, if you've ever used Godbolt.org or compiler explorer.com,
that's what we're talking about. Right. So it started out, I think, as a kind of a pet project of map GodBolt. So GodBolt is actually a person. And ever. Yes. And the verb, I guess, you can GodBolt something, right? Okay. So, but I found out recently that Manus actually not the only person working on compiler explorer or not no longer the only person working on compiler explorer. So, so Patrick, so how did you get involved in compiler explorer and what do you do there?
Well, I've been a, what would maybe a long story, maybe short story. I can shorten it. Oh, yeah. Time. Don't worry. Okay. Well, I've always been interested in NCB++ really. I've never been a fan of C or other languages. Of course, I've written, go didn't like other languages. I started in in basic, a lot of basic and the best cow. I did some, yeah, a lot of Java in the in school.
But but also C++ and C++ just somehow, yeah, was really interesting to me. And even though I've started working in with with mostly Delphi, I did follow this sort of the scene and especially with the with internet coming up and it was easier to follow what's going on in that industry. And then I saw at one point, of course, a CPP, a CPP, a YouTube video. And there's a surprising a lot of sort of a certain websites that they were using. And then I also saw
a math talk about it in one of his earlier videos. And then I got really interesting like maybe I can see if we can get Delphi or Pascal into that website. And that was basically my first P, P, and it's really because they were really inviting and friendly about my progress even though it was a love code, probably bad codes, but it improved over the time. And yeah, it got merged. And then I started to do more stuff. And now we're here. I wonder if your large pull request worked in your
favor. You know, that old story that if you have a code review, the free lines of code, you spend hours just discussing and pulling apart. Yeah. You give like free pages of code and someone say, yeah, that's fine. Yeah, baby, baby, yes. No, but I did get some feedback and I did, of course, improve. But it was, it was set in a nice way that I can actually do something about it. And there wasn't really a complicated discussion, but well, this is not how we work. And
you should do it solve it some other way or something. They were really glad to get any improvement at all. And I think that's really how you work nowadays still. Great. So other people can get involved as well. Yeah, exactly. So, so is it like an open source project and that people doing there, that people work on in their free time? Or is it like a team around it now? Like, how many people work on this? Well, first of all, it's very open source. Like everything,
well, almost everything is open source. Even our infrastructure is in a real repository as code using Terraform. And we published that information to AWS, where our all our instances and services are running. And then the website, of course, itself, that can just, you can just run it locally on your PC as well instead of having to use the website. Just very useful. Yeah. Sorry, what I can run, I can run Compile Explorer locally. Yes.
I could just plan the repository and run make. And what happens then? By default, it uses your your system compilers. So if you're running Ubuntu and you have GC installed the normal way, like fire, baggage, then it will just use that. Wow. That is kind of mind blowing. I had no idea you could do that. Guess you did. No, I didn't. I didn't.
That's really cool. I've had that's the thing with with Compile Explorer. Everyone's familiar with but most people don't know all of the little things you can do with it or some of these facts, like it's open sourced and you can run it on your own machine. So that's one of the reasons that we want to serve this or these in this episode. Do you have any idea, just just random question? Do you have any idea like how Compile Explorer is funded? Because I guess it takes a lot of money
to run these AWS instances. And I guess people who work on it kind of do it in every time, but at least the service probably costs a lot of money. So how does that work? Is that like, it does cost a lot of money, especially the amount of people that use it. We have to scale up
quite a bit and we're using quite a lot of storage and compute. So I think what's half half we have sponsors, so Matt's suspense of this time trying to get sponsors to interest it's not too many at the time, but at least decent amounts and then there is a Patreon in which people can donate. And if you do contribute to that Patreon, you'll get a figure so weekly newsletter from Matt just talking about what has been working on that week or
what the team's been working on. Yeah, it is really insightful including things like, how much it costs to run all these servers and how they're doing. He's really transparent about it. So I do recommend signing up for the Patreon, helping out and getting some useful information. Yeah, I mean, I'm very curious, for example, probably there's data about how many people use KapalExpo or like, Poday or something. That would be a really interesting number.
I think, well, there's like is public stats page that we have had stats.com. parlor-export.com. All right. And it displays the at least four weeks. It displays the compilations and currently it's a three million four seabed plus for this week. Three million compilations or people or a well compilations. We don't, I'm not sure if we really know the people that are using it. Okay, okay. I actually opened this this website now and yes,
there's a lot of stats here. And yes, there's three, quite three million seabed plus plus compilations in the last week. 600,000 seacompilations. 180,000 rust compilations. Yeah. There's people using these. What is this? Cuda, there's Pascal, 10,000 compilations per week. There's D, there's Aida. Wow. And there's carbon. Yeah, there's quite a lot of stuff going on there. That is quite fascinating. We have a lot of languages. Yeah, yeah, yeah, yeah. We get new languages. So I think we get a new
language every month. Not just because that's interesting because people like creating languages and just why not publish it to comply or explore it. 63 languages apparently. Yeah. 2666 compilations. That's like just for that for one of our Met Spectrum posts. But about two thirds of it is actually Cephas Plus. That's also interesting. That's like by far the most dominant language. Yeah. Right. Right. Right. Well, that's interesting.
So another thing that a lot of people don't know about Piler Explorer is it's not just the compilers. There's also extra libraries that you can bring in and other tools you can run against the code. And we're not just saying this because I've got horses in both those races. There's a same I plug in that you can run and you can also compile against catch two with plenty more libraries. And tools there as well, which is really useful just to be able to drop in and try this things out
without any setup at all against the whole range of compilers. Is that something that you've worked on at all? I did. I did. Basically the first, well, the fifth PR that I made was about tools. Right. And adding them to both after the effect of the compilation or on your codes. So there's I think the first two tools were let's see. Oh yeah. The first two tools were PA hole. And it's really weird time. But the PA hole. I'm going to ask you in a minute what that is. So that's
and Helen's VM MC8. So I love you. I'm MCA. I heard about it. It kind of tells you kind of roughly speaking how long like an instruction takes to execute something like that. Yeah. But what's what's PA hole. I have never heard about that. That's an intriguing name. Yeah. It's it's a tool to that investigate your binary that you produce either an executable or
what are just from the from the from your code. That's inspects like classes and structures or in other languages records or whatever whatever data structure you have. And see if the alignments are okay or acceptable in your case. But it will show like if there's gaps in between certain data types. And if it's perhaps better to reorder them for better alignments and caching and yeah. Yeah. Because for example, if you're doing like low latency stuff
I guess you want your objects to be aligned on like cash lines and things like that. I guess that helps with finding problems with things like that. That's very interesting. I should check this out. Vining so much today. This is great. But over the time, of course, yeah, there's now lots more love more tools. Is it tricky getting all the tools to work with so many different compilers because obviously all of them are going to work together. How do you handle that sort of
compatibility issue? That's a good question. I think at the start we really tried hard to anticipate that. And so you as a tool, it's always code. So you always have to write code in the website. And then it calls the tool. And in that code class that you have to create, you really you get all the compilation information. So even the compiler arguments that are passed to the compiler itself so that if you're reducing the tool like clankray or clank tidy,
that's to also get can get those compiler arguments. But of course, yeah, some tools don't really work with certain languages or certain binaries or certain compilers. So well, then we have to exclude them from being used, being able to use them. Because I really don't really want to get in a situation where people are complaining like, well, it doesn't work here. There's a weird error or something. So we really try to test them. And if it doesn't work, we just disable them in that case.
Trans-reasonable. Nice. You're mentioning clank query there. That's really useful if you happen to be working on static analysis tools. Don't ask me how I know. There's also a really good case for running a version locally because at so now we have our own instance that has some of our own rules into or some of our matches in clank query. So we can we can see them actually working as part of the output. But probably not so interesting to most people. So.
No, but they're also tools. Well, yeah, yeah, that's true. But it's really useful for compiler writers as well. And that's also really a type of user that uses the website a lot, I think. Not just because of the compiler, the buck reports that they get with the compiler explorer links. But also because it's, oh, useful to compare all the different compiler versions to what it was and what it's now and how did the compiler interpret that code. And you can do it with clank
tidy, for example. Right. What we're talking about static analysis is I've brought it up there. That's probably a good time to do our sponsor break because this week we are once again sponsored by sonar, the home of clean code. And sonar lint is a free plugin for your IDE, helps you to find and fix bugs and security issues for the moment you start writing code.
But you can also add sonar cube or sonar cloud to extend your cicd pipeline and enable your whole team to live a clean code consistently and efficiently on every check in or pull request. Sonar cloud is completely free for open source projects and integrates with all of the cloud devops platforms. And it's one tool that's not actually in that list that we don't normally talk about because it's basically written exclusively for compiler explorer. It's just another
packaging for our analyzers. So when you use the sonar tool there, it's like a something between sonar lint and what runs as part of sonar cube or sonar cloud. So an interesting little behind the scenes tip bit there. So back to the episode. All right, thank you Phil. So we do this thing sometimes where like in the second half of the episode, you kind of dive a bit deeper. So let's do that. So I was actually this morning listening
to the first episode of cccast where compiler explorer was discussed. It was actually called gcc explorer back then that was eight years ago where map was on the show. It was one of the really early episodes with Robin Jason like episode 40 something. And so that was really fascinating because like at the time like it was kind of very new and Matt was saying, oh yeah, I kind of
just put this thing together and so he described how how this works. He was saying, yeah, I basically have an instance on Amazon like AWS, I guess, which at the time was just one one computer. And he was saying, okay, so I have to start one instance and then I kind of just have these
Docker containers running there with like all the compilers. And then I have this little bit of JavaScript, which is like does all the coloring and stuff and and and like kind of like I do this and this and this and this and there's a bit of caching server side and and that's pretty much it. So I was wondering whether that is still what it is or how does it work nowadays? Like what has what has changed in the last eight years? Well compared to death a lot.
Like it's it's it's it's really grown a lot not just in well definitely instances. So if it was just one instance then then it's yeah. We yeah because we're serving a lot of compilations and the website is quite popular I guess. And I think a lot of people use it in there not just yeah in definitely in their work time and for the job so to see what's going on. And we're well currently we're running 11 instances that's this is European time. So America has really waking up yet I think
well almost and it can grow to maybe 16 or something. And it really quiet the acquired days it's still six instances at a time and that's just the Linux instances for our normal GCC's and Glenn. We also now have two GPU instances where you can run CUDA codes that can run on the actual GPU and we have to run two because they're really expensive and a lot of people are using those CPU instances for very different way reasons than that we use them.
And they're always in use. So we we have to have to to have some kind of consistent performance that if one falls out crashes then it takes a while for another instance to spawn. So we try to keep to alive which is not cheap. But now we've sold Nvidia's code bloat problem hopefully that'll be a bit cheaper. Right. Very definitely. Yeah. I wonder if you have these like really powerful GPUs like running there which basically anybody could run any code on.
Do you get things like somebody mining bitcoins on there or something like I don't know if that's the thing or like like doing something that they're not supposed to do. Maybe maybe they're trying. But just as the normal Linux instances we have sandbox running on the GPUs instances as well. And that limits both CPU cores that you can use in memory and time that you can spend on it. So I doubt they get much use of that out of that. Right.
It actually means me to another question and maybe you can't answer this at least fully. But that's okay. But I presume you have certain sort of safeguards in there to prevent abuse of the resources like the Bitcoin mining or just locking up loss of instances for for no reason maybe even like done on a service attack. Do you have any any things in place for that? You don't have to necessarily go into details.
Well aside of the normal AWS, I think we have some AWS safeguards. But other than that it's basically just running a lot of instances and sandboxing. That's really the most important part perhaps not just because we don't want people to abuse the resources but also we don't want people to access someone else's codes if they don't want to share that. That makes sense. I don't want to be giving people ideas. But I'm sure they'll come up with them on the run anyway.
And yeah since I think the last year we're also running a Windows instance. We used to have Microsoft itself run Microsoft compilers. We still do of course. But we wanted to have not alternative and now we do have it. We also have sandboxing for that. So yeah that's just about the instances. Yeah if I remember rightly that was one of the limitations because as well as compiling the component you can run it now as well. But I think until recently we can do that with
VisualC++. But you can do that now. Am I right in thinking? What does it depend? Well Microsoft had to disable execution for what we had a small period for excuse from what's on but we decided to not do that anymore. And we now our own Windows instance. I think we tried hard to mitigate any issue that can come from execution and therefore we have enabled that execution but it's only we only have mean. How do you pronounce it in English? Yes. Compilers.
Interesting. Still a limitation but for good reasons. Maybe in the future we can have more compilers on that. Yeah there's also no Apple clang as far as I can tell. So there's no I guess because you need to need the actual hardware for that which yeah that's really big. We definitely have questions about that but we really can't. Well, big quits but we're not going. Fair enough.
So I this is actually kind of a more of a comment but I just noticed when I was listening to the episode from eight years ago Matt was saying kind of going more about the kind of client site now rather than service site Matt was saying that. Yeah so there was this like JavaScript stuff and then there was this like thing which is like the code editor which he just like basically took kind of an off the shelf thing. Well the code it was like yeah this is great
it has like all the features has like way more features than we need. Like it even has like things like a VIM bindings and but like who in their right mind would ever want to do that. And now I see there was actually a button here to go with VIM key bindings so clearly that has been added. So yeah he was like who would ever want this for Compilers for so I guess it's things have changed quite a lot on the kind of client side as well. Yeah we
yeah not too rarely. There's been a lot of work on the on the client side and especially the website itself. It's now it started out as it's just some pages and JavaScript but now we're we've transitioned to TypeScript mostly not entirely but mostly and it's it's a lot of codes.
Yeah it's just like thinking about it like how much actually rely on Compilers for in my daily work like whenever you like send a code snippet to anybody and say like hey look this is doing something weird or whatever like the default way to do this is to like send them a
got bold thing right. Yeah and so I'm just looking at my like toolbar you know like the kind of most important bookmarks you have like at the top of your browser and number one is not my calendar which tells me where I need to be when and number two is got bold like Compilers for is like number two. The number three is like eels.is which is like the standard and like number four
is like my to do thingy. So yeah basically Compilers for it's like right there at the top and I don't think I could really do what I do without it these days it's just like if you want to know like oh
this weird there's no that I'm kind of involved in like standardization and like if you're developing a new new language feature which kind of actually after you're working on like you know what do you do you call them out and you tell them hey we have this like hacked version of Clang that supports our experiment with feature can you just put that on Compilers for and then he does and then all you
do is just like send each other like got bold snippets. I shouldn't say that because I think Matt always says that you know you should say Compilers for instead of like his name so I'm going to say it properly so you're going to send each other a Compiler Explorer links basically and
just that's the thing you use to figure out if something works or doesn't or compiles or what it does and yeah so yeah it's became such an essential tool I think probably for many people yeah I don't have a bookmark for it so you only have to type CO in automatic
completes to compiler explorer. So there are any other ready useful features baked into compiler explorer today that most people probably probably are not even aware of maybe you're not the best person to ask this because you're too close to it but maybe you've got an idea in mind. Yeah I'm always trying to think of better ways on how to improve the websites I'm not always
succeeding I think. There's a lot of practice. Yeah yeah yeah. Now what I especially think is nice is the the IDE modes that we have since a couple of years I think where you can not just have not a small code snippets but also embeds or sent long additional files and not just that's also just write a build script and see make and have that um test and working your building your executable and testing that. And is that this um the tree thing that you can have
yeah I've actually tried that yet. Now where is that how do I do that that sounds really cool. We add button next to the logo. That's not the tree IDE mode. Wow this is so cool I've never seen this before. There's even there's even easier ways since a year um someone has added uh it's called a site template button if you click that you can just choose a template so like see
uh see slow c-make and get a nice layout for that's an example project. Yeah and I I can save my own right so for example if I don't know like it does this compile on like these four compilers I can just like save a template that has exactly that layout right yeah yeah yeah yeah that's
really cool. And if you have um if you want to save a save your project you can also do that so if there's uh yeah if you click on project and then save you can download this zip and you can also load it as zip so if you also have a get up repository you can download this zip from there
and then upload it to compile and explore. Of course there there are limitations to that uh we have a limited amount of file extensions that you can use um and then if we don't know a file extension we filter it out so it's not loaded and if the zip is really large like if you're loading boost into your clients it's all client sites so it's um yeah not probably not the best um smartest idea and if you're if if you're using uh CMake and your um in your codes and you're using libraries then
usually it doesn't work because we don't allow internet on our instances. Right but you have like a kind of repository of like certain like commonly used libraries that you can include yeah yeah we we get very generous generous uh poor requests and bug reports um about any libraries and in the first few years we only really added just the headers of the of those libraries but nowadays we have a complete infrastructure for building libraries to link against and
execute and there yeah it keeps growing the list. Is there anywhere I can see this list like well if you have a compiler you can um click on the little book and let's library so you go yes okay yeah I think okay it's like yeah it's like there's like over a hundred libraries here like pretty much all the standard ones there's Qt there is um yeah there's a lot of stuff um there's all like the testing framework there's boost yeah this is very impressive
yeah yeah this is really cool. That's really the most most used library is well I should say we don't really have stats on this yet um but we do have stats on if you're linking or executing with a library then FMT is by far the most used library that there is FMT but that's now in a
standard isn't it well well well some are fit no comments in a way stood format may have generated more interest in FMT could output with it what else can we do yeah okay now there's like a few areas of superstars that I kind of early decided that it's so complicated it's not even worth
trying to understand how this works and one of those areas is anything that has to do with strings and characters I just don't understand it basically it's funny that we have to just like unique code study group on the on the committee and they have meetings and they have papers and
they have like emails related to that that landed in box and I have no idea what's going on there I kind of gave up on that topic yeah I think you have to choose your battles yeah yeah I think the three biggest areas of complexity in any program in English really
with particular C++ are strings initialization and for loops so I try to avoid all of those yeah you might be right I mean the the for loop the range based for the was broken until C++ 23 so you have a point there okay so Patrick are there any are you aware of any features
in the combat explorer that are not there yet but that you're kind of working on that like I'm not soon that you can talk about we won't tell Matt that you're spending all the secrets I think we have endless lists of plans but not enough time or interest to do all of them and there's a lot of
well it's I think what we're at a stage now where every interesting feature is a lot of work and so and and we also have the normal code reviews and merging pull requests and testing and um other bugs and so every every well we didn't really talk about it but um we do sort of have a
team of people but everyone is working on in their free time of course and we don't really expect them to fully be dedicated on on anything really but if you remember has taken a place in in sort of in the projects of force sorts like some people are really invested in getting cross compilers to be supported so they're really good at using CT and G I think it's called in generating cross compilers with GCC so we've added yeah quite a bit of those but and some people are more like
um interested in the type scripts area and improving the codes for bug fixing and I try to if I'm not and I'm really merging pull requests and testing takes a lot of time especially with a web project like this where we have a lot of a lot of dependencies and every dependency have has security updates like every week but math is kindly taking that upon myself to improve that every week and therefore I'm trying to focus on when I do have inspiration to work on compiler explorer to focus on
uh really sending outside some time and spending that time on complicators issues to improve infrastructure or yeah things that take a lot of concentrating time makes sense I think it's worth emphasizing that the whole the whole project is run by volunteers yeah just in their own time
even the core team no one's getting paid for this and even though the sponsorship money and and the patreon's just going to the infrastructure it's right I know so I think everyone in our community really has a has a big debt to you all so thank you for everything you're doing
I think what you like to do is I think we are yeah it's still very interesting to do yeah that doesn't mean we can't be appreciative yeah so um I find all questions then for today uh by usual final question is there anything else in the world of c++ or beyond so I know you're
interested in every areas that you find particularly exciting on trusting at the moment I'm still waiting for a good module so you're enjoying the cue yeah well everybody's been saying that now all three compilers the major compiler supported and even she made supported and in theory it
all works now right so what's so what's the problem what's everybody complaining about yes yeah next maybe we did another modules episode soon yeah I mean we did we did one with uh uh dania right uh half a year ago or something but but yeah it seems like there's quite a few holes
there when you want actually want to use this stuff right yeah I think when we're even comparing it to the the work we had to do in terms of libraries and getting them to um to work modules is gonna be a lot harder because it's it well currently um it looks like
they get it gets influenced but by a lot of flags um in the compiler that's the normal library is currently well you can complain about c++ and the abi and whatnot but since c++ 11 it's the abi has gotten a lot better and it's really easy perhaps to achieve good linking and executing um across
when when the library is using a lot of of their own flags and you're using different flags in or more codes but with modules looks like it's going to be complicated mm-hmm I think it might be the first time I've ever heard the words easy and abi together but yeah yeah I'm hopeful
it's gonna it's gonna happen just a matter of time who is it saying recently that the uh c++ 20 phrase modularized standard library will we'll really help adoption it uh was it right now in the last episode I think yeah I think so yeah so I've always said modules will
be a c++ 23 feature so 21 23 maybe well let's see about that all right so um I think we're kind of near the end uh for today but uh Patrick thank you again so much for coming to the show and talking to us about compilax for right I certainly learned a lot um and um yeah is there anything
else you want to tell us um for example where people can reach you if they want to get in touch or anything else you want to kind of say promote share well you can read it in the show notes I guess but I think the most important thing I want to maybe tell that send us both rests and
has issues and what you want to improve about compilax or what's bugging you about the website and how can we help with that even if it's really a tidy thing that you're bought at the buy or if you want to get your favorite library into compiler explorer try to take 10 minutes and see if you
can get it to work you don't even even if you don't have time to test it and run it locally you can basically just send a support request through get up and just edit the files that are needed we basically have two files in the uh info in our infrastructure we post story and our main
compiler explorer your post story it should be easy but if it's not we can write more documentation I guess try to spend 10 minutes on that and see if you can make it work and send us a support rest and if you if you can test it's will test it's and purchase great recommendation thank
you and thank you for coming on the show today telling us all about compiler explorer and all the stuff we didn't know thanks for everything thanks so much for listening in as you chat about T plus plus we'd love to hear what you think of the podcast please let us know if we're discussing this stuff
you're interested in or if you have a suggestion for a guest or topic we'd love to hear about that too we can email all your thoughts to feedback at tbpcast.com we'd also appreciate it if you can follow cbpcast on twitter or mastodon you can also follow me and fill individually on twitter or mastodon all those links as well as the show notes can be found on the podcast website at cppcast.com the theme music for this episode was provided by podcastthemes.com