WEBVTT

00:00.000 --> 00:10.000
Okay, that's my cue.

00:10.000 --> 00:12.000
Let's talk about a party on the team.

00:12.000 --> 00:14.000
Oh my gosh, you've looked me up.

00:14.000 --> 00:15.000
Hi, everyone.

00:15.000 --> 00:16.000
I'm James.

00:16.000 --> 00:18.000
I hope you can hear me on the recording.

00:18.000 --> 00:22.000
I'm going to sit down to talk because I want to use both my hands to hack for you.

00:22.000 --> 00:23.000
So don't worry, I'm still here.

00:23.000 --> 00:24.000
Don't be afraid.

00:24.000 --> 00:27.000
And I'm going to try and talk quickly and make this energetic and fun.

00:27.000 --> 00:29.000
You have any really questions because I've lost.

00:29.000 --> 00:30.000
You just let me know.

00:30.000 --> 00:31.000
It's my first time in the docks room.

00:31.000 --> 00:34.000
So I don't know the audience super well.

00:34.000 --> 00:37.000
I come from the automation and can figure management hacker space.

00:37.000 --> 00:42.000
And so I'm going to try and give you a good docks talk.

00:42.000 --> 00:46.000
So yeah, I'm trying to get better at writing docks because I'm kind of really

00:46.000 --> 00:47.000
shit at this.

00:47.000 --> 00:52.000
This is just a quick video from my hometown in Canada, which I think is really funny.

00:52.000 --> 00:58.000
And we're normally pretty good about snowing everything, but it was an icy day this day.

00:58.000 --> 01:01.000
And so this bus had some trouble.

01:01.000 --> 01:06.000
But then this little taxi, how little bit of trouble, too.

01:06.000 --> 01:09.000
And I'll let you watch this.

01:09.000 --> 01:11.000
It's much easier all, yeah.

01:11.000 --> 01:12.000
Boom.

01:12.000 --> 01:19.000
But that's okay because we have help for this kind of situation, which will come shortly.

01:19.000 --> 01:26.000
I have 25 minutes, right?

01:26.000 --> 01:29.000
Yeah.

01:29.000 --> 01:30.000
Yeah.

01:30.000 --> 01:34.000
I'll lie about talking about docks.

01:34.000 --> 01:38.000
I'm just showing videos today.

01:38.000 --> 01:40.000
But here comes the bus.

01:40.000 --> 01:48.000
The buses are, and then watch this number two, here comes number two.

01:48.000 --> 01:55.000
Oh, yeah.

01:55.000 --> 02:03.000
But.

02:03.000 --> 02:08.000
I'm not very creative at coming up with material and this makes you laugh.

02:08.000 --> 02:11.000
And then how could we make this even better?

02:11.000 --> 02:14.000
How could we make this better?

02:14.000 --> 02:30.000
So, this is a truck to put salt down to make it less slippery.

02:30.000 --> 02:32.000
Do you find several people up there?

02:32.000 --> 02:33.000
Boom.

02:33.000 --> 02:34.000
Yeah.

02:34.000 --> 02:37.000
So anyways, just for my, I'm a hot guy.

02:37.000 --> 02:39.000
I work on automation, config management things.

02:39.000 --> 02:41.000
It's a very misunderstood field.

02:41.000 --> 02:43.000
There should be sending patches, but he hasn't.

02:43.000 --> 02:45.000
I write a blog called the technical blog of James.

02:45.000 --> 02:46.000
Who's write my blog?

02:46.000 --> 02:47.000
Just raise your hand.

02:47.000 --> 02:48.000
If you haven't, raise your hand.

02:48.000 --> 02:49.000
So I seem really popular, please.

02:49.000 --> 02:50.000
Yes.

02:50.000 --> 02:51.000
Thank you.

02:51.000 --> 02:54.000
Actually, if you're all just by training, I have this stock interest sites.

02:54.000 --> 02:55.000
So I guess maybe you've seen this.

02:55.000 --> 02:57.000
I work for this weird company right now.

02:57.000 --> 02:59.000
They're very kind and they paid for my travel here.

02:59.000 --> 03:01.000
So I'm quite thankful for that.

03:01.000 --> 03:05.000
We don't really do anything about documentation specifically, but do tack and whatnot.

03:05.000 --> 03:08.000
And if you're looking for a job, we're usually hiring.

03:08.000 --> 03:10.000
So how about have a look?

03:10.000 --> 03:11.000
So these are not my opinions.

03:11.000 --> 03:14.000
Obviously, these are my opinions on my employers, blah, blah, blah.

03:14.000 --> 03:16.000
Bad jokes and so on.

03:16.000 --> 03:18.000
This image was stolen from the internet.

03:18.000 --> 03:22.000
My whole life that I've been kind of writing software really, really struggled to write

03:22.000 --> 03:24.000
docs and to get them up to date.

03:24.000 --> 03:29.000
So anytime I can use tools and software and automation to make this easier, I'm like, I'm there.

03:29.000 --> 03:33.000
And yeah, the, the doc world is, for me, it's always been kind of terrible.

03:33.000 --> 03:36.000
And, and do we, do we want bad docs?

03:36.000 --> 03:37.000
What?

03:37.000 --> 03:38.000
All right.

03:38.000 --> 03:39.000
Thank you.

03:39.000 --> 03:44.000
So this is, this is my nope guy who's just, um, if you see the weird image quality,

03:44.000 --> 03:48.000
this is because we were office has a bug, so if any of you are, we were office hackers.

03:48.000 --> 03:51.000
I don't know what's happened that broke.

03:51.000 --> 03:53.000
So yeah, we don't want that docs.

03:53.000 --> 03:56.000
And so, um, so this is the project I work on.

