WEBVTT

00:00.000 --> 00:13.280
Well, thank you everyone. My name is Amy Grin, and I'd like to talk today about ordmode witchcraft

00:13.280 --> 00:20.040
at Spritley. So Spritley Institute, I just want to talk a little bit about them first.

00:20.040 --> 00:26.120
I'm obviously a part of the Spritley Institute. I am the technical administrator. Spritley

00:26.120 --> 00:34.520
is working on the next generation of decentralized technology. That includes like peer-to-peer communication

00:34.520 --> 00:41.880
that is done securely using object capability security, which is not a new concept, but we

00:41.880 --> 00:47.080
feel that's probably that it's an underutilized concept. So that is something that we're

00:47.080 --> 00:53.920
passionate about, and we believe that it is going to enable secured collaboration

00:53.920 --> 01:02.360
between between a lot of different people. So actually Spritley is actually running a donor

01:02.360 --> 01:07.840
campaign right now. If you have any time, please visit Spritley.institute-donate, and you

01:07.840 --> 01:15.840
can see exactly what we're offering and how to support us. And this is really important.

01:15.840 --> 01:22.560
So please, if you have time, please visit that. And also, we're giving more talks than

01:22.640 --> 01:27.520
just this one. So this QR code will take you to a blog post, what that I've written, that

01:27.520 --> 01:34.560
shows you all of the different talks that Spritley is going to be doing. There are five

01:34.560 --> 01:41.120
more talks besides this one, and they're all worth your time. So please join them. I will

01:41.120 --> 01:49.240
be there, and they will be a lot of fun. They will be more time for this. Leave it up for a few

01:49.320 --> 01:59.960
seconds. Okay. So what you're looking at right here is a boxy diagram. Is this something

01:59.960 --> 02:07.000
that I wrote a couple of years ago? It's a way to view hierarchical data. And in this instance,

02:07.000 --> 02:12.040
we're looking at a different view of an org mode file. An org mode file is a hierarchical

02:12.120 --> 02:17.560
data structure. And all of these boxes represent different headings in the org mode file.

02:19.400 --> 02:24.360
So let me just talk a little bit about myself and all the other packages that I've written.

02:24.360 --> 02:29.720
So as I've mentioned, I am an EMAX package author, EMAX contributor, org mode contributor.

02:30.920 --> 02:35.800
If you want, you can see all of my packages at packages.amigrant.com.

02:35.800 --> 02:43.240
Here's what it looks like. And these are all the packages that I've written. You can see

02:43.240 --> 02:50.840
that the boxy ones. There's a lot of boxy packages. And you can install all of these through

02:50.840 --> 02:57.880
the normal EMAX process of use package or package list packages and these things. So if you

02:57.880 --> 03:02.680
just install my package archive, you can have these things. But some of these are available on

03:02.680 --> 03:07.560
Elpa. So you don't even need to do anything. You just package install boxy headings and you'll have

03:09.640 --> 03:19.560
this interface. So yeah, so that is a big part of my life. I really love EMAX. As you can tell,

03:19.560 --> 03:27.720
I've made a hat. Yeah, I've made the EMAX hat. And it's a little too small in the end. But it

03:27.720 --> 03:33.080
is really knitting is another thing that I'm very passionate about. So I like to combine my

03:33.080 --> 03:39.960
passions. And I think you can tell further on this talk that combined my passion for EMAX

03:39.960 --> 03:47.960
with Spritly. Another one of my passions is raising my beautiful dog. This is my dog Leo.

03:48.840 --> 03:55.000
He is very, very cute and very, very cuddly. And just love him to death. So I wanted to show him

03:55.000 --> 04:04.760
off to everyone because you all deserve Leo in your life. And as I mentioned and shown, I do

04:04.760 --> 04:09.640
like knitting quite a lot. I'm working on a couple different projects right now. And if anybody

04:09.640 --> 04:15.240
wants to talk to me about that, that is something that I would love to discuss as well. Yeah,

