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.md64
1 files changed, 32 insertions, 32 deletions
diff --git a/2023/info/parallel-after.md b/2023/info/parallel-after.md
index 653eb525..9b0b6ae6 100644
--- a/2023/info/parallel-after.md
+++ b/2023/info/parallel-after.md
@@ -5,9 +5,9 @@
# Transcript
-[[!template text="""Introduction""" video="00:00:00.000" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Introduction""" video="00:00:00.000" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""Hi everyone!""" start="00:00:00.000" video="mainVideo-parallel" id="subtitle"]]
+[[!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 +18,9 @@
[[!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 text="""Problem: Goal""" video="00:00:23.440" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Problem: Goal""" video="00:00:23.440" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""Here is a problem that most of us have dealt with""" 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"]]
[[!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 +43,9 @@
[[!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 text="""Problem: Naive Multi-pass""" video="00:01:12.360" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Problem: Naive Multi-pass""" video="00:01:12.360" id="subtitle"mainVideo-parallel]]
-[[!template new="1" 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="""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 "foo" with "bar",""" start="00:01:19.040" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""then we do another pass where we replace "bar" with "foo".""" start="00:01:22.240" video="mainVideo-parallel" id="subtitle"]]
@@ -54,9 +54,9 @@
[[!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 text="""Problem: Clever Multi-pass""" video="00:01:34.200" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Problem: Clever Multi-pass""" video="00:01:34.200" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""Instead, we have to be a bit more clever.""" 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"]]
[[!template text="""We should first replace "foo" with a temporary string,""" start="00:01:36.800" video="mainVideo-parallel" id="subtitle"]]
[[!template text="""in this case "oof", that we will call a "token".""" 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 +66,9 @@
[[!template text="""and finally a third pass to replace the token with "bar".""" 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 text="""Problem: Terminology""" video="00:01:57.720" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Problem: Terminology""" video="00:01:57.720" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""Putting the implementation aside for a moment, this style""" 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"]]
[[!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 +90,9 @@
[[!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 "no interference".""" start="00:03:00.200" video="mainVideo-parallel" id="subtitle"]]
-[[!template text="""Problem: Scaling Multi-pass""" video="00:03:04.440" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Problem: Scaling Multi-pass""" video="00:03:04.440" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""However, manually invoking multiple carefully chosen""" 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"]]
[[!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 +111,9 @@
[[!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 text="""Solution: Single-pass""" video="00:03:55.920" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Solution: Single-pass""" video="00:03:55.920" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""Yes we can!""" 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"]]
[[!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 +122,9 @@
[[!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 text="""Solution: Existing""" video="00:04:18.240" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Solution: Existing""" video="00:04:18.240" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""Since this is Emacs we're talking about, of course""" 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"]]
[[!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 +171,9 @@
[[!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 text="""Solution: query-replace-parallel""" video="00:06:29.080" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Solution: query-replace-parallel""" video="00:06:29.080" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""We call it 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"]]
[[!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 +184,9 @@
[[!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 text="""Demonstration: Swap""" video="00:06:55.240" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Demonstration: Swap""" video="00:06:55.240" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""Our first demo is a simple swap, like the one we""" 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"]]
[[!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 +209,9 @@
[[!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 text="""Demonstration: LaTeX""" video="00:07:53.970" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Demonstration: LaTeX""" video="00:07:53.970" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""The second demo shows our first regex use case.""" 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"]]
[[!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 +233,9 @@
[[!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 text="""Demonstration: Regex""" video="00:08:48.700" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Demonstration: Regex""" video="00:08:48.700" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""We now take a look at a more complicated 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"]]
[[!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 "foo" and "bar" in this example is followed by""" start="00:08:55.100" video="mainVideo-parallel" id="subtitle"]]
@@ -252,9 +252,9 @@
[[!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 text="""Demonstration: Order""" video="00:09:36.320" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Demonstration: Order""" video="00:09:36.320" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""We haven't covered it explicitly so some of you may""" 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"]]
[[!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 +280,9 @@
[[!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 text="""Demonstration: Fun""" video="00:10:54.440" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Demonstration: Fun""" video="00:10:54.440" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""The final demo tests the limits of the package and""" 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"]]
[[!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 +310,9 @@
[[!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 text="""Implementation""" video="00:12:29.120" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""Implementation""" video="00:12:29.120" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""Before we finish, a few quick words about the""" 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"]]
[[!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 +354,9 @@
[[!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 text="""End""" video="00:14:18.740" id="subtitle"mainVideo-parallel]]
+[[!template new="1" text="""End""" video="00:14:18.740" id="subtitle"mainVideo-parallel]]
-[[!template new="1" text="""In conclusion, go download and play with the package.""" 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"]]
[[!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"]]