03:56.000 --> 03:57.000
It's an open source thing.

03:57.000 --> 03:59.000
I've just been running it myself.

03:59.000 --> 04:02.000
If you really want to stick around, you can use it, come, come see me at the end.

04:02.000 --> 04:03.000
Do you want to see a quick demo?

04:03.000 --> 04:04.000
Yeah.

04:04.000 --> 04:05.000
Okay.

04:05.000 --> 04:06.000
So I'll just show you in this space.

04:06.000 --> 04:07.000
This is not really what it's about.

04:07.000 --> 04:10.000
But basically, um, you just, whoops.

04:10.000 --> 04:13.000
You just, uh, turn down that beeping.

04:13.000 --> 04:19.000
Um, we just have this tool, um, something like, for example, hello.

04:19.000 --> 04:22.000
It's a declarative way of doing stuff.

04:22.000 --> 04:27.000
So if you run this kind of file, I'll show you exactly what that code looks like.

04:27.000 --> 04:29.000
Is that big enough for you to all see?

04:29.000 --> 04:30.000
Can you see that?

04:30.000 --> 04:32.000
Let's make it a bit bigger.

04:32.000 --> 04:36.000
So basically, we declaratively say how the world should look, right?

04:36.000 --> 04:40.000
So in this case, we say we want this file that exists in this path to have these contents.

04:40.000 --> 04:41.000
It must be the case.

04:41.000 --> 04:42.000
And so we, whoops.

04:42.000 --> 04:43.000
My microphone's phone.

04:43.000 --> 04:47.000
We, we, um, we run the tool with that kind of special code.

04:47.000 --> 04:49.000
And then we'll look over here.

04:49.000 --> 04:51.000
We can go and check that file.

04:51.000 --> 04:53.000
Um, make that a bit bigger too.

04:53.000 --> 04:56.000
M.T. Hello world.

04:56.000 --> 04:58.000
And it, and it's there, right?

04:58.000 --> 05:00.000
Um, and just so you can see that I'm not treating.

05:00.000 --> 05:05.000
We can actually say something like, uh, hello world.

05:05.000 --> 05:09.000
Well, two docs people from me, right?

05:09.000 --> 05:12.000
And we can just run that again.

05:12.000 --> 05:13.000
Just chill this.

05:13.000 --> 05:16.000
And you'll see that the file doesn't even have those contents, right?

05:16.000 --> 05:18.000
But the, this is what many tools do.

05:18.000 --> 05:21.000
But the cool thing about M.T. is it's live.

05:21.000 --> 05:24.000
So if you, for example, deleted that file and counted the file,

05:24.000 --> 05:25.000
it comes right back, right?

05:25.000 --> 05:26.000
So you can delete it.

05:26.000 --> 05:27.000
It comes back.

05:27.000 --> 05:28.000
It's silly.

05:28.000 --> 05:30.000
Uh, kind of a knowing game you're fighting with the computers.

05:30.000 --> 05:32.000
Kind of like AI.

05:32.000 --> 05:34.000
Um, but any so fast, you can really even do.

05:34.000 --> 05:37.000
And then it comes back very quickly.

05:37.000 --> 05:39.000
Now we can do this for virtual machines and blah, blah, blah.

05:39.000 --> 05:41.000
I'm also bad at marketing.

05:41.000 --> 05:42.000
Um, but just really fun.

05:42.000 --> 05:45.000
You can even go really fast.

05:45.000 --> 05:48.000
Uh, like a top speed on Linux and boom.

05:48.000 --> 05:50.000
You can see the tool keeps working up.

05:50.000 --> 05:52.000
blah, blah, blah, blah and fixing the state, right?

05:52.000 --> 05:54.000
And, and that just goes on forever.

05:54.000 --> 05:58.000
So, um, and then the cool cool thing, because this is cheap.

05:58.000 --> 06:01.000
Um, we can actually express time as a thing.

06:01.000 --> 06:03.000
Um, and I'm telling you this for a good reason.

06:03.000 --> 06:05.000
I'll get to talk in a second.

06:05.000 --> 06:08.000
So I can actually write slightly different code.

06:08.000 --> 06:09.000
Um, just really quickly.

06:09.000 --> 06:10.000
Oh, my god.

06:10.000 --> 06:11.000
This isn't so well.

06:11.000 --> 06:12.000
Uh, sorry.

06:12.000 --> 06:13.000
There's no syntax highlighting.

06:13.000 --> 06:16.000
But we can actually express streams of time and pipelines and documentation,

06:16.000 --> 06:19.000
pipelines and hinting and model these over time.

06:19.000 --> 06:22.000
And as time flows through this function here,

06:22.000 --> 06:25.000
it goes into this variable, which goes into this template.

06:25.000 --> 06:27.000
And then the file should change over time.

06:27.000 --> 06:28.000
Oops.

06:28.000 --> 06:31.000
And so if you, um, oops.

06:32.000 --> 06:33.000
Can't type properly.

06:33.000 --> 06:36.000
As you see, I'm running this over here and in this file here.

06:36.000 --> 06:41.000
So we can see this file that I just created for this demo.

06:41.000 --> 06:44.000
And if I just cat this, you can see that every second.

06:44.000 --> 06:46.000
I'm just pulling the file to see what's happening.

06:46.000 --> 06:47.000
It's changing over time.

06:47.000 --> 06:50.000
So just data flowing through pipelines to new way.

06:50.000 --> 06:53.000
Um, everyone doing docs is going to be using this in the future.

06:53.000 --> 06:54.000
So you've had a warning.

06:54.000 --> 06:55.000
Okay.

06:55.000 --> 06:56.000
Enough of that.

06:56.000 --> 06:58.000
You want to see more real doc stuff?

06:58.000 --> 06:59.000
Yay.