04:15.240 --> 04:23.800
anything, yeah. Okay. But today, I'm going to be talking more about my work. So as I said,

04:23.800 --> 04:30.360
it doesn't on the technical administrator. That includes a lot of different roles. Fun raising.

04:30.360 --> 04:38.040
I help write grants. I help do the donor campaign. I help take care of the public documents,

04:38.600 --> 04:44.680
like the the white papers and the documentation. And that's the point of this room. So I'm

04:44.680 --> 04:53.160
going to try to focus on that a lot. I'm also a web developer. So I'm helping develop the website.

04:53.160 --> 05:00.280
If you've seen our website, I made the the bar, the fundraising bar that fills up over time.

05:01.560 --> 05:05.480
And also, I help with administrative tests as technical administrator implies,

05:06.360 --> 05:15.080
just organizing and calendars and all these things. And the technical part of my job title

05:16.440 --> 05:22.920
is, you know, part of the website development and these things. But also, I do like working with

05:23.080 --> 05:29.160
our other technologies like hoot. And everybody's heard of who is our scheme to web assembly

05:29.160 --> 05:36.280
compiler. It is really fun to work with. And I'm writing a game. I'm helping write a game with hoot

05:36.280 --> 05:43.720
in order to show us some of the features and also test it. Push it to its limits. So that is the

05:43.800 --> 05:54.120
basic functions that I do throughout the day. But on top of all this is Emx in order to get it

05:54.120 --> 06:05.000
on top. So I stay in Emx basically all day. Except for video chats, you can't really do video chats

06:05.080 --> 06:17.960
in Emx, but there's a yet, exactly. Everything's possible in Emx. So there's four main topics that I

06:17.960 --> 06:24.200
wanted to discuss today about Emx in order mode. There's using E-list in a make file and a

06:24.200 --> 06:30.920
new make file. There is the language picker with order mode so that your documents can have multiple

06:31.000 --> 06:37.960
languages and the users can switch between them. And there is a way to share links with

06:37.960 --> 06:43.800
org mode on your phone. So this is something that I've developed that is really useful when I'm on

06:43.800 --> 06:53.320
the go. I can just save a link to my org mode files and retrieve them later. And finally, I am

06:53.320 --> 06:58.680
working, this is a work in progress, but I am working on plain text accounting for organization.

06:58.680 --> 07:04.120
And I'm going to try to demo some of the bean count integrations that I've done on the plain text

07:04.120 --> 07:15.640
accounting side of things. So I'll jump into the E-list make file. So make files, I don't know if

07:15.640 --> 07:22.280
everybody knows this, but you can change the shell. So if you just say shell equals Emx, it's not

07:22.280 --> 07:27.320
going to do exactly what you want. It's going to open Emx every single time that you have a target.

07:27.320 --> 07:34.600
But if you add these shell flags, dash Q means to not, it's quiet load, it means to not load any

07:34.600 --> 07:45.080
user settings so you can get builds. Well, pretty reproducible, it's not perfect, but if you do batch

07:45.080 --> 07:55.160
eval, then you can use E-list in a make file instead of a shell command. So let me show you how this

07:55.240 --> 08:08.040
works in practice. So this is just my environment. And these are the papers that we move right

08:08.040 --> 08:16.440
the white papers that are part of our organization's core, core, you know, identity. And that doesn't

08:16.440 --> 08:23.480
do much right there, but if I clean, you can see that it's running an E-list script. It's running

08:23.560 --> 08:32.840
delete directory instead of RM, RM dash RF. And I can make. So this, what this is doing is taking

08:32.840 --> 08:38.120
our org files, which is where we've written our documentation and our white papers, and it's converting

08:38.120 --> 08:45.960
them to OTT, HTML, and PDF. And it's also doing something else that is really unique to org mode,

08:45.960 --> 08:53.240
and that is called literate programming. And so it's taking all these code blocks, all these

08:53.240 --> 08:58.600
examples that are inside org mode, and stitching them together into one program. So let me show you

