summaryrefslogtreecommitdiffstats
path: root/2023/info/parallel-after.md
diff options
context:
space:
mode:
Diffstat (limited to '2023/info/parallel-after.md')
-rw-r--r--2023/info/parallel-after.md72
1 files changed, 19 insertions, 53 deletions
diff --git a/2023/info/parallel-after.md b/2023/info/parallel-after.md
index 2f390ff8..77006241 100644
--- a/2023/info/parallel-after.md
+++ b/2023/info/parallel-after.md
@@ -1,13 +1,10 @@
<!-- Automatically generated by emacsconf-publish-after-page -->
-<a name="parallel-mainVideo-transcript"></a>
-# Transcript
+<div class="transcript transcript-mainVideo"><a name="parallel-mainVideo-transcript"></a><h1>Transcript</h1>
-[[!template new="1" text="""Introduction""" start="00:00:00.000" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""Hi everyone!""" start="00:00:00.000" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Introduction""" start="00:00:00.000" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""Hi everyone!""" start="00:00:00.000" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Welcome to our talk on Parallel Text Replacement.""" start="00:00:01.640" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""My name is Lovro, and I'll be telling you about an""" start="00:00:04.640" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""interesting problem that my friend Valentino and I""" start="00:00:07.040" video="mainVideo-parallel" id="subtitle"]]
@@ -18,9 +15,7 @@
[[!template text="""with a quick overview of the implementation.""" start="00:00:19.080" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Let's get straight into it!""" start="00:00:21.520" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Problem: Goal""" start="00:00:23.440" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""Here is a problem that most of us have dealt with""" start="00:00:23.440" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Problem: Goal""" start="00:00:23.440" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""Here is a problem that most of us have dealt with""" start="00:00:23.440" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""at some point.""" start="00:00:25.800" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Assume we have a piece of code such as the following.""" start="00:00:27.040" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""We use a code example here, but in general what we're""" start="00:00:29.880" video="mainVideo-parallel" id="subtitle"]]
@@ -43,9 +38,7 @@
[[!template text="""We should object to doing things that the computer""" start="00:01:08.280" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""can do for us.""" start="00:01:10.280" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Problem: Naive Multi-pass""" start="00:01:12.360" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""So, one way to automate it is by using our old friend""" start="00:01:12.360" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Problem: Naive Multi-pass""" start="00:01:12.360" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""So, one way to automate it is by using our old friend""" start="00:01:12.360" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""query-replace (M-%) multiple times in a sequence.""" start="00:01:15.560" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""We first do a pass where we replace &quot;foo&quot; with &quot;bar&quot;,""" start="00:01:19.040" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""then we do another pass where we replace &quot;bar&quot; with &quot;foo&quot;.""" start="00:01:22.240" video="mainVideo-parallel" id="subtitle"]]
@@ -54,9 +47,7 @@
[[!template text="""doesn't work because it results in interference""" start="00:01:29.160" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""between the two replacements.""" start="00:01:31.560" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Problem: Clever Multi-pass""" start="00:01:34.200" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""Instead, we have to be a bit more clever.""" start="00:01:34.200" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Problem: Clever Multi-pass""" start="00:01:34.200" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""Instead, we have to be a bit more clever.""" start="00:01:34.200" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""We should first replace &quot;foo&quot; with a temporary string,""" start="00:01:36.800" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""in this case &quot;oof&quot;, that we will call a &quot;token&quot;.""" start="00:01:39.840" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""To avoid interference, we must be careful to ensure""" start="00:01:42.120" video="mainVideo-parallel" id="subtitle"]]
@@ -66,9 +57,7 @@
[[!template text="""and finally a third pass to replace the token with &quot;bar&quot;.""" start="00:01:52.720" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""This gives us the result we want.""" start="00:01:56.080" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Problem: Terminology""" start="00:01:57.720" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""Putting the implementation aside for a moment, this style""" start="00:01:57.720" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Problem: Terminology""" start="00:01:57.720" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""Putting the implementation aside for a moment, this style""" start="00:01:57.720" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""of text replacement, where we replace multiple sources""" start="00:02:01.920" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""with their targets, without running into interference""" start="00:02:05.600" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""issues between replacement pairs, is what we call""" start="00:02:09.040" video="mainVideo-parallel" id="subtitle"]]
@@ -90,9 +79,7 @@
[[!template text="""the previously substituted targets of any other pair.""" start="00:02:56.760" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""This is what we mean by &quot;no interference&quot;.""" start="00:03:00.200" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Problem: Scaling Multi-pass""" start="00:03:04.440" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""However, manually invoking multiple carefully chosen""" start="00:03:04.440" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Problem: Scaling Multi-pass""" start="00:03:04.440" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""However, manually invoking multiple carefully chosen""" start="00:03:04.440" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""query-replace commands gets old very quickly.""" start="00:03:08.000" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Say we scaled up the problem and wanted to perform n""" start="00:03:11.520" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""swaps instead of just two, e.g. to swap, or rather,""" start="00:03:14.200" video="mainVideo-parallel" id="subtitle"]]
@@ -111,9 +98,7 @@
[[!template text="""and two, might slow down the search if they're overly long.""" start="00:03:50.280" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Can we do better?""" start="00:03:53.480" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Solution: Single-pass""" start="00:03:55.920" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""Yes we can!""" start="00:03:55.920" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Solution: Single-pass""" start="00:03:55.920" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""Yes we can!""" start="00:03:55.920" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""We can actually perform just a single pass.""" start="00:03:56.840" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""The trick is to alternate between the replacement""" start="00:03:59.680" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""pairs, replacing whichever source occurs the earliest,""" start="00:04:02.280" video="mainVideo-parallel" id="subtitle"]]
@@ -122,9 +107,7 @@
[[!template text="""This interleaving of replacements is not something""" start="00:04:12.280" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""that's easy to do by hand with query-replace.""" start="00:04:14.520" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Solution: Existing""" start="00:04:18.240" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""Since this is Emacs we're talking about, of course""" start="00:04:18.240" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Solution: Existing""" start="00:04:18.240" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""Since this is Emacs we're talking about, of course""" start="00:04:18.240" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""there already exist solutions that implement this idea.""" start="00:04:20.960" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Here are few that we could find.""" start="00:04:23.560" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""The EmacsWiki has a page dedicated to this problem.""" start="00:04:25.960" video="mainVideo-parallel" id="subtitle"]]
@@ -171,9 +154,7 @@
[[!template text="""regexes and consolidates all of the existing ideas""" start="00:06:24.240" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""into a single package.""" start="00:06:27.120" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Solution: query-replace-parallel""" start="00:06:29.080" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""We call it query-replace-parallel.""" start="00:06:29.080" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Solution: query-replace-parallel""" start="00:06:29.080" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""We call it query-replace-parallel.""" start="00:06:29.080" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""The package is free and open-source and can currently""" start="00:06:31.360" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""be found on GitHub under hokomo/query-replace-parallel.""" start="00:06:34.160" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""The name is not yet finalized and we're open to any""" start="00:06:37.400" video="mainVideo-parallel" id="subtitle"]]
@@ -184,9 +165,7 @@
[[!template text="""With all of that said, let's go through a few demos""" start="00:06:48.900" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""to illustrate some use cases and see how to use the package.""" start="00:06:51.400" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Demonstration: Swap""" start="00:06:55.240" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""Our first demo is a simple swap, like the one we""" start="00:06:55.240" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Demonstration: Swap""" start="00:06:55.240" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""Our first demo is a simple swap, like the one we""" start="00:06:55.240" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""showed at the beginning of the presentation.""" start="00:06:57.560" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""This chunk of text is actually one of the tests""" start="00:06:59.240" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""from our package's code.""" start="00:07:02.160" video="mainVideo-parallel" id="subtitle"]]
@@ -209,9 +188,7 @@
[[!template text="""execute them until the end,""" start="00:07:49.203" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""and so on.""" start="00:07:50.240" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Demonstration: LaTeX""" start="00:07:53.970" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""The second demo shows our first regex use case.""" start="00:07:53.970" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Demonstration: LaTeX""" start="00:07:53.970" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""The second demo shows our first regex use case.""" start="00:07:53.970" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Imagine we have the following LaTeX code.""" start="00:07:56.280" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""We realize that we haven't been completely consistent""" start="00:07:58.720" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""in our use and naming of macros, so we decide to""" start="00:08:01.480" video="mainVideo-parallel" id="subtitle"]]
@@ -233,9 +210,7 @@
[[!template text="""There we go, the fixes are done and we didn't have""" start="00:08:42.280" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""to think about in which order to apply them.""" start="00:08:44.480" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Demonstration: Regex""" start="00:08:48.700" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""We now take a look at a more complicated regex""" start="00:08:48.700" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Demonstration: Regex""" start="00:08:48.700" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""We now take a look at a more complicated regex""" start="00:08:48.700" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""example to demonstrate that even advanced query-replace""" start="00:08:51.000" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""features are supported.""" start="00:08:53.680" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Each &quot;foo&quot; and &quot;bar&quot; in this example is followed by""" start="00:08:55.100" video="mainVideo-parallel" id="subtitle"]]
@@ -252,9 +227,7 @@
[[!template text="""Performing the replacements, we can see how each""" start="00:09:27.040" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""number is incremented or decremented appropriately.""" start="00:09:29.120" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Demonstration: Order""" start="00:09:36.320" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""We haven't covered it explicitly so some of you may""" start="00:09:36.320" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Demonstration: Order""" start="00:09:36.320" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""We haven't covered it explicitly so some of you may""" start="00:09:36.320" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""be wondering how parallel replacement deals with""" start="00:09:38.760" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""overlapping matches and whether the order of the""" start="00:09:41.360" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""replacement pairs is significant.""" start="00:09:43.840" video="mainVideo-parallel" id="subtitle"]]
@@ -280,9 +253,7 @@
[[!template text="""The order only matters when two or more sources""" start="00:10:46.760" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""share the same prefix, as in this example.""" start="00:10:49.960" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Demonstration: Fun""" start="00:10:54.440" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""The final demo tests the limits of the package and""" start="00:10:54.440" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Demonstration: Fun""" start="00:10:54.440" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""The final demo tests the limits of the package and""" start="00:10:54.440" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""shows that it fully integrates with query-replace.""" start="00:10:56.960" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""It is really just for fun and can even serve as a""" start="00:10:59.760" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""small Emacs brainteaser.""" start="00:11:03.040" video="mainVideo-parallel" id="subtitle"]]
@@ -310,9 +281,7 @@
[[!template text="""We confirm the prompt and finally rename our directories.""" start="00:12:16.300" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Wow, that really paid off.""" start="00:12:25.360" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""Implementation""" start="00:12:29.120" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""Before we finish, a few quick words about the""" start="00:12:29.120" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""Implementation""" start="00:12:29.120" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""Before we finish, a few quick words about the""" start="00:12:29.120" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""implementation for the curious.""" start="00:12:31.480" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Both query-replace-parallel and query-replace-parallel-regexp""" start="00:12:33.300" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""delegate to the complex perform-replace function""" start="00:12:36.480" video="mainVideo-parallel" id="subtitle"]]
@@ -354,9 +323,7 @@
[[!template text="""tried to do it in the simplest and least intrusive way""" start="00:14:14.040" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""possible.""" start="00:14:16.680" video="mainVideo-parallel" id="subtitle"]]
-[[!template new="1" text="""End""" start="00:14:18.740" video="mainVideo-parallel" id="subtitle"]]
-
-[[!template text="""In conclusion, go download and play with the package.""" start="00:14:18.740" video="mainVideo-parallel" id="subtitle"]]
+<div class="transcript-heading">[[!template new="1" text="""End""" start="00:14:18.740" video="mainVideo-parallel" id="subtitle"]]</div>[[!template text="""In conclusion, go download and play with the package.""" start="00:14:18.740" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Even if you're not performing overlapping replacements,""" start="00:14:21.680" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""you can still use query-replace-parallel for the""" start="00:14:24.560" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""peace of mind knowing that things won't go wrong if""" start="00:14:26.880" video="mainVideo-parallel" id="subtitle"]]
@@ -366,8 +333,7 @@
[[!template text="""improvements or bugs that make it only a 99% solution.""" start="00:14:37.560" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""Thanks for listening and have a great EmacsConf!""" start="00:14:40.640" video="mainVideo-parallel" id="subtitle"]]
-<a name="parallel-qanda-transcript"></a>
-# Q&A transcript (unedited)
+</div><div class="transcript transcript-qanda"><a name="parallel-qanda-transcript"></a><h1>Q&A transcript (unedited)</h1>
[[!template text="""[Speaker 0]: And I think we are live.""" start="00:00:08.620" video="qanda-parallel" id="subtitle"]]
[[!template text="""Hello again, everyone.""" start="00:00:09.620" video="qanda-parallel" id="subtitle"]]
@@ -625,7 +591,7 @@
[[!template text="""[Speaker 1]: Bye, thank you, see you.""" start="00:10:11.160" video="qanda-parallel" id="subtitle"]]
[[!template text="""[Speaker 2]: You""" start="00:10:15.060" video="qanda-parallel" id="subtitle"]]
-Questions or comments? Please e-mail [hokomo@disroot.org](mailto:hokomo@disroot.org?subject=Comment%20for%20EmacsConf%202023%20parallel%3A%20Parallel%20text%20replacement)
+</div>Questions or comments? Please e-mail [hokomo@disroot.org](mailto:hokomo@disroot.org?subject=Comment%20for%20EmacsConf%202023%20parallel%3A%20Parallel%20text%20replacement)
<!-- End of emacsconf-publish-after-page -->