06:59.000 --> 07:00.000
Yay.

07:00.000 --> 07:01.000
All right.

07:01.000 --> 07:04.000
Who do you all like hackers and software people?

07:04.000 --> 07:06.000
And who writes no code at all?

07:06.000 --> 07:07.000
Raise your hand.

07:07.000 --> 07:09.000
Who wishes they wrote no code at all?

07:09.000 --> 07:10.000
Okay.

07:10.000 --> 07:12.000
And then the last question.

07:12.000 --> 07:14.000
Does anyone know what an AST is?

07:14.000 --> 07:15.000
If you do raise your hand?

07:15.000 --> 07:16.000
Um, don't be shy.

07:16.000 --> 07:19.000
Um, I really didn't know what this says very recently.

07:19.000 --> 07:21.000
Um, and just here's the rough like background of my talk.

07:21.000 --> 07:23.000
So writing docs at all is difficult.

07:23.000 --> 07:27.000
Um, many languages have a way that you can put in the comments.

07:27.000 --> 07:30.000
Write above the function a little stuff about what it does.

07:30.000 --> 07:34.000
Um, but you can use that comment space or any comment space in your entire code base.

07:34.000 --> 07:37.000
Even if it's in file just with docs to put source code in.

07:37.000 --> 07:39.000
And that is along with the commit.

07:39.000 --> 07:42.000
So you have some traceability about where did this happen?

07:42.000 --> 07:44.000
Where did this start all that stuff and so on?

07:44.000 --> 07:45.000
Um, and you can, you can just cheat.

07:45.000 --> 07:49.000
Some languages have built in ways to take those comments and put them into documentation.

07:49.000 --> 07:52.000
But those are documentation about the program.

07:52.000 --> 07:53.000
Right.

07:53.000 --> 08:03.000
You can also, you know, misuse that that functionality with a very small amount of code to generate custom docs that are for your user as opposed to the programmers of your software.

08:03.000 --> 08:06.000
Um, honestly, this is way easier than you think.

08:06.000 --> 08:10.000
Um, I'm not a huge like like AI large language model supporter.

08:10.000 --> 08:12.000
But finding the API.

08:12.000 --> 08:18.000
So the functional programming interface that you use to talk to these ASTs which we'll talk about.

08:18.000 --> 08:21.000
Um, models are very good at figuring out these docs, figuring out these APIs.

08:21.000 --> 08:26.000
So I actually cheated instead of spending two hours trying to learn how to parse the AST, which we'll get to.

08:26.000 --> 08:30.000
I just cheated a little bit and got some hints from a large language model.

08:30.000 --> 08:31.000
So don't be shy.

08:31.000 --> 08:34.000
Um, it can help be a net benefit.

08:34.000 --> 08:36.000
Um, and so what I typically, the model I, I've chosen.

08:36.000 --> 08:39.000
Um, and I think you might like this model is you have your code.

08:39.000 --> 08:42.000
You decide how you want to store your docs and your data and so on.

08:42.000 --> 08:43.000
And that's really up to you.

08:43.000 --> 08:48.000
And so I would write a small script that takes that out into an intermediate format like JSON.

08:48.000 --> 08:51.000
And then that JSON file can then go into different tools.

08:51.000 --> 08:54.000
So like a PDF generator or website and so on.

08:54.000 --> 08:57.000
And so you have to kind of think of that intermediate format and pull it out.

08:57.000 --> 09:00.000
In my case, I use, I have a website run with Go Hugo.

09:00.000 --> 09:02.000
It's a static site generator.

09:02.000 --> 09:03.000
She'll show you.

09:03.000 --> 09:05.000
And that's what I used to then read that JSON.

09:05.000 --> 09:07.000
Does that make sense or you confused already?

09:07.000 --> 09:09.000
Who's confused?

09:09.000 --> 09:10.000
Don't be shy.

09:10.000 --> 09:11.000
Okay.

09:11.000 --> 09:12.000
I'm going to pick on you.

09:12.000 --> 09:13.000
Careful now.

09:13.000 --> 09:15.000
So do you want to see a demo?

09:15.000 --> 09:16.000
Yeah.

09:16.000 --> 09:17.000
All right.

09:17.000 --> 09:18.000
Thank you.

09:18.000 --> 09:21.000
So, um, so let's just start off here.

09:21.000 --> 09:23.000
Oh, there are my demos.

09:23.000 --> 09:25.000
Um, so here are, I'm just going to show you the website.

09:25.000 --> 09:28.000
You can actually, um, even go to this website here.

09:28.000 --> 09:29.000
So you can see it's all live.

09:29.000 --> 09:33.000
But just to make it a little faster, so I don't have to break the live website.

09:33.000 --> 09:35.000
I just have a local copy running here.

09:35.000 --> 09:39.000
And this very sad sad doc's link has some reference.

09:39.000 --> 09:42.000
So in my software, um, it's software.

09:42.000 --> 09:46.000
For developers and other people.

09:46.000 --> 09:48.000
And we want to give some reference.

09:48.000 --> 09:51.000
So they know what, um, functions and resources.

09:51.000 --> 09:52.000
What we call them.

09:52.000 --> 09:53.000
They're available.

09:53.000 --> 09:54.000
So I have this one page for functions.

09:54.000 --> 09:55.000
Another for resources.

09:55.000 --> 09:56.000
And you can see here.

09:56.000 --> 09:59.000
We have this kind of list of all them at the, on the side.

09:59.000 --> 10:01.000
You can click and see some stuff about this.

10:01.000 --> 10:02.000
I'm not a web developer.

10:02.000 --> 10:04.000
This is not, you know, but if you are.

10:04.000 --> 10:06.000
Patch is welcome.