08:58.600 --> 09:08.200
what that looks like. Here's the actual build folder, and you can see that each file has four

09:08.280 --> 09:19.480
different formats, HTML, OTT, PDF, and what's the other one, org. And if you look at the

09:20.360 --> 09:29.240
org file, you can see, oops. Let's look at the source.

09:38.760 --> 09:47.480
Okay, along more. So you can see that this is going to tangle to taste of goblin's.sem. So this is just

09:47.560 --> 09:52.840
the imports of the taste of goblin's.sem. There's more to it, and we didn't want to just go

09:52.840 --> 09:57.880
sweat and give you all the code at once. So when you're reading the documentation, you can split

09:57.880 --> 10:04.920
up the code blocks, and then when you're building, when you're making the script, you can

10:08.920 --> 10:15.640
let's go to taste of goblin's.sem. It builds them, and it puts them all together. So you just saw the

10:15.640 --> 10:21.720
first bit at the top, but there's plenty of other source blocks that all get stitched together

10:21.720 --> 10:31.240
into one working program. So let me show you the make file here. As you can see, we've got the

10:31.240 --> 10:37.560
shell equals e-max, we've got the shell flags. Additionally, here we're loading a set of e-max.pl script.

10:37.560 --> 10:43.880
That is just a global setting up some variables and things. Well, it's important to note here is

10:44.760 --> 10:51.400
this is not ideal for most situations, but we were already using e-list as part of our build process.

10:51.400 --> 11:00.040
The only difference was that we were using bash, or s-h to run e-max, and then e-max runs these scripts.

11:00.760 --> 11:06.520
So it was one additional step, and also these files were kind of spread out over the project.

11:06.520 --> 11:11.080
So if you were looking at a single target, you wouldn't exactly know what was going on,

11:11.160 --> 11:16.040
unless you could look up that file. So it was a little bit cumbersome, and so I decided to

11:17.160 --> 11:23.480
write the whole make file in e-max. So you can see the clean that we already looked at the delete

11:23.480 --> 11:31.400
directory. Here's a more interesting one. So this target has multiple lines to it,

11:31.480 --> 11:41.880
which is tricky in make files because each line in a target is a separate shell.

11:43.160 --> 11:49.480
So you have to add this one shell line right here, the pseudo target, and that will make the entire

11:49.480 --> 11:55.160
target into a single shell, a single script, and a single S expression.

11:55.560 --> 12:03.560
One other cool thing about this technique is that you can switch the major mode of the

12:05.400 --> 12:10.360
of the make files. So right now we're in make file mode. So you can see that the syntax highlighting

12:10.360 --> 12:17.720
is for make files. But if I change to list interaction mode, now the make file text is white.

12:17.720 --> 12:24.200
It doesn't really mean anything anymore, and the e-list is highlighted. And I have, you know,

12:25.240 --> 12:29.560
these things, and at the bottom it tells me where it just gives me all the developer tools that

12:29.560 --> 12:35.800
we use to the completion and the type and everything of these functions.

12:37.560 --> 12:45.800
And we can switch back to make file mode. So that is basically the gist of how to write e-max in a make file.

12:55.160 --> 13:06.280
Okay. So now that you know how to build our docs, how do we integrate the language picker?

13:07.160 --> 13:17.720
And the first thing I want to show you is the language picker in action. So right now we've got

13:17.720 --> 13:26.120
two surface syntaxes to to to to to tutorialize our our our technology.

13:27.880 --> 13:28.760
Yeah, absolutely.

13:31.720 --> 13:37.080
Is that good? Yeah. Okay. So you can see in the top right corner of all these code blocks,

13:39.000 --> 13:42.680
these are the same things that we were looking at before in the work mode file that they've been

13:42.680 --> 13:49.080
exported to HTML. And we can switch between these two surface syntaxes. It looks very similar.

13:49.640 --> 13:55.800
Whisp is maybe feels a little more familiar to people that are are used to Python scripts.

