WEBVTT 00:00.000 --> 00:10.000 Okay, let's continue. 00:10.000 --> 00:13.000 One more person joining, great. 00:13.000 --> 00:15.000 There you go. 00:15.000 --> 00:18.000 The death room is almost full and we have 00:18.000 --> 00:22.000 GCC Cobalt talk that has not even been on the agenda 00:22.000 --> 00:24.000 until this morning. 00:24.000 --> 00:26.000 That's great. 00:27.000 --> 00:30.000 Can we please resume? 00:30.000 --> 00:39.000 All right, so James, thank you very much again for being here. 00:39.000 --> 00:44.000 We discussed this last night that we had a change in the schedule 00:44.000 --> 00:48.000 and unplanned cancellation and James offered to do 00:48.000 --> 00:52.000 impromptu, GCC Cobalt talk regarding 00:52.000 --> 00:55.000 some other parsing use of lipics, ML2. 00:55.000 --> 00:57.000 Maintenance of that and all these funny things 00:57.000 --> 01:00.000 that you need to do in engineering, 01:00.000 --> 01:05.000 in a proper compiler, which is not just a research kind of 01:05.000 --> 01:12.000 fun thing, but James has done GCC Cobalt talks 01:12.000 --> 01:16.000 on every instance of the GCC death room at 01:17.000 --> 01:19.000 the end of the day. 01:19.000 --> 01:26.000 So we have a different system, so here's another one. 01:30.000 --> 01:32.000 Good morning, everybody. 01:32.000 --> 01:35.000 We're afternoon already, I think. 01:35.000 --> 01:40.000 So, talk is about why and how we're going to do 01:40.000 --> 01:44.000 XML in Cobalt, so I'd like to give it the why part. 01:44.000 --> 01:47.000 It is because they said so, that is to say, 01:47.000 --> 01:50.000 I'd be in defines a verb in Cobalt that says 01:50.000 --> 01:51.000 we're going to parse XML. 01:51.000 --> 01:53.000 It's very simple. 01:53.000 --> 01:56.000 Parse, sorry, XML, parse, 01:56.000 --> 01:59.000 buffer name, function. 01:59.000 --> 02:02.000 For every element that the Cobalt that these are, 02:02.000 --> 02:06.000 the XML parser generates, we call the function. 02:06.000 --> 02:09.000 That function knows there are, for what two cold registers 02:09.000 --> 02:13.000 that describe the element and the function does whatever it does. 02:13.000 --> 02:15.000 He is a compiler writer. 02:15.000 --> 02:17.000 I don't have actually much to do, right? 02:17.000 --> 02:20.000 That's not a lot to parse. 02:20.000 --> 02:23.000 Then, I had to figure out a way to make that 02:23.000 --> 02:25.000 actually happen in the system. 02:25.000 --> 02:28.000 And that comes to the what part. 02:28.000 --> 02:34.000 It's interesting that if I wanted to make GCC happy, 02:34.000 --> 02:38.000 I could just write my own XML parser. 02:38.000 --> 02:40.000 No controversy. 02:40.000 --> 02:41.000 It's a library. 02:41.000 --> 02:42.000 Nothing to discuss. 02:42.000 --> 02:44.000 Build it right in. 02:44.000 --> 02:45.000 Done. 02:45.000 --> 02:47.000 But you don't get a beard this collar 02:47.000 --> 02:51.000 without learning some things about how the world works. 02:51.000 --> 02:56.000 And one of the things I decided was that as confident as I am 02:56.000 --> 03:01.000 of parsing, I mean, what could be easier than parsing XML. 03:02.000 --> 03:07.000 A tag, properties, text, a closing tag. 03:07.000 --> 03:09.000 It's as simple as could be. 03:09.000 --> 03:13.000 There's expressions with a lot of ugly syntax. 03:13.000 --> 03:16.000 But then, on the other hand, if I look around the world, 03:16.000 --> 03:20.000 I find that there are two XML libraries out there. 03:20.000 --> 03:22.000 Both on satisfactory. 03:22.000 --> 03:25.000 After decades of operation. 03:25.000 --> 03:29.000 So, there is perhaps some possibility that there are aspects of this parsing 03:29.000 --> 03:32.000 problem that I don't fully understand. 03:32.000 --> 03:35.000 And I say to myself, okay, we're going to have to use library. 03:35.000 --> 03:41.000 And I use the security vulnerability that the GCC gave that you last year. 03:41.000 --> 03:46.000 And I commit to the library, the library, the live jicoval. 03:46.000 --> 03:48.000 I commit a new dependency. 03:48.000 --> 03:51.000 We're going to use the live XML to library. 03:51.000 --> 03:54.000 We're going to use the Sax parser. 03:54.000 --> 03:56.000 Job done. 03:56.000 --> 03:59.000 This is where we encounter the other part of the web part, 03:59.000 --> 04:02.000 which is you do engineering in the large. 04:02.000 --> 04:05.000 You have a lot of people to satisfy. 04:05.000 --> 04:09.000 And it turns out there's not a single opinion about how to do these things. 04:09.000 --> 04:13.000 So, now, okay, I'm not going to write my own parser. 04:13.000 --> 04:15.000 I'm going to use this library. 04:15.000 --> 04:21.000 How am I going to make that library open and useful to the 04:21.000 --> 04:27.000 couple programs that are going to take advantage of this feature. 04:27.000 --> 04:32.000 Another thing that would have made GCC very happy is to just make this option. 04:32.000 --> 04:35.000 If we make it optional, then it doesn't really matter how it comes in 04:35.000 --> 04:38.000 because the person who builds the compiler just makes the decision. 04:38.000 --> 04:40.000 But here's the problem. 04:40.000 --> 04:42.000 It's not really an option. 04:42.000 --> 04:46.000 If you say that the XML library is optional, 04:46.000 --> 04:51.000 then you say that some part of the functionality of the compiler is optional, 04:51.000 --> 04:55.000 which means that the user has either got the whole compiler or some of the 04:55.000 --> 04:56.000 compiler. 04:56.000 --> 04:59.000 He doesn't know that I made that choice. 04:59.000 --> 05:01.000 And so, who are making these choices? 05:01.000 --> 05:04.000 Well, we could make it optional and then the package, 05:04.000 --> 05:07.000 the guy who does the packaging, he could decide, 05:07.000 --> 05:10.000 except he doesn't know what the user is going to want, 05:10.000 --> 05:11.000 because the user doesn't know yet. 05:11.000 --> 05:14.000 And if he didn't know he's wrong, because that's going to change later. 05:15.000 --> 05:18.000 So, each time you provide an option about what's going to be a 05:18.000 --> 05:21.000 concluded or not included, you really just give somebody else a choice 05:21.000 --> 05:25.000 that isn't a choice, which means he has to make a choice to bring that thing in. 05:25.000 --> 05:27.000 So, I don't want to make it optional. 05:27.000 --> 05:29.000 It's not really optional. 05:29.000 --> 05:33.000 I don't want it to be the case that when the user arrives at his XML horse thing, 05:33.000 --> 05:35.000 he gets an error back and says, 05:35.000 --> 05:39.000 the compiler didn't give that to you. 05:39.000 --> 05:42.000 So, not optional. 05:42.000 --> 05:45.000 Then the question is, how do so find? 05:45.000 --> 05:47.000 Now, we've got this terrible library. 05:47.000 --> 05:48.000 I should point out terrible. 05:48.000 --> 05:53.000 So, I said earlier that the only options available to us 05:53.000 --> 05:55.000 were unsatisfactory. 05:55.000 --> 06:00.000 And live XML2, unfortunately, has a not very stellar reputation. 06:00.000 --> 06:05.000 It has seen a lot of changes over the years, 06:05.000 --> 06:08.000 and not been terribly good. 06:08.000 --> 06:10.000 Apparently, it's not an experience I had, but when I'm told 06:11.000 --> 06:15.000 that the ABI has been a little variable. 06:15.000 --> 06:19.000 So, keeping track of the versions of XML2, 06:19.000 --> 06:23.000 I'm going to use over the generations of GCC that are going to be available. 06:23.000 --> 06:26.000 Who's going to take care of that? 06:26.000 --> 06:32.000 How are we going to account for many of the security violations reports 06:32.000 --> 06:38.000 that are maybe maliciously, maybe whatever generated we don't really know 06:38.000 --> 06:41.000 how important they actually are, but there they are. 06:41.000 --> 06:44.000 How do we deal with them? 06:44.000 --> 06:49.000 So, should then live XML become part of GCC? 06:49.000 --> 06:52.000 Do I become the maintainer of this thing? 06:52.000 --> 06:55.000 I, who bets it never saw the code actually, 06:55.000 --> 06:56.000 and just want to use it. 06:56.000 --> 06:59.000 So, my user can have his feature. 06:59.000 --> 07:01.000 Do we rely on the target? 07:01.000 --> 07:04.000 Do we, do we say, just look at the package, 07:04.000 --> 07:07.000 or just have to put it in some place and go find it? 07:07.000 --> 07:11.000 And then, if, do we allow it to be statically leaked for some packages that 07:11.000 --> 07:14.000 want to build a compiler in that way? 07:14.000 --> 07:19.000 These were all the questions, and different people want different things 07:19.000 --> 07:20.000 from the system. 07:20.000 --> 07:23.000 They actually want different GCCs. 07:23.000 --> 07:27.000 So, I put this to the steering committee last month, 07:27.000 --> 07:30.000 and I said, last month? 07:30.000 --> 07:31.000 Yeah, last month. 07:31.000 --> 07:34.000 And I said, hmm, so should we bring this in? 07:34.000 --> 07:36.000 Should live gcote, sorry? 07:36.000 --> 07:37.000 Should live XML, too? 07:37.000 --> 07:38.000 Be like Z-Live. 07:38.000 --> 07:40.000 Put it right in the repository. 07:40.000 --> 07:41.000 Build it like everything else. 07:41.000 --> 07:43.000 Make it a bootstrap library. 07:43.000 --> 07:47.000 And I think the answer is, no. 07:47.000 --> 07:53.000 I think the answer is, that was one way to do it. 07:53.000 --> 07:57.000 And it could be the case that some people who are doing packaging want to build 07:57.000 --> 08:02.000 live gcobal from source and build live XML, too, 08:02.000 --> 08:04.000 from source and link it in statically. 08:04.000 --> 08:06.000 And that should be an option. 08:06.000 --> 08:10.000 But it may be the case that do not necessarily do that. 08:10.000 --> 08:16.000 So, I think what the consensus hope the consensus is. 08:16.000 --> 08:20.000 We just have to make it as flexible as possible when we configure the building of the library 08:20.000 --> 08:24.000 about which version of live XML you're going to bring in. 08:24.000 --> 08:29.000 And then simply run, you know, rely on the runtime linker to pull that in. 08:29.000 --> 08:32.000 So, do I cover the what, the why and how yes. 08:32.000 --> 08:35.000 So, we're doing this because the user wants to be able to parse XML. 08:35.000 --> 08:43.000 We've decided to rely on runtime dynamic linking to make it happen. 08:43.000 --> 08:48.000 But to put in a bunch of configuration options when you build the library that will establish 08:48.000 --> 08:53.000 where that one is coming from, who wants to pull it in how, whether they want to link it 08:53.000 --> 08:56.000 in statically, whether they want to rely on the target to supply it. 08:56.000 --> 09:00.000 So, that is more or less what I want to say. 09:00.000 --> 09:06.000 And I thought, you know, there's this gnarly engineering question might spur questions. 09:06.000 --> 09:12.000 So, I thought I would have let ask you if you had any. 09:12.000 --> 09:14.000 You are in trouble. 09:14.000 --> 09:15.000 I'm in trouble. 09:15.000 --> 09:17.000 I'm always in trouble. 09:17.000 --> 09:18.000 Yes. 09:18.000 --> 09:19.000 Yes. 09:19.000 --> 09:24.000 So, it was very easy to have a talk with a site and you made it very captivating. 09:24.000 --> 09:25.000 So, thanks for that. 09:25.000 --> 09:26.000 Oh. 09:26.000 --> 09:27.000 But now's the question. 09:27.000 --> 09:28.000 Yes. 09:28.000 --> 09:34.000 You think that you don't want, in a way, to be fair based on the HTML being there or not. 09:34.000 --> 09:43.000 But is XML part of the standard, or it's an extension of the command of the user system. 09:43.000 --> 09:46.000 It depends on what being by yes. 09:46.000 --> 09:51.000 The verb I mentioned at the outside is called XML pars. 09:51.000 --> 09:53.000 And your question is, is that part of the standard? 09:53.000 --> 09:58.000 My question is, what's the standard? 09:58.000 --> 10:01.000 So, yes and no. 10:01.000 --> 10:08.000 The ISO not only has not included this verb as part of the official 2023 standard. 10:08.000 --> 10:12.000 It does not intend to include it as part of the 2022 standard. 10:12.000 --> 10:13.000 So, no. 10:13.000 --> 10:15.000 On the other hand, IBM. 10:16.000 --> 10:17.000 Yes. 10:17.000 --> 10:20.000 So, IBM added this to their compiler. 10:20.000 --> 10:22.000 They also have a JSON parser, by the way. 10:22.000 --> 10:25.000 They also have XML generate. 10:25.000 --> 10:30.000 If anyone here has worked in finance, you've encountered one or two XML files in your day. 10:30.000 --> 10:37.000 And we chose to use the sex parser because not only we're going to see XML files, but they're going to be big. 10:38.000 --> 10:47.000 So, it's not an international standard, but it's a standard of the international business machine company. 10:47.000 --> 10:49.000 And that's actually good enough for us. 10:49.000 --> 11:04.000 So, the question is, can I use options about dialects and so on when the compiler runs to decide whether or not the future is available? 11:04.000 --> 11:06.000 And the answer is yes. 11:07.000 --> 11:10.000 In fact, that option already exists. 11:10.000 --> 11:32.000 The question is whether we want to build logical, depending on whether, so, if you have such an option, when you build your co-valt program, that doesn't change what features are available in the library that that co-valt program may be available. 11:32.000 --> 11:48.000 So, I have no way to build the library and then say this library only supports these versions of the co-valt standard. 11:49.000 --> 11:52.000 Well, you could do lazy loading. 11:52.000 --> 11:54.000 I could do lazy loading. 11:54.000 --> 11:59.000 So, I could use deal open, you mean? 11:59.000 --> 12:01.000 Yes, something like that. 12:01.000 --> 12:07.000 Yes, at the risk of having an error when the program runs. 12:07.000 --> 12:09.000 Yes. 12:09.000 --> 12:10.000 Yes. 12:28.000 --> 12:36.000 Simon is thinking to the question of whether deal open opens another can of worms and the answer is absolutely true and he's speaking from experience. 12:36.000 --> 12:37.000 Yes. 12:37.000 --> 12:52.000 I have to admit I was a little bit disappointed to not see a parser written in co-valt, which would solve the mission. 12:52.000 --> 12:57.000 So, if we wrote our XML parser in co-valt, we would solve it elegantly. 12:57.000 --> 12:59.000 Absolutely true. 12:59.000 --> 13:04.000 If indeed, I have finished the project. 13:04.000 --> 13:05.000 And then you'll maintain it. 13:05.000 --> 13:08.000 It's acceptable for a partner to take the flag. 13:08.000 --> 13:11.000 Similar to that, you print because it's also standard advice. 13:11.000 --> 13:14.000 You know, it's linked in the repo. 13:14.000 --> 13:16.000 So, it's a special part you've created. 13:16.000 --> 13:21.000 Then instead of having a little bit of repo home, I'll link for the next moment. 13:21.000 --> 13:24.000 There could be a little bit of repo for that scenario. 13:24.000 --> 13:31.000 We're trying to acquire it, you know, that could then be probably even written by us separately. 13:32.000 --> 13:48.000 So, I didn't understand every word you said, but if I can try to repeat what you were suggesting is that the weather or not, I'm sorry, the time is up, so I don't have to answer. 13:48.000 --> 13:58.000 Thank you.