10:06.000 --> 10:07.000
Um, and so.

10:07.000 --> 10:09.000
So what we actually do.

10:09.000 --> 10:11.000
Um, so here's the split function for example.

10:11.000 --> 10:15.000
Uh, if we go into here and we'll get split.

10:15.000 --> 10:21.000
Um, and you can see that this, this comment here basically comes from this function.

10:21.000 --> 10:22.000
Right.

10:22.000 --> 10:23.000
Is that match?

10:23.000 --> 10:24.000
All right.

10:24.000 --> 10:26.000
And just to prove it, I need a magic word.

10:26.000 --> 10:27.000
Someone.

10:27.000 --> 10:28.000
Do it.

10:28.000 --> 10:29.000
Do it.

10:29.000 --> 10:30.000
All right.

10:30.000 --> 10:32.000
Let's do it.

10:32.000 --> 10:40.000
If you want to hack with me, it will be as fun as can be.

10:41.000 --> 10:43.000
Uh, let's see.

10:43.000 --> 10:47.000
Be rhyming is fun.

10:47.000 --> 10:48.000
Um, don't.

10:48.000 --> 10:49.000
Let's think.

10:49.000 --> 10:50.000
Don't run.

10:50.000 --> 10:51.000
All right.

10:51.000 --> 10:52.000
Fine.

10:52.000 --> 10:53.000
Docs.

10:53.000 --> 10:54.000
2025.

10:54.000 --> 10:55.000
Okay.

10:55.000 --> 10:56.000
So we're just going to save that file.

10:56.000 --> 10:57.000
You're like, what is this guy doing?

10:57.000 --> 10:58.000
You see a crazy person.

10:58.000 --> 11:00.000
Um, so we just saved that file.

11:00.000 --> 11:03.000
And then as part of my tool itself, I have a little.

11:03.000 --> 11:04.000
Uh, my tool is called MGMT.

11:04.000 --> 11:05.000
Can you see it at the bottom?

11:05.000 --> 11:07.000
I can make that a little bit bigger.

11:07.000 --> 11:08.000
Um, so I just run MGMT.

11:08.000 --> 11:12.000
I have a docs subcommand because I can just do whatever I want.

11:12.000 --> 11:14.000
And I can generate and put the output.

11:14.000 --> 11:15.000
Let's say in temp.

11:15.000 --> 11:16.000
Docs.json.

11:16.000 --> 11:17.000
Okay.

11:17.000 --> 11:18.000
So I run it.

11:18.000 --> 11:21.000
Um, when I'm developing docs, it actually gives me some morning.

11:21.000 --> 11:25.000
So for example, I have some fields that that don't have documentation

11:25.000 --> 11:26.000
Description.

11:26.000 --> 11:28.000
So it's like saying, hey, you didn't comment this.

11:28.000 --> 11:29.000
Um, that's okay.

11:29.000 --> 11:31.000
Cause these ones that don't want really commented.

11:31.000 --> 11:33.000
And then it wrote this file.

11:33.000 --> 11:36.000
And then if you want to just cat this file and look at it as.

11:36.000 --> 11:38.000
As json, you can see it's like this big,

11:38.000 --> 11:40.000
norally horrible json file.

11:40.000 --> 11:41.000
Right?

11:41.000 --> 11:42.000
Makes sense?

11:42.000 --> 11:44.000
Json ugly, but useful.

11:44.000 --> 11:47.000
Json is useful in this case because I'm not really editing by hand.

11:47.000 --> 11:48.000
Right?

11:48.000 --> 11:49.000
It's not human.

11:49.000 --> 11:51.000
It's human flexible, but not human.

11:51.000 --> 11:53.000
Really readable.

11:53.000 --> 11:55.000
Um, and so I can do that.

11:55.000 --> 11:58.000
Um, and you can see at the top level, I actually have like a version

11:58.000 --> 12:00.000
field, which is just the get hash.

12:00.000 --> 12:02.000
So I can have this unique.

12:02.000 --> 12:03.000
Um, field.

12:03.000 --> 12:05.000
I have a big struct for all the resources.

12:05.000 --> 12:08.000
And uh, functions, some way through.

12:08.000 --> 12:11.000
You see how all the functions as a separate thing.

12:11.000 --> 12:13.000
Um, and so that's that.

12:13.000 --> 12:16.000
Um, just to get really, you want to get really nerdy and technical.

12:16.000 --> 12:17.000
Yeah.

12:17.000 --> 12:19.000
Anybody else?

12:19.000 --> 12:22.000
So you can actually see in the code that I wrote.

12:22.000 --> 12:25.000
And this is all open source all on, uh, on GitHub.

12:25.000 --> 12:28.000
It's actually the whole thing is like not even a thousand.

12:28.000 --> 12:30.000
It's like 800 lines with comments.

12:30.000 --> 12:31.000
Docs.

12:31.000 --> 12:33.000
Um, it's really quite simple.

12:34.000 --> 12:37.000
The whole thing is just really this data structure called output.

12:37.000 --> 12:40.000
So the top level field version resources and functions.

12:40.000 --> 12:43.000
And then in the future, let's say there's a different aspect of my program.

12:43.000 --> 12:45.000
I want it to opt to add.

12:45.000 --> 12:48.000
I can put like, you know, thing here or whatever.

12:48.000 --> 12:52.000
Um, and then so the resources are all kind of this set of fields.

12:52.000 --> 12:55.000
And then, uh, functions are this set of fields.

12:55.000 --> 12:56.000
Makes sense.

12:56.000 --> 12:58.000
Um, I'm glazing over to a little bit, but it's, it's very,

12:58.000 --> 13:00.000
very easy once you start playing with it.

13:00.000 --> 13:03.000
And if you're doing this and you're stuck just joining our channel,