13:55.800 --> 14:02.760
There's not as many parentheses and it's it's a little bit more white space oriented.

14:05.080 --> 14:11.240
I definitely prefer scheme. And when I first started at the organization, all the documents were

14:11.240 --> 14:18.920
in and whisp. And I found that a little bit hard to follow along with. So I was already converting

14:18.920 --> 14:24.440
these to scheme before I came up with the language picker. And I decided that other people would

14:24.440 --> 14:31.480
probably want this ability to. So let me now that you've seen it in action, let me show you how it works.

14:31.880 --> 14:41.080
So at the very top level, we've got this the body tag which covers the entire web page.

14:41.880 --> 14:47.400
It's got this data-lang attribute of scheme right now. And if I change it to whisp,

14:48.360 --> 14:57.160
the data-lang changes to whisp. So this is this is pretty simple. This is a JavaScript thing.

14:57.160 --> 15:02.520
And the reason that it has to be JavaScript is that we want all of these code blocks to be

15:02.520 --> 15:09.800
in sync. We want, we don't want one to be whisp in the next one to be scheme. We want either

15:09.800 --> 15:15.480
all of the code blocks to be whisp or all of them to be scheme. So that JavaScript changes it for

15:15.480 --> 15:26.360
the entire web page, not just a single thing. So here's the setup file for this.

15:27.800 --> 15:38.360
Can everybody see it? Okay. So right here, we've got a selector. So let me back up a little bit.

15:38.360 --> 15:46.040
This is an org file, but it begins with began export HTML, which means that when this file is

15:46.040 --> 15:52.200
exported HTML, this HTML code will be directly inserted into the final document.

15:53.080 --> 16:00.360
So this is actually a style tag within an HTML within an org. It's getting pretty meta.

16:03.640 --> 16:09.480
Here is the rules. So we're looking at the data-lang attribute of the body tag.

16:13.800 --> 16:20.600
Okay. Let me start over here. The whole block. This whole rule is to disable things,

16:20.600 --> 16:26.200
to not show them, to not display them, and to not interact with them. It's important to

16:26.200 --> 16:30.120
not display them, and not interact with them, because some screen readers will still be able to

16:30.120 --> 16:34.520
interact with non-displayed elements. It's not as common anymore, but it's still a good practice.

16:37.320 --> 16:41.400
So we got to think about this a little bit backwards. When data-lang equals scheme,

16:42.520 --> 16:49.640
you want to hide the source whisp. So it's a little bit unintuitive, but this makes sense when

16:49.720 --> 16:53.640
you think about it a little bit more. And when the data-lang equals whisp, you want to hide the

16:53.640 --> 17:00.360
scheme blocks. There's one more. These last two lines are for when JavaScript is disabled.

17:00.360 --> 17:06.200
Not everyone has JavaScript, especially at tour users. A lot of them don't have JavaScript

17:06.200 --> 17:14.920
enabled. And the trick that I used here is that the data-lang attribute does not have a default

17:15.000 --> 17:20.120
value. It's only set the a JavaScript. So if the data-lang attribute does not exist,

17:20.680 --> 17:26.840
then we have to choose a default language, we chose scheme. So we're hiding the whisp blocks.

17:27.720 --> 17:35.160
But we're also hiding the length select buttons themselves. So let me show you what this looks like.

17:36.520 --> 17:43.400
I can turn off JavaScript, and now you can see the buttons are gone.

17:45.240 --> 17:58.200
All right. So I've got about 12 minutes left, and I've got about two more things that I want to get through.

18:02.040 --> 18:06.680
Yeah, we'll start with share with org. I think this is really cool. I think that if you're using

18:06.680 --> 18:11.960
org mode, it is actually easier than you think to install it on your Android phone.

18:12.920 --> 18:19.480
You can use termux to do this. Emax, the development team at Emax is actively working on

18:19.480 --> 18:27.160
Android application. Termux is a little bit easier in my opinion right now, but that is very promising.

