Transcript

[[!template text="""Hello, I'm Danny McClanahan. This is EmacsConf 2024. And""" start="00:00:00.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""this presentation is ostensibly about Emacs Regex""" start="00:00:13.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""compilation. But it'll lead a lot more in future""" start="00:00:17.160" video="mainVideo-regex" id="subtitle"]] [[!template text="""directions. Thanks for coming on this journey with me.""" start="00:00:22.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""This presentation is 50 slides, 50 footnotes, and that's""" start="00:00:30.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""intended for it to be a resource later on for your perusal. We""" start="00:00:36.720" video="mainVideo-regex" id="subtitle"]] [[!template text="""are unfortunately not going to be able to go into all of it,""" start="00:00:40.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""but I will try to be within 20 minutes so we can make it""" start="00:00:44.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""throughout Q&A. This is the structure of the talk.""" start="00:00:49.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""But enough about me. Who are you? And why are you here?""" start="00:00:56.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""I'm Danny McClanahan.""" start="00:01:03.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""My experience is a lot in build tools, especially in the""" start="00:01:09.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""package managers. That started because I realized I was""" start="00:01:13.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""wasting a lot of time. Then I didn't like that. I""" start="00:01:19.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""started wasting a lot of time, trying to avoid wasting time.""" start="00:01:23.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""Then I ended up... going so far around that I ended up""" start="00:01:29.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""stopping other people from wasting their own time, in this""" start="00:01:35.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""case, regarding failing builds. But this is a kind of""" start="00:01:40.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""pattern that you'll see. I'm talking a lot about patterns in""" start="00:01:44.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""this presentation. Parsing in text is another one of""" start="00:01:47.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""those tendencies that I have. Why am I here? I've got a lot""" start="00:01:52.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""of feelings about text. For the next 20 minutes, I'm""" start="00:01:57.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""making it your problem.""" start="00:02:00.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""First off, a huge shout out to Emacs Devel and the Emacs""" start="00:02:06.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""community in general. I spent a lot of time learning about""" start="00:02:09.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""what I'm about to talk about. I was definitely super""" start="00:02:12.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""confused at first. Then when I became less confused and I""" start="00:02:15.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""decided I was going to look at the regular expressions of the""" start="00:02:19.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""Regex engine, I was like, oh, it's old C code. It's""" start="00:02:23.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""Emacs. We can just use modern techniques. Turns out that's""" start="00:02:28.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""wrong for kind of two reasons. One, because using modern""" start="00:02:33.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""techniques or other engines don't necessarily do what""" start="00:02:37.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""Emacs regex engine currently does. Then secondarily,""" start="00:02:41.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""that's not actually as interesting as the other kind of""" start="00:02:44.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""larger goals that emacs-devel discussed. Thank you, Eli""" start="00:02:48.720" video="mainVideo-regex" id="subtitle"]] [[!template text="""Zaretskii, so, so much, especially Pip Cet and everyone else""" start="00:02:52.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""as well--I believe--Pip Cet, I hope I'm pronouncing that""" start="00:02:56.280" video="mainVideo-regex" id="subtitle"]] [[!template text="""correctly. Thank you so much. I'll be shouting you out""" start="00:02:59.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""later as well. Then these larger goals ended up""" start="00:03:01.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""overlapping a lot with my own research interests. And""" start="00:03:04.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""that's very exciting. I'm hoping it's exciting for you""" start="00:03:07.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""too. What is a regular expression? And when and how does""" start="00:03:09.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""implementation match formal theory? So what does formal""" start="00:03:14.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""theory mean? And we'll talk about that.""" start="00:03:16.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""What is a regular expression? So I might ask you this""" start="00:03:24.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""question, and you might give an answer. Then I might ask""" start="00:03:27.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""someone else, and they might have an answer. Then I might""" start="00:03:30.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""ask myself, and I might try to think of an answer. Our""" start="00:03:33.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""answers would, you know, see, the thing is, they'd all be""" start="00:03:38.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""correct, but they'd probably be slightly different, and""" start="00:03:41.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""they'd be different in kind of important ways. I'm""" start="00:03:45.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""using formal theory to kind of describe what unifies these""" start="00:03:50.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""interpretations and what causes this sort of divergence,""" start="00:03:55.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""both over time and then across code bases. I'm kind of""" start="00:04:00.120" video="mainVideo-regex" id="subtitle"]] [[!template text="""putting a flag in the ground here and saying formal theory is""" start="00:04:05.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""actually a really, really negative influence, I think, but""" start="00:04:09.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""it can be better. That's what I'm going to talk about in""" start="00:04:13.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""this talk, in this presentation. We might ask, how did""" start="00:04:16.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""this happen? and we might try to find a start state. We""" start="00:04:19.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""might put that place at the theories of formal languages""" start="00:04:26.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""that kind of arose, especially post Turing and post""" start="00:04:30.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""Chomsky. Especially there was this really, really""" start="00:04:34.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""interesting and powerful relationship with formal""" start="00:04:37.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""languages between representation and computation. And""" start="00:04:40.120" video="mainVideo-regex" id="subtitle"]] [[!template text="""then on top of that, we have regex as this really powerful""" start="00:04:43.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""union of theory and practice And then, like I mentioned,""" start="00:04:48.600" video="mainVideo-regex" id="subtitle"]] [[!template text="""this is kind of divergence that kind of occurs. This""" start="00:04:52.160" video="mainVideo-regex" id="subtitle"]] [[!template text="""divergence happens for a good reason. This happens because""" start="00:04:55.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""people were adding implementations and people adding""" start="00:04:58.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""features to implementations. While the people adding""" start="00:05:02.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""these features were often academics, they were""" start="00:05:04.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""industries, people that were hobbyists, they were""" start="00:05:06.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""interested in building practical tools. This is a good""" start="00:05:09.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""thing. This is still a good thing, even though it moves a""" start="00:05:12.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""little bit away from formal theory. But we start seeing some""" start="00:05:14.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""cracks developing, and we'll go into that in a second. We're""" start="00:05:18.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""just going to kind of electric slide into the 1980s here, and""" start="00:05:22.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""we're going to be confronted with two occurrences very""" start="00:05:27.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""similarly. We might call it simultaneous discovery. In""" start="00:05:31.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""1983, you have Michael Jackson demonstrating the""" start="00:05:35.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""moonwalk. Three years later, we have backtracking""" start="00:05:38.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""developed to stimulate EGREP-style regular expressions.""" start="00:05:42.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""These would both be incredibly influential in their own""" start="00:05:45.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""kind of branching paths. Here's where the gloves come""" start="00:05:48.600" video="mainVideo-regex" id="subtitle"]] [[!template text="""off. Formal theory, I claim, remains largely concerned""" start="00:05:54.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""with incremental improvements to artificial benchmarks,""" start="00:06:00.760" video="mainVideo-regex" id="subtitle"]] [[!template text="""and much less with expanding models to cover actual user""" start="00:06:03.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""needs. This isn't just about, oh, if you listened to""" start="00:06:07.280" video="mainVideo-regex" id="subtitle"]] [[!template text="""users, that you'd be a nicer person, you'd be a better""" start="00:06:11.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""engineer. What I'm actually saying is that they're missing""" start="00:06:16.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""out. When you don't listen to applications, you miss out on a""" start="00:06:19.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""lot of fantastic opportunities for novel theory. So""" start="00:06:23.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""this is, again, my complaint with formal theory as it""" start="00:06:26.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""stands. But we're gonna do better. Before we get better,""" start="00:06:30.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""we're gonna get, a little bit worse for a bit. We're going to""" start="00:06:34.600" video="mainVideo-regex" id="subtitle"]] [[!template text="""actually get a little bit worse is better. What I mean by""" start="00:06:36.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""that is, by the 1990s, we start looking into these""" start="00:06:40.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""non-backtracking engines. This is a bit of a reaction to""" start="00:06:43.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""backtracking. The current ones include RE2,""" start="00:06:46.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""hyperscan, and the rust regex library. These are all""" start="00:06:50.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""great. I'll talk about them later as well. They make use""" start="00:06:53.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""of these. They kind of call back to the earlier formal""" start="00:06:56.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""theory. They have linear runtimes for well-specified""" start="00:06:58.720" video="mainVideo-regex" id="subtitle"]] [[!template text="""search tasks.""" start="00:07:01.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""What happens if that doesn't fit your needs? We're going to""" start="00:07:02.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""talk about that. We're going to table that for a second,""" start="00:07:08.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""and we're going to focus more on Emacs, the subject of this""" start="00:07:11.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""conference. What are regex used for? And in this""" start="00:07:15.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""particular case, they're used for lots of things, with""" start="00:07:19.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""practically, and I think they should be. But more""" start="00:07:22.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""specifically, how do Emacs users use them? And I'm going to""" start="00:07:25.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""focus in on this text as input and output. I'll be kind of""" start="00:07:29.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""elaborating on this analogy as we continue. Why is text""" start="00:07:32.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""powerful? Text as I/O. The reason text programming""" start="00:07:38.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""languages and not just programming languages, but""" start="00:07:43.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""languages themselves, the reason why they're successful""" start="00:07:45.760" video="mainVideo-regex" id="subtitle"]] [[!template text="""and why they propagate, I claim, is because text is both""" start="00:07:49.160" video="mainVideo-regex" id="subtitle"]] [[!template text="""input readable and output writable. What this means""" start="00:07:52.280" video="mainVideo-regex" id="subtitle"]] [[!template text="""is that if you receive something in text, you can read it, And""" start="00:07:56.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""then you can also write it, you can modify it, and you can""" start="00:08:01.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""produce a new version of it. You're on a kind of level""" start="00:08:04.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""playing field. That's not always the case, though. You""" start="00:08:06.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""recall that I've worked a lot with build systems and package""" start="00:08:10.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""managers. There's a discussion that goes by the name of""" start="00:08:15.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""software supply chain security. I think it's a massive""" start="00:08:21.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""joke. The reason why is because people largely raise it""" start="00:08:25.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""to explain why their for-profit company with their""" start="00:08:29.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""for-profit product is going to solve the problem for you, as""" start="00:08:34.280" video="mainVideo-regex" id="subtitle"]] [[!template text="""opposed to the commons of open source. If you are unable to""" start="00:08:38.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""modify or deploy your code without employing an opaque""" start="00:08:41.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""external system, I think, then you have a hidden""" start="00:08:45.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""dependency. you don't remove a dependency, you just, by,""" start="00:08:48.600" video="mainVideo-regex" id="subtitle"]] [[!template text="""for example, paying into a for-profit product or using a""" start="00:08:53.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""closed-off supply chain, you end up just having a hidden""" start="00:08:59.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""dependency, you end up just displacing that. This can""" start="00:09:01.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""actually exert arbitrary control over your programming""" start="00:09:04.720" video="mainVideo-regex" id="subtitle"]] [[!template text="""output and potentially even your thoughts. This is really""" start="00:09:07.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""important. I'm going to dive in a little bit deeper and I'm""" start="00:09:11.280" video="mainVideo-regex" id="subtitle"]] [[!template text="""going to overload the term locality here. I'm going to""" start="00:09:15.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""say, if you cannot reproduce a system locally, it becomes an""" start="00:09:19.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""opaque external system. I'm going to give examples""" start="00:09:22.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""here, and these are going to be a bit of a hot take. First""" start="00:09:25.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""off, GUI IDEs. I think we might, well, some of us might agree""" start="00:09:27.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""with that here. I say development environments that only""" start="00:09:30.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""allow you to use a graphical interface, do not expose""" start="00:09:34.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""interaction with text, are explicitly trying to kind of""" start="00:09:38.120" video="mainVideo-regex" id="subtitle"]] [[!template text="""place you on a separate kind of plane where you're not an""" start="00:09:42.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""equal contributor to the people who make the development""" start="00:09:46.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""environment, make the development kind of frameworks""" start="00:09:50.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""here. We'll go one further. Cloud services are precisely,""" start="00:09:53.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""you know, they're useful for things that, you know, that""" start="00:09:57.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""require large domain computation, but, you know, Twitter,""" start="00:10:00.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""for example, didn't actually ever use any cloud services,""" start="00:10:04.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""external ones, because it was really important for them to""" start="00:10:08.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""actually own their own hardware, their own computation,""" start="00:10:12.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""their own thinking. Cloud services are a way to ensure""" start="00:10:15.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""that you're unable to reproduce a system without paying an""" start="00:10:20.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""amount per month, an amount per day, an amount per second, an""" start="00:10:24.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""amount per cycle to an external entity. I'm just going to""" start="00:10:28.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""conclude this with, I'd say, the argumentum ad absurdum,""" start="00:10:32.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""here, where large language models are all of these at once.""" start="00:10:35.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""They are a cloud service, specifically, and this is what""" start="00:10:39.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""makes them very evil, to make it so that, similar to GUI IDEs,""" start="00:10:42.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""so that text itself loses that ability to be both readable""" start="00:10:48.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""and writable. Instead, text is both unreadable, because""" start="00:10:52.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""it's produced by a machine, and then also unwritable,""" start="00:10:56.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""because you're subservient and subjugated to the machine,""" start="00:10:59.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""to the large language model to produce the code in the first""" start="00:11:03.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""place. You lose this input, output, readable, writable""" start="00:11:05.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""behavior that I claim text has specifically. To""" start="00:11:08.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""underline this, what is text? Text is local. Finally,""" start="00:11:13.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""we're at the subject of this conference. Emacs, I have""" start="00:11:19.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""double hearts with text. I start off the slide saying Emacs""" start="00:11:23.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""is a text editor. I think that's a good start. Which""" start="00:11:27.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""implements much of its own logic and user interface via""" start="00:11:31.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""text. What this means is that, you know, I say without""" start="00:11:34.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""trying, Emacs tries very hard, but without trying so hard,""" start="00:11:38.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""Emacs, is imbued with all of the capabilities that text has""" start="00:11:42.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""specifically. When you use text like Emacs does, and""" start="00:11:47.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""particularly you then start offering mechanisms to query,""" start="00:11:51.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""to transform, and to generally metaprogram text itself,""" start="00:11:55.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""you don't just have the ability to edit code in new ways. And""" start="00:12:00.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""this is something that I think is often lost, maybe not by""" start="00:12:03.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""participants of this conference, you particularly start""" start="00:12:07.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""being able to not only just edit code differently, but to""" start="00:12:11.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""change the way that you think about code and actually to""" start="00:12:14.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""expand your range of thought, the range of actions that you""" start="00:12:16.600" video="mainVideo-regex" id="subtitle"]] [[!template text="""can perform. You can actually start then editing at the""" start="00:12:20.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""speed of thought. This is where especially Regex kind of""" start="00:12:22.720" video="mainVideo-regex" id="subtitle"]] [[!template text="""comes into play. Finally, we get to the subject of the""" start="00:12:25.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""title of this talk. I'm about to disappoint a lot of""" start="00:12:30.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""people. I claim for good reason. Unfortunately, it's a""" start="00:12:33.600" video="mainVideo-regex" id="subtitle"]] [[!template text="""very brief walkthrough, but I'm going to go over what the""" start="00:12:38.760" video="mainVideo-regex" id="subtitle"]] [[!template text="""current Emacs Redix engine is. This is going to give us""" start="00:12:41.600" video="mainVideo-regex" id="subtitle"]] [[!template text="""enough context for the next section on future directions.""" start="00:12:43.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""Quickly, it's a backtracking engine over a multi-byte""" start="00:12:48.120" video="mainVideo-regex" id="subtitle"]] [[!template text="""code point. I'll define what that means. It's in""" start="00:12:51.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""regex-emacs.c. It's invoked in two ways, which you'll see""" start="00:12:53.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""is actually the same way, over a single contiguous string""" start="00:12:58.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""input. This is a Lisp string that you pass in. or over the""" start="00:13:01.760" video="mainVideo-regex" id="subtitle"]] [[!template text="""two halves of the gap buffer. This is when you match""" start="00:13:05.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""against a buffer text. We'll go into that a little bit""" start="00:13:07.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""more, but this is one of the really actually interesting and""" start="00:13:11.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""specific things about Emacs Regex Engine as it stands. So""" start="00:13:13.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""very, very quickly, this is the data layout. This is just, if""" start="00:13:17.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""you're interested, this is where the code lies. So""" start="00:13:21.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""regex-emacs.h has re-pattern buffer, which is a struct""" start="00:13:24.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""Actually, you know, I love, by the way, I love the Emacs C""" start="00:13:30.160" video="mainVideo-regex" id="subtitle"]] [[!template text="""source code. It's so nice to read. It made all this so, so""" start="00:13:34.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""easy. I really appreciated it. In this particular case,""" start="00:13:37.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""I'm just going to focus on re-pattern buffer actually has""" start="00:13:41.120" video="mainVideo-regex" id="subtitle"]] [[!template text="""the compiler. It's a C struct. It has every single thing""" start="00:13:44.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""that is needed to execute the regular expression against a""" start="00:13:48.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""string input or against a buffer input. This buffer,""" start="00:13:52.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""It's not an Emacs buffer. It refers to just the instruction""" start="00:13:56.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""table and the match loop. Again, this is very, very""" start="00:13:59.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""brief, but I want to specifically focus on the first part. So""" start="00:14:04.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""this is this inner matching loop, and there's a prologue,""" start="00:14:07.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""and then there's a loop body, and there's an epilogue. And""" start="00:14:11.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""the prologue is the really, really interesting part. I say""" start="00:14:15.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""extract current and next char. What Emacs does here, it""" start="00:14:18.280" video="mainVideo-regex" id="subtitle"]] [[!template text="""doesn't just reach for the next byte. It actually will""" start="00:14:22.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""perform lazily in some sense, this variable integer size""" start="00:14:27.160" video="mainVideo-regex" id="subtitle"]] [[!template text="""VAR decoding for multi-byte, and it'll actually then""" start="00:14:31.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""decode the next one to four bytes. Up to 32 bits at once, and""" start="00:14:36.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""then it'll actually go into the loop. We'll talk about the""" start="00:14:43.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""implications of that later. Next, in the body of the loop, we""" start="00:14:46.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""read the instruction from the instruction pointer, which""" start="00:14:52.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""is, again, in that buffer field. Then we have this big""" start="00:14:54.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""switch statement, which is actually, love a big switch""" start="00:14:57.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""statement, super easy to read, super easy to understand""" start="00:14:59.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""kind of what's occurring. Then that's the loop body. And""" start="00:15:02.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""then at the end of it, we either increment the instruction""" start="00:15:05.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""pointer if it was matching a single character or something""" start="00:15:08.280" video="mainVideo-regex" id="subtitle"]] [[!template text="""along those lines, or if it was a jump, we don't do that. A""" start="00:15:11.120" video="mainVideo-regex" id="subtitle"]] [[!template text="""jump, however, it's not referring to a jump in the sense of a""" start="00:15:14.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""go-to, but a jump that's elsewhere within that table, that""" start="00:15:18.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""buffer field. If you've included a capture, we write""" start="00:15:22.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""that end position there. Of course, well, as you may""" start="00:15:25.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""recall, the zeroth capture is, of course, the entire match""" start="00:15:29.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""string. If the capture is zero, then we know we've""" start="00:15:34.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""actually completed that match. That's really great.""" start="00:15:36.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""I would love to receive Q&A about this as well. I've spent a""" start="00:15:39.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""lot of time kind of learning and understanding it. But it's""" start="00:15:43.600" video="mainVideo-regex" id="subtitle"]] [[!template text="""really interesting that this can be described in a single""" start="00:15:46.720" video="mainVideo-regex" id="subtitle"]] [[!template text="""slide because it's really simple. That simplicity is""" start="00:15:49.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""actually a really powerful thing. I'll mention that in""" start="00:15:52.160" video="mainVideo-regex" id="subtitle"]] [[!template text="""the next section. I say, is that all? And I apologize for""" start="00:15:54.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""not doing so. But please, please ask questions in Q&A or""" start="00:15:58.760" video="mainVideo-regex" id="subtitle"]] [[!template text="""message me about this, because I think it's really, really,""" start="00:16:02.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""again, interesting. Again, I find the code relatively""" start="00:16:05.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""easy to read. Now, here's, I think this is actually the""" start="00:16:07.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""point of the talk. The rest of it was, you know, I think just me""" start="00:16:12.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""posturing. This is the really, really interesting part.""" start="00:16:15.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""This is the ways that we can improve, well, not just we can""" start="00:16:18.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""improve stuff in Emacs, but why those are the right things to""" start="00:16:22.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""improve. Then also how that can be a model for even things""" start="00:16:25.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""outside of Emacs. This is gonna be a lot of text. I'm not""" start="00:16:30.280" video="mainVideo-regex" id="subtitle"]] [[!template text="""gonna go through all of it. This is the one thing that I tried.""" start="00:16:35.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""This is the thing that I thought would be a slam dunk, easy""" start="00:16:38.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""solution. My initial thought process was, well, We tried""" start="00:16:42.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""very hard to do an LRU cache here. It works. It's actually""" start="00:16:47.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""very effective. However, though, we don't actually give""" start="00:16:52.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""the user, the list programmer, the ability to then say, I""" start="00:16:57.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""know that this regex is something that is going to be used""" start="00:17:00.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""again. I made an artificial benchmark. I made an""" start="00:17:03.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""artificial benchmark because I wanted to show there is one""" start="00:17:06.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""very specific case that it does solve, but it's the same""" start="00:17:10.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""issue with the artificial benchmarks. mentioned earlier.""" start="00:17:13.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""It's very specifically crafted in order to show that this""" start="00:17:16.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""particular solution would produce some speedup. What""" start="00:17:21.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""this means is it just creates more than 20 regexps in a row. It""" start="00:17:25.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""compiles them. Then, of course, because we just don't""" start="00:17:29.600" video="mainVideo-regex" id="subtitle"]] [[!template text="""pay the compile costs, because we don't go through that""" start="00:17:31.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""cache eviction process, it ends up being faster. But this""" start="00:17:35.160" video="mainVideo-regex" id="subtitle"]] [[!template text="""isn't really mean very much, particularly the goal here,""" start="00:17:39.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""you know, the goal would have been to show that the compile""" start="00:17:42.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""cache is actually causing the performance issue in""" start="00:17:45.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""comparison to pre-compiling it. That's not something""" start="00:17:48.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""I've been able to show. Match over bytes, not cars. So""" start="00:17:51.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""this is when I said at the beginning, oh, I came in and I think,""" start="00:17:56.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""oh, we can just use modern regex engine techniques. This is""" start="00:17:59.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""really what I meant. In particular, I mentioned in this""" start="00:18:02.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""match loop here that there's this, prolog that does this""" start="00:18:05.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""varring decoding. What this means is that every single""" start="00:18:09.280" video="mainVideo-regex" id="subtitle"]] [[!template text="""iteration of that loop is going to be interspersed with this""" start="00:18:13.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""not being able to read a fixed number of bytes, but a variable""" start="00:18:18.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""number of bytes just depending upon the Unicode character""" start="00:18:21.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""or the Unicode code point or the multibyte code point. So""" start="00:18:24.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""this ends up, again, being relatively difficult to""" start="00:18:27.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""optimize because processors operate over bytes and not""" start="00:18:29.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""over code points. Yes, we might consider a multi-byte CPU at""" start="00:18:32.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""some point. But this is a really, really simple thing. It's""" start="00:18:38.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""just generating automata that operate over bytes as""" start="00:18:41.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""opposed to code points. This kind of goes into the much more""" start="00:18:45.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""abstract one. There's a lot of text here, and we're not""" start="00:18:48.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""going to go into it. But the really, really important point""" start="00:18:51.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""that I'm specifically mentioning here is this explicit""" start="00:18:56.160" video="mainVideo-regex" id="subtitle"]] [[!template text="""control over linguistic complexity. That's the""" start="00:18:58.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""abstract kind of point. I want to introduce the inputs and""" start="00:19:02.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""the outputs. Basically, when you perform a search, or a""" start="00:19:06.160" video="mainVideo-regex" id="subtitle"]] [[!template text="""match, or a parse, those are different tasks. They'll""" start="00:19:11.280" video="mainVideo-regex" id="subtitle"]] [[!template text="""have different expected inputs and different desired""" start="00:19:14.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""outputs. Right now, Emacs, the API for the regular""" start="00:19:17.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""expression engine and for matching, It doesn't allow""" start="00:19:21.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""specialization on this. Or rather, if we do specialize on""" start="00:19:24.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""particular inputs, if we have a heuristic to check if a regex""" start="00:19:27.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""is actually a literal string, that's not something that the""" start="00:19:31.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""user actually has control over. For example, you can make""" start="00:19:33.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""a mistake escaping something, and then you don't have a""" start="00:19:36.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""literal, and then you accidentally have behavior that you""" start="00:19:39.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""totally didn't expect. Not just correctness issues, but""" start="00:19:42.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""also performance issues. I really like this one. I like""" start="00:19:44.280" video="mainVideo-regex" id="subtitle"]] [[!template text="""this a lot, because I didn't think of it at all. I think it's""" start="00:19:48.600" video="mainVideo-regex" id="subtitle"]] [[!template text="""better than in all of my ideas. This was proposed, at least""" start="00:19:52.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""to me, by Pip Cet, and I really hope that I'm pronouncing your""" start="00:19:58.120" video="mainVideo-regex" id="subtitle"]] [[!template text="""name correctly. I'm sorry I didn't ask you beforehand,""" start="00:20:01.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""emacs-devel. In particular, this was after a couple of""" start="00:20:04.480" video="mainVideo-regex" id="subtitle"]] [[!template text="""responses where I was trying to say, oh, I want to give the""" start="00:20:08.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""list programmer, way back in here, I want to give the list""" start="00:20:12.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""programmer the ability to control compilation in some""" start="00:20:15.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""sense. you know, he mentioned, I think he is correct, you""" start="00:20:20.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""know, there's no real introspection. That happens""" start="00:20:25.760" video="mainVideo-regex" id="subtitle"]] [[!template text="""because it's written in C. I was thinking, oh, if I turn""" start="00:20:28.440" video="mainVideo-regex" id="subtitle"]] [[!template text="""this into a list object that gives the list programmer the""" start="00:20:33.120" video="mainVideo-regex" id="subtitle"]] [[!template text="""power and the ability to do more with that, but it doesn't""" start="00:20:35.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""actually because it's still in C. At first, I was""" start="00:20:40.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""thinking, oh, we can make the C part more flexible. But""" start="00:20:42.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""actually, especially if we want to do almost any of the""" start="00:20:46.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""things we previously mentioned, I think basically that""" start="00:20:50.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""this is... I think that if I'm not going to do it, somebody""" start="00:20:52.720" video="mainVideo-regex" id="subtitle"]] [[!template text="""else really should do it, and I think we should maybe even do""" start="00:20:56.600" video="mainVideo-regex" id="subtitle"]] [[!template text="""it together, because I think this is really, I think, how we""" start="00:20:58.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""can start experimenting, and not just experimenting, but""" start="00:21:01.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""because, as mentioned here, we have libgccjit, we have the""" start="00:21:04.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""native compiler, we have the ability to opt, like,""" start="00:21:07.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""specifically to generate specific code for this, so why not""" start="00:21:09.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""implement the or a Redix engine itself in list, And this""" start="00:21:12.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""gives us the ability to introspect it. That's one of the""" start="00:21:15.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""things I mentioned at the beginning. But it actually gives""" start="00:21:18.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""us the ability to then actually look at all the previous""" start="00:21:20.760" video="mainVideo-regex" id="subtitle"]] [[!template text="""implementations, to explicitly compile beforehand, to""" start="00:21:23.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""match against bytes, to specialize and dispatch based upon""" start="00:21:28.160" video="mainVideo-regex" id="subtitle"]] [[!template text="""input and output. This is something that, you know, it's""" start="00:21:32.520" video="mainVideo-regex" id="subtitle"]] [[!template text="""super simple.""" start="00:21:36.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""It's really smart. I'm really, really glad that Pip""" start="00:21:38.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""mentioned this because it is, I think, the right way to solve""" start="00:21:40.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""the rest of it. We're at the final section. I talked a""" start="00:21:44.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""lot about, you know, kind of abstract, you know, thoughts.""" start="00:21:49.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""I talked a little about, you know, specific solutions.""" start="00:21:52.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""But I especially talked about, you know, what is Regex and""" start="00:21:55.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""Emacs? And I don't know if I had a lot of specific examples of""" start="00:22:00.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""it. I'm going to just describe kind of my, I guess,""" start="00:22:02.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""motivation, my impetus. Then I think something that's""" start="00:22:06.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""really something to chew on for the future. Do I have any""" start="00:22:09.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""concrete examples? Yes. Well, you can decide if they're""" start="00:22:12.640" video="mainVideo-regex" id="subtitle"]] [[!template text="""concrete. Or am I just posturing? Also, yes. helm, rg. Helm,""" start="00:22:15.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""Erg, it's literally just M-x grep, it uses ripgrep, which""" start="00:22:22.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""is written by the same author of the Rust regex [??]. It""" start="00:22:27.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""happens to be very, very fast. In particular, I use this tool""" start="00:22:32.000" video="mainVideo-regex" id="subtitle"]] [[!template text="""with ripgrep on the Twitter monorepo, and I was able to""" start="00:22:36.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""search very, very large amounts of code that was on my local""" start="00:22:39.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""machine using regular expressions. I think this is one""" start="00:22:42.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""thing that I think is really, really important, because""" start="00:22:46.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""when you want to scale, People say the word scaling and they""" start="00:22:49.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""assume there's a specific kind of answer for that. I've""" start="00:22:52.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""just found that text is not only flexible, it's actually""" start="00:22:56.720" video="mainVideo-regex" id="subtitle"]] [[!template text="""something that can be more performant than the alternative""" start="00:23:01.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""and not only more performant, but more productive. It's""" start="00:23:04.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""again, it's just M-x grep using ripgrep. There's a tool""" start="00:23:07.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""deadgrep by Wilfred Hughes, which is also fantastic. I""" start="00:23:10.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""think it's actually better than this, but this one's mine so""" start="00:23:12.720" video="mainVideo-regex" id="subtitle"]] [[!template text="""I can mess around with it. But this tool is kind of why,""" start="00:23:15.760" video="mainVideo-regex" id="subtitle"]] [[!template text="""especially I started looking into Emacs and looking into""" start="00:23:19.200" video="mainVideo-regex" id="subtitle"]] [[!template text="""changing the way that, or at least diving into how the""" start="00:23:21.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""regular expression matching actually kind of works, both""" start="00:23:24.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""in Emacs and then in ripgrep. We'll go to the next one.""" start="00:23:27.560" video="mainVideo-regex" id="subtitle"]] [[!template text="""This is something that does exist and continues to exist.""" start="00:23:30.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""This is something that doesn't quite exist yet. I'm""" start="00:23:34.120" video="mainVideo-regex" id="subtitle"]] [[!template text="""calling it telepathy grams. It's, you know, it's the name,""" start="00:23:36.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""and it's very, you know, it doesn't work, but it's a code""" start="00:23:41.360" video="mainVideo-regex" id="subtitle"]] [[!template text="""search tool that, in this case, precompiles the database to""" start="00:23:44.720" video="mainVideo-regex" id="subtitle"]] [[!template text="""execute NFAs against. I was thinking, how can I beat And""" start="00:23:47.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""the first thing I thought is, well, as I have worked on build""" start="00:23:51.880" video="mainVideo-regex" id="subtitle"]] [[!template text="""tools, especially in monorepos, one of the things that the""" start="00:23:55.040" video="mainVideo-regex" id="subtitle"]] [[!template text="""pants build tool from Twitter does is it uses a file watcher""" start="00:23:57.760" video="mainVideo-regex" id="subtitle"]] [[!template text="""to ensure that instead of having to constantly read in the""" start="00:24:00.800" video="mainVideo-regex" id="subtitle"]] [[!template text="""entire contents of a file, which may be very, very large, it""" start="00:24:04.240" video="mainVideo-regex" id="subtitle"]] [[!template text="""only does so when the file has been changed. Finally, I""" start="00:24:10.080" video="mainVideo-regex" id="subtitle"]] [[!template text="""want to conclude on this note, which is just that the stuff I""" start="00:24:13.680" video="mainVideo-regex" id="subtitle"]] [[!template text="""didn't learn from emacs devel, I learned from Paul""" start="00:24:16.920" video="mainVideo-regex" id="subtitle"]] [[!template text="""Wankadia, Jr., who is the RE2 maintainer, and he taught me""" start="00:24:20.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""quite a lot from 2023 to 2024. I'm thankful for the time""" start="00:24:25.320" video="mainVideo-regex" id="subtitle"]] [[!template text="""that I learned from you, so thank you, Paul. With that, we're""" start="00:24:32.400" video="mainVideo-regex" id="subtitle"]] [[!template text="""at point-max. Call me, beat me, if you want to reach me and or""" start="00:24:37.960" video="mainVideo-regex" id="subtitle"]] [[!template text="""hire me. These are places that you can reach me at. There are""" start="00:24:42.760" video="mainVideo-regex" id="subtitle"]] [[!template text="""probably others. Feel free to suggest other ways to contact""" start="00:24:45.840" video="mainVideo-regex" id="subtitle"]] [[!template text="""me. But for now, this is the end. Thank you so much for your""" start="00:24:49.720" video="mainVideo-regex" id="subtitle"]] [[!template text="""time. I really appreciate it.""" start="00:24:53.200" video="mainVideo-regex" id="subtitle"]]
Captioner: sachac Questions or comments? Please e-mail [dmcC2@hypnicjerk.ai](mailto:dmcC2@hypnicjerk.ai?subject=Comment%20for%20EmacsConf%202023%20regex%3A%20Emacs%20regex%20compilation%20and%20future%20directions%20for%20expressive%20pattern%20matching)