13:03.000 --> 13:05.000
and we can help walk you through it.

13:05.000 --> 13:06.000
So we have that.

13:06.000 --> 13:07.000
We generate the JSON.

13:07.000 --> 13:09.000
And then what do we do is we go over here.

13:09.000 --> 13:13.000
Um, and we copy the JSON to, uh,

13:13.000 --> 13:15.000
I think it's data.

13:15.000 --> 13:18.000
Uh, where is it?

13:18.000 --> 13:19.000
Uh, yeah.

13:19.000 --> 13:21.000
It's got to be in data.

13:21.000 --> 13:22.000
Yeah.

13:22.000 --> 13:25.000
So we're going to copy temp, uh,

13:25.000 --> 13:28.000
docs.json to docs right here.

13:28.000 --> 13:29.000
Okay.

13:29.000 --> 13:32.000
And so that you can see is, is, is, is, is, is, is, is, is, it's not sort of get actually

13:32.000 --> 13:33.000
exciting.

13:33.000 --> 13:34.000
We made it.

13:34.000 --> 13:36.000
And then we just run the the site generator again,

13:36.000 --> 13:42.000
which is this fun command, um, and so this statically generates a copy,

13:42.000 --> 13:43.000
but it's just keeping it locally.

13:43.000 --> 13:45.000
So I don't have to push it online.

13:45.000 --> 13:48.000
And then if we go here and refresh, refresh this page.

13:48.000 --> 13:50.000
Oops.

13:50.000 --> 13:53.000
You can see, um, you can see all the stuff is changed.

13:53.000 --> 13:55.000
Oh, oh.

13:55.000 --> 13:56.000
Oh, man.

13:56.000 --> 13:57.000
If you come to my other conferences, I can show you some rules.

13:57.000 --> 13:58.920
This is, I can show you some really hard code demos.

13:58.920 --> 14:00.280
This was easy.

14:00.280 --> 14:02.360
I didn't even study for this.

14:02.360 --> 14:05.400
Yeah, and so obviously, I've chosen what this looks like.

14:05.400 --> 14:07.640
So I've chosen the data structure to have all this data.

14:07.640 --> 14:09.880
So I have the signature of the function here.

14:09.880 --> 14:13.640
So if I wanted to change that to something else,

14:13.640 --> 14:17.440
like C-ball, this is our type signature.

14:17.440 --> 14:18.840
You don't have to know what that means.

14:18.840 --> 14:22.520
And I can go through the whole dance again,

14:22.520 --> 14:24.440
if you want to see that dance.

14:24.440 --> 14:26.720
I can just go there.

14:26.720 --> 14:31.160
Let's just copy that over on this again.

14:31.160 --> 14:32.560
And you don't have to re-run it.

14:32.560 --> 14:34.720
I'm just doing that because it's easier to fall

14:34.720 --> 14:36.440
than switching terminals.

14:36.440 --> 14:38.560
And you can refresh this.

14:38.560 --> 14:40.600
And did I refresh it?

14:40.600 --> 14:42.160
Did I copy it?

14:42.160 --> 14:44.200
I may have, maybe I didn't even save it.

14:47.640 --> 14:49.960
Should be saved.

14:49.960 --> 14:51.480
We can make it work.

14:51.480 --> 14:54.760
So it's output those docs.

14:54.760 --> 14:58.520
Copy them here.

14:58.520 --> 15:00.360
Should work.

15:00.360 --> 15:04.680
Doesn't you get your money back?

15:04.680 --> 15:06.640
I think it's actually caching something.

15:06.640 --> 15:09.200
Did you like get commit?

15:09.200 --> 15:10.840
No, but it does update.

15:10.840 --> 15:13.640
It definitely works.

15:13.640 --> 15:14.920
I actually wonder why that's not working.

15:14.920 --> 15:16.200
Now I'm more curious.

15:16.200 --> 15:20.760
But so we can actually look at the docs.json file,

15:20.760 --> 15:26.200
split, split.

15:26.200 --> 15:30.680
And this is why it's OK.

15:30.680 --> 15:31.200
Let's see.

15:31.200 --> 15:34.680
Let's be good hackers.

15:34.680 --> 15:37.360
Let's see, split.

15:37.360 --> 15:38.520
Strings.split.

15:38.520 --> 15:39.480
I don't know why I didn't come out.

15:39.480 --> 15:41.120
That's interesting.

15:41.120 --> 15:41.920
That's a mystery.

15:41.920 --> 15:46.800
But yeah, oh, it's probably because it

15:46.800 --> 15:49.160
wasn't a valid type or something.

15:49.160 --> 15:50.320
Let's try this.

15:50.320 --> 15:51.560
That's probably why.

15:51.560 --> 15:59.720
So if we modify it, I'm modifying it, not split.

15:59.720 --> 16:01.200
Yes, I know.

16:01.200 --> 16:03.200
Oh, I know why, actually, because I didn't

16:03.200 --> 16:03.800
excuse me.

16:03.800 --> 16:04.800
I didn't compile it again.

16:04.800 --> 16:06.440
So that's exactly what I didn't do.

16:06.440 --> 16:07.080
So I forgot.

16:07.080 --> 16:09.880
I have to compile it because it's part of the generated code.

16:09.880 --> 16:11.480
So that's actually the bug.

16:11.480 --> 16:12.960
And so then I run this.

16:12.960 --> 16:16.680
And then I can copy this over.

16:16.680 --> 16:19.520
And we can run this server.

16:19.520 --> 16:23.320
And now it will definitely work.

16:23.320 --> 16:24.000
And there you go.

16:24.000 --> 16:25.320
So now it's seen.

16:25.320 --> 16:29.640
And this is, yeah, I want to like,