18:28.600 --> 18:38.120
So this is great now. It uses termux as a terminal emulator within Android.

18:39.080 --> 18:46.680
And let me show you exactly how this works. So you can see that I'm browsing my projects.

18:47.480 --> 18:53.080
I can see all my e-lifts packages here, and I'm just browsing the internet, and I find a project that I

18:53.080 --> 18:59.960
like. Chive. It's an alternative archive style for org mode. So I'm going to share it.

19:00.680 --> 19:05.560
And you can share it. If you've ever shared a link with friends or anything, you just click share,

19:05.560 --> 19:11.480
and then you click the right app. In this case, you're clicking org mode as the app that you're sharing with.

19:12.360 --> 19:15.640
You can add notes to it, like I just did there, and then you can capture it.

19:18.360 --> 19:24.760
And you can see that my intray has now the link and the date and time and the notes.

19:24.760 --> 19:32.200
And let me just play that one more time. So it's not just links, right? You can share text.

19:32.200 --> 19:37.800
If you just highlight text, there's actually a share button. So it's really, really flexible.

19:37.800 --> 19:44.840
And you can have different capture templates. So the template that I use has the timestamp

19:44.840 --> 19:50.600
automatically attached. There's other metadata that you could attach to. And the possibilities are just

19:50.600 --> 20:14.920
when it was here. So let me show you the setup script for that, too. So this is all you have to do.

20:14.920 --> 20:20.600
You just have to install termux, install e-max. There's pretty simple instructions. If you have

20:20.600 --> 20:26.280
any questions about this, if you have any trouble with this, please reach out to me and let me know.

20:28.680 --> 20:32.680
And also another thing about my blog is that it has my better verse profile.

20:32.680 --> 20:42.920
If you want to follow me, I would love that. And yeah. So that is the share with org

20:43.720 --> 20:54.680
part of my tooling that I use. And lastly, I'm going to talk about bean count, which is a

20:55.720 --> 21:00.120
plain text accounting tool. It's kind of a successor to ledger if you've ever heard of that.

21:02.680 --> 21:09.240
So I don't want to show you our internal ledger. So this is a very, very simple

21:09.880 --> 21:19.800
American-themed ledger. And I was showing you a boxy implementation before that

21:19.800 --> 21:26.360
that read an org file and it created a boxy diagram out of the headings. Here we can use

21:26.360 --> 21:34.840
boxy bean count to look at the different accounts, a tree structure of the accounts. So we

21:34.840 --> 21:42.120
can see that within expenses is travel and food. And we can see within liabilities is reimbursed

21:42.120 --> 21:48.200
me. And if you press the O button while you're over one of these boxes, it will take you to the

21:48.200 --> 21:53.080
first instance. You press O again and it will keep cycling through these instances.

21:56.120 --> 22:03.560
If you want to see all of the instances of a particular account, you can use all to enter.

22:04.360 --> 22:10.040
And it will split your buffer and it will use a different cursor position in each buffer

22:11.240 --> 22:18.840
so that you can easily see all of the times that me has been used.

22:25.080 --> 22:31.880
So one other thing that I really like doing is writing transient interfaces. And if anybody

22:32.040 --> 22:39.080
who here is used magic before? Lots of magic users. Great. So magic uses a transient interface.

22:39.960 --> 22:44.200
Magic actually the developer of magic developed the transient interface and now is a part of E-max.

22:46.440 --> 22:49.960
So I made a transient interface for bean count. I made it trans bean.

22:53.800 --> 22:58.600
And this is what it looks like. You can edit the transaction, it pulls in all the data from the

22:58.600 --> 23:05.800
parses of the transaction and you can edit it using similar tools that would be similar to

23:05.800 --> 23:12.600
magic users or be prepared familiar to magic users. So I can change the date and it will pull

23:12.600 --> 23:23.240
up a calendar like that and I can change it to 1111. I can change the flag on this.

23:23.240 --> 23:28.680
So if I change the flag to an exclamation point, it changes the color there.