16:29.640 --> 16:30.800
soapbox for a second.

16:30.800 --> 16:32.440
I see people do live demos.

16:32.440 --> 16:33.560
And something gets stuck.

16:33.560 --> 16:35.360
And they freak out and they're like, ah, don't get

16:35.360 --> 16:36.080
freak out.

16:36.080 --> 16:38.880
If you are giving a talk, you are the hacker.

16:38.880 --> 16:39.640
Like you can do this.

16:39.640 --> 16:40.880
So just hack it through.

16:40.880 --> 16:43.120
Like imagine if you went to like some concert,

16:43.120 --> 16:45.600
like you saw like, I don't know, like Drake or something.

16:45.600 --> 16:47.720
And he's like, ah, I need to stop playing.

16:47.720 --> 16:50.520
If you're near, like, put on a show, like don't be shy.

16:50.520 --> 16:52.400
Give life demos.

16:52.400 --> 16:55.760
Yeah, so that's how that works.

16:55.760 --> 16:58.200
We'll just go back to these boring sides.

16:58.200 --> 16:59.320
Do you do?

16:59.320 --> 17:00.760
I think I lost my place.

17:00.760 --> 17:01.760
Hi, I'm James.

17:01.760 --> 17:03.880
Physiologist, Barbara.

17:03.880 --> 17:06.720
Nope, no, demo, demo, docs, docs, docs.

17:06.720 --> 17:08.720
Apps aren't abstract syntax.

17:08.720 --> 17:11.840
So just some foundation of about foundations about what

17:11.840 --> 17:12.320
this work.

17:12.320 --> 17:13.000
Don't be scared.

17:13.000 --> 17:13.800
It's scary.

17:13.800 --> 17:14.880
It's just a tree structure.

17:14.920 --> 17:17.320
Imagine like at the root of a tree and then branches,

17:17.320 --> 17:21.000
it's just the kind of structure that the programs have.

17:21.000 --> 17:23.520
I just write all this stuff so you can see it.

17:23.520 --> 17:28.000
And most modern languages store the comments in this AST.

17:28.000 --> 17:29.280
They look typically like this.

17:29.280 --> 17:31.280
This is just stolen from Wikipedia.

17:31.280 --> 17:32.480
You don't have to know the specifics.

17:32.480 --> 17:35.760
But basically just think about in your program,

17:35.760 --> 17:38.200
there'll be a structure with parents and children

17:38.200 --> 17:40.920
and so on, and the comments should be in there somewhere.

17:40.920 --> 17:43.200
And it's very easy to parse these.

17:43.200 --> 17:44.480
It's even I can do it.

17:44.480 --> 17:46.840
So you could do it for sure.

17:46.840 --> 17:48.880
The parser, so you'll need a little parser.

17:48.880 --> 17:51.720
You'll need a small program to go through that AST.

17:51.720 --> 17:53.280
You don't have to write the parser from scratch,

17:53.280 --> 17:55.840
because typically the language that your parsing already

17:55.840 --> 17:57.720
has one, because they're using it for its own code.

17:57.720 --> 17:59.000
So don't write the parser from scratch.

17:59.000 --> 18:01.600
Just use their library.

18:01.600 --> 18:03.320
And just keep in mind.

18:03.320 --> 18:06.080
You don't only have to take data to build that data structure

18:06.080 --> 18:07.760
from the parser.

18:07.760 --> 18:10.840
You can also have internal APIs in your program.

18:10.840 --> 18:12.880
For example, my type API that you saw.

18:12.880 --> 18:14.920
And that's just data that's in my program

18:14.920 --> 18:16.560
that I run and I use that data too.

18:16.560 --> 18:18.640
So anything you want, you can just write a function

18:18.640 --> 18:21.120
that gets you that data, and then have that all

18:21.120 --> 18:23.040
build your struct.

18:23.040 --> 18:25.880
And so you build that single struct.

18:25.880 --> 18:26.960
I showed you some of the code.

18:26.960 --> 18:28.480
It's super simple.

18:28.480 --> 18:32.280
Again, all of the source if you want to go look at that.

18:32.280 --> 18:34.400
This is actually slightly tricky.

18:34.400 --> 18:37.920
But yeah, it was a few hours work sort of thing.

18:37.920 --> 18:39.800
I told you about this intermediate format.

18:39.800 --> 18:41.520
I find that very useful because now I can say,

18:41.520 --> 18:43.480
hey, I'm shit writing this website,

18:43.480 --> 18:45.840
or you want to make a book or something else.

18:45.840 --> 18:47.200
Other people can parse this, and you

18:47.200 --> 18:50.960
can have more formats all from that, that same source of truth.

18:50.960 --> 18:55.040
I love the single source of truth thing.

18:55.040 --> 18:56.200
I kind of showed you this as well.

18:56.200 --> 18:58.280
Static site generation is a beautiful thing,

18:58.280 --> 19:00.120
because I hate running sites and having

19:00.120 --> 19:02.240
a server where there's all sorts of free hosting

19:02.240 --> 19:05.080
that I kind of steal from the internet.

19:05.080 --> 19:08.080
And I showed you how I run this as well.

19:08.080 --> 19:10.680
And the lovely thing is that people that

19:10.680 --> 19:13.280
are not hardcore programmers can help out with my project.

19:13.280 --> 19:14.600
You can write docs.

19:14.600 --> 19:17.560
You can send pull requests to the box site,

19:17.560 --> 19:20.120
designer, make it less ugly, and so on.

19:20.120 --> 19:21.840
I showed you some photos of this.

19:21.840 --> 19:24.680
All of the links on this website, which is online,

19:24.680 --> 19:26.440
they have this view source link.

19:26.440 --> 19:28.880
So you can actually see the documentation,

19:28.880 --> 19:31.040
see a bug, and go right to the source code,

19:31.040 --> 19:32.680
where that is generated from.

19:32.680 --> 19:34.560
And so I generate those links as well.

19:34.560 --> 19:36.560
So if you see a problem, fix it.

19:36.560 --> 19:37.920
I would love that.

19:37.920 --> 19:39.320
Because I definitely want to write a code.

19:40.200 --> 19:43.000
Stringcat function, cat strings, like some things like that.

19:43.000 --> 19:45.560
So that's how that works.

19:45.560 --> 19:46.640
And so on.

19:46.640 --> 19:48.800
So testing, here's a really cool thing that I do.

19:48.800 --> 19:51.960
So every time I have a git commit,

19:51.960 --> 19:53.720
it goes through all these automated tests.

19:53.720 --> 19:56.520
And in fact, the script itself will check some things

19:56.520 --> 19:58.560
about if the documentation is right.

19:58.560 --> 20:00.480
In theory, it could check spelling, but it doesn't,

20:00.480 --> 20:01.560
but I spell really well.

20:01.560 --> 20:02.920
So that's great.

20:02.920 --> 20:03.840
And it runs these tests.

20:03.840 --> 20:05.120
So even if someone sends a patch,

20:05.120 --> 20:07.200
you can test your docs as well.

20:07.200 --> 20:09.000
Some people will put like, if you say,

20:09.000 --> 20:10.920
like, some really bad word, it will fail the test,

20:10.920 --> 20:14.360
or you can use your imagination.

20:14.360 --> 20:15.520
So how much time do I have left?

20:15.520 --> 20:17.080
Let's see, I've got five minutes.

20:17.080 --> 20:18.360
All right.

20:18.360 --> 20:20.880
I have a friend of mine actually named Ellie.

20:20.880 --> 20:25.000
She has this website, Ellie.com with two eyes.

20:25.000 --> 20:27.200
And she actually did the go-hugo work for this,

20:27.200 --> 20:29.600
because I knew how to do it, but I was crazy.

20:29.600 --> 20:31.840
And I was like, hey, why don't you do my doc site

20:31.840 --> 20:32.760
and go Hugo?

20:32.760 --> 20:35.120
Because she's running more Go Hugo stuff.

20:35.120 --> 20:37.720
And so if you want some Go Hugo work done,

20:37.720 --> 20:39.680
you should a great job in get patches,

20:39.680 --> 20:42.000
I reviewed the patches, and then merged it.

20:42.000 --> 20:44.880
So that's five stars.

20:44.880 --> 20:45.680
Hi, Ellie.

20:45.680 --> 20:47.280
Is this recorded?

20:47.280 --> 20:49.440
Where's the camera?

20:49.440 --> 20:50.440
Where?

20:50.440 --> 20:52.080
Oh, hi.

20:52.080 --> 20:54.200
So yeah, if you're interested, if you're interested,

20:54.200 --> 20:57.080
have a look, there's a find it hard to find, actually.

20:57.080 --> 20:59.680
I've been wanting something to do Hugo work for a while,

20:59.680 --> 21:03.160
like someone who knows Git and these kind of Linux technologies.

21:03.160 --> 21:04.760
I find it so hard to find people.

21:04.760 --> 21:06.680
So I don't know if it's just me, bad at searching,

21:06.680 --> 21:07.720
or whatever.

21:07.720 --> 21:08.480
What's next?

21:08.480 --> 21:10.680
In the future work, I really need to write some

21:10.680 --> 21:12.960
getting started guides for my tool.

21:12.960 --> 21:16.280
I've been lazy, I've been bad at focusing on new users.

21:16.280 --> 21:17.680
So I need to do that, but if you're interested

21:17.680 --> 21:20.240
in playing with MGMT and helping write stuff,

21:20.240 --> 21:21.560
I'd love that.

21:21.560 --> 21:22.920
We need to actually version the docs,

21:22.920 --> 21:25.040
so that as new versions of MGMT come out,

21:25.040 --> 21:27.680
you can click and see which version these docs are for.

21:27.680 --> 21:31.080
So the latest version is correct.

21:31.080 --> 21:33.800
And we need to actually start writing more architectural docs.

21:33.800 --> 21:36.040
Currently we just have standalone lockdown files,

21:36.040 --> 21:38.640
but I plan to move these into the main source tree

21:38.640 --> 21:40.680
as code and then parse them out.

21:40.680 --> 21:42.840
So just like about how internals work,

21:42.840 --> 21:45.120
not individual functions and stuff like that.

21:45.120 --> 21:47.160
And translation is the thing that I really

21:47.160 --> 21:50.440
need to get on and integrate the plumbing for translation.

21:50.440 --> 21:54.760
So if you speak French, keep out falsa, as manual,

21:54.760 --> 21:57.560
Battlesky, you show, anyways, whatever.

21:57.560 --> 22:00.400
So just any languages I love trying to learn languages,

22:00.400 --> 22:03.520
and I'm shit at a lot of them, but I'm trying.

22:03.520 --> 22:07.240
And what will be really cool is I should actually automate

22:07.240 --> 22:08.920
my docs pipeline with MGMT,

22:08.920 --> 22:10.760
instead of doing it manually as I have been doing.

22:10.760 --> 22:14.320
Whoops, but yeah, there's too many things to do.

22:14.320 --> 22:16.000
I didn't really want to be a business person.

22:16.000 --> 22:17.920
I don't want to do sales or consulting

22:17.920 --> 22:19.040
or any of these things.

22:19.040 --> 22:22.600
So if you keep plug, but if you want to help do MGMT stuff,

22:22.600 --> 22:24.640
I'm happy just running an MGMT project,