23:31.240 --> 23:37.240
The other cool thing about the flag though is that it has to follow strict rules for bean count

23:37.240 --> 23:42.280
in order to be parsed correctly. So if I type in like an invalid flag, it's going to tell me

23:42.280 --> 23:46.280
the rejects that I have to follow and it's going to give me another chance.

23:46.600 --> 23:56.840
Bean count transactions are made up of postings. So of course you can edit the postings.

23:57.880 --> 24:06.120
I'm going to go ahead and edit the liabilities and I can change the account to Christine.

24:08.920 --> 24:14.360
So this is not quite finished yet. As you can tell there's more things to the posting than just

24:14.440 --> 24:20.440
the account name. And also I'd like to integrate these two things. The boxy diagram and the

24:21.240 --> 24:25.880
edit account page so that you can select a new account using the tree structure.

24:29.320 --> 24:34.280
Yeah, that's about all that I had planned. I'd like to open it up to questions now.

24:35.720 --> 24:39.000
I really appreciate everyone coming out. This is a very full room.

24:39.960 --> 24:43.160
And yeah, I just I love e-mix.

24:58.760 --> 25:02.520
There's a lot of different ways to do that. There's tramper for instance.

25:04.760 --> 25:06.760
Oh, yeah, so how do you do that?

25:09.000 --> 25:16.040
Thank you. So how do you get the data from your phone to your laptop or your desktop?

25:16.040 --> 25:21.000
Once you've shared with org mode, once you've shared with termux, there's a lot of different ways

25:21.000 --> 25:27.560
to do this. If you're phone and your laptop are connected via SSH, you can you can use a

25:27.560 --> 25:33.880
tramp file location as the capture location. So inside your capture template, you get to choose

25:33.960 --> 25:40.440
which file you use. And if you choose a SSH file, then you can save it remotely.

25:42.120 --> 25:47.800
There's another way, this is the way I use it. I use Sync thing. Sync thing is a really, really,

25:47.800 --> 25:54.120
really cool product. And I use that to sync my all my org files across all my devices.

25:54.920 --> 25:59.560
So there's a lot of different ways to handle that. I didn't specify any in the instructions,

25:59.560 --> 26:01.800
but there's plenty of ways to do that.

26:03.880 --> 26:16.520
I'm sorry, I don't quite, I don't understand.

26:16.520 --> 26:36.040
You know, let's talk afterwards. Yeah, yeah, I'm sorry. I'm not quite following right now,

26:36.040 --> 26:38.360
but yeah, sounds like a good question. Christine?

26:39.080 --> 26:44.520
Is there any particular reason that you might want to do the literate programming thing

26:44.520 --> 26:50.280
in a thing like part of spray liege, doctor note, like, would it be possibly useful for anything

26:50.280 --> 27:00.040
to be able to refine the color or anything like that? Yeah, that's right. Yeah, absolutely. So the

27:00.040 --> 27:06.040
question was, why do we use literate programming? And obviously a big reason for that is that we

27:06.120 --> 27:11.240
can split up the source file. And another reason is that we can, we can test automatically,

27:11.240 --> 27:17.400
test the file once we've tangled it out of the, of the org file, and we can run unit test

27:17.400 --> 27:22.680
on to make sure that it is correct.

27:22.680 --> 27:40.360
Yeah, so org mode has a variety of tools for this. You can, you can embed images and videos

27:40.360 --> 27:45.880
within an org file. They're not actually the files don't exist within the org file, the org

27:45.880 --> 27:51.880
files plain text. But if you have them in the same folder or if you serve them over the web

27:51.960 --> 27:58.840
in the same directory, then you can include them in whichever export format. As you can see,

27:58.840 --> 28:04.760
I did include some images. I did include some images inside the org mode itself. There are

28:04.760 --> 28:13.800
inline images, but it's really easy to customize that and to have it in multiple formats.

28:15.000 --> 28:16.760
All right, thank you so much, everyone.