22:24.640 --> 22:27.680
but I need people who are good at making customer documentation

22:27.680 --> 22:30.200
and selling sales and stuff like that.

22:30.200 --> 22:32.760
So if you want to job doing that,

22:32.840 --> 22:35.880
you make the money, you give me like a small percentage.

22:35.880 --> 22:39.240
I get to be an awkward nerd, you get to be a super sales

22:39.240 --> 22:40.800
consulting hacker.

22:40.800 --> 22:42.160
Sound good, right?

22:42.160 --> 22:44.240
Binder, it's good stuff, right?

22:44.240 --> 22:45.280
Binder is a brilliant guy.

22:45.280 --> 22:47.680
He wrote some really patches, and then got busy with life,

22:47.680 --> 22:49.960
but he's coming back, Chris said.

22:49.960 --> 22:52.080
So yeah, if you really just randomly are running

22:52.080 --> 22:54.640
to help do free software, if you don't help me,

22:54.640 --> 22:56.480
then I have to go get money from investors

22:56.480 --> 22:58.920
and do like Prytar shit, which sucks.

22:58.920 --> 23:01.800
So don't be shy, let's just recap.

23:01.800 --> 23:03.200
He's just recapping his pen.

23:03.200 --> 23:05.640
It's my lovely joke from all the slides.

23:05.640 --> 23:08.800
We have a Matrix channel, MGMT config,

23:08.800 --> 23:11.120
the website, MGMT config.com.

23:11.120 --> 23:12.680
And we don't have a mailing list anymore

23:12.680 --> 23:14.240
because Red Hat used the hostess

23:14.240 --> 23:16.360
and then they nuked the whole infrastructure.

23:16.360 --> 23:19.160
So if you run mailing lists, let me know.

23:19.160 --> 23:21.720
Everyone knows about the technical vlog of James?

23:21.720 --> 23:22.720
Yeah.

23:22.720 --> 23:24.560
I know, it's not that exciting.

23:24.560 --> 23:26.720
If you do want to find out, I'm a purple idea

23:26.720 --> 23:31.520
on all these internet things, on not tomorrow

23:31.520 --> 23:32.880
the day after Monday.

23:32.880 --> 23:35.400
There's this big conference called Config Management Camp,

23:35.400 --> 23:36.440
which is, again, it's free.

23:36.440 --> 23:39.360
It's like a mini-fossed-em, like a thousand people-ish.

23:39.360 --> 23:43.200
And so I give a really technical talk about the tool.

23:43.200 --> 23:44.600
And then on Wednesday, we have a hack day,

23:44.600 --> 23:46.440
which is super fun.

23:46.440 --> 23:48.280
And blah, blah, blah.

23:48.280 --> 23:51.040
Stickers, if you want, that's really all I have.

23:51.040 --> 23:52.200
Thank you so much.

23:52.200 --> 24:01.600
I have maybe one or two minutes for questions.

24:01.600 --> 24:03.640
And then if you want a sticker, come grab,

24:03.640 --> 24:06.280
whoops, come grab outside, I'm happy to give you one.

24:06.280 --> 24:07.440
Question in the back.

24:07.440 --> 24:09.480
Yeah, blah, blah, blah.

24:09.480 --> 24:15.800
So my tool is, yeah, the question is, how does it

24:15.800 --> 24:17.880
compare to this other tool, which I couldn't have heard?

24:17.880 --> 24:19.960
But dox, dox, yeah.

24:19.960 --> 24:23.320
So it's, in some ways, very similar, the same idea, right?

24:23.320 --> 24:26.120
This is more about saying that instead of using one of these tools,

24:26.120 --> 24:28.360
it doesn't necessarily do exactly what you want.

24:28.360 --> 24:30.560
It's so cheap and simple to build exactly what you want

24:30.560 --> 24:34.360
in 700 lines of code, which is like five minutes.

24:34.360 --> 24:35.200
So yeah, great question.

24:35.200 --> 24:36.840
But it's the same rough idea, right?

24:36.840 --> 24:38.400
So yeah.

24:38.400 --> 24:41.160
And one more question, maybe?

24:41.160 --> 24:42.720
Oh, yeah, go ahead.

24:42.720 --> 24:45.400
The score, which is any programming language?

24:45.400 --> 24:47.400
This concept works with every programming language.

24:47.400 --> 24:50.240
My documentation generation tool was designed

24:50.240 --> 24:51.440
for my software.

24:51.440 --> 24:54.200
Of course, it's open source, so you can adapt it.

24:54.200 --> 24:55.880
So really, if you're writing and going,

24:55.880 --> 24:58.840
then you can definitely steal this and probably do

24:58.840 --> 25:00.160
close to what you want.

25:00.160 --> 25:00.800
So a good question.

25:00.800 --> 25:02.200
You had a question somewhere here?

25:02.200 --> 25:03.200
Yeah.

25:03.200 --> 25:04.640
Anyone else?

25:04.640 --> 25:05.600
I hope you enjoyed this.

25:05.600 --> 25:07.400
And do me a big favor.

25:07.400 --> 25:09.640
If you like this talk, go to the organizers,

25:09.640 --> 25:12.040
plug them like one at a time, like DDoS, like,

25:12.040 --> 25:13.960
really like James's talk.

25:13.960 --> 25:16.320
If you look on the website, sometimes there's a voting link

25:16.320 --> 25:17.320
to rate your talk.

25:17.320 --> 25:18.280
So I really appreciate that.

25:18.280 --> 25:20.080
I put all the ratings on my website.

25:20.080 --> 25:21.960
So you can, you know, so we have hopefully

25:21.960 --> 25:25.080
entertaining speakers and stickers outside.

25:25.080 --> 25:26.080
Thank you so much.

