<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>SeniorMars</title>
      <link>https://seniormars.com</link>
      <description>A blog about math, extremely niche interests, and a guy having fun.</description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://seniormars.com/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Tue, 23 Jun 2026 00:00:00 +0000</lastBuildDate>
      <item>
          <title>I am conflicted by current Mathematics</title>
          <pubDate>Fri, 26 Dec 2025 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/conflicted/</link>
          <guid>https://seniormars.com/posts/conflicted/</guid>
          <description xml:base="https://seniormars.com/posts/conflicted/">&lt;h1 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;For the last three months, I’ve been preparing applications to graduate schools in Mathematics. The process has forced me to ask questions I’ve been avoiding: do I actually want to commit the next five to seven years of my life to this field? Not just the mathematics itself (I love that part) but the culture and the unspoken rules that govern who gets to do mathematics and how we talk about what mathematics even is.&lt;&#x2F;p&gt;
&lt;p&gt;This post is an attempt to articulate my conflicted feelings; maybe get some answers from people who’ve thought about these things longer than I have. What follows is filled with anecdotal observations and personal experiences, so take it with however many grains of salt you need. But I hope it sparks something worth discussing.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;the-culture-of-mathematics&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-culture-of-mathematics&quot; aria-label=&quot;Anchor link for: the-culture-of-mathematics&quot;&gt;The culture of Mathematics&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;One of the PhD programs I’m applying to lists where their current graduate students did their undergraduate work. I went through the list, then looked up their profiles. The pattern was immediate: top-tier universities, nearly all of them. MIT, Harvard, Berkeley, a few international equivalents; maybe one or two state schools if you squint. I go to Rice, which has a solid math program: I can take graduate courses as an undergrad, work with professors on research. I’m extremely lucky. But scrolling through those names made something sit wrong in my stomach, and it’s not just me being insecure about my chances. I can’t prove this, but I find it hard to believe that someone from a “weaker” school would implcitly have less mathematical ability than these students. So why does the list look like this?&lt;&#x2F;p&gt;
&lt;p&gt;I found the people who end up at top undergraduate programs tend to have done serious mathematics in high school. Many competed in olympiads, attended elite summer programs, had access to university-level material before they turned seventeen. This creates what looks like meritocracy but functions more like a pipeline. The students who discover mathematics later, or come from schools without advanced math offerings, or didn’t have parents who knew these opportunities existed — they start disadvantaged the system never lets them close. Many hobbies are like this, but mathematics is just one I feel is particularly stark about. I’m not even talking about the idea of a child genius, though that exists too.&lt;&#x2F;p&gt;
&lt;p&gt;This isn’t about individual students being talented or hardworking. It’s about how the field has built a self-perpetuating cycle that selects for access rather than ability. The olympiad kids had olympiad coaching; the coaching started in middle school; the middle school programs required parents who knew they existed and could afford the time and money to support them. By the time someone reaches graduate admissions, we’re looking at the result of a decade-long filtering process that has nothing to do with mathematical potential and everything to do with circumstances of birth. I understand I’m oversimplifying, but I went to Stuyvesant High School, a school filled with extremely strong math individuals, and I saw this pattern play out in real life multiple times. Only after seriously engaging with math did I realize how privileged my own path had been even when I didn’t “do math stuff” in high school.&lt;&#x2F;p&gt;
&lt;p&gt;Even more troubling: I’ve noticed another pattern. Students from small liberal arts colleges, even excellent ones, seem to have a harder time getting into top graduate programs compared to students from research universities. The liberal arts students might have the same level of passion and preparation, but they lack something quantifiable that admissions committees trust. Maybe it’s research experience at the frontier; maybe it’s letters from famous mathematicians; maybe it’s just name recognition. The result is that many liberal arts students, unless they’re exceptionally exceptional, end up filtered out of the top tier of graduate programs.&lt;&#x2F;p&gt;
&lt;p&gt;Here’s what bothers me: many liberal arts colleges are women’s colleges, HBCUs, or other minority-serving institutions. By favoring students from prestigious research universities, even unintentionally, graduate admissions may be indirectly reducing diversity in mathematics. I don’t have hard data on this, but it seems worth asking whether the selection mechanisms we use encode biases about race, gender, and class through the proxy of undergraduate institution.&lt;&#x2F;p&gt;
&lt;p&gt;Computer science has made visible efforts in the last decade to reach underrepresented groups through programs, scholarships, explicit diversity initiatives. Mathematics has been around much longer; such efforts seem less prevalent, less systematic, less central to how the field thinks about itself. I find myself wondering if mathematics is resistant to change or if there are structural reasons this is harder in math than in CS. Either way, the relative lack of progress is striking.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;mathematics-and-subjectivity&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mathematics-and-subjectivity&quot; aria-label=&quot;Anchor link for: mathematics-and-subjectivity&quot;&gt;Mathematics and subjectivity&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;This will sound absurd coming from someone who’s taken real analysis and studied the foundations’ crisis of the early twentieth century, but I’m troubled by how mathematics presents itself as the shining example of objective science. Yes, I know we had to rebuild the foundations after paradoxes threatened the whole edifice. Yes, I know Gödel showed us incompleteness; we survived. But the way mathematics gets taught in academia often glosses over the subjective choices embedded in what we do.&lt;&#x2F;p&gt;
&lt;p&gt;Most mathematicians work in ZFC set theory without ever explicitly saying so. We talk about “the universe” of sets but never define what that phrase means rigorously. The foundations are assumed to be consistent because they’ve held up so far, not because we’ve proven they’re safe: we literally cannot prove ZFC is consistent from within ZFC itself. In my opinion, that’s the entire field resting on “well, nothing’s broken yet.” We can get arbitrarily far from foundational questions because most mathematicians don’t care. The working mathematician doesn’t lose sleep over whether ZFC might harbor a contradiction. We proceed as if the foundations are settled when they’re really just accepted.&lt;&#x2F;p&gt;
&lt;p&gt;There are theorems that make the subjectivity explicit. Joel David Hamkins proved that there exists a universal algorithm, a Turing machine capable of computing any desired function, provided you run it in the right model of arithmetic. Which “right model” you pick changes what’s computable. In this setting subjectivity isn’t a technicality, but a choice about what mathematical universe you inhabit, and different choices give different answers to questions that look purely mathematical.&lt;&#x2F;p&gt;
&lt;p&gt;We could have chosen homotopy type theory instead of ZFC as our foundation. HoTT would still be valid mathematics, just different mathematics. The fact that we picked one foundation over another reflects historical contingency, aesthetic preference, and practical utility — we have been using ZFC for years. Yet we teach mathematics as if the structures we study exist independently of these choices. And I know we have some good reasons for this, but still it feels like a glossing over of important philosophical issues.&lt;&#x2F;p&gt;
&lt;p&gt;Yes, our proofs and theorems are truths; I’m not disputing that. But at a larger scale, it strikes me as almost funny how we claim to be the shining example of science without acknowledging some important details. You can argue that everything reduces to axioms and we’re just exploring consequences, fine. But which axioms we choose, which logical framework we work in, whether we accept the law of excluded middle or work constructively — these are subjective decisions that shape what counts as mathematics. The subjectivity is everywhere once you start looking for it.&lt;&#x2F;p&gt;
&lt;p&gt;Every so often, I watch mathematicians criticize social sciences for being subjective, for not having the rigor of mathematics. The irony is that mathematics has its subjectivity; we’ve just convinced ourselves it doesn’t count.&lt;&#x2F;p&gt;
&lt;p&gt;Consider the Dirac delta function. Physicists used it productively for nearly two decades before we provided rigorous foundations. In this case, intuition ran ahead of formalization, and the formalization eventually caught up. Ramanujan’s work showed the same pattern: results that seemed nonsensical under the standards of his time turned out to be correct when we developed the right framework to understand them. In these two cases, the demand for proof blocks mathematical progress. I understand why we need proofs. I really do, but the insistence on formalization before acceptance has costs we don’t always count.&lt;&#x2F;p&gt;
&lt;p&gt;Even our current formalization efforts run into these issues. Proof assistants like Lean require choosing whether to use the law of excluded middle, whether to work constructively, whether to use cubical methods for homotopy type theory. These may be implementation details, but end up being philosophical commitments that affect what theorems you can state and prove (for instance fomralizing temporal logic in lean is difficult). Different proof assistants make different choices, and while that might be interesting, it undercuts the narrative that mathematics is a single objective edifice.&lt;&#x2F;p&gt;
&lt;p&gt;The broader problem, I think, is that we may be creating a culture where the general public are afraid to criticize mathematicians. We treat mathematics as hard, exclusive, requiring special talent. Combined with the assumption of objectivity, this makes mathematical authority almost unquestionable. But mathematicians make mistakes — our proofs have errors, our definitions need revision, our intuitions mislead us. The mythology of objectivity makes it harder to have those conversations honestly.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;the-ethics-of-mathematics&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-ethics-of-mathematics&quot; aria-label=&quot;Anchor link for: the-ethics-of-mathematics&quot;&gt;The ethics of Mathematics&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I’m also a linguistics major, which means I notice things about language and naming that maybe pure math people don’t. Take the name “algorithm.” It’s based on the Latinization of محمد بن موسى الخوارزميّ, the Persian mathematician who wrote foundational texts on algebra and arithmetic in the ninth century. His name got corrupted through Latin into something that sounds European; most people learning about algorithms have no idea they’re named after a Muslim scholar from Baghdad.&lt;&#x2F;p&gt;
&lt;p&gt;This is part of a broader pattern. Mathematics has uncredited work everywhere, especially from non-Western cultures. The number system we use daily came from India; the concept of zero as a number, not just a placeholder, came from Indian and later Islamic mathematics. Yet we don’t teach the history of mathematics in a way that makes these contributions visible. We name theorems after Western mathematicians; we teach a narrative where real mathematics started with the Greeks and resumed with the Europeans.&lt;&#x2F;p&gt;
&lt;p&gt;Even when we do credit people, we sometimes get it wrong in ways that reflect power dynamics. Hyperbolic geometry was discovered independently by Gauss, Lobachevsky, and Bolyai, but Gauss was already famous and didn’t publish his work. Lobachevsky and Bolyai get more credit, but often the narrative erases how close Gauss was to the same ideas. The history gets simplified into priority disputes that miss how mathematics actually develops in favor a narrative (one that I’m guilty of repeating here).&lt;&#x2F;p&gt;
&lt;p&gt;Mathematics also gets used in ways that have ethical consequences we rarely discuss in math departments. Algorithms perpetuate bias because they’re trained on biased data or designed by people who don’t consider how they’ll be used. Financial models led to the 2008 economic crisis because the models made assumptions that turned out catastrophically incorrect. Mathematics isn’t neutral when it’s applied; we teach it as if the applications are someone else’s problem.&lt;&#x2F;p&gt;
&lt;p&gt;The field itself often feels elitist in ways that go beyond who gets admitted to graduate programs. There’s a culture of genius worship, of problems being interesting only if they’re hard enough to stump everyone, of mathematics as a game played by an intellectual elite. I don’t see many mathematicians asking whether we have obligations to make our work accessible, to think about who benefits from our research, to consider whether the way we structure the field excludes people who could contribute.&lt;&#x2F;p&gt;
&lt;p&gt;Maybe these questions seem tangential to doing mathematics; maybe they’re outside the scope of what a mathematician should worry about. But if I’m going to spend the next decade in this field, I need to know whether it’s possible to care about these things and still be taken seriously as a mathematician. Right now, I’m not sure it is.&lt;&#x2F;p&gt;
&lt;p&gt;I understand this reads like a crackpot essay at times, but these are genuine concerns I have.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>When “Complexity” Means Twelve Different Things: A Map of the Chaos</title>
          <pubDate>Wed, 24 Dec 2025 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/complexity/</link>
          <guid>https://seniormars.com/posts/complexity/</guid>
          <description xml:base="https://seniormars.com/posts/complexity/">&lt;h2 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;For the last six months, I’ve been doing research on SAT solvers. More specifically, model counting. I’m a math major, so naturally I thought “let’s count things” sounded like a good summer project. The question was simple: does the phase transition phenomenon (where SAT instances go from easy to hard to easy again as you increase constraints) extend to counting solutions?&lt;&#x2F;p&gt;
&lt;p&gt;Quick primer: the #SAT problem asks “given a Boolean formula $\phi$, how many assignments make it true?” It’s #P-complete, which means it’s at least as hard as NP-complete problems, probably harder.&lt;&#x2F;p&gt;
&lt;p&gt;Yes, the phase transition extends to counting. Paper coming soon.&lt;&#x2F;p&gt;
&lt;p&gt;But here’s what happened while I was running experiments. I kept measuring different things without realizing they were &lt;em&gt;different&lt;&#x2F;em&gt;. Circuit size would explode at one density. Solver runtime would spike somewhere else. The number of random XOR constraints needed would climb in a third region. And I’d think “okay, the problem is getting complex here,” without being precise about what “complex” meant.&lt;&#x2F;p&gt;
&lt;p&gt;Then PhD application season hit. I started reading papers from professors I wanted to work with. One paper would talk about “proof complexity lower bounds.” Another about “circuit complexity barriers.” A third about “communication complexity of distributed protocols.” And I realized something annoying: they were all using the word “complexity” to mean completely different things. [I know this sounds obvious, but it hadn’t clicked before how broad complexity is.]&lt;&#x2F;p&gt;
&lt;p&gt;Time complexity (how long does it take) is different from circuit complexity (how many gates do you need). Both are different from query complexity (how many input bits must you read). All three are different from proof complexity (how long is the certificate). And none of them are Kolmogorov complexity (how compressible is this object).&lt;&#x2F;p&gt;
&lt;p&gt;Wait, what?&lt;&#x2F;p&gt;
&lt;p&gt;This post is me trying to make sense of that mess. Not comprehensively (that would take a textbook I’m not qualified to write), but enough so that when someone says “oh that’s communication-complex” or “the query complexity is too high,” you’ll know what lens they’re using to measure hardness.&lt;&#x2F;p&gt;
&lt;p&gt;Because here’s the thing: when I was measuring #SAT difficulty this summer, I was simultaneously measuring like five different complexity types without realizing it. They all spiked at roughly the same place (the phase transition), but for different structural reasons. Understanding &lt;em&gt;why&lt;&#x2F;em&gt; requires knowing what each complexity measure actually captures.&lt;&#x2F;p&gt;
&lt;p&gt;So let’s map the zoo.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;time-space&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#time-space&quot; aria-label=&quot;Anchor link for: time-space&quot;&gt;Time &amp;amp; Space&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Let’s start with the classics, the ones everyone learns first.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Time_complexity&quot;&gt;&lt;strong&gt;Time complexity&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt;: how many steps does the algorithm take?
&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Space_complexity&quot;&gt;&lt;strong&gt;Space complexity&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt;: how much memory does it use?&lt;&#x2F;p&gt;
&lt;p&gt;For a Turing machine solving problem $A$, time complexity $T(n)$ is the maximum number of steps on any input of length $n$. Space complexity $S(n)$ is the maximum number of tape cells used. Both are measured in the worst case (usually).&lt;&#x2F;p&gt;
&lt;p&gt;This gives us the standard hierarchy. &lt;strong&gt;P&lt;&#x2F;strong&gt; is polynomial time (the “tractable” class). &lt;strong&gt;NP&lt;&#x2F;strong&gt; is nondeterministic polynomial time (or equivalently, polynomial-time verifiable). &lt;strong&gt;PSPACE&lt;&#x2F;strong&gt; is polynomial space. And so on.&lt;&#x2F;p&gt;
&lt;p&gt;For #SAT (counting satisfying assignments), we know it’s &lt;strong&gt;#P-complete&lt;&#x2F;strong&gt;. Again, this means it’s at least as hard as any NP problem, probably harder. Toda’s Theorem tells us the entire polynomial hierarchy collapses to $\text{P}^{\#\text{P}}$ (if you can count, you can solve anything in PH) &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-9-1&quot;&gt;&lt;a href=&quot;#fn-9&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. Counting is powerful.&lt;&#x2F;p&gt;
&lt;p&gt;But time complexity doesn’t tell you &lt;em&gt;why&lt;&#x2F;em&gt; something is hard. It just says “this takes a long time.” When my #SAT solver was slow at the phase transition, time complexity told me “yep, it’s slow,” but not &lt;em&gt;what structural property of the formula&lt;&#x2F;em&gt; caused that slowness.&lt;&#x2F;p&gt;
&lt;p&gt;For that, I needed different lenses.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;circuit-complexity&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#circuit-complexity&quot; aria-label=&quot;Anchor link for: circuit-complexity&quot;&gt;Circuit Complexity&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;When I compiled CNF formulas to d-DNNF (decision diagrams for model counting), I was measuring &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Circuit_complexity&quot;&gt;&lt;strong&gt;circuit complexity&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt;: how many logical gates (AND, OR, NOT) does it take to represent this Boolean function?&lt;&#x2F;p&gt;
&lt;p&gt;Two main measures exist here. &lt;strong&gt;Size&lt;&#x2F;strong&gt; is the total number of gates. &lt;strong&gt;Depth&lt;&#x2F;strong&gt; is the longest path from input to output (this measures parallelizability).&lt;&#x2F;p&gt;
&lt;p&gt;Classes like &lt;strong&gt;NC&lt;&#x2F;strong&gt; (polylog depth, polynomial size) capture “efficiently parallelizable” problems. &lt;strong&gt;AC$^0$&lt;&#x2F;strong&gt; is constant-depth circuits with unbounded fan-in. &lt;strong&gt;P&#x2F;poly&lt;&#x2F;strong&gt; is polynomial-size circuits, the most general non-uniform class.&lt;&#x2F;p&gt;
&lt;p&gt;Here’s the interesting part: we can’t prove &lt;em&gt;any&lt;&#x2F;em&gt; superlinear lower bounds for explicit functions. Shannon proved in 1949 that most functions need exponential circuits (by counting) &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;, but we can’t point to a specific function and prove it needs more than $O(n)$ gates. The best result is Ryan Williams’ 2011 breakthrough: NEXP is not in ACC$^0$ (&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ACC0&quot;&gt;circuits with modular counting gates&lt;&#x2F;a&gt;) &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-2-1&quot;&gt;&lt;a href=&quot;#fn-2&quot;&gt;3&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;That’s it. That’s all we have. We think 3SAT needs exponential circuits, but we can’t prove it. If we could, P would not equal NP.&lt;&#x2F;p&gt;
&lt;p&gt;For my #SAT experiments, the compiled circuits exploded in size at the phase transition. Why? Because the solution space fragments. The circuit has to branch on many variables before determining satisfiability. The formula has high “treewidth” (a graph measure of branching structure). This structural complexity &lt;em&gt;causes&lt;&#x2F;em&gt; the circuit blow-up.&lt;&#x2F;p&gt;
&lt;p&gt;But size isn’t the only way to think about accessing information.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;query-complexity&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#query-complexity&quot; aria-label=&quot;Anchor link for: query-complexity&quot;&gt;Query Complexity&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Decision_tree_model&quot;&gt;&lt;strong&gt;Query complexity&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; (also called decision tree complexity) asks a purer question: ignoring computation entirely, how many input bits must you examine to compute the answer?&lt;&#x2F;p&gt;
&lt;p&gt;Model: you have input $x \in {0,1}^n$. You can query “what is $x_i$?” The &lt;strong&gt;deterministic query complexity&lt;&#x2F;strong&gt; $D(f)$ is the minimum number of queries needed in the worst case to determine $f(x)$. There are also randomized ($R(f)$) and quantum ($Q(f)$) versions.&lt;&#x2F;p&gt;
&lt;p&gt;Example: the OR function (is there a 1 in the input?). Deterministically, you need $D(\text{OR}) = n$ queries because the 1 might be in the last position you check. But Grover’s algorithm gives $Q(\text{OR}) = O(\sqrt{n})$ with a quantum computer &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-8-1&quot;&gt;&lt;a href=&quot;#fn-8&quot;&gt;4&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. This quadratic speedup is the canonical quantum search advantage.&lt;&#x2F;p&gt;
&lt;p&gt;Another example: sorting $n$ items requires $\Omega(n \log n)$ comparisons in the comparison model. This is a query complexity lower bound (each comparison is a query), and it immediately implies that no comparison-based sorting algorithm can be faster than $O(n \log n)$.&lt;&#x2F;p&gt;
&lt;p&gt;Now, how does this relate to #SAT? Strictly speaking, my XOR-constraint approach isn’t classical query complexity (which queries input bits). Instead, it’s more like &lt;strong&gt;sampling complexity&lt;&#x2F;strong&gt; or &lt;strong&gt;solution space probing&lt;&#x2F;strong&gt;: we’re adding random XOR constraints and observing how the solution count changes. Each XOR constraint gives us one “query” into the structure of the solution space. The number of constraints needed to get an $(\epsilon, \delta)$-approximation is, in spirit, a query-like measure.&lt;&#x2F;p&gt;
&lt;p&gt;At the phase transition, we need more XOR constraints because the solution distribution is neither uniform nor sparse. It’s structured in this weird fragmented way that requires more samples to characterize accurately.&lt;&#x2F;p&gt;
&lt;p&gt;One of my favorite results in query complexity is Hao Huang’s 2019 proof of the &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Sensitivity_theorem&quot;&gt;&lt;strong&gt;Sensitivity Conjecture&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt;. Sensitivity $s(f)$ measures how many bits you can flip in an input to change the output. Block sensitivity $bs(f)$ is similar but for blocks of bits. For 25 years, people wondered if $bs(f)$ was polynomially bounded by $s(f)$. Huang proved $bs(f) \leq s(f)^4$ with a two-page argument &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-7-1&quot;&gt;&lt;a href=&quot;#fn-7&quot;&gt;5&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt; using spectral graph theory and the Cauchy Interlace Theorem.&lt;&#x2F;p&gt;
&lt;p&gt;Two pages. 25-year-old problem. That’s the kind of math that makes you spill coffee.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;proof-complexity&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#proof-complexity&quot; aria-label=&quot;Anchor link for: proof-complexity&quot;&gt;Proof Complexity&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Here’s where things get weird. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Proof_complexity&quot;&gt;&lt;strong&gt;Proof complexity&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; asks: how many steps does it take to &lt;em&gt;prove&lt;&#x2F;em&gt; something is unsatisfiable?&lt;&#x2F;p&gt;
&lt;p&gt;Most modern SAT solvers use CDCL (Conflict-Driven Clause Learning), which is essentially doing &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Resolution_(logic)&quot;&gt;&lt;strong&gt;Resolution&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt;: a proof system where you derive new clauses from existing ones.&lt;&#x2F;p&gt;
&lt;p&gt;Rule: from clauses $(A \vee x)$ and $(B \vee \neg x)$, derive $(A \vee B)$.&lt;&#x2F;p&gt;
&lt;p&gt;To prove a CNF is unsatisfiable, derive the empty clause (contradiction). The &lt;strong&gt;proof complexity&lt;&#x2F;strong&gt; is the number of clauses in the shortest derivation.&lt;&#x2F;p&gt;
&lt;p&gt;Haken’s 1985 result: the Pigeonhole Principle ($n+1$ pigeons in $n$ holes) requires exponential-size Resolution proofs &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-3-1&quot;&gt;&lt;a href=&quot;#fn-3&quot;&gt;6&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. This means CDCL solvers &lt;em&gt;must&lt;&#x2F;em&gt; take exponential time on these formulas. The hardness isn’t in the problem (easy to state), it’s in the &lt;em&gt;structure of reasoning required&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;For random 3-CNF at the critical density, Resolution proofs are also hard. The unsatisfiable core is hidden deep. You can’t find a small, easily refutable subformula. The refutation requires reasoning about many clauses simultaneously, leading to exponential blow-up.&lt;&#x2F;p&gt;
&lt;p&gt;Ben-Sasson and Wigderson formalized this with the &lt;strong&gt;width-size tradeoff&lt;&#x2F;strong&gt; &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-4-1&quot;&gt;&lt;a href=&quot;#fn-4&quot;&gt;7&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;: if a Resolution proof has small width (short clauses), then it’s short. But if every proof requires wide clauses (mentioning many variables), then every proof is long. Random 3-CNF at the critical density has high proof width, hence high proof complexity, hence hard for CDCL.&lt;&#x2F;p&gt;
&lt;p&gt;This is a different kind of hardness than “the circuit is big” or “you need many queries.” It’s about the &lt;em&gt;logical certificates&lt;&#x2F;em&gt; themselves.&lt;&#x2F;p&gt;
&lt;p&gt;MOreover, Cook-Reckhow (1979) proved that if there exists a proof system where every tautology has polynomial-size proofs, then $\text{NP} = \text{coNP}$ &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-5-1&quot;&gt;&lt;a href=&quot;#fn-5&quot;&gt;8&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. So proving lower bounds for increasingly strong proof systems is a path toward separating complexity classes. We’ve done it for Resolution, Cutting Planes, bounded-depth Frege. For general Frege (standard propositional logic)? Still open.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;kolmogorov-complexity&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#kolmogorov-complexity&quot; aria-label=&quot;Anchor link for: kolmogorov-complexity&quot;&gt;Kolmogorov Complexity&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Okay, curveball time. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Kolmogorov_complexity&quot;&gt;&lt;strong&gt;Kolmogorov complexity&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; measures something completely different: information content, independent of computation time.&lt;&#x2F;p&gt;
&lt;p&gt;Definition: $K(x)$ is the length of the shortest program that outputs $x$. Random strings have $K(x) \approx |x|$ (incompressible). Structured strings like “0000…0” have low $K(x)$ (program is “print ‘0’ $n$ times”).&lt;&#x2F;p&gt;
&lt;p&gt;This is uncomputable. You can’t write an algorithm that takes $x$ and outputs $K(x)$. Proof: Berry’s paradox (“the smallest number not definable in under sixty characters” defines itself in under sixty characters, contradiction).&lt;&#x2F;p&gt;
&lt;p&gt;Why does this matter for SAT? Because time-bounded Kolmogorov complexity connects to cryptography.&lt;&#x2F;p&gt;
&lt;p&gt;Levin’s &lt;strong&gt;Kt complexity&lt;&#x2F;strong&gt; measures program length plus log runtime:&lt;&#x2F;p&gt;
&lt;p&gt;$$Kt(x) = \min { |p| + \log t \mid U(p) = x \text{ in } t \text{ steps} }$$&lt;&#x2F;p&gt;
&lt;p&gt;Liu and Pass (2020) proved: &lt;strong&gt;one-way functions exist if and only if Kt complexity is hard to compute on average&lt;&#x2F;strong&gt; &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-6-1&quot;&gt;&lt;a href=&quot;#fn-6&quot;&gt;9&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. This connects cryptographic hardness to meta-complexity (the complexity of computing complexity).&lt;&#x2F;p&gt;
&lt;p&gt;For SAT at the phase transition, formulas are neither maximally random nor maximally structured. They’re in a weird middle ground where their Kolmogorov complexity is interesting and hard to compute. I’m not saying this directly impacts my experiments (it doesn’t), but it’s a reminder that “complexity” can mean “information content” rather than “computational cost.”&lt;&#x2F;p&gt;
&lt;h2 id=&quot;communication-complexity&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#communication-complexity&quot; aria-label=&quot;Anchor link for: communication-complexity&quot;&gt;Communication Complexity&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;What if the input isn’t all in one place?&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Communication_complexity&quot;&gt;&lt;strong&gt;Communication complexity&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt;: Alice has $x$, Bob has $y$, they want to compute $f(x, y)$. They exchange bits. The &lt;strong&gt;communication complexity&lt;&#x2F;strong&gt; $D(f)$ is the minimum number of bits needed in the worst case.&lt;&#x2F;p&gt;
&lt;p&gt;Example: Equality (is $x = y$?). Any deterministic protocol needs $n$ bits. Essentially, one party sends their entire input. But with randomness, you can do it in $O(\log n)$ bits (hash functions!).&lt;&#x2F;p&gt;
&lt;p&gt;The canonical hard problem is &lt;strong&gt;Set Disjointness&lt;&#x2F;strong&gt;: Alice has set $A$, Bob has set $B$, are they disjoint? This needs $\Omega(n)$ communication. Proof uses a “fooling set” argument (a set of input pairs forcing the protocol to distinguish them all).&lt;&#x2F;p&gt;
&lt;p&gt;Why does this matter? Because communication lower bounds imply circuit lower bounds. The &lt;strong&gt;Karchmer-Wigderson relation&lt;&#x2F;strong&gt; connects circuit depth to communication complexity: the depth of a circuit computing $f$ equals the communication complexity of a certain two-party game about $f$ &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-13-1&quot;&gt;&lt;a href=&quot;#fn-13&quot;&gt;10&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. This is how we prove AC$^0$ lower bounds.&lt;&#x2F;p&gt;
&lt;p&gt;For distributed model counting (formula split across machines), communication is the bottleneck. You can’t send the whole formula (too big). You need protocols that minimize communication while getting accurate counts. Active research area.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;algebraic-complexity&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#algebraic-complexity&quot; aria-label=&quot;Anchor link for: algebraic-complexity&quot;&gt;Algebraic Complexity&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Here’s where things get elegant. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Arithmetic_circuit_complexity&quot;&gt;&lt;strong&gt;Algebraic complexity&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; (also called arithmetic complexity) studies computation over fields instead of bits. Instead of Boolean circuits with AND&#x2F;OR&#x2F;NOT gates, we have arithmetic circuits with $+, -, \times$ gates over fields like $\mathbb{R}$ or $\mathbb{C}$.&lt;&#x2F;p&gt;
&lt;p&gt;Leslie Valiant defined two classes to mirror P and NP &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-14-1&quot;&gt;&lt;a href=&quot;#fn-14&quot;&gt;11&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;VP&lt;&#x2F;strong&gt; (Valiant’s P): families of polynomials ${f_n}$ computable by arithmetic circuits of polynomial size and polynomial degree.&lt;&#x2F;p&gt;
&lt;p&gt;Example: The &lt;strong&gt;determinant&lt;&#x2F;strong&gt; of an $n \times n$ matrix. It’s computable in $O(n^3)$ operations (Gaussian elimination) or $O(\log^2 n)$ depth (Berkowitz’s algorithm). Determinant is in VP.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;VNP&lt;&#x2F;strong&gt; (Valiant’s NP): polynomials definable as a sum over exponentially many terms, where each term is efficiently computable.&lt;&#x2F;p&gt;
&lt;p&gt;Example: The &lt;strong&gt;permanent&lt;&#x2F;strong&gt; of a matrix:&lt;&#x2F;p&gt;
&lt;p&gt;$$\text{Perm}(X) = \sum_{\sigma \in S_n} \prod_{i=1}^n x_{i,\sigma(i)}$$&lt;&#x2F;p&gt;
&lt;p&gt;This looks almost identical to the determinant (which has $(-1)^{\text{sgn}(\sigma)}$ terms), but without the sign. Computing permanents is #P-complete in the Boolean world. In the algebraic world, permanent is complete for VNP.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Valiant’s Hypothesis&lt;&#x2F;strong&gt;: $\text{VP} \neq \text{VNP}$.&lt;&#x2F;p&gt;
&lt;p&gt;This is the algebraic analog of $\text{P} \neq \text{NP}$. If VP = VNP, then the permanent has polynomial-size arithmetic circuits, which would imply $\text{P}^{\#\text{P}} \subseteq \text{P&#x2F;poly}$, collapsing the polynomial hierarchy. So algebraically proving VP $\neq$ VNP would be huge.&lt;&#x2F;p&gt;
&lt;p&gt;Why is this “cleaner” than Boolean complexity? Because the algebraic setting has more structure. We can use tools from algebraic geometry, representation theory, and commutative algebra. The &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Geometric_complexity_theory&quot;&gt;&lt;strong&gt;Geometric Complexity Theory&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; (GCT) program, launched by Mulmuley and Sohoni, tries to prove VP $\neq$ VNP using representation-theoretic obstructions.&lt;&#x2F;p&gt;
&lt;p&gt;The core idea: frame permanent vs determinant as a question about orbit closures in representation theory. Can the permanent be approximated by a linear projection of a slightly larger determinant? GCT tries to prove “no” by finding representations that appear in the permanent’s orbit but not the determinant’s.&lt;&#x2F;p&gt;
&lt;p&gt;It hasn’t succeeded yet (and recent results show simple “occurrence obstructions” don’t work), but the program drives deep research connecting complexity to algebraic geometry.&lt;&#x2F;p&gt;
&lt;p&gt;For my work, this is tangential. But it’s a reminder that choosing the right mathematical setting matters. Boolean complexity is stuck on lower bounds. Algebraic complexity has more tools available. Sometimes the right lens makes all the difference.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;descriptive-complexity&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#descriptive-complexity&quot; aria-label=&quot;Anchor link for: descriptive-complexity&quot;&gt;Descriptive Complexity&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Completely different angle. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Descriptive_complexity_theory&quot;&gt;&lt;strong&gt;Descriptive complexity&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; measures problems by the &lt;em&gt;logical formulas&lt;&#x2F;em&gt; needed to describe them.&lt;&#x2F;p&gt;
&lt;p&gt;Fagin’s Theorem (1974): &lt;strong&gt;NP = Existential Second-Order Logic&lt;&#x2F;strong&gt; &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-10-1&quot;&gt;&lt;a href=&quot;#fn-10&quot;&gt;12&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. A problem is in NP iff it’s expressible as “there exists a relation $R$ such that $\phi(R)$ holds” for some first-order $\phi$.&lt;&#x2F;p&gt;
&lt;p&gt;Example: 3-colorability. “There exist three sets of vertices (Red, Green, Blue) such that every vertex is in one set, and no two adjacent vertices share a set.” The existential quantification is the “guessing” in NP. The first-order part is the “verification.”&lt;&#x2F;p&gt;
&lt;p&gt;This extends:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AC$^0$&lt;&#x2F;strong&gt; = First-Order Logic&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;P&lt;&#x2F;strong&gt; = First-Order + Least Fixed Point (on ordered structures) &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-11-1&quot;&gt;&lt;a href=&quot;#fn-11&quot;&gt;13&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;NP&lt;&#x2F;strong&gt; = Existential Second-Order&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;PH&lt;&#x2F;strong&gt; = Full Second-Order&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;PSPACE&lt;&#x2F;strong&gt; = First-Order + Partial Fixed Point&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;So P vs NP becomes: is FO + LFP equal to Existential Second-Order?&lt;&#x2F;p&gt;
&lt;p&gt;This is a question about &lt;em&gt;expressive power of logical languages&lt;&#x2F;em&gt;, not Turing machines. Same question, different lens.&lt;&#x2F;p&gt;
&lt;p&gt;I find this beautiful but not directly useful for experiments. It’s more philosophical: “What kind of logic expresses this problem?” But it’s a reminder that complexity isn’t just about machines. It’s about languages, logic, expressiveness.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;parameterized-complexity&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#parameterized-complexity&quot; aria-label=&quot;Anchor link for: parameterized-complexity&quot;&gt;Parameterized Complexity&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Parameterized_complexity&quot;&gt;&lt;strong&gt;Parameterized complexity&lt;&#x2F;strong&gt;&lt;&#x2F;a&gt; refines P vs NP by acknowledging inputs have structure.&lt;&#x2F;p&gt;
&lt;p&gt;Instead of measuring complexity as just $f(n)$, pick a parameter $k$ (solution size, treewidth, number of variables) and ask: is it solvable in $f(k) \cdot \text{poly}(n)$ time?&lt;&#x2F;p&gt;
&lt;p&gt;If yes, it’s &lt;strong&gt;Fixed-Parameter Tractable (FPT)&lt;&#x2F;strong&gt;. Exponential blow-up is confined to $k$, not $n$.&lt;&#x2F;p&gt;
&lt;p&gt;Example: Vertex Cover. Find $k$ vertices covering all edges. Brute force: $O(n^k)$, not FPT. But branching algorithm: pick an edge, one endpoint must be in the cover, branch on both. Recursion depth $k$, each level $O(n)$. Total: $O(2^k \cdot n)$. This is FPT.&lt;&#x2F;p&gt;
&lt;p&gt;For SAT parameterized by treewidth, the problem becomes FPT. Low-treewidth formulas are easier.&lt;&#x2F;p&gt;
&lt;p&gt;At the #SAT phase transition, treewidth explodes. The constraint graph becomes highly interconnected. This is &lt;em&gt;why&lt;&#x2F;em&gt; compilation struggles: dynamic programming over the constraint graph has exponential blow-up with high treewidth.&lt;&#x2F;p&gt;
&lt;p&gt;Parameterized complexity gives vocabulary to say “this problem is hard because this parameter is large.” More fine-grained than P vs NP.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;data-vs-expression-complexity&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#data-vs-expression-complexity&quot; aria-label=&quot;Anchor link for: data-vs-expression-complexity&quot;&gt;Data vs Expression Complexity&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;So here is the thing: Dr. Vardi is my undergraduate advisor, and it so happens that I had to read one of papers to lecture for a class he teaches where he talks about another type of complexity. In his 1982 paper “The Complexity of Relational Query Languages,” he made a distinction that should have been obvious but somehow wasn’t standard at the time &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-12-1&quot;&gt;&lt;a href=&quot;#fn-12&quot;&gt;14&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Vardi asked: when we talk about the complexity of a &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Database_theory&quot;&gt;query language&lt;&#x2F;a&gt;, what are we actually measuring?&lt;&#x2F;p&gt;
&lt;p&gt;He split it into two types:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Data complexity&lt;&#x2F;strong&gt;: Fix a specific query. How hard is it to evaluate that query as a function of the database size? This measures “how difficult are the individual questions asked in this language?”&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Expression complexity&lt;&#x2F;strong&gt;: Fix a specific database. How hard is it to evaluate arbitrary queries (represented by expressions in the language) on that database, as a function of the expression size? This measures “how difficult is answering different questions in this language?”&lt;&#x2F;p&gt;
&lt;p&gt;Same query language. Two completely different complexity measures. And they’re not just different by a constant factor. Vardi showed that expression complexity is typically &lt;strong&gt;one exponential higher&lt;&#x2F;strong&gt; than data complexity.&lt;&#x2F;p&gt;
&lt;p&gt;Example: First-order logic (relational calculus). Data complexity? LOGSPACE. Expression complexity? PSPACE. That’s not a small gap.&lt;&#x2F;p&gt;
&lt;p&gt;For fixed-point queries (related to my #SAT work), data complexity is PTIME, but expression complexity jumps to EXPTIME. The pattern holds across multiple query languages: the expression complexity hierarchy mirrors the data complexity hierarchy, shifted up by one exponential.&lt;&#x2F;p&gt;
&lt;p&gt;This matters because when database people say “this query language is complex,” you have to ask: complex for users who run the same query repeatedly on growing data? Or complex for users who run many different queries on fixed-size data? Different questions, different answers, same word.&lt;&#x2F;p&gt;
&lt;p&gt;It’s the same confusion I had with #SAT, just in a different domain. And it reinforces the point: “complexity” without context is meaningless.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;and-there-are-more&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#and-there-are-more&quot; aria-label=&quot;Anchor link for: and-there-are-more&quot;&gt;And There Are More&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I could keep going. &lt;strong&gt;Topological complexity&lt;&#x2F;strong&gt; (robot controller modes). &lt;strong&gt;Instance complexity&lt;&#x2F;strong&gt; (how hard is &lt;em&gt;this specific input&lt;&#x2F;em&gt;). &lt;strong&gt;Logical depth&lt;&#x2F;strong&gt; (computation time for near-shortest programs). &lt;strong&gt;State complexity&lt;&#x2F;strong&gt; (automata states for regular languages). &lt;strong&gt;Learning complexity&lt;&#x2F;strong&gt; (VC dimension vs Rademacher complexity).&lt;&#x2F;p&gt;
&lt;p&gt;Each isolates a different resource or structural property.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;why-this-actually-matters&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#why-this-actually-matters&quot; aria-label=&quot;Anchor link for: why-this-actually-matters&quot;&gt;Why This Actually Matters&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Back to my summer experiments. When measuring #SAT hardness, I was simultaneously measuring:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Time complexity&lt;&#x2F;strong&gt;: solver runtime&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Circuit complexity&lt;&#x2F;strong&gt;: compiled decision diagram size&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Query&#x2F;Sampling complexity&lt;&#x2F;strong&gt;: XOR constraints needed&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Proof complexity&lt;&#x2F;strong&gt;: Resolution width (implicitly)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Parameterized complexity&lt;&#x2F;strong&gt;: formula treewidth&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;These all spike at the same place (phase transition) because they measure different facets of the same structure. The formula at critical density is hard in &lt;em&gt;multiple senses&lt;&#x2F;em&gt;. Not just slow, but structurally complicated.&lt;&#x2F;p&gt;
&lt;p&gt;That’s why the phase transition is interesting. It’s not “solvers are slow here.” It’s “the formula itself, in multiple formal senses, is complex here.”&lt;&#x2F;p&gt;
&lt;p&gt;And that’s the broader lesson. When someone says “this problem is complex,” the first question should be: complex in what sense? Time? Space? Communication? Proof length? Circuit size? Information content?&lt;&#x2F;p&gt;
&lt;p&gt;Each lens reveals something different. The real breakthroughs happen when you connect them. Communication lower bounds imply circuit lower bounds. Kolmogorov complexity connects to one-way functions. Query complexity connects to spectral graph theory (Huang’s sensitivity proof). Proof complexity connects to solver runtime.&lt;&#x2F;p&gt;
&lt;p&gt;The zoo isn’t a mess. It’s a toolkit. Yay.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;general-resources&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#general-resources&quot; aria-label=&quot;Anchor link for: general-resources&quot;&gt;General Resources&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;For readers wanting to dive deeper into complexity theory broadly:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Textbooks:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Arora, S., &amp;amp; Barak, B. (2009). &lt;em&gt;Computational Complexity: A Modern Approach&lt;&#x2F;em&gt;. [Free draft available online]&lt;&#x2F;li&gt;
&lt;li&gt;Goldreich, O. (2008). &lt;em&gt;Computational Complexity: A Conceptual Perspective&lt;&#x2F;em&gt;. Cambridge University Press.&lt;&#x2F;li&gt;
&lt;li&gt;Papadimitriou, C. H. (1994). &lt;em&gt;Computational Complexity&lt;&#x2F;em&gt;. Addison-Wesley.&lt;&#x2F;li&gt;
&lt;li&gt;Jukna, S. (2012). &lt;em&gt;Boolean Function Complexity: Advances and Frontiers&lt;&#x2F;em&gt;. Springer. [Comprehensive modern treatment]&lt;&#x2F;li&gt;
&lt;li&gt;Vollmer, H. (1999). &lt;em&gt;Introduction to Circuit Complexity: A Uniform Approach&lt;&#x2F;em&gt;. Springer. [Classic introduction]&lt;&#x2F;li&gt;
&lt;li&gt;Krajíček, J. (1995). &lt;em&gt;Bounded Arithmetic, Propositional Logic and Complexity Theory&lt;&#x2F;em&gt;. Cambridge University Press. [Deep dive into proof complexity]&lt;&#x2F;li&gt;
&lt;li&gt;Kushilevitz, E., &amp;amp; Nisan, N. (1997). &lt;em&gt;Communication Complexity&lt;&#x2F;em&gt;. Cambridge University Press. [Classic textbook]&lt;&#x2F;li&gt;
&lt;li&gt;Li, M., &amp;amp; Vitányi, P. (2008). &lt;em&gt;An Introduction to Kolmogorov Complexity and Its Applications&lt;&#x2F;em&gt; (3rd ed.). Springer. [The definitive textbook]&lt;&#x2F;li&gt;
&lt;li&gt;Bürgisser, P., Clausen, M., &amp;amp; Shokrollahi, M. A. (1997). &lt;em&gt;Algebraic Complexity Theory&lt;&#x2F;em&gt;. Springer. [Comprehensive reference]&lt;&#x2F;li&gt;
&lt;li&gt;Immerman, N. (1999). &lt;em&gt;Descriptive Complexity&lt;&#x2F;em&gt;. Springer. [The authoritative textbook]&lt;&#x2F;li&gt;
&lt;li&gt;Downey, R. G., &amp;amp; Fellows, M. R. (2013). &lt;em&gt;Fundamentals of Parameterized Complexity&lt;&#x2F;em&gt;. Springer. [Modern comprehensive treatment]&lt;&#x2F;li&gt;
&lt;li&gt;Abiteboul, S., Hull, R., &amp;amp; Vianu, V. (1995). &lt;em&gt;Foundations of Databases&lt;&#x2F;em&gt;. Addison-Wesley. [Chapter 17 covers complexity]&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Surveys:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Fortnow, L., &amp;amp; Homer, S. (2003). “A short history of computational complexity.” &lt;em&gt;Bulletin of the EATCS&lt;&#x2F;em&gt;, 80, 95-133.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;complexityzoo.net&#x2F;Complexity_Zoo&quot;&gt;Complexity Zoo&lt;&#x2F;a&gt; - Comprehensive catalog of complexity classes&lt;&#x2F;li&gt;
&lt;li&gt;Buhrman, H., &amp;amp; de Wolf, R. (2002). “Complexity measures and decision tree complexity: a survey.” &lt;em&gt;Theoretical Computer Science&lt;&#x2F;em&gt;, 288(1), 21-43. [Excellent survey of the field]&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Blogs:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;blog.computationalcomplexity.org&#x2F;&quot;&gt;Computational Complexity Blog&lt;&#x2F;a&gt; by Lance Fortnow and Bill Gasarch&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;rjlipton.wpcomstaging.com&#x2F;&quot;&gt;Gödel’s Lost Letter&lt;&#x2F;a&gt; by Dick Lipton and Ken Regan&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;scottaaronson.blog&#x2F;&quot;&gt;Scott Aaronson’s Shtetl-Optimized&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Video Lectures:&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PLm3J0oaFux3YL5vLXpzOyJiLtqLp6dCW2&quot;&gt;Ryan O’Donnell’s course on Analysis of Boolean Functions&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;channel&#x2F;UCW_GKczW8HnejSJLuGGoBlw&quot;&gt;Boaz Barak’s complexity theory lectures&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#conclusion&quot; aria-label=&quot;Anchor link for: conclusion&quot;&gt;Conclusion&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;As I’m applying to PhD programs, I’m looking for advisors who think about complexity from multiple angles. Who don’t just say “P vs NP” but understand hardness is structural, informational, communicational, logical, computational all at once.&lt;&#x2F;p&gt;
&lt;p&gt;If you’re navigating the complexity landscape (literally), I hope this taxonomy helps. Next time someone says “communication-complex” or “high proof complexity,” you’ll know what lens they’re using.&lt;&#x2F;p&gt;
&lt;p&gt;And maybe you’ll start seeing connections. That’s where it gets fun.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-9&quot;&gt;
&lt;p&gt;Toda, S. (1991). “PP is as hard as the polynomial-time hierarchy.” &lt;em&gt;SIAM Journal on Computing&lt;&#x2F;em&gt;, 20(5), 865-877. Shows that counting witnesses (even approximately) is remarkably powerful. &lt;a href=&quot;#fr-9-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;Shannon, C. E. (1949). “The synthesis of two-terminal switching circuits.” &lt;em&gt;Bell System Technical Journal&lt;&#x2F;em&gt;, 28(1), 59-98. Shannon showed that almost all Boolean functions require circuits of size at least 2^n&#x2F;n, though the proof is non-constructive. &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-2&quot;&gt;
&lt;p&gt;Williams, R. (2014). “Non-uniform ACC circuit lower bounds.” &lt;em&gt;Journal of the ACM&lt;&#x2F;em&gt;, 61(1), 2:1-2:32. This breakthrough showed NEXP ⊄ ACC^0, the first major circuit lower bound progress since the 1980s. &lt;a href=&quot;#fr-2-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-8&quot;&gt;
&lt;p&gt;Grover, L. K. (1996). “A fast quantum mechanical algorithm for database search.” &lt;em&gt;Proceedings of STOC&lt;&#x2F;em&gt;, 212-219. The canonical quantum speedup, achieving quadratic improvement over classical search. &lt;a href=&quot;#fr-8-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-7&quot;&gt;
&lt;p&gt;Huang, H. (2019). “Induced subgraphs of hypercubes and a proof of the Sensitivity Conjecture.” &lt;em&gt;Annals of Mathematics&lt;&#x2F;em&gt;, 190(3), 949-955. A remarkably concise proof using spectral graph theory and the Cauchy Interlace Theorem. &lt;a href=&quot;#fr-7-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-3&quot;&gt;
&lt;p&gt;Haken, A. (1985). “The intractability of resolution.” &lt;em&gt;Theoretical Computer Science&lt;&#x2F;em&gt;, 39(2-3), 297-308. The first exponential lower bound for a natural proof system. &lt;a href=&quot;#fr-3-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-4&quot;&gt;
&lt;p&gt;Ben-Sasson, E., &amp;amp; Wigderson, A. (2001). “Short proofs are narrow—resolution made simple.” &lt;em&gt;Journal of the ACM&lt;&#x2F;em&gt;, 48(2), 149-169. Established the fundamental width-size tradeoff for resolution proofs. &lt;a href=&quot;#fr-4-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-5&quot;&gt;
&lt;p&gt;Cook, S. A., &amp;amp; Reckhow, R. A. (1979). “The relative efficiency of propositional proof systems.” &lt;em&gt;The Journal of Symbolic Logic&lt;&#x2F;em&gt;, 44(1), 36-50. Foundational paper connecting proof complexity to computational complexity. &lt;a href=&quot;#fr-5-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-6&quot;&gt;
&lt;p&gt;Liu, Y., &amp;amp; Pass, R. (2020). “On one-way functions and Kolmogorov complexity.” &lt;em&gt;Proceedings of FOCS&lt;&#x2F;em&gt;, 1243-1254. Proved the equivalence between OWF existence and average-case hardness of time-bounded Kolmogorov complexity. &lt;a href=&quot;#fr-6-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-13&quot;&gt;
&lt;p&gt;Karchmer, M., &amp;amp; Wigderson, A. (1990). “Monotone circuits for connectivity require super-logarithmic depth.” &lt;em&gt;SIAM Journal on Discrete Mathematics&lt;&#x2F;em&gt;, 3(2), 255-265. Established the fundamental connection between circuit depth and communication complexity. &lt;a href=&quot;#fr-13-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-14&quot;&gt;
&lt;p&gt;Valiant, L. G. (1979). “Completeness classes in algebra.” &lt;em&gt;Proceedings of STOC&lt;&#x2F;em&gt;, 249-261. Introduced VP and VNP as algebraic analogs of P and NP, along with Valiant’s Hypothesis. &lt;a href=&quot;#fr-14-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-10&quot;&gt;
&lt;p&gt;Fagin, R. (1974). “Generalized first-order spectra and polynomial-time recognizable sets.” &lt;em&gt;Complexity of Computation&lt;&#x2F;em&gt;, 7, 43-73. The foundational result of descriptive complexity theory. &lt;a href=&quot;#fr-10-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-11&quot;&gt;
&lt;p&gt;Immerman, N. (1986). “Relational queries computable in polynomial time.” &lt;em&gt;Information and Control&lt;&#x2F;em&gt;, 68(1-3), 86-104. And independently: Vardi, M. Y. (1982). “The complexity of relational query languages.” &lt;em&gt;Proceedings of STOC&lt;&#x2F;em&gt;, 137-146. Together these prove the Immerman-Vardi Theorem characterizing P in logic. &lt;a href=&quot;#fr-11-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-12&quot;&gt;
&lt;p&gt;Vardi, M. Y. (1982). “The complexity of relational query languages.” &lt;em&gt;Proceedings of the 14th Annual ACM Symposium on Theory of Computing&lt;&#x2F;em&gt;, 137-146. First systematic distinction between data and expression complexity, showing expression complexity is typically one exponential higher. &lt;a href=&quot;#fr-12-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</description>
      </item>
      <item>
          <title>Scratch Paper</title>
          <pubDate>Thu, 06 Nov 2025 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/scrach-paper/</link>
          <guid>https://seniormars.com/posts/scrach-paper/</guid>
          <description xml:base="https://seniormars.com/posts/scrach-paper/">&lt;p&gt;I submitted this to a math poetry contest a while back and got honorable mention! I figured I’d share it here too.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Scratch Paper&lt;&#x2F;p&gt;
&lt;p&gt;Each sheet, a battlefield of crossed-out lines,&lt;&#x2F;p&gt;
&lt;p&gt;arrows veering nowhere, circles chasing dreams.&lt;&#x2F;p&gt;
&lt;p&gt;Three hours deep, seventeen pages sprawled—&lt;&#x2F;p&gt;
&lt;p&gt;my proof still wrong, but now wrong in new ways.&lt;&#x2F;p&gt;
&lt;p&gt;Like archeology in reverse, I stack&lt;&#x2F;p&gt;
&lt;p&gt;layers of failure, each attempt preserved&lt;&#x2F;p&gt;
&lt;p&gt;in smudged graphite and coffee rings.&lt;&#x2F;p&gt;
&lt;p&gt;The answer is here somewhere, buried&lt;&#x2F;p&gt;
&lt;p&gt;beneath epsilon neighborhoods and&lt;&#x2F;p&gt;
&lt;p&gt;desperate margin calculations.&lt;&#x2F;p&gt;
&lt;p&gt;My professor makes it look effortless,&lt;&#x2F;p&gt;
&lt;p&gt;chalk lines flowing like water.&lt;&#x2F;p&gt;
&lt;p&gt;But here in my dorm at 3 AM,&lt;&#x2F;p&gt;
&lt;p&gt;drowning in crumpled attempts,&lt;&#x2F;p&gt;
&lt;p&gt;I remember reading how Erdős&lt;&#x2F;p&gt;
&lt;p&gt;filled notebooks before finding truth.&lt;&#x2F;p&gt;
&lt;p&gt;So I reach for one more blank page,&lt;&#x2F;p&gt;
&lt;p&gt;knowing that ugly paths sometimes lead&lt;&#x2F;p&gt;
&lt;p&gt;to the most beautiful places.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
</description>
      </item>
      <item>
          <title>The Computational Trilogy: Three Languages for One Structure</title>
          <pubDate>Thu, 27 Feb 2025 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/trilogy/</link>
          <guid>https://seniormars.com/posts/trilogy/</guid>
          <description xml:base="https://seniormars.com/posts/trilogy/">&lt;h2 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Ask three people what computation is and you may get three answers that barely seem related.&lt;&#x2F;p&gt;
&lt;p&gt;A computer scientist might talk about programs, evaluation, and types. A logician might talk about propositions, derivations, and normalization. A category theorist might draw arrows until everyone else leaves the room.&lt;&#x2F;p&gt;
&lt;p&gt;For a long time I treated these as neighboring subjects. They shared notation, borrowed ideas from each other, and occasionally occupied the same seminar. Then I encountered the claim usually called the &lt;strong&gt;computational trilogy&lt;&#x2F;strong&gt; or &lt;strong&gt;computational trinitarianism&lt;&#x2F;strong&gt;:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Propositions correspond to types and objects.&lt;br &#x2F;&gt;
Proofs correspond to programs and morphisms.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;The slogan is often compressed even further:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Proofs are programs. Programs are morphisms.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;When I first saw this, I thought it was either one of the deepest ideas I had encountered or an elaborate abuse of the word “are.” It is, in a sense, both.&lt;&#x2F;p&gt;
&lt;p&gt;There is a precise theorem underneath the slogan. Intuitionistic propositional logic, the simply typed lambda calculus, and cartesian closed categories present the same basic structure in three different languages. That precision matters, but it also creates more ideas we can explore. Nonetheless, the claim is not that every Python script is secretly a proof, that every mathematical proof should be executable, or that category theory has abolished the distinction between syntax and semantics. Those versions sound exciting and are mostly wrong.&lt;&#x2F;p&gt;
&lt;p&gt;The real correspondence is a bit narrower, but I now find it more interesting because of those limits. It tells us exactly which parts of logic behave computationally, exactly which type systems carry logical meaning, and exactly which categorical structures model those systems. When the correspondence breaks, the way it breaks usually points toward another logic, another language, or another category.&lt;&#x2F;p&gt;
&lt;p&gt;This post is my attempt to explain that triangle without sanding off the technical details that make it true. It began as an accessible companion to the &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;ncatlab.org&#x2F;nlab&#x2F;show&#x2F;computational+trilogy&quot;&gt;nLab page on the computational trilogy&lt;&#x2F;a&gt;, but it has become partly an argument with my earlier draft.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Revision note — June 2026&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;The 2025 version was too confident in several places. I treated type errors as contradictions, implied that monads simply “are” modal logic, and moved from linear logic to quantum mechanics much too quickly. This revision narrows those claims, updates the examples to Lean 4, Rust, and current Q# syntax, and replaces the borrowed screenshots with original diagrams.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;img src=&quot;.&#x2F;trilogy-overview.svg&quot; alt=&quot;A triangle connecting logic, programming languages, and category theory through the Curry–Howard and Lambek correspondences&quot; loading=&quot;eager&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h2 id=&quot;what-the-trilogy-actually-says&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#what-the-trilogy-actually-says&quot; aria-label=&quot;Anchor link for: what-the-trilogy-actually-says&quot;&gt;What the trilogy actually says&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The cleanest version of the story starts with three formal systems:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;intuitionistic propositional logic;&lt;&#x2F;li&gt;
&lt;li&gt;the simply typed lambda calculus with products and a unit type;&lt;&#x2F;li&gt;
&lt;li&gt;cartesian closed categories.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Each system has its own vocabulary. Logic speaks about propositions and proofs. Type theory speaks about types and terms. Category theory speaks about objects and morphisms. The correspondence matches their constructions:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Logic&lt;&#x2F;th&gt;&lt;th&gt;Type theory &#x2F; programming&lt;&#x2F;th&gt;&lt;th&gt;Category theory&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;proposition $A$&lt;&#x2F;td&gt;&lt;td&gt;type $A$&lt;&#x2F;td&gt;&lt;td&gt;object $A$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;proof of $A$&lt;&#x2F;td&gt;&lt;td&gt;term $t : A$&lt;&#x2F;td&gt;&lt;td&gt;global element $1 \to A$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;assumption $A$ used to prove $B$&lt;&#x2F;td&gt;&lt;td&gt;term $x : A \vdash t : B$&lt;&#x2F;td&gt;&lt;td&gt;morphism $A \to B$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;implication $A \to B$&lt;&#x2F;td&gt;&lt;td&gt;function type $A \to B$&lt;&#x2F;td&gt;&lt;td&gt;exponential object $B^A$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;conjunction $A \land B$&lt;&#x2F;td&gt;&lt;td&gt;product type $A \times B$&lt;&#x2F;td&gt;&lt;td&gt;categorical product $A \times B$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;truth $\top$&lt;&#x2F;td&gt;&lt;td&gt;unit type $1$&lt;&#x2F;td&gt;&lt;td&gt;terminal object $1$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;proof normalization&lt;&#x2F;td&gt;&lt;td&gt;program evaluation&lt;&#x2F;td&gt;&lt;td&gt;equality of morphisms induced by the categorical laws&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;This table is already enough to explain why the trilogy is not a loose metaphor. The same introduction and elimination rules appear on all three sides. Function abstraction, implication introduction, and currying are three presentations of one operation. Function application, modus ponens, and evaluation are three presentations of another.&lt;&#x2F;p&gt;
&lt;p&gt;There are also immediate caveats. Disjunction and falsity require coproducts and an initial object, so a bare cartesian closed category is not enough; one usually asks for a bicartesian closed category. Quantifiers require dependent types and additional categorical structure. Effects, general recursion, mutable state, concurrency, and control operators require still more. However, the triangle is a starting point of the ideas to come.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;curry-howard-proofs-as-programs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#curry-howard-proofs-as-programs&quot; aria-label=&quot;Anchor link for: curry-howard-proofs-as-programs&quot;&gt;Curry–Howard: proofs as programs&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The first edge of the triangle connects logic and typed computation. Suppose I want to prove the transitivity of implication:&lt;&#x2F;p&gt;
&lt;p&gt;$$
(A \to B) \to (B \to C) \to (A \to C).
$$&lt;&#x2F;p&gt;
&lt;p&gt;A proof is almost forced. Assume a proof of $A \to B$, assume a proof of $B \to C$, and assume $A$. Apply the first implication to get $B$, then the second to get $C$.&lt;&#x2F;p&gt;
&lt;p&gt;Written as a lambda term, the proof is:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\lambda f.,\lambda g.,\lambda x.,g(f(x)).
$$&lt;&#x2F;p&gt;
&lt;p&gt;Written as a Haskell program, it is ordinary function composition:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;haskell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;compose&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ::&lt;&#x2F;span&gt;&lt;span&gt; (a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; b)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; (b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; c)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;compose f g x &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; g (f x)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Written in Lean 4, the theorem and the program have almost the same body:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lean&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;variable&lt;&#x2F;span&gt;&lt;span&gt; {A B C : &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;Prop&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;theorem&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; implicationTransitivity&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (ab : A → B) (bc : B → C) : A → C :=&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;  fun&lt;&#x2F;span&gt;&lt;span&gt; a =&amp;gt; bc (ab a)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;def&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; compose&lt;&#x2F;span&gt;&lt;span&gt; {α β γ : &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;Type&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (f : α → β) (g : β → γ) : α → γ :=&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;  fun&lt;&#x2F;span&gt;&lt;span&gt; x =&amp;gt; g (f x)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Lean reads a proposition as a type and a proof as a term inhabiting that type. To prove &lt;code&gt;A → C&lt;&#x2F;code&gt;, we construct a function that turns a proof of &lt;code&gt;A&lt;&#x2F;code&gt; into a proof of &lt;code&gt;C&lt;&#x2F;code&gt;. The logical and computational readings are not merely similar descriptions of the code. They are the same typing judgment read in two ways.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;introduction-rules-become-constructors&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#introduction-rules-become-constructors&quot; aria-label=&quot;Anchor link for: introduction-rules-become-constructors&quot;&gt;Introduction rules become constructors&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The correspondence is especially visible in natural deduction. Implication introduction says:&lt;&#x2F;p&gt;
&lt;p&gt;\begin{prooftree}
\AxiomC{$\Gamma, x : A \vdash t : B$}
\RightLabel{\scriptsize $\to\ \mathrm{introduction}$}
\UnaryInfC{$\Gamma \vdash (\mathsf{fun}\ x \Rightarrow t) : A \to B$}
\end{prooftree}&lt;&#x2F;p&gt;
&lt;p&gt;If, under the assumption $x : A$, we can construct a proof of $B$, then we can discharge that assumption and obtain a proof of $A \to B$. In programming language terms, we define a function.&lt;&#x2F;p&gt;
&lt;p&gt;Implication elimination, better known as modus ponens, says:&lt;&#x2F;p&gt;
&lt;p&gt;\begin{prooftree}
\AxiomC{$\Gamma \vdash f : A \to B$}
\AxiomC{$\Gamma \vdash a : A$}
\RightLabel{\scriptsize $\to\ \mathrm{elimination}$}
\BinaryInfC{$\Gamma \vdash f\ a : B$}
\end{prooftree}&lt;&#x2F;p&gt;
&lt;p&gt;In programming language terms, we apply a function.&lt;&#x2F;p&gt;
&lt;p&gt;Products work the same way. A proof of $A \land B$ contains a proof of $A$ and a proof of $B$, so it behaves like a pair. A proof of $A \lor B$ contains either a proof of $A$ or a proof of $B$, together with a tag telling us which, so it behaves like a sum type. A proof of $\bot$ would be an inhabitant of the empty type, which is why a function $A \to \bot$ represents a proof of $\neg A$.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Logic&lt;&#x2F;th&gt;&lt;th&gt;Type&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;$A \land B$&lt;&#x2F;td&gt;&lt;td&gt;$A \times B$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;$A \lor B$&lt;&#x2F;td&gt;&lt;td&gt;$A + B$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;$A \to B$&lt;&#x2F;td&gt;&lt;td&gt;function type $A \to B$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;$\top$&lt;&#x2F;td&gt;&lt;td&gt;unit type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;$\bot$&lt;&#x2F;td&gt;&lt;td&gt;empty type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;$\neg A$&lt;&#x2F;td&gt;&lt;td&gt;$A \to \bot$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;The important correction to my old draft is this: &lt;strong&gt;a type error is not a logical contradiction&lt;&#x2F;strong&gt;. A type error means that a term fails to constitute a proof in the system. A contradiction would be a well-typed closed term of the empty type. Those are very different failures.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;evaluation-becomes-normalization&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#evaluation-becomes-normalization&quot; aria-label=&quot;Anchor link for: evaluation-becomes-normalization&quot;&gt;Evaluation becomes normalization&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Proofs can contain detours. We might build a conjunction and immediately project its first component:&lt;&#x2F;p&gt;
&lt;p&gt;\begin{prooftree}
\AxiomC{$a : A$}
\AxiomC{$b : B$}
\RightLabel{\scriptsize $\land\ \mathrm{introduction}$}
\BinaryInfC{$(a,b) : A \land B$}
\RightLabel{\scriptsize $\land\ \mathrm{elimination}_1$}
\UnaryInfC{$a : A$}
\end{prooftree}&lt;&#x2F;p&gt;
&lt;p&gt;The corresponding program is:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;haskell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;fst (a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; b)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Evaluation reduces it to &lt;code&gt;a&lt;&#x2F;code&gt;. Proof normalization removes the same detour. This is the computational content of cut elimination and normalization: executing a term corresponds to simplifying a proof.&lt;&#x2F;p&gt;
&lt;p&gt;Again, the scope matters. This clean story applies most directly to total, pure calculi in which evaluation behaves well. A general-purpose language may diverge, throw an exception, mutate memory, inspect a continuation, or communicate with another process. None of that destroys Curry–Howard, but each feature changes the logical system and the semantics needed to model it.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;proof-assistants-make-the-correspondence-visible&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#proof-assistants-make-the-correspondence-visible&quot; aria-label=&quot;Anchor link for: proof-assistants-make-the-correspondence-visible&quot;&gt;Proof assistants make the correspondence visible&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Lean, Agda, and the Rocq Prover (formerly Coq) make this shared structure hard to ignore. Their kernels check terms against types; some of those types represent data and others represent propositions. The boundary between “program” and “proof” is therefore not a boundary in the core syntax.&lt;&#x2F;p&gt;
&lt;p&gt;Still, it would be misleading to say that ordinary mathematical proof and ordinary programming have become indistinguishable. A human proof in a paper leaves many steps implicit. A proof assistant elaborates those steps into a formal term that a small kernel can check. The machine-checked term is a proof in a formal calculus; the prose argument is usually a guide to a term that still has to survive elaboration and kernel checking. The difference matters, especially when formalization becomes a research tool.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;lambek-programs-as-morphisms&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#lambek-programs-as-morphisms&quot; aria-label=&quot;Anchor link for: lambek-programs-as-morphisms&quot;&gt;Lambek: programs as morphisms&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Curry–Howard gives us logic and programming. Joachim Lambek supplied the third corner by showing that the simply typed lambda calculus has the equational structure of a cartesian closed category.&lt;&#x2F;p&gt;
&lt;p&gt;A category consists of objects and morphisms. Every object $A$ has an identity morphism $\mathrm{id}_A : A \to A$, and composable morphisms&lt;&#x2F;p&gt;
&lt;p&gt;$$
f : A \to B, \qquad g : B \to C
$$&lt;&#x2F;p&gt;
&lt;p&gt;have a composite&lt;&#x2F;p&gt;
&lt;p&gt;$$
g \circ f : A \to C.
$$&lt;&#x2F;p&gt;
&lt;p&gt;Composition is associative, and identities act neutrally. That definition is famously small. The point is not that every category is about computation. The point is that typed functions already obey these laws, so categories provide a language in which we can describe what is essential about composition while ignoring implementation details.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;a-typed-term-is-a-morphism-from-its-context&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-typed-term-is-a-morphism-from-its-context&quot; aria-label=&quot;Anchor link for: a-typed-term-is-a-morphism-from-its-context&quot;&gt;A typed term is a morphism from its context&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;A judgment such as&lt;&#x2F;p&gt;
&lt;p&gt;$$
x : A,\ y : B \vdash t : C
$$&lt;&#x2F;p&gt;
&lt;p&gt;can be read categorically as a morphism&lt;&#x2F;p&gt;
&lt;p&gt;$$
A \times B \longrightarrow C.
$$&lt;&#x2F;p&gt;
&lt;p&gt;The entire typing context becomes a product object. Substitution becomes composition. A variable becomes a projection. The identity term becomes an identity morphism.&lt;&#x2F;p&gt;
&lt;p&gt;For a term with one free variable,&lt;&#x2F;p&gt;
&lt;p&gt;$$
x : A \vdash t : B,
$$&lt;&#x2F;p&gt;
&lt;p&gt;we obtain a morphism $A \to B$. If the term is closed, the context is empty, represented by the terminal object $1$, so a closed term $t : A$ becomes a global element $1 \to A$.&lt;&#x2F;p&gt;
&lt;p&gt;This is the categorical version of the proofs-as-programs idea: a proof of $B$ from an assumption $A$ is a morphism from $A$ to $B$.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;why-cartesian-closed-categories-appear&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#why-cartesian-closed-categories-appear&quot; aria-label=&quot;Anchor link for: why-cartesian-closed-categories-appear&quot;&gt;Why cartesian closed categories appear&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;A cartesian closed category has exactly the structure needed to interpret the simply typed lambda calculus with products:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;a terminal object $1$;&lt;&#x2F;li&gt;
&lt;li&gt;binary products $A \times B$;&lt;&#x2F;li&gt;
&lt;li&gt;exponential objects $B^A$.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The exponential $B^A$ plays the role of the function type $A \to B$. It comes with an evaluation morphism&lt;&#x2F;p&gt;
&lt;p&gt;$$
\operatorname{ev}_{A,B} : B^A \times A \to B,
$$&lt;&#x2F;p&gt;
&lt;p&gt;which is categorical function application.&lt;&#x2F;p&gt;
&lt;p&gt;Currying is expressed by a natural bijection&lt;&#x2F;p&gt;
&lt;p&gt;$$
\operatorname{Hom}(C \times A, B)
\cong
\operatorname{Hom}(C, B^A).
$$&lt;&#x2F;p&gt;
&lt;p&gt;A function of two arguments can be regarded as a function returning a function. The same equation appears as lambda abstraction in programming and implication introduction in logic.&lt;&#x2F;p&gt;
&lt;img src=&quot;.&#x2F;implication-three-views.svg&quot; alt=&quot;Implication, function types, and exponential objects shown as three views of abstraction and application&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;This was the point at which the subject clicked for me. Category theory was not adding a decorative layer on top of lambda calculus. It was extracting the algebra of substitution, pairing, abstraction, and application.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;syntax-and-semantics-are-related-not-identical&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#syntax-and-semantics-are-related-not-identical&quot; aria-label=&quot;Anchor link for: syntax-and-semantics-are-related-not-identical&quot;&gt;Syntax and semantics are related, not identical&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;There are two directions here.&lt;&#x2F;p&gt;
&lt;p&gt;Given a typed lambda calculus, we can construct its &lt;strong&gt;syntactic category&lt;&#x2F;strong&gt;: types are objects, and equivalence classes of terms are morphisms. Beta–eta equality becomes equality of morphisms. This category is cartesian closed.&lt;&#x2F;p&gt;
&lt;p&gt;Conversely, any cartesian closed category gives a semantics for the simply typed lambda calculus. Types are interpreted as objects, terms as morphisms, pairing as the universal property of products, and lambda abstraction through the exponential adjunction.&lt;&#x2F;p&gt;
&lt;p&gt;This is why saying “programs are morphisms” is useful but incomplete. A source program has syntax, reduction steps, variable names, and operational behavior. A morphism in a semantic category may forget some or all of that. The correspondence concerns the structure preserved by the interpretation, not a literal identity between text files and arrows.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;harper-s-computational-trinitarianism&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#harper-s-computational-trinitarianism&quot; aria-label=&quot;Anchor link for: harper-s-computational-trinitarianism&quot;&gt;Harper’s computational trinitarianism&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Robert Harper gave this three-way unity its most memorable name. His “computational trinitarianism” treats logic, programming languages, and categories as three manifestations of one notion of computation. The religious language is intentionally playful, but the methodological point is serious: no corner has permanent priority.&lt;&#x2F;p&gt;
&lt;p&gt;A logical connective can suggest a type former. A type system can reveal a proof theory. A categorical construction can expose the universal property shared by both. Moving around the triangle is often easier than attacking a problem in one language alone.&lt;&#x2F;p&gt;
&lt;p&gt;The following table gives the basic translation. It is corrected from my old version, which confused products with composition and exponentials with Kan extensions.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Categorical structure&lt;&#x2F;th&gt;&lt;th&gt;Sets and functions&lt;&#x2F;th&gt;&lt;th&gt;Logic&lt;&#x2F;th&gt;&lt;th&gt;Typed lambda calculus&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;object&lt;&#x2F;td&gt;&lt;td&gt;set&lt;&#x2F;td&gt;&lt;td&gt;proposition&lt;&#x2F;td&gt;&lt;td&gt;type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;morphism $A \to B$&lt;&#x2F;td&gt;&lt;td&gt;function&lt;&#x2F;td&gt;&lt;td&gt;proof of $B$ from $A$&lt;&#x2F;td&gt;&lt;td&gt;term with input $A$ and output $B$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;terminal object $1$&lt;&#x2F;td&gt;&lt;td&gt;singleton set&lt;&#x2F;td&gt;&lt;td&gt;truth $\top$&lt;&#x2F;td&gt;&lt;td&gt;unit type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;product $A \times B$&lt;&#x2F;td&gt;&lt;td&gt;cartesian product&lt;&#x2F;td&gt;&lt;td&gt;conjunction $A \land B$&lt;&#x2F;td&gt;&lt;td&gt;pair type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;exponential $B^A$&lt;&#x2F;td&gt;&lt;td&gt;function set&lt;&#x2F;td&gt;&lt;td&gt;implication $A \to B$&lt;&#x2F;td&gt;&lt;td&gt;function type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;evaluation&lt;&#x2F;td&gt;&lt;td&gt;function application&lt;&#x2F;td&gt;&lt;td&gt;modus ponens&lt;&#x2F;td&gt;&lt;td&gt;term application&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;currying&lt;&#x2F;td&gt;&lt;td&gt;curried function&lt;&#x2F;td&gt;&lt;td&gt;deduction theorem&lt;&#x2F;td&gt;&lt;td&gt;lambda abstraction&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;The table is thus not merely a dictionary. Line the equations up. Beta reduction corresponds to applying an abstraction; eta expansion corresponds to the extensional principle that a function is determined by how it acts on arguments; product laws correspond to the introduction and elimination equations for conjunction.&lt;&#x2F;p&gt;
&lt;p&gt;John Baez and Mike Stay used the image of a Rosetta Stone for a larger network connecting physics, topology, logic, and computation. I like that analogy because a Rosetta Stone does not claim that its languages are visually identical, but it lets us translate while preserving meaning. Isomorphisms, universal properties, and naturality are the preserved meaning.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;a-research-heuristic-not-a-law-of-nature&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-research-heuristic-not-a-law-of-nature&quot; aria-label=&quot;Anchor link for: a-research-heuristic-not-a-law-of-nature&quot;&gt;A research heuristic; not a law of nature&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The trinitarian viewpoint suggests a useful habit:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;when a new logic appears, look for its type theory and categorical semantics;&lt;&#x2F;li&gt;
&lt;li&gt;when a new type discipline appears, ask what proof rules it enforces;&lt;&#x2F;li&gt;
&lt;li&gt;when a categorical structure appears, ask what language has it as a model.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;This habit has been productive. Linear logic led to linear type systems and monoidal semantics. Classical logic is connected to continuations and control operators. Moggi’s use of monads gave a compositional semantics for computational effects. Modal logics have informed staged computation, guarded recursion, mobility, and effect systems.&lt;&#x2F;p&gt;
&lt;p&gt;But the translations are not usually one-line identities. “Monads are modal logic” is too crude. Certain monads interpret certain modalities or notions of computation under specific conditions. “Continuations are classical logic” is also shorthand for a precise family of correspondences involving control operators, double-negation translations, and evaluation strategy. The trilogy is strongest when it makes us ask for the missing hypotheses.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;where-the-slogan-breaks&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#where-the-slogan-breaks&quot; aria-label=&quot;Anchor link for: where-the-slogan-breaks&quot;&gt;Where the slogan breaks&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The phrase “proofs are programs” is so satisfying that it tempts people, including me, to stop reading too early. Several distinctions survive the correspondence.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;not-every-type-is-a-proposition-in-the-same-sense&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#not-every-type-is-a-proposition-in-the-same-sense&quot; aria-label=&quot;Anchor link for: not-every-type-is-a-proposition-in-the-same-sense&quot;&gt;Not every type is a proposition in the same sense&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;In a propositions-as-types reading, a type is interpreted as the proposition that it is inhabited. But programming languages use types for many purposes: memory layout, representation, optimization, effects, ownership, protocol state, and abstraction boundaries. The logical reading may still exist, but it may not be the only useful one.&lt;&#x2F;p&gt;
&lt;p&gt;Lean makes a deliberate distinction between &lt;code&gt;Prop&lt;&#x2F;code&gt; and data-bearing universes such as &lt;code&gt;Type&lt;&#x2F;code&gt;. Proofs in &lt;code&gt;Prop&lt;&#x2F;code&gt; are proof-irrelevant: the system does not computationally distinguish two proofs of the same proposition. Terms in &lt;code&gt;Type&lt;&#x2F;code&gt; can carry data that matters at runtime. That design is itself a reminder that “types are propositions” has variants.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;nontermination-changes-the-logic&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#nontermination-changes-the-logic&quot; aria-label=&quot;Anchor link for: nontermination-changes-the-logic&quot;&gt;Nontermination changes the logic&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;In a strongly normalizing calculus, every well-typed term evaluates to a normal form. This supports the reading of an inhabitant as a completed proof. Add unrestricted general recursion and we can write a term that claims any type but never produces a value. Logically, divergence behaves like a serious complication, not a free theorem.&lt;&#x2F;p&gt;
&lt;p&gt;Languages handle this in different ways. Some isolate partiality in an effect. Some use domain theory. Some distinguish total functions from general computations. The simple Curry–Howard story does not disappear, but it no longer describes the whole language.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;effects-need-semantics-beyond-plain-functions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#effects-need-semantics-beyond-plain-functions&quot; aria-label=&quot;Anchor link for: effects-need-semantics-beyond-plain-functions&quot;&gt;Effects need semantics beyond plain functions&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;A function that reads mutable state is not determined only by its explicit argument. A computation that may throw an exception does not simply return a value of type $B$. A nondeterministic computation may return several possible values. Moggi’s insight was to separate values from computations, often interpreting an effectful computation returning a $B$ as a morphism into $T B$ for a suitable monad $T$.&lt;&#x2F;p&gt;
&lt;p&gt;This is a beautiful extension of the categorical corner, but it is not the claim that every Haskell monad corresponds to a familiar modal logic. The details depend on the monad, the type theory, and the equations we impose.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;human-proofs-are-not-formal-terms-on-the-page&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#human-proofs-are-not-formal-terms-on-the-page&quot; aria-label=&quot;Anchor link for: human-proofs-are-not-formal-terms-on-the-page&quot;&gt;Human proofs are not formal terms on the page&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The trilogy can make formalists sound as if an informal proof is merely badly formatted source code. I do not think that is right.&lt;&#x2F;p&gt;
&lt;p&gt;Mathematicians use diagrams, analogies, omitted cases, appeals to symmetry, changes of viewpoint, and judgments about which lemma is worth proving. A formal term records enough detail for a kernel to verify correctness inside a chosen foundation. It does not automatically record why the proof was discovered, which representation made it visible, or which parts a human considers explanatory.&lt;&#x2F;p&gt;
&lt;p&gt;The computational trilogy tells us something profound about formal derivations. It does not settle the philosophy of mathematical understanding.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;dependent-types-computation-in-context&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#dependent-types-computation-in-context&quot; aria-label=&quot;Anchor link for: dependent-types-computation-in-context&quot;&gt;Dependent types: computation in context&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The simply typed triangle treats a function’s output type as independent of its input. Dependent type theory removes that restriction.&lt;&#x2F;p&gt;
&lt;p&gt;A dependent function type&lt;&#x2F;p&gt;
&lt;p&gt;$$
\prod_{x:A} B(x)
$$&lt;&#x2F;p&gt;
&lt;p&gt;contains functions that take $x : A$ and return a value of type $B(x)$. Logically, this corresponds to universal quantification. A dependent pair&lt;&#x2F;p&gt;
&lt;p&gt;$$
\sum_{x:A} B(x)
$$&lt;&#x2F;p&gt;
&lt;p&gt;contains an $x : A$ together with a witness of $B(x)$, corresponding to existential quantification.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Logic&lt;&#x2F;th&gt;&lt;th&gt;Dependent type theory&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;$\forall x:A.,B(x)$&lt;&#x2F;td&gt;&lt;td&gt;dependent function $\prod_{x:A} B(x)$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;$\exists x:A.,B(x)$&lt;&#x2F;td&gt;&lt;td&gt;dependent pair $\sum_{x:A} B(x)$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Categorically, contexts and substitutions are no longer captured by one cartesian closed category alone. We need structure that tracks families of types varying over a base. Slice categories, fibrations, comprehension categories, categories with families, and locally cartesian closed categories are several related ways to organize this.&lt;&#x2F;p&gt;
&lt;p&gt;The slice category $\mathcal{C}&#x2F;\Gamma$ consists of objects and morphisms living over a context $\Gamma$. A dependent type over $\Gamma$ can be represented by a map into $\Gamma$, and substitution becomes pullback. This is the rigorous version of the phrase “computation happens in context.”&lt;&#x2F;p&gt;
&lt;p&gt;My old draft leapt from this observation to claims about practical program verification through non-abelian cohomology. That was not justified. There are genuine connections between higher toposes, classifying maps, cocycles, and dependent type theory, especially in work around cohesive and homotopical mathematics. But that does not currently mean that one can feed ordinary source code into cohomology and read off unreachable states. The mathematics is real; my application story was not.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;homotopy-type-theory-proofs-have-shape&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#homotopy-type-theory-proofs-have-shape&quot; aria-label=&quot;Anchor link for: homotopy-type-theory-proofs-have-shape&quot;&gt;Homotopy type theory: proofs have shape&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Homotopy type theory changes the picture again by taking identity types seriously as mathematical objects.&lt;&#x2F;p&gt;
&lt;p&gt;In ordinary set-level thinking, equality often behaves like a yes-or-no relation. In homotopy type theory, a proof of equality $x =_A y$ can be viewed as a path from $x$ to $y$ in the space represented by $A$. Equalities between equalities become homotopies between paths, and this continues to higher dimensions.&lt;&#x2F;p&gt;
&lt;p&gt;The correspondence expands:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Type theory&lt;&#x2F;th&gt;&lt;th&gt;Homotopy theory&lt;&#x2F;th&gt;&lt;th&gt;Higher category theory&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;type&lt;&#x2F;td&gt;&lt;td&gt;space &#x2F; $\infty$-groupoid&lt;&#x2F;td&gt;&lt;td&gt;object-like higher structure&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;term&lt;&#x2F;td&gt;&lt;td&gt;point&lt;&#x2F;td&gt;&lt;td&gt;object &#x2F; generalized element&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;identity proof&lt;&#x2F;td&gt;&lt;td&gt;path&lt;&#x2F;td&gt;&lt;td&gt;invertible higher morphism&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;equality between identity proofs&lt;&#x2F;td&gt;&lt;td&gt;homotopy between paths&lt;&#x2F;td&gt;&lt;td&gt;higher morphism&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;The univalence axiom is often summarized as “equivalence is equality.” More precisely, for types $A$ and $B$ in a universe $\mathcal{U}$, the canonical map from identity to equivalence is itself an equivalence:&lt;&#x2F;p&gt;
&lt;p&gt;$$
(A =_{\mathcal{U}} B) \simeq (A \simeq B).
$$&lt;&#x2F;p&gt;
&lt;p&gt;This does not mean that two data structures with the same number of elements are interchangeable at zero cost in an ordinary compiler. It means that, inside univalent type theory, an equivalence between types can be used as a path along which constructions and proofs may be transported.&lt;&#x2F;p&gt;
&lt;p&gt;Cubical type theories give computational content to this idea. Cubical Agda, for example, supports computational univalence and higher inductive types rather than treating univalence only as an opaque axiom. That is one place where the phrase “proofs are programs” becomes stranger and more literal: paths, transport, and higher structure participate in computation.&lt;&#x2F;p&gt;
&lt;img src=&quot;.&#x2F;extensions-map.svg&quot; alt=&quot;A map showing the classical computational trilogy extending toward dependent and homotopy type theory, effects and control, and linear or quantum structures&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;I am still fascinated by this higher version, but I now resist calling it a completed “tetralogy.” There are several overlapping correspondences here, and researchers do not package them all in one universally agreed framework. The map is useful; the branding is optional.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;structural-rules-linear-affine-and-relevant-computation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#structural-rules-linear-affine-and-relevant-computation&quot; aria-label=&quot;Anchor link for: structural-rules-linear-affine-and-relevant-computation&quot;&gt;Structural rules: linear, affine, and relevant computation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;One of the best ways to understand the trilogy is to change the logical rules and watch all three corners move.&lt;&#x2F;p&gt;
&lt;p&gt;Ordinary intuitionistic logic permits three structural rules on assumptions:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;exchange&lt;&#x2F;strong&gt;: assumptions may be reordered;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;weakening&lt;&#x2F;strong&gt;: an assumption may go unused;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;contraction&lt;&#x2F;strong&gt;: an assumption may be duplicated.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Substructural logics restrict some of these rules. Assuming exchange remains available, we obtain a useful four-way comparison:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Logic&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: right&quot;&gt;Weakening&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: right&quot;&gt;Contraction&lt;&#x2F;th&gt;&lt;th&gt;Informal resource reading&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;intuitionistic&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;yes&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;yes&lt;&#x2F;td&gt;&lt;td&gt;values may be discarded or copied&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;affine&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;yes&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;no&lt;&#x2F;td&gt;&lt;td&gt;values may be discarded but not implicitly copied&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;relevant&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;no&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;yes&lt;&#x2F;td&gt;&lt;td&gt;values must be used but may be copied&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;linear&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;no&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;no&lt;&#x2F;td&gt;&lt;td&gt;values must be used exactly once&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;The difference is concrete. In ordinary intuitionistic logic, the proposition&lt;&#x2F;p&gt;
&lt;p&gt;$$
A \to A \land A
$$&lt;&#x2F;p&gt;
&lt;p&gt;is provable because we may use the assumption $A$ twice. In linear logic, the analogous formula&lt;&#x2F;p&gt;
&lt;p&gt;$$
A \multimap A \otimes A
$$&lt;&#x2F;p&gt;
&lt;p&gt;is not generally provable. Producing two resources from one would require an explicit copying structure. The exponential modality $!A$ marks resources that may be duplicated and discarded.&lt;&#x2F;p&gt;
&lt;p&gt;A 2026 paper by Fernando Cano-Jorge develops trinitarian presentations not only for linear logic but also for affine and relevant logic. I like this update because it corrects an impression my old post gave: the trilogy is not one fixed triangle with a quantum annex. Changing structural rules systematically changes the proof theory, the term calculus, and the categorical semantics.&lt;&#x2F;p&gt;
&lt;img src=&quot;.&#x2F;structural-rules.svg&quot; alt=&quot;A comparison of intuitionistic, affine, relevant, and linear systems based on whether weakening and contraction are allowed&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h3 id=&quot;rust-has-an-affine-flavor&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#rust-has-an-affine-flavor&quot; aria-label=&quot;Anchor link for: rust-has-an-affine-flavor&quot;&gt;Rust has an affine flavor&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Rust is often described as having an affine ownership discipline. For values that do not implement &lt;code&gt;Copy&lt;&#x2F;code&gt;, moving the value consumes the original binding; the value may be used at most once unless it is borrowed or explicitly cloned.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; consume&lt;&#x2F;span&gt;&lt;span&gt;(text&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    text&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;len&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; message&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;proofs as programs&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; length&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; consume&lt;&#x2F;span&gt;&lt;span&gt;(message);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;{length}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    &#x2F;&#x2F; println!(&amp;quot;{message}&amp;quot;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    &#x2F;&#x2F; Error: `message` was moved into `consume`.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This does not mean that the whole Rust language is a direct implementation of affine logic. Borrowing, lifetimes, &lt;code&gt;Copy&lt;&#x2F;code&gt;, mutation, unsafe code, and the operational semantics all add structure. But the resource-sensitive intuition is genuine: ownership prevents unrestricted implicit duplication of certain values.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-quantum-connection-with-fewer-miracles&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-quantum-connection-with-fewer-miracles&quot; aria-label=&quot;Anchor link for: the-quantum-connection-with-fewer-miracles&quot;&gt;The quantum connection, with fewer miracles&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;My old draft presented a neat parallel:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;intuitionistic logic becomes linear logic;&lt;&#x2F;li&gt;
&lt;li&gt;classical computation becomes quantum computation;&lt;&#x2F;li&gt;
&lt;li&gt;cartesian closed categories become monoidal categories.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;There is something important here, but we must expand.&lt;&#x2F;p&gt;
&lt;p&gt;Linear logic and quantum theory both care about copying and deletion. The no-cloning theorem says there is no universal physical operation that perfectly copies an arbitrary unknown quantum state. Cartesian categories, by contrast, provide a natural diagonal map $A \to A \times A$ for every object, exactly the kind of uniform copying operation that quantum states do not possess.&lt;&#x2F;p&gt;
&lt;p&gt;This is one reason symmetric monoidal categories, rather than cartesian categories, are natural for quantum processes. A tensor product $A \otimes B$ combines systems without automatically supplying diagonal and deletion maps. Categorical quantum mechanics adds further structure, commonly dagger compact structure, to model adjoints, entanglement, and process composition.&lt;&#x2F;p&gt;
&lt;p&gt;But linear logic is not quantum mechanics. Many linear systems have nothing quantum about them. The no-cloning theorem does not say that a qubit can be touched only once; quantum gates can act on the same qubit sequentially. It says that an arbitrary unknown state cannot be duplicated by one uniform quantum operation. And a quantum programming language need not expose a linear type system directly.&lt;&#x2F;p&gt;
&lt;p&gt;Given two qubits initialized to $|0\rangle$, a current Q# operation for preparing a Bell pair is simple:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;operation CreateBellPair(q1 : Qubit, q2 : Qubit) : Unit {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    H(q1);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    CNOT(q1, q2);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This circuit applies a Hadamard gate to &lt;code&gt;q1&lt;&#x2F;code&gt; and then entangles &lt;code&gt;q1&lt;&#x2F;code&gt; with &lt;code&gt;q2&lt;&#x2F;code&gt; using &lt;code&gt;CNOT&lt;&#x2F;code&gt;. It illustrates monoidal composition and entanglement. It does &lt;strong&gt;not&lt;&#x2F;strong&gt; by itself demonstrate a Curry–Howard correspondence for quantum computation, and Q#’s type system is not being used here as a proof of no-cloning.&lt;&#x2F;p&gt;
&lt;p&gt;The more defensible picture is you may see in papers is:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;linear logic supplies a resource-sensitive proof theory;&lt;&#x2F;li&gt;
&lt;li&gt;linear type systems and quantum data share a concern with unrestricted copying;&lt;&#x2F;li&gt;
&lt;li&gt;symmetric monoidal and dagger compact categories organize process composition;&lt;&#x2F;li&gt;
&lt;li&gt;categorical quantum mechanics shows that this structure captures substantial quantum protocols.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Which is really cool already.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;one-example-across-all-three-corners&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#one-example-across-all-three-corners&quot; aria-label=&quot;Anchor link for: one-example-across-all-three-corners&quot;&gt;One example across all three corners&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;It helps to finish the technical part with one construction and carry it around the triangle.&lt;&#x2F;p&gt;
&lt;p&gt;Suppose we have:&lt;&#x2F;p&gt;
&lt;p&gt;$$
f : A \to B, \qquad g : B \to C.
$$&lt;&#x2F;p&gt;
&lt;h3 id=&quot;in-logic&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#in-logic&quot; aria-label=&quot;Anchor link for: in-logic&quot;&gt;In logic&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;From $A \to B$ and $B \to C$, we derive $A \to C$. This is transitivity of implication.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;in-programming&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#in-programming&quot; aria-label=&quot;Anchor link for: in-programming&quot;&gt;In programming&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;We compose functions:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;haskell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;compose&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ::&lt;&#x2F;span&gt;&lt;span&gt; (a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; b)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; (b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; c)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;compose f g &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;= \&lt;&#x2F;span&gt;&lt;span&gt;x &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;-&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; g (f x)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;in-category-theory&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#in-category-theory&quot; aria-label=&quot;Anchor link for: in-category-theory&quot;&gt;In category theory&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;We compose morphisms:&lt;&#x2F;p&gt;
&lt;p&gt;$$
A \xrightarrow{f} B \xrightarrow{g} C
$$&lt;&#x2F;p&gt;
&lt;p&gt;into&lt;&#x2F;p&gt;
&lt;p&gt;$$
A \xrightarrow{g \circ f} C.
$$&lt;&#x2F;p&gt;
&lt;p&gt;The three descriptions preserve more than the final input-output relationship. Identity proofs correspond to identity functions and identity morphisms. Substitution corresponds to function composition and categorical composition. Associativity appears in all three languages.&lt;&#x2F;p&gt;
&lt;p&gt;This is what I mean by “one structure.” Not that the notation disappears, or that every question transfers automatically, but that the operations and equations line up tightly enough that a result in one corner can become a theorem, a program, or a semantic construction in another.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#conclusion&quot; aria-label=&quot;Anchor link for: conclusion&quot;&gt;Conclusion&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;What still amazes me about the computational trilogy is the potential for translation. The three corners are not identical, but they are close enough that we can move between them systematically. We can ask what information is preserved, what is forgotten, and what new structure is needed when the correspondence fails.&lt;&#x2F;p&gt;
&lt;p&gt;Implication becomes a function type and an exponential object. Modus ponens becomes application and evaluation. Proof normalization becomes term reduction. Substitution becomes composition. When we change the treatment of assumptions, intuitionistic logic separates into affine, relevant, and linear systems, and corresponding type systems and categories appear with it. When types depend on terms, slice categories and fibrations enter. When identity proofs carry higher structure, homotopy theory enters. When copying ceases to be free, monoidal categories become unavoidable.&lt;&#x2F;p&gt;
&lt;p&gt;None of this proves that computation is the fabric of reality. I am less willing to make that sentence now than I was a year ago. It does show that logic, programs, and mathematical structure repeatedly organize themselves around the same compositional patterns.&lt;&#x2F;p&gt;
&lt;p&gt;The borders do not vanish. A proof is still not the same cultural object as a program, and a program is still not the same syntactic object as a morphism. But crossing the borders becomes systematic. We can ask what information a translation preserves, what it forgets, and what new structure is needed when it fails.&lt;&#x2F;p&gt;
&lt;p&gt;That, to me, is the real value of the trilogy. It is not one grand answer. It is a disciplined way to move between questions.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;false&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;References&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: none;&quot;&gt;
      &lt;ol&gt;
&lt;li&gt;H. B. Curry, “Functionality in Combinatory Logic,” &lt;em&gt;Proceedings of the National Academy of Sciences&lt;&#x2F;em&gt; 20(11), 1934, 584–590.&lt;&#x2F;li&gt;
&lt;li&gt;William A. Howard, “The Formulae-as-Types Notion of Construction,” in J. P. Seldin and J. R. Hindley (eds.), &lt;em&gt;To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism&lt;&#x2F;em&gt;, Academic Press, 1980, 479–490. The manuscript dates from 1969.&lt;&#x2F;li&gt;
&lt;li&gt;Joachim Lambek, “From $\lambda$-Calculus to Cartesian Closed Categories,” in J. P. Seldin and J. R. Hindley (eds.), &lt;em&gt;To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism&lt;&#x2F;em&gt;, Academic Press, 1980, 375–402.&lt;&#x2F;li&gt;
&lt;li&gt;Joachim Lambek and Philip J. Scott, &lt;em&gt;Introduction to Higher-Order Categorical Logic&lt;&#x2F;em&gt;, Cambridge University Press, 1986. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1017&#x2F;CBO9780511525858&quot;&gt;doi:10.1017&#x2F;CBO9780511525858&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Robert Harper, &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;existentialtype.wordpress.com&#x2F;2011&#x2F;03&#x2F;27&#x2F;the-holy-trinity&#x2F;&quot;&gt;“The Holy Trinity”&lt;&#x2F;a&gt;, 2011.&lt;&#x2F;li&gt;
&lt;li&gt;Philip Wadler, “Propositions as Types,” &lt;em&gt;Communications of the ACM&lt;&#x2F;em&gt; 58(12), 2015, 75–84. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1145&#x2F;2699407&quot;&gt;doi:10.1145&#x2F;2699407&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;John C. Baez and Mike Stay, “Physics, Topology, Logic and Computation: A Rosetta Stone,” in &lt;em&gt;New Structures for Physics&lt;&#x2F;em&gt;, Lecture Notes in Physics 813, 2011, 95–174. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;0903.0340&quot;&gt;arXiv:0903.0340&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Jeremy Avigad, Leonardo de Moura, Soonho Kong, Sebastian Ullrich, and contributors, &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;lean-lang.org&#x2F;theorem_proving_in_lean4&#x2F;&quot;&gt;&lt;em&gt;Theorem Proving in Lean 4&lt;&#x2F;em&gt;&lt;&#x2F;a&gt;, current online edition.&lt;&#x2F;li&gt;
&lt;li&gt;The Rocq Prover team, &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;rocq-prover.org&#x2F;&quot;&gt;The Rocq Prover&lt;&#x2F;a&gt;, formerly the Coq Proof Assistant.&lt;&#x2F;li&gt;
&lt;li&gt;Eugenio Moggi, “Notions of Computation and Monads,” &lt;em&gt;Information and Computation&lt;&#x2F;em&gt; 93(1), 1991, 55–92. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1016&#x2F;0890-5401(91)90052-4&quot;&gt;doi:10.1016&#x2F;0890-5401(91)90052-4&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Timothy G. Griffin, “A Formulae-as-Type Notion of Control,” &lt;em&gt;POPL ’90&lt;&#x2F;em&gt;, 1990, 47–58. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1145&#x2F;96709.96714&quot;&gt;doi:10.1145&#x2F;96709.96714&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;The Univalent Foundations Program, &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;homotopytypetheory.org&#x2F;book&#x2F;&quot;&gt;&lt;em&gt;Homotopy Type Theory: Univalent Foundations of Mathematics&lt;&#x2F;em&gt;&lt;&#x2F;a&gt;, 2013.&lt;&#x2F;li&gt;
&lt;li&gt;Michael Shulman, &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;home.sandiego.edu&#x2F;~shulman&#x2F;papers&#x2F;trinity.pdf&quot;&gt;“Homotopical Trinitarianism: A Perspective on Homotopy Type Theory”&lt;&#x2F;a&gt;, 2018 slides.&lt;&#x2F;li&gt;
&lt;li&gt;Agda documentation, &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;agda.readthedocs.io&#x2F;en&#x2F;latest&#x2F;language&#x2F;cubical.html&quot;&gt;“Cubical”&lt;&#x2F;a&gt;, current online edition.&lt;&#x2F;li&gt;
&lt;li&gt;Jean-Yves Girard, “Linear Logic,” &lt;em&gt;Theoretical Computer Science&lt;&#x2F;em&gt; 50, 1987, 1–101. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1016&#x2F;0304-3975(87)90045-4&quot;&gt;doi:10.1016&#x2F;0304-3975(87)90045-4&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Fernando Cano-Jorge, “Extending Computational Trinitarianism,” &lt;em&gt;Logic Journal of the IGPL&lt;&#x2F;em&gt;, published online 8 June 2026; assigned to volume 34, issue 4. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1093&#x2F;jigpal&#x2F;jzag037&quot;&gt;doi:10.1093&#x2F;jigpal&#x2F;jzag037&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Samson Abramsky and Bob Coecke, “A Categorical Semantics of Quantum Protocols,” &lt;em&gt;LICS 2004&lt;&#x2F;em&gt;, 415–425. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1109&#x2F;LICS.2004.1319636&quot;&gt;doi:10.1109&#x2F;LICS.2004.1319636&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Peter Selinger, “A Survey of Graphical Languages for Monoidal Categories,” in &lt;em&gt;New Structures for Physics&lt;&#x2F;em&gt;, 2011. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;0908.3347&quot;&gt;arXiv:0908.3347&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Microsoft, &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;azure&#x2F;quantum&#x2F;concepts-qir&quot;&gt;“Quantum Intermediate Representation”&lt;&#x2F;a&gt;, including the Q# Bell-pair example.&lt;&#x2F;li&gt;
&lt;li&gt;nLab, &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;ncatlab.org&#x2F;nlab&#x2F;show&#x2F;computational+trilogy&quot;&gt;“Computational Trilogy”&lt;&#x2F;a&gt;, accessed June 2026.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
</description>
      </item>
      <item>
          <title>The Computational Trilogy: Three Perspectives, One Truth</title>
          <pubDate>Thu, 27 Feb 2025 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/trilogy/copy/</link>
          <guid>https://seniormars.com/posts/trilogy/copy/</guid>
          <description xml:base="https://seniormars.com/posts/trilogy/copy/">&lt;h2 id=&quot;motivation&quot;&gt;Motivation&lt;&#x2F;h2&gt;
&lt;p&gt;Everywhere we look, computation surrounds us—yet confusion about its true nature persists just as universally. Ask a computer scientist about computation, and you’ll hear of algorithms and Turing machines. Pose the same question to a logician, and watch them expound on formal proofs and axioms. A category theorist, meanwhile, might wave their hands toward morphisms and elaborate commutative diagrams.&lt;&#x2F;p&gt;
&lt;p&gt;Throughout much of the 20th century, these three perspectives seemed to speak entirely different languages, each isolated in its own intellectual silo. Then something remarkable happened. Starting in the late 1900s, a realization began to crystallize: programming languages, formal logic, and category theory aren’t separate disciplines at all! Rather, they represent different manifestations of a single underlying structure—interconnected as intimately as electricity, magnetism, and light in Maxwell’s revolutionary equations.&lt;&#x2F;p&gt;
&lt;p&gt;This insight, sometimes called the Computational Trilogy, builds on a deceptively simple but idea:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Proofs are programs.
Programs are morphisms.
Types are propositions.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Could anything be more elegant? Formalized as the Curry-Howard-Lambek correspondence, this unification suggests that logic, computation, and mathematical structure aren’t just similar—they’re different expressions of the same fundamental reality. Each domain offers a unique lens for viewing the others; together, they create what John Baez aptly called a “Rosetta Stone” for modern mathematics.&lt;&#x2F;p&gt;
&lt;p&gt;But why should we care?&lt;&#x2F;p&gt;
&lt;p&gt;Far beyond its elegant theoretical beauty, this framework has begun transforming everything from how we design programming languages to how we approach automated theorem proving, even reshaping the very foundations of mathematics itself. Where might this lead? Consider the emergence of homotopy type theory, the rising popularity of dependently typed programming languages, and the surprising yet seemingly inevitable convergence of classical and quantum computation—all pointing toward an ever-deeper unification.&lt;&#x2F;p&gt;
&lt;p&gt;Yet for all its power, the correspondence remains incomplete. How do the intuitive, sometimes messy proofs of human mathematicians fit into this framework? Can we extend it to embrace discrete mathematics, where combinatorial structures often resist elegant formulation? What happens when we venture beyond classical computation into quantum mechanical realms, where the rules of logic themselves appear to shift and transform?&lt;&#x2F;p&gt;
&lt;p&gt;Through this blog, I hope to explore precisely these questions. My goal isn’t just to explain theoretical curiosities but to demonstrate why this unification of logic, programming, and mathematics holds such transformative potential—not just for specialists, but for anyone fascinated by computation, proof, and mathematical truth. Most importantly, it is to make this link: &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;ncatlab.org&#x2F;nlab&#x2F;show&#x2F;computational+trilogy&quot;&gt;ncatlab.org &#x2F; computational+trilogy&lt;&#x2F;a&gt; more accessible to a wider audience. Note: all images are from the same link.&lt;&#x2F;p&gt;
&lt;p&gt;Note: Some parts of the original blog was grammar-checked by GPT-4. I have changed my opinion about AI tools since, and will updated this blog soon to reflect my current views. The main ideas remain mine.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-problem-with-borders&quot;&gt;The Problem With Borders&lt;&#x2F;h2&gt;
&lt;p&gt;Our tendency to separate disciplines is a deeply ingrained habit of thought. Mathematicians have long viewed proofs as distinct from computation, even as the rise of proof assistants like Lean and Coq suggests that writing proofs and writing programs are becoming indistinguishable. Likewise, computer scientists often see programming languages as a domain of syntax and algorithms, without recognizing that their very structure is dictated by deep logical principles.&lt;&#x2F;p&gt;
&lt;p&gt;Category theory, for its part, often seems like an esoteric abstraction, despite the fact that it offers the most general possible language for describing computation. The reluctance to embrace these connections is understandable. Each discipline has its own historical development, its own motivations, its own culture.&lt;&#x2F;p&gt;
&lt;p&gt;But as we will see, once you adopt the computational trilogy as a guiding principle, the artificial boundaries between these fields dissolve.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;No longer is a proof just a sequence of logical deductions—it becomes an algorithm actively computing its conclusion.&lt;&#x2F;li&gt;
&lt;li&gt;A function in programming transcends its role as mere instructions—revealing itself as a morphism in a mathematical category.&lt;&#x2F;li&gt;
&lt;li&gt;And a logical proposition? Far more than a statement about truth—it emerges as a type describing computational possibilities.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;This perspective doesn’t just unify fields—it expands our tools for understanding mathematics itself.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;a-roadmap&quot;&gt;A Roadmap&lt;&#x2F;h2&gt;
&lt;p&gt;In this blog, we will explore:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Origins of the Trilogy&lt;&#x2F;li&gt;
&lt;li&gt;The Curry-Howard correspondence: proofs as programs.&lt;&#x2F;li&gt;
&lt;li&gt;Lambek’s categorical extension: programs as morphisms.&lt;&#x2F;li&gt;
&lt;li&gt;Harper’s vision of computational trinitarianism.&lt;&#x2F;li&gt;
&lt;li&gt;The Rosetta Stone of Computation&lt;&#x2F;li&gt;
&lt;li&gt;Concrete examples of the correspondence.&lt;&#x2F;li&gt;
&lt;li&gt;Beyond the Trilogy: New Frontiers
&lt;ul&gt;
&lt;li&gt;Homotopy type theory: when types behave like spaces.&lt;&#x2F;li&gt;
&lt;li&gt;The rise of quantum computation: from classical logic to linear logic.&lt;&#x2F;li&gt;
&lt;li&gt;What comes after proof? Mathematical intuition, unformalized reasoning, and the limits of formalism.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;This is a story about unification—but also about boundaries, and where they begin to break down. It is about how computation, once thought to be just a tool, is becoming the very fabric of mathematics itself. All of this while trying to be as accessible as possible, without sacrificing depth.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;origins-of-the-trilogy&quot;&gt;Origins of the Trilogy&lt;&#x2F;h2&gt;
&lt;p&gt;The discovery that proofs, programs, and mathematical structures are deeply interwoven did not happen all at once. It unfolded in stages, through a series of insights spanning logic, computation, and category theory. What we now call the Computational Trilogy emerged from a confluence of three major developments:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The Curry-Howard Correspondence – the realization that proofs are programs.&lt;&#x2F;li&gt;
&lt;li&gt;Lambek’s Categorical Perspective – the generalization that programs are morphisms.&lt;&#x2F;li&gt;
&lt;li&gt;Harper’s Computational Trinitarianism – the philosophical framework that unites logic, computation, and category theory into a single, interconnected vision.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Each of these developments transformed its respective field, but together, they form a single, powerful idea: mathematics and computation are not separate; they are two sides of the same coin.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-curry-howard-correspondence-proofs-as-programs&quot;&gt;The Curry-Howard Correspondence: Proofs as Programs&lt;&#x2F;h2&gt;
&lt;p&gt;Mathematics is the study of absolute truths, yet for centuries, mathematicians have been unknowingly writing computer programs without ever compiling them.&lt;&#x2F;p&gt;
&lt;p&gt;A proof is often thought of as a static object, a sequence of logical deductions frozen on the page. But what if we view proofs differently—not as static arguments, but as dynamic computations? This is the heart of the Curry-Howard Correspondence, a discovery that revealed a connection between logic and computation.&lt;&#x2F;p&gt;
&lt;p&gt;This insight wasn’t just a clever academic observation—it fundamentally transformed both fields by establishing that:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Mathematical proofs and programs share the same underlying structure&lt;&#x2F;li&gt;
&lt;li&gt;Propositions in logic correspond directly to types in programming&lt;&#x2F;li&gt;
&lt;li&gt;Proving a theorem is isomorphic to constructing a program of a given type&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;When I first encountered this correspondence in high school, it felt like discovering that two languages I had been studying separately were actually dialects of the same underlying structure. It was a moment of clarity—suddenly, the boundary between proving theorems and writing code disappeared.&lt;&#x2F;p&gt;
&lt;p&gt;The story begins in the early 20th century when formal logic underwent a foundational shift. David Hilbert sought to formalize all of mathematics, but this ambition was shattered by Gödel’s incompleteness theorems. Gödel’s work hinted at an intricate relationship between proofs and computation, which was soon made explicit by Alonzo Church and Alan Turing with their independent formalizations of computability.&lt;&#x2F;p&gt;
&lt;p&gt;But it wasn’t until the work of Haskell Curry and William Howard that the full isomorphism emerged. Their insight laid the groundwork for Per Martin-Löf’s intuitionistic type theory, bridging proof theory and computation. This work eventually led to modern proof assistants like Coq, Lean, and Agda, which allow mathematicians to write proofs that can be checked by a computer—effectively “compiling” mathematics for the first time.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-isomorphism-beyond-simple-correspondence&quot;&gt;The Isomorphism: Beyond Simple Correspondence&lt;&#x2F;h3&gt;
&lt;p&gt;The Curry-Howard Correspondence tells us that the act of proving a theorem is structurally identical to writing a well-typed functional program. This isn’t a vague metaphor; it is a direct translation between propositional logic, type theory, and programming languages.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Logic (Intuitionistic)&lt;&#x2F;th&gt;&lt;th&gt;Type Theory&lt;&#x2F;th&gt;&lt;th&gt;Programming&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Proposition $A$&lt;&#x2F;td&gt;&lt;td&gt;Type $A$&lt;&#x2F;td&gt;&lt;td&gt;Data type declaration&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Proof of $A$&lt;&#x2F;td&gt;&lt;td&gt;Term $t : A$&lt;&#x2F;td&gt;&lt;td&gt;Program of type $A$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Assumption $A$&lt;&#x2F;td&gt;&lt;td&gt;Variable $x : A$&lt;&#x2F;td&gt;&lt;td&gt;Function parameter&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Implication $A \rightarrow B$&lt;&#x2F;td&gt;&lt;td&gt;Function type $A \to B$&lt;&#x2F;td&gt;&lt;td&gt;Function declaration&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Conjunction $A \land B$&lt;&#x2F;td&gt;&lt;td&gt;Product type $A \times B$&lt;&#x2F;td&gt;&lt;td&gt;Tuple&#x2F;record type (e.g., &lt;code&gt;(A, B)&lt;&#x2F;code&gt; in Haskell)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Disjunction $A \lor B$&lt;&#x2F;td&gt;&lt;td&gt;Sum type $A + B$&lt;&#x2F;td&gt;&lt;td&gt;Tagged union&#x2F;variant (e.g., &lt;code&gt;Either A B&lt;&#x2F;code&gt; in Haskell)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Universal quantification $\forall x. P(x)$&lt;&#x2F;td&gt;&lt;td&gt;Dependent product $\Pi x:A. B(x)$&lt;&#x2F;td&gt;&lt;td&gt;Generic&#x2F;polymorphic function&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Existential quantification $\exists x. P(x)$&lt;&#x2F;td&gt;&lt;td&gt;Dependent sum $\Sigma x:A. B(x)$&lt;&#x2F;td&gt;&lt;td&gt;Existential type&#x2F;data hiding&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Falsity $\bot$&lt;&#x2F;td&gt;&lt;td&gt;Empty type $\emptyset$&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;Void&lt;&#x2F;code&gt; type (uninhabited)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Truth $\top$&lt;&#x2F;td&gt;&lt;td&gt;Unit type $()$&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;Unit&lt;&#x2F;code&gt; type (singleton)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Negation $\neg A$&lt;&#x2F;td&gt;&lt;td&gt;Function $A \to \bot$&lt;&#x2F;td&gt;&lt;td&gt;Function to &lt;code&gt;Void&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;This means that checking a proof for correctness is the same as type-checking a program. Running a program corresponds to simplifying a proof. If a proof contains an inconsistency, it is equivalent to a type error in a program.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;inference-rules-as-type-rules-proofs-construct-programs&quot;&gt;Inference Rules as Type Rules: Proofs Construct Programs&lt;&#x2F;h3&gt;
&lt;p&gt;The correspondence extends beyond static structures to inference rules themselves. Every logical deduction rule has a corresponding type rule in lambda calculus.&lt;&#x2F;p&gt;
&lt;p&gt;Example 1: Implication Introduction (Function Definition)
In logic:
\begin{prooftree}
\AxiomC{$\Gamma, A \vdash B$}
\RightLabel{\scriptsize $\to\ \mathrm{introduction}$}
\UnaryInfC{$\Gamma \vdash A \to B$}
\end{prooftree}&lt;&#x2F;p&gt;
&lt;p&gt;In typed lambda calculus:
\begin{prooftree}
\AxiomC{$x : A \vdash e : B$}
\RightLabel{\scriptsize $\to\ \mathrm{introduction}$}
\UnaryInfC{$\vdash \lambda x.,e : A \to B$}
\end{prooftree}
Interpretation: Assuming $A$ allows us to derive $B$, which corresponds to defining a function that takes an argument of type $A$ and produces a result of type $B$.&lt;&#x2F;p&gt;
&lt;p&gt;Example 2: Modus Ponens (Function Application)
In logic:
\begin{prooftree}
\AxiomC{$A \to B$}
\AxiomC{$A$}
\RightLabel{\scriptsize $\to\ \mathrm{elimination}$}
\BinaryInfC{$B$}
\end{prooftree}&lt;&#x2F;p&gt;
&lt;p&gt;In typed lambda calculus:
\begin{prooftree}
\AxiomC{$f : A \to B$}
\AxiomC{$x : A$}
\RightLabel{\scriptsize $\to\ \mathrm{elimination}$}
\BinaryInfC{$f\ x : B$}
\end{prooftree}
Interpretation: Applying a function of type $A \to B$ to a value of type $A$ produces a result of type $B$, just as modus ponens allows us to infer $B$ from $A \to B$ and $A$.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;computation-as-proof-normalization-code-as-proof-execution&quot;&gt;Computation as Proof Normalization: Code as Proof Execution&lt;&#x2F;h3&gt;
&lt;p&gt;One of the most striking aspects of the Curry-Howard Correspondence is how program execution relates to proof simplification (also known as normalization).&lt;&#x2F;p&gt;
&lt;p&gt;Consider this logical proof with an unnecessary detour:&lt;&#x2F;p&gt;
&lt;p&gt;\begin{prooftree}
\AxiomC{$A$}
\AxiomC{$B$}
\RightLabel{\scriptsize $\land\ \mathrm{introduction}$}
\BinaryInfC{$A \land B$}
\RightLabel{\scriptsize $\land\ \mathrm{elimination}_1$}
\UnaryInfC{$A$}
\end{prooftree}&lt;&#x2F;p&gt;
&lt;p&gt;This corresponds to the Haskell program:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;haskell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;fst (a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; b)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;When evaluated, it reduces to &lt;code&gt;a&lt;&#x2F;code&gt;. Similarly, in proof theory, we normalize this proof to a simpler one:&lt;&#x2F;p&gt;
&lt;p&gt;\begin{prooftree}
\AxiomC{$A$}
\end{prooftree}&lt;&#x2F;p&gt;
&lt;p&gt;Thus, evaluating a program is equivalent to simplifying a proof.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;a-concrete-example-function-composition-as-logical-transitivity&quot;&gt;A Concrete Example: Function Composition as Logical Transitivity&lt;&#x2F;h3&gt;
&lt;p&gt;Let’s prove the transitivity of implication:&lt;&#x2F;p&gt;
&lt;p&gt;$$
(A \rightarrow B) \rightarrow (B \rightarrow C) \rightarrow (A \rightarrow C)
$$&lt;&#x2F;p&gt;
&lt;p&gt;Logical proof in natural deduction:
\begin{prooftree}
\AxiomC{$[A \to B]^1$}
\AxiomC{$[A]^3$}
\RightLabel{\scriptsize $\to\ \mathrm{elimination}$}
\BinaryInfC{$B$}
\AxiomC{$[B \to C]^2$}
\RightLabel{\scriptsize $\to\ \mathrm{elimination}$}
\BinaryInfC{$C$}
\RightLabel{\scriptsize $\to\ \mathrm{introduction}^3$}
\UnaryInfC{$A \to C$}
\RightLabel{\scriptsize $\to\ \mathrm{introduction}^2$}
\UnaryInfC{$(B \to C) \to (A \to C)$}
\RightLabel{\scriptsize $\to\ \mathrm{introduction}^1$}
\UnaryInfC{$(A \to B) \to (B \to C) \to (A \to C)$}
\end{prooftree}&lt;&#x2F;p&gt;
&lt;p&gt;Corresponding Haskell program:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;haskell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;compose&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ::&lt;&#x2F;span&gt;&lt;span&gt; (a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; b)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; (b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; c)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; (a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; c)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;compose f g &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;= \&lt;&#x2F;span&gt;&lt;span&gt;x &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;-&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; g (f x)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Or in lambda calculus:
$$
\lambda f. \lambda g. \lambda x. g(f(x))
$$&lt;&#x2F;p&gt;
&lt;p&gt;The computational content of this proof is function composition.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;real-world-applications-from-proof-assistants-to-functional-programming&quot;&gt;Real-World Applications: From Proof Assistants to Functional Programming&lt;&#x2F;h3&gt;
&lt;p&gt;The Curry-Howard Correspondence has shaped both mathematics and computer science:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Proof Assistants &amp;amp; Dependently Typed Languages&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Coq, Agda, and Lean allow us to write proofs as programs.&lt;&#x2F;li&gt;
&lt;li&gt;Example: Proving composition in Coq:&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;coq&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;Definition&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; compose&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; {&lt;&#x2F;span&gt;&lt;span&gt;A B C &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt; Type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span&gt; (f &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; A &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;-&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; B) (g &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; B &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;-&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; C) (x &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; A) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; C &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:=&lt;&#x2F;span&gt;&lt;span&gt; g (f x).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Programming Language Design&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Functional languages like Haskell, Idris, and Scala directly implement Curry-Howard ideas.&lt;&#x2F;li&gt;
&lt;li&gt;Rust’s borrow checker enforces affine logic (a variant of linear logic).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Effect Systems &amp;amp; Modal Logic&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Monads in Haskell correspond to modal logic.&lt;&#x2F;li&gt;
&lt;li&gt;Continuations implement classical logic.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;why-this-matters-computation-as-mathematics&quot;&gt;Why This Matters: Computation as Mathematics&lt;&#x2F;h3&gt;
&lt;p&gt;When we write well-typed code, we are constructing mathematical proofs. A type error is a logical inconsistency. A program transformation is a proof transformation.&lt;&#x2F;p&gt;
&lt;p&gt;This perspective reshapes how we think about programming:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Proving a theorem is just writing a program.&lt;&#x2F;li&gt;
&lt;li&gt;Evaluating a program is just simplifying a proof.&lt;&#x2F;li&gt;
&lt;li&gt;Refactoring code is transforming one proof into another equivalent one.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;As Philip Wadler beautifully put it:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Proofs are programs, and programs are proofs.”&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;The Curry-Howard Correspondence gives us our first glimpse into the computational trilogy, but it’s only the beginning. To complete the picture, we need to explore how these programs—these proofs—relate to the mathematical structures of category theory. This brings us to Lambek’s remarkable insight that programs are morphisms in a category.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;lambek-s-categorical-perspective-programs-as-morphisms&quot;&gt;Lambek’s Categorical Perspective: Programs as Morphisms&lt;&#x2F;h2&gt;
&lt;p&gt;While the Curry-Howard Correspondence established a connection between logic and programming, Joachim Lambek extended this perspective into category theory. His work in the 1970s provided an even more abstract viewpoint: programs are morphisms in a category.&lt;&#x2F;p&gt;
&lt;p&gt;This insight generalizes the Curry-Howard Correspondence. Not only are proofs equivalent to programs, but programs themselves can be understood as morphisms—structured transformations between objects in a mathematical framework.&lt;&#x2F;p&gt;
&lt;p&gt;To fully grasp this shift, we must first define what a category is.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;definition-category&quot;&gt;Definition: Category&lt;&#x2F;h3&gt;
&lt;p&gt;A category $\mathcal{C}$ consists of:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;A collection of objects (e.g., types in a programming language, propositions in logic).&lt;&#x2F;li&gt;
&lt;li&gt;A collection of morphisms (arrows) between these objects, representing transformations.&lt;&#x2F;li&gt;
&lt;li&gt;Two fundamental properties governing these morphisms:
&lt;ol&gt;
&lt;li&gt;Composition: If $f : A \to B$ and $g : B \to C$, then there exists a composite morphism $g \circ f : A \to C$.&lt;&#x2F;li&gt;
&lt;li&gt;Identity: Each object $A$ has an identity morphism $\text{id}_A : A \to A$, which behaves neutrally under composition.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Formally, this means:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Associativity: For all morphisms $f : A \to B$, $g : B \to C$, and $h : C \to D$,&lt;&#x2F;p&gt;
&lt;p&gt;$$
h \circ (g \circ f) = (h \circ g) \circ f.
$$&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Identity laws: For every morphism $f : A \to B$,&lt;&#x2F;p&gt;
&lt;p&gt;$$
\text{id}_B \circ f = f = f \circ \text{id}_A.
$$&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;These rules ensure that morphisms behave like structured transformations, forming a robust framework for reasoning about functions, types, and proofs.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;typed-lambda-calculus-as-a-category&quot;&gt;Typed Lambda Calculus as a Category&lt;&#x2F;h3&gt;
&lt;p&gt;Lambek’s key insight was that typed lambda calculus naturally forms a category. In this categorical perspective:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Types correspond to objects in a category.&lt;&#x2F;li&gt;
&lt;li&gt;Programs (functions) correspond to morphisms between these types.&lt;&#x2F;li&gt;
&lt;li&gt;Function composition corresponds to morphism composition.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;For example, in typed lambda calculus:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;A function of type $A \to B$ can be interpreted as a morphism $f : A \to B$.&lt;&#x2F;li&gt;
&lt;li&gt;If we have another function $g : B \to C$, we can compose them to obtain a new function $g \circ f : A \to C$, just as in category theory.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;This correspondence can be visualized as:&lt;&#x2F;p&gt;
&lt;p&gt;$$
A \xrightarrow{f} B \xrightarrow{g} C
$$&lt;&#x2F;p&gt;
&lt;p&gt;which combines into:&lt;&#x2F;p&gt;
&lt;p&gt;$$
A \xrightarrow{g \circ f} C.
$$&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-syntax-semantics-connection&quot;&gt;The Syntax-Semantics Connection&lt;&#x2F;h3&gt;
&lt;p&gt;What makes this correspondence is that it connects syntax (terms in lambda calculus) with semantics (morphisms in a category). The equivalence classes of lambda terms constitute the morphisms in the induced category.&lt;&#x2F;p&gt;
&lt;p&gt;More precisely, given a typed lambda calculus L, we construct a category C(L) where:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Objects are the types of L&lt;&#x2F;li&gt;
&lt;li&gt;Arrows $A \to B$ are equivalence classes of terms of type B with exactly one free variable of type A&lt;&#x2F;li&gt;
&lt;li&gt;Arrow equality is defined by beta-eta equivalence: $(x:A, M(x)) = (x’:A, N(x’))$ if and only if $M(x) =_{\beta\eta} N(x)$&lt;&#x2F;li&gt;
&lt;li&gt;Identity arrow $id_A: A \to A$ is the pair $(x:A, x)$&lt;&#x2F;li&gt;
&lt;li&gt;Composition of $(x:A, M(x)): A \to B$ and $(y:B, N(y)): B \to C$ is $(x:A, N[M(x)&#x2F;y]): A \to C$, where $N[M(x)&#x2F;y]$ means substituting $M(x)$ for $y$ in $N(y)$&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;This construction satisfies the category axioms:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Associativity: $(h \circ g) \circ f = h \circ (g \circ f)$ follows from the associativity of substitution&lt;&#x2F;li&gt;
&lt;li&gt;Identity: $id_B \circ f = f = f \circ id_A$ follows from the definition of substitution&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;correspondence-between-typed-lambda-calculus-and-category-theory&quot;&gt;Correspondence Between Typed Lambda Calculus and Category Theory&lt;&#x2F;h3&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Typed Lambda Calculus&lt;&#x2F;th&gt;&lt;th&gt;Category Theory&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Type&lt;&#x2F;td&gt;&lt;td&gt;Object in a category&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Function $A \to B$&lt;&#x2F;td&gt;&lt;td&gt;Morphism $f : A \to B$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Lambda abstraction $\lambda x:A.M$&lt;&#x2F;td&gt;&lt;td&gt;Currying operation $\Lambda$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Function application $M(N)$&lt;&#x2F;td&gt;&lt;td&gt;Evaluation morphism $eval$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Identity function $\lambda x. x$&lt;&#x2F;td&gt;&lt;td&gt;Identity morphism $\text{id}_A$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Function composition $g \circ f$&lt;&#x2F;td&gt;&lt;td&gt;Morphism composition $g \circ f$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;This perspective expands the Curry-Howard Correspondence: not only are proofs equivalent to programs, but programs themselves can be understood as structured transformations within a category.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;cartesian-closed-categories-cccs-and-the-structure-of-computation&quot;&gt;Cartesian Closed Categories (CCCs) and the Structure of Computation&lt;&#x2F;h3&gt;
&lt;p&gt;A natural question arises: what kind of category best models typed functional programming? The answer is Cartesian Closed Categories (CCCs).&lt;&#x2F;p&gt;
&lt;p&gt;A Cartesian Closed Category (CCC) is a category $\mathcal{C}$ that satisfies three conditions:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Terminal Object: There exists an object $1$ such that for every object $A$, there is a unique morphism $!_A: A \to 1$.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Products: Every pair of objects $A, B$ has a product $A \times B$ with projection morphisms:
$$
\pi_1 : A \times B \to A, \quad \pi_2 : A \times B \to B.
$$
Moreover, for any morphisms $f: C \to A$ and $g: C \to B$, there exists a unique morphism $\langle f, g \rangle: C \to A \times B$ such that $\pi_1 \circ \langle f, g \rangle = f$ and $\pi_2 \circ \langle f, g \rangle = g$.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Exponential Objects: For every pair of objects $A, B$, there exists an exponential object $B^A$ and an evaluation morphism:
$$
eval_{A,B} : B^A \times A \to B
$$
such that for any morphism $f : C \times A \to B$, there exists a unique morphism $\Lambda(f) : C \to B^A$ making the following diagram commute:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\begin{array}{ccc}
C \times A &amp;amp; \xrightarrow{f} &amp;amp; B \\
\lVert\\
C \times A &amp;amp; \xrightarrow{\Lambda(f) \times id_A} &amp;amp; B^A \times A &amp;amp; \xrightarrow{eval_{A,B}} &amp;amp; B
\end{array}
$$&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;These structures correspond precisely to the computational constructs in typed lambda calculus:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;The terminal object $1$ corresponds to the unit type.&lt;&#x2F;li&gt;
&lt;li&gt;Products $A \times B$ correspond to pair types.&lt;&#x2F;li&gt;
&lt;li&gt;Exponentials $B^A$ correspond to function types $A \to B$.&lt;&#x2F;li&gt;
&lt;li&gt;The evaluation morphism corresponds to function application.&lt;&#x2F;li&gt;
&lt;li&gt;The currying operation $\Lambda$ corresponds to lambda abstraction.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;The equations governing CCCs correspond exactly to the reductions in lambda calculus, including beta and eta reduction.&lt;&#x2F;p&gt;
&lt;p&gt;Now that we’ve established the connections between logic and programming (Curry-Howard) and between programming and category theory (Lambek), we can finally see how all three perspectives unite into a single, coherent vision of computation—what Robert Harper calls “Computational Trinitarianism.”&lt;&#x2F;p&gt;
&lt;h2 id=&quot;harper-s-vision-of-computational-trinitarianism-a-unified-perspective-on-computation&quot;&gt;Harper’s Vision of Computational Trinitarianism: A Unified Perspective on Computation&lt;&#x2F;h2&gt;
&lt;p&gt;While Curry-Howard shows us that proofs are programs and Lambek shows that programs are morphisms, Harper’s insight is that these aren’t just correspondences—they are three facets of a single phenomenon. His concept of Computational Trinitarianism is an attempt to express the deep unity between logic, programming languages, and category theory—not as mere correspondences, but as three manifestations of a single mathematical truth.&lt;&#x2F;p&gt;
&lt;p&gt;Harper’s vision is perhaps best summarized as:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Logic, Programming, and Category Theory are not just similar—they are the same.
Each provides an essential perspective on the nature of computation.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;This view is doctrinal, almost theological in its emphasis on three-in-one unity. In fact, Harper explicitly borrows the language of religious doctrine to frame this insight:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;The central dogma of computational trinitarianism holds that Logic,
Languages, and Categories are but three manifestations of one divine notion
of computation. There is no preferred route to enlightenment: each aspect
provides insights that comprise the experience of computation in our lives.
— Robert Harper, 2011&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;img src=&quot;.&#x2F;2025-02-27-03-01-41.png&quot; alt=&quot;trilogy&quot; width=&quot;976&quot; height=&quot;470&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;The idea is not just that these fields are connected—but that any computational concept should be meaningful in all three aspects. If you discover something fundamental in one, it must have a counterpart in the other two.&lt;&#x2F;p&gt;
&lt;p&gt;What makes this perspective so powerful is how it transforms our approach to computational concepts. Rather than viewing a new idea through a single lens, we can triangulate its meaning across all three domains simultaneously. If you discover something fundamental in one realm, its counterparts in the other two realms must exist and offer complementary insights.&lt;&#x2F;p&gt;
&lt;p&gt;I remember when this unified perspective clicked for me—I was struggling to understand monads (as every functional programmer does at some point), when suddenly seeing the categorical, logical, and programming perspectives simultaneously made everything clear. The three views reinforced each other, like looking at a complex shape from multiple angles.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-rosetta-stone-of-computation-three-views-one-truth&quot;&gt;The Rosetta Stone of Computation: Three Views, One Truth&lt;&#x2F;h3&gt;
&lt;p&gt;In his influential paper “Physics, Topology, Logic and Computation: A Rosetta Stone,” John Baez and Mike Stay explicitly drew the analogy to the ancient Rosetta Stone. Just as that archaeological artifact displayed the same text in three different languages—hieroglyphics, demotic script, and ancient Greek—allowing linguists to decode previously impenetrable language systems, the computational trilogy serves as our modern Rosetta Stone for decoding the languages of mathematics, logic, and computation.&lt;&#x2F;p&gt;
&lt;p&gt;Harper’s computational trinitarianism is most clearly expressed in the following three-way correspondence between Logic, Programming, and Category Theory:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Logic (Proofs)&lt;&#x2F;th&gt;&lt;th&gt;Programming (Types &amp;amp; Terms)&lt;&#x2F;th&gt;&lt;th&gt;Category Theory (Morphisms)&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Proposition $A$&lt;&#x2F;td&gt;&lt;td&gt;Type $A$&lt;&#x2F;td&gt;&lt;td&gt;Object $A$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Proof of $A$&lt;&#x2F;td&gt;&lt;td&gt;Program of type $A$&lt;&#x2F;td&gt;&lt;td&gt;Morphism $f: 1 \to A$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Assumption $A$&lt;&#x2F;td&gt;&lt;td&gt;Variable $x : A$&lt;&#x2F;td&gt;&lt;td&gt;Projection $p_A$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Implication $A \to B$&lt;&#x2F;td&gt;&lt;td&gt;Function type $A \to B$&lt;&#x2F;td&gt;&lt;td&gt;Exponential object $B^A$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Conjunction $A \land B$&lt;&#x2F;td&gt;&lt;td&gt;Product type $A \times B$&lt;&#x2F;td&gt;&lt;td&gt;Cartesian product $A \times B$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Disjunction $A \lor B$&lt;&#x2F;td&gt;&lt;td&gt;Sum type $A + B$&lt;&#x2F;td&gt;&lt;td&gt;Coproduct $A + B$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Falsehood $\bot$&lt;&#x2F;td&gt;&lt;td&gt;Empty type $0$&lt;&#x2F;td&gt;&lt;td&gt;Initial object $0$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Truth $\top$&lt;&#x2F;td&gt;&lt;td&gt;Unit type $()$&lt;&#x2F;td&gt;&lt;td&gt;Terminal object $1$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Modus Ponens $A, A \to B \vdash B$&lt;&#x2F;td&gt;&lt;td&gt;Function application $f(a)$&lt;&#x2F;td&gt;&lt;td&gt;Evaluation morphism $\text{eval}$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Universal quantification $\forall x. P(x)$&lt;&#x2F;td&gt;&lt;td&gt;Dependent function $\Pi x:A. B(x)$&lt;&#x2F;td&gt;&lt;td&gt;Dependent product $\Pi x:A. B(x)$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Existential quantification $\exists x. P(x)$&lt;&#x2F;td&gt;&lt;td&gt;Dependent pair $\Sigma x:A. B(x)$&lt;&#x2F;td&gt;&lt;td&gt;Dependent sum $\Sigma x:A. B(x)$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;This correspondence is more than a metaphor—it’s an equivalence of structures. If you remove the surface-level differences in notation, all three fields are describing the same underlying phenomenon.&lt;&#x2F;p&gt;
&lt;img src=&quot;.&#x2F;2025-02-27-03-03-01.png&quot; alt=&quot;trilogy2&quot; width=&quot;994&quot; height=&quot;494&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h3 id=&quot;back-to-the-curry-howard-lambek-correspondence-when-three-worlds-collide&quot;&gt;Back to the Curry-Howard-Lambek Correspondence: When Three Worlds Collide&lt;&#x2F;h3&gt;
&lt;p&gt;The deeper I’ve ventured into the computational trilogy, the more I’ve come to appreciate the sheer elegance of the Curry-Howard-Lambek correspondence. What began as separate intellectual traditions has crystallized into one of the most beautiful unifications in mathematical science.&lt;&#x2F;p&gt;
&lt;p&gt;Again, to emphasize this! The Curry-Howard-Lambek correspondence shows us that:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Logic (proofs)&lt;&#x2F;li&gt;
&lt;li&gt;Programming (typed lambda calculus)&lt;&#x2F;li&gt;
&lt;li&gt;Category Theory (cartesian closed categories)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;are three perspectives on the same underlying phenomenon. Consider two fundamental structures:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The category $\mathbf{Set}$ of sets and functions&lt;&#x2F;li&gt;
&lt;li&gt;A meet-semilattice $\mathbf{P}$ with implications (a model of propositional logic)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Both of these turn out to be cartesian closed categories! This gives us a three-way correspondence table that reveals the underlying unity:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Cartesian Closed Category&lt;&#x2F;th&gt;&lt;th&gt;$\mathbf{Set}$&lt;&#x2F;th&gt;&lt;th&gt;$\mathbf{P}$ (Logic)&lt;&#x2F;th&gt;&lt;th&gt;Typed $\lambda$-calculus&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Objects&#x2F;1-cells&lt;&#x2F;td&gt;&lt;td&gt;Sets&lt;&#x2F;td&gt;&lt;td&gt;Propositions&lt;&#x2F;td&gt;&lt;td&gt;Types&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Morphisms&#x2F;2-cells&lt;&#x2F;td&gt;&lt;td&gt;Functions&lt;&#x2F;td&gt;&lt;td&gt;Entailment&lt;&#x2F;td&gt;&lt;td&gt;Terms&#x2F;Programs&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;1-cell composition&lt;&#x2F;td&gt;&lt;td&gt;Cartesian product $S \times T$&lt;&#x2F;td&gt;&lt;td&gt;Conjunction $A \wedge B$&lt;&#x2F;td&gt;&lt;td&gt;Product type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Identity 1-cell&lt;&#x2F;td&gt;&lt;td&gt;One-element set ${*}$&lt;&#x2F;td&gt;&lt;td&gt;True proposition $\top$&lt;&#x2F;td&gt;&lt;td&gt;Unit type $()$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Right Kan extension&lt;&#x2F;td&gt;&lt;td&gt;Function set $T^S$&lt;&#x2F;td&gt;&lt;td&gt;Implication $A \rightarrow B$&lt;&#x2F;td&gt;&lt;td&gt;Function type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Evaluation morphism&lt;&#x2F;td&gt;&lt;td&gt;Function application&lt;&#x2F;td&gt;&lt;td&gt;Modus ponens&lt;&#x2F;td&gt;&lt;td&gt;Term application&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Currying&lt;&#x2F;td&gt;&lt;td&gt;$f: C\times A\rightarrow B$ to $\Lambda f: C\rightarrow B^A$&lt;&#x2F;td&gt;&lt;td&gt;Deduction theorem&lt;&#x2F;td&gt;&lt;td&gt;Lambda abstraction&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;I gasped when I first saw this table. It was literally everything I was studying!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-dogma-no-concept-exists-in-isolation&quot;&gt;The Dogma: No Concept Exists in Isolation&lt;&#x2F;h3&gt;
&lt;img src=&quot;.&#x2F;2025-02-27-03-03-50.png&quot; alt=&quot;trilogy3&quot; width=&quot;1806&quot; height=&quot;1140&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;One of the most powerful aspects of Computational Trinitarianism is how it serves as a research guiding principle. It suggests that:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;If you discover a new logical system, it should have an interpretation in type theory and category theory.&lt;&#x2F;li&gt;
&lt;li&gt;If you propose a new type system, it should correspond to proof rules and categorical structures.&lt;&#x2F;li&gt;
&lt;li&gt;If you define a new categorical construction, it should express something in logic and computation.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I’ve found this principle enormously helpful in my own work. When encountering a difficult concept in one domain, I often seek its “translations” in the other two. This triangulation helps clarify the essence of what I’m studying. This explains why linear logic led to linear types, why modal logic corresponds to monads, and why higher category theory is shaping homotopy type theory.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;sequent-calculus-and-categorical-structure&quot;&gt;Sequent Calculus and Categorical Structure&lt;&#x2F;h3&gt;
&lt;p&gt;Logical reasoning in sequent calculus form:&lt;&#x2F;p&gt;
&lt;p&gt;$$\frac{{\Gamma_i \vdash \Delta_i}_{i\in I}}{\Gamma \vdash \Delta}$$&lt;&#x2F;p&gt;
&lt;p&gt;directly corresponds to composition rules in a category. The entailment relation $A \vdash B$ (read “B follows from A”) is precisely a morphism in our category!&lt;&#x2F;p&gt;
&lt;p&gt;This connection transformed how I think about type theory. When I write:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;haskell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;compose&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ::&lt;&#x2F;span&gt;&lt;span&gt; (b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; c)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; (a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; b)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; (a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; c)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;compose g f &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;= \&lt;&#x2F;span&gt;&lt;span&gt;x &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;-&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; g (f x)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I’m not just defining a function—I’m establishing a categorical composition rule that mirrors logical entailment. The type signature itself is a proposition, and the implementation is a proof!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;beyond-classical-structures-the-higher-trinity&quot;&gt;Beyond Classical Structures: The Higher Trinity&lt;&#x2F;h3&gt;
&lt;img src=&quot;.&#x2F;2025-02-27-03-04-13.png&quot; alt=&quot;trilogy4&quot; width=&quot;1616&quot; height=&quot;880&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;The Computational Trinity extends naturally into more advanced mathematical domains. Consider how it manifests in higher mathematics:&lt;&#x2F;p&gt;
&lt;p&gt;Type theory gets enriched to homotopy type theory, categories become higher categories, and the entire framework elevates to what we might call “higher computation.” This evolution allows us to model not just whether proofs exist, but the spaces of possible proofs and transformations between them.&lt;&#x2F;p&gt;
&lt;p&gt;When I first read about Voevodsky’s univalence axiom, I was fascinated by how it connected homotopy theory, type theory, and higher categories. The idea that equality is path connection in a space, which corresponds to type equivalence in programming and isomorphism in category theory, reveals the trilateral nature of mathematical thought itself.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;mathematical-structures-through-the-trinitarian-lens&quot;&gt;Mathematical Structures Through the Trinitarian Lens&lt;&#x2F;h3&gt;
&lt;p&gt;Even basic mathematical structures reveal this three-way perspective. Consider the concept of a group:&lt;&#x2F;p&gt;
&lt;img src=&quot;.&#x2F;2025-02-27-03-04-43.png&quot; alt=&quot;group&quot; width=&quot;1728&quot; height=&quot;834&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;A group can be viewed as:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;A set with operations satisfying axioms (set-theoretic view)&lt;&#x2F;li&gt;
&lt;li&gt;A type with operations and proofs of properties (computational view)&lt;&#x2F;li&gt;
&lt;li&gt;A one-object category with invertible morphisms (categorical view)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;These aren’t just different definitions—they’re different manifestations of the same fundamental structure, each revealing aspects that might be obscured in the others.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;beyond-the-original-trilogy-the-parametrized-perspective&quot;&gt;Beyond the Original Trilogy: The Parametrized Perspective&lt;&#x2F;h2&gt;
&lt;p&gt;Just when I thought I’d wrapped my head around the computational trinity, the rabbit hole went deeper. It turns out that our lovely trinity was just the beginning of an even more unification. The extension into what I call the “parametrized perspective” represents one of those mathematical moments that made me spill my coffee in excitement.&lt;&#x2F;p&gt;
&lt;p&gt;What happens when we consider that computation doesn’t happen in a vacuum? What if we acknowledge that:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Computation happens in contexts and is proof relevant&lt;&#x2F;li&gt;
&lt;li&gt;Categories give rise to systems of slice categories (and are in general $(\infty,1)$-categories)&lt;&#x2F;li&gt;
&lt;li&gt;Types may depend on other types and are in general homotopy types&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;This realization transforms our well-established computational trinity into something richer and more nuanced.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-enhanced-trinity-a-four-way-correspondence&quot;&gt;The Enhanced Trinity: A Four-Way Correspondence&lt;&#x2F;h3&gt;
&lt;p&gt;The traditional computational trilogy enhances to a four-way correspondence:&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;In dependent homotopy type theory&lt;&#x2F;th&gt;&lt;th&gt;In programming languages&lt;&#x2F;th&gt;&lt;th&gt;In locally cartesian closed $(\infty,1)$-categories&lt;&#x2F;th&gt;&lt;th&gt;In non-abelian cohomology&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;A term of some type in context&lt;&#x2F;td&gt;&lt;td&gt;A program of some data type in context&lt;&#x2F;td&gt;&lt;td&gt;A generalized element of an object in a slice&lt;&#x2F;td&gt;&lt;td&gt;A cocycle in twisted cohomology&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Let’s unpack this correspondence with the technical rigor it deserves.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;contexts-and-slice-categories&quot;&gt;Contexts and Slice Categories&lt;&#x2F;h3&gt;
&lt;p&gt;In dependent type theory, a context $\Gamma$ represents assumptions or variables in scope. When we write a judgment like:&lt;&#x2F;p&gt;
&lt;p&gt;$\Gamma \vdash t : A$&lt;&#x2F;p&gt;
&lt;p&gt;We’re saying that term $t$ has type $A$ under assumptions $\Gamma$.&lt;&#x2F;p&gt;
&lt;p&gt;Categorically, this corresponds to working in a slice category. Given a category $\mathcal{C}$ and an object $X$, the slice category $\mathcal{C}&#x2F;X$ has:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Objects: morphisms $f: Y \to X$ in $\mathcal{C}$&lt;&#x2F;li&gt;
&lt;li&gt;Morphisms: commutative triangles&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The slice category $\mathcal{C}&#x2F;X$ precisely captures the idea of “computation in context $X$.” This is not just a formal analogy—it’s a deep mathematical equivalence. When I first understood this, it completely changed how I view type checking!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;from-categories-to-higher-categories&quot;&gt;From Categories to Higher Categories&lt;&#x2F;h3&gt;
&lt;p&gt;The connection deepens when we consider that ordinary categories are insufficient for capturing the richness of type theory. We need $(\infty,1)$-categories, which track:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Objects (types)&lt;&#x2F;li&gt;
&lt;li&gt;1-morphisms (functions)&lt;&#x2F;li&gt;
&lt;li&gt;2-morphisms (homotopies between functions)&lt;&#x2F;li&gt;
&lt;li&gt;3-morphisms (homotopies between homotopies)&lt;&#x2F;li&gt;
&lt;li&gt;…and so on&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;An $(\infty,1)$-category has $n$-morphisms for all $n \geq 1$, and all $k$-morphisms for $k &amp;gt; 1$ are invertible. This structure perfectly captures the notion of proof relevance in type theory.&lt;&#x2F;p&gt;
&lt;p&gt;In a proof-relevant system, we care not just about whether a proposition is true, but about &lt;em&gt;how&lt;&#x2F;em&gt; it’s proven. The space of all possible proofs forms a higher-dimensional structure, and different proofs can be related by homotopies (paths between proofs). This is precisely what $(\infty,1)$-categories model!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-algebraic-topology-connection&quot;&gt;The Algebraic Topology Connection&lt;&#x2F;h3&gt;
&lt;p&gt;The deepest layer of this correspondence connects to algebraic topology through the work of Schreiber, Lurie, and others. This connection reveals that the very structure of computational type theory maps onto cohomology theories.&lt;&#x2F;p&gt;
&lt;p&gt;The equivalence with algebraic topology opens up a connection: a generalized element in an $(\infty,1)$-topos may equivalently be regarded as a cocycle in (non-abelian) cohomology, and in twisted cohomology if in a slice $(\infty,1)$-category.&lt;&#x2F;p&gt;
&lt;p&gt;For example, in twisted cohomology, the cup product of a 0-cochain $f$ with values in $\text{Hom}(E, F)$ and a 1-cochain $g$ with values in $E$ gives a 1-cochain with values in $F$. This is exactly analogous to function application in dependent type theory!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;practical-implications-where-theory-meets-practice&quot;&gt;Practical Implications: Where Theory Meets Practice&lt;&#x2F;h3&gt;
&lt;p&gt;This expanded correspondence isn’t just mathematical abstraction—it provides a unified framework for solving real problems:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Program Verification Through Topology
When we view programs through the lens of non-abelian cohomology, topological invariants become tools for proving program properties. The fundamental group can detect unreachable states in a program’s execution space.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Homotopy Theory Computation
The type-theoretic perspective allows us to compute topological invariants constructively. For instance, computing the homotopy groups of spheres becomes a matter of constructing specific terms in type theory.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Effect Systems as Cohomological Twistings
Computational effects in programming languages (exceptions, state, IO) can be understood as “twistings” in cohomology. A monadic effect system corresponds to a twisted cohomology theory where the twisting cocycle represents the effect.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;the-univalence-axiom-a-concrete-example&quot;&gt;The Univalence Axiom: A Concrete Example&lt;&#x2F;h2&gt;
&lt;p&gt;Perhaps the most striking example of this parametrized perspective in action is Voevodsky’s univalence axiom, which states:&lt;&#x2F;p&gt;
&lt;p&gt;$(A \simeq B) \simeq (A =_{\mathcal{U}} B)$&lt;&#x2F;p&gt;
&lt;p&gt;This means that equivalence of types is equivalent to equality of types in the universe type $\mathcal{U}$. In programming terms, it says that isomorphic data structures are interchangeable. In categorical terms, it says that equivalent objects in a category should be considered equal. In cohomological terms, it says that cohomologous cocycles represent equivalent structures.&lt;&#x2F;p&gt;
&lt;p&gt;The univalence axiom is implemented in systems like Cubical Agda, allowing programmers to transport programs along type equivalences, turning type-level isomorphisms into computational paths.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-quantum-trilogy-a-parallel-correspondence&quot;&gt;The Quantum Trilogy: A Parallel Correspondence&lt;&#x2F;h2&gt;
&lt;p&gt;While exploring the depths of the computational trilogy, I stumbled upon a parallel framework that completely shifted my understanding. This alternative correspondence—what I’ve dubbed the “quantum trilogy”—connects linear logic, quantum computation, and monoidal categories in a way that’s mathematically elegant and conceptually .&lt;&#x2F;p&gt;
&lt;p&gt;What makes this correspondence so striking is how it mirrors yet transforms the classical trilogy. Where the classical world embraces copying and deletion of information, this quantum realm enforces strict resource management.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;from-classical-to-quantum-three-parallel-transitions&quot;&gt;From Classical to Quantum: Three Parallel Transitions&lt;&#x2F;h3&gt;
&lt;ol&gt;
&lt;li&gt;From intuitionistic logic to linear logic&lt;&#x2F;li&gt;
&lt;li&gt;From classical computation to quantum computation&lt;&#x2F;li&gt;
&lt;li&gt;From cartesian closed categories to closed monoidal categories&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Each of these transitions represents moving from a world where information can be freely copied and deleted to one where resources must be precisely accounted for.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;In the classical world, information can be freely copied and discarded.
In the quantum world, information must be precisely accounted for.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h3 id=&quot;linear-logic-when-resources-matter&quot;&gt;Linear Logic: When Resources Matter&lt;&#x2F;h3&gt;
&lt;p&gt;Girard’s linear logic (1987) revolutionized logical systems by treating propositions as consumable resources. The difference becomes clear when we compare:&lt;&#x2F;p&gt;
&lt;p&gt;In classical logic:
$$A \Rightarrow (A \Rightarrow B) \Rightarrow B$$&lt;&#x2F;p&gt;
&lt;p&gt;This is trivially true because we can use $A$ twice. But in linear logic:
$$A \multimap (A \multimap B) \multimap B$$&lt;&#x2F;p&gt;
&lt;p&gt;This isn’t valid—the first use of $A$ depletes it, leaving nothing for the second use!&lt;&#x2F;p&gt;
&lt;p&gt;The operators of linear logic make this resource-consciousness explicit:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;$A \otimes B$ (tensor): you have &lt;em&gt;both&lt;&#x2F;em&gt; $A$ and $B$&lt;&#x2F;li&gt;
&lt;li&gt;$A \oplus B$ (plus): you have &lt;em&gt;either&lt;&#x2F;em&gt; $A$ or $B$&lt;&#x2F;li&gt;
&lt;li&gt;$!A$ (of course): you have &lt;em&gt;as many copies&lt;&#x2F;em&gt; of $A$ as needed&lt;&#x2F;li&gt;
&lt;li&gt;$A \multimap B$ (linear implication): consuming $A$ produces $B$&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Quantum computation differs from classical computation most notably in the no-cloning theorem: you cannot make a perfect copy of an arbitrary quantum state. This resource-sensitivity mirrors precisely the constraints of linear logic!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;quantum-computation-where-no-cloning-is-law&quot;&gt;Quantum Computation: Where No-Cloning Is Law&lt;&#x2F;h3&gt;
&lt;p&gt;This resource sensitivity perfectly aligns with quantum computation’s fundamental constraints. The no-cloning theorem—the impossibility of creating identical copies of arbitrary quantum states—finds its logical expression in linear logic and its categorical formulation in monoidal categories.&lt;&#x2F;p&gt;
&lt;p&gt;A quantum circuit demonstrates this linearity visually: each qubit follows a path through gates, transforming but never duplicating (unless explicitly measured). The Bell pair creation circuit exemplifies this resource flow:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;q1 ----H----•----&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;             |&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;q2 ---------X----&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Each qubit is used exactly once—a perfect manifestation of linear logic in action.&lt;&#x2F;p&gt;
&lt;p&gt;A simple quantum program in a linear type system might look like:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;haskell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- Linear types ensure qubits aren&amp;#39;t duplicated&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;hadamard &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; Qubit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ⊸&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; Qubit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cnot &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;Qubit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ⊗&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; Qubit&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ⊸&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;Qubit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ⊗&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; Qubit&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bellPair &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; Qubit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ⊸&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; Qubit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ⊸&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;Qubit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ⊗&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; Qubit&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bellPair q1 q2 &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; cnot (hadamard q1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; q2)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The linear function type &lt;code&gt;⊸&lt;&#x2F;code&gt; ensures each qubit is used exactly once.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;closed-monoidal-categories-the-right-math&quot;&gt;Closed Monoidal Categories: The Right Math&lt;&#x2F;h2&gt;
&lt;p&gt;While cartesian closed categories provide the categorical semantics for classical computation, &lt;em&gt;closed symmetric monoidal categories&lt;&#x2F;em&gt; give us the perfect setting for quantum computation and linear logic.&lt;&#x2F;p&gt;
&lt;p&gt;In a cartesian category, every object $A$ comes with natural morphisms $\Delta_A: A \to A \times A$ (duplication) and $\epsilon_A: A \to 1$ (deletion). But quantum information can’t be duplicated or deleted arbitrarily! What we need instead is a monoidal structure, where:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;We have a tensor product $\otimes$ instead of a cartesian product $\times$&lt;&#x2F;li&gt;
&lt;li&gt;There’s no general duplication or deletion&lt;&#x2F;li&gt;
&lt;li&gt;We still have a closed structure giving us internal hom objects $A \multimap B$&lt;&#x2F;li&gt;
&lt;li&gt;The symmetry isomorphism $\sigma_{A,B}: A \otimes B \cong B \otimes A$ captures the commutativity properties essential for quantum mechanics&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The category FdHilb of finite-dimensional Hilbert spaces with linear maps is the prototype example - it’s symmetric monoidal closed but not cartesian closed, and gives semantics to quantum computation. The symmetry of the tensor product in FdHilb corresponds directly to the physical principle that the joint state space of two quantum systems is invariant under exchange of the systems.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusion-the-tetralogical-universe-of-computation&quot;&gt;Conclusion: The Tetralogical Universe of Computation&lt;&#x2F;h2&gt;
&lt;p&gt;The journey through these computational correspondences reveals something even more than separate trilogies – it unveils what we might call a “computational tetralogy” where the classical and quantum worlds combine with their parametrized perspectives.&lt;&#x2F;p&gt;
&lt;p&gt;When we merge the classical parametrized trilogy with the quantum trilogy, we arrive at a unified framework that encompasses:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;From classical computation to classically controlled quantum computation on linear spaces of quantum states parametrized over classical data types&lt;&#x2F;li&gt;
&lt;li&gt;From dependent intuitionistic homotopy type theory to dependent linear type theory of dependent stable homotopy types&lt;&#x2F;li&gt;
&lt;li&gt;From locally cartesian closed (∞,1)-categories to indexed monoidal (∞,1)-categories of parametrized spectra, which in algebraic topology corresponds to twisted generalized cohomology theory&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;This perspective reveals computation not as isolated islands of theory, but as a connected landscape that we can traverse through systematic transformations:&lt;&#x2F;p&gt;
&lt;img src=&quot;.&#x2F;2025-02-27-04-05-51.png&quot; alt=&quot;Final&quot; width=&quot;1076&quot; height=&quot;249&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;We begin with the classical computational trilogy in the bottom left – the foundation connecting intuitionistic logic, programming languages, and category theory. From here, we can follow two fundamental transformations:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Topologize: Moving right, we enter the world of contextual computation, where the parametrized perspective takes hold. Here, types become homotopy types, logic becomes dependent, and categories give way to twisted non-abelian cohomology.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Quantize: From contextual computation, we can then quantize to reach classically controlled quantum computation, where dependent linear type theory and twisted generalized cohomology theory provide the mathematical foundation.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;What continues to amaze me is how these transformations aren’t arbitrary – they follow deep mathematical patterns. The “topologize” operation corresponds to enriching our structures with spatial information, while the “quantize” operation introduces resource sensitivity and linear behavior.&lt;&#x2F;p&gt;
&lt;p&gt;Each vertex in this tetralogy offers a unique lens for understanding computation:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The classical trilogy excels at describing functional abstraction&lt;&#x2F;li&gt;
&lt;li&gt;The parametrized perspective captures context-dependence&lt;&#x2F;li&gt;
&lt;li&gt;The quantum trilogy handles resource management&lt;&#x2F;li&gt;
&lt;li&gt;The combined “classically controlled quantum computation” framework brings everything together&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I’ve come to see these connections not just as formal correspondences, but as a roadmap for the future of computation itself. As quantum computing continues to mature and topological data analysis becomes more prevalent, this unified framework will likely serve as the theoretical foundation for the next generation of programming languages and computational systems.&lt;&#x2F;p&gt;
&lt;p&gt;This tetralogy isn’t a static endpoint – it’s an invitation to explore. What happens when we apply other transformations? What about probabilistic computation, or continuous computation? Each new perspective adds another dimension to our understanding, revealing computation to be not just a tool, but a mathematical structure that connects the deepest ideas in mathematics, physics, and logic.&lt;&#x2F;p&gt;
&lt;p&gt;And perhaps that’s the most beautiful insight of all – that computation, in its essence, isn’t just about algorithms and machines. It’s about the fundamental structure of information and transformation, something that permeates not just computer science, but mathematics and reality itself.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;false&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;References&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: none;&quot;&gt;
      &lt;p&gt;Please tell me if I got the references wrong. My zotero is not working properly.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Melliès, P.-A. (2006). &lt;em&gt;Functorial boxes in string diagrams&lt;&#x2F;em&gt;. In &lt;em&gt;Proceedings of Computer Science Logic 2006&lt;&#x2F;em&gt;, Szeged, Hungary. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;hal.archives-ouvertes.fr&#x2F;hal-00154243&quot;&gt;hal.archives-ouvertes.fr &#x2F; hal 00154243&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Discusses the extension of string diagrams with functorial boxes, an idea that surfaced in the 1970s.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;Lambek, J., &amp;amp; Scott, P. J. (1986). &lt;em&gt;Introduction to Higher Order Categorical Logic&lt;&#x2F;em&gt;. Cambridge University Press. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1017&#x2F;CBO9780511525858&quot;&gt;DOI CBO9780511525858&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Early work on higher-order categorical logic, connecting mathematical logic and category theory.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Harper, R. (2011). &lt;em&gt;The Holy Trinity&lt;&#x2F;em&gt;. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.cs.cmu.edu&#x2F;~rwh&#x2F;talks&#x2F;hott.pdf&quot;&gt;cs.cmu.edu &#x2F; hott&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Explores the relationship between type theory, category theory, and logic.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;Eades, H. (2012). &lt;em&gt;Type Theory and Applications&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Provides insights into type theory and its applications.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;Frumin, D. (2014). &lt;em&gt;Computational Trinitarianism&lt;&#x2F;em&gt;. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;prezi.com&#x2F;fnz-4wzsygiq&#x2F;computational-trinitarianism&#x2F;&quot;&gt;prezi.com &#x2F; computational trinitarianism&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Presentation on the unity of computation, logic, and category theory.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;6&quot;&gt;
&lt;li&gt;Baez, J., &amp;amp; Stay, M. (2011). &lt;em&gt;Physics, Topology, Logic and Computation: A Rosetta Stone&lt;&#x2F;em&gt;. In B. Coecke (Ed.), &lt;em&gt;New Structures for Physics&lt;&#x2F;em&gt;, Lecture Notes in Physics, vol 813. Springer. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;0903.0340&quot;&gt;arxiv.org &#x2F; 0903&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Connects concepts in physics, topology, logic, and computation.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;7&quot;&gt;
&lt;li&gt;Shulman, M. (2018). &lt;em&gt;Homotopical Trinitarianism: A Perspective on Homotopy Type Theory&lt;&#x2F;em&gt;. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;1803.00180&quot;&gt;arxiv.org &#x2F; 1803&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Discusses homotopy type theory from a trinitarian perspective.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;8&quot;&gt;
&lt;li&gt;Taylor, P. (1999). &lt;em&gt;Practical Foundations of Mathematics&lt;&#x2F;em&gt;. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.paultaylor.eu&#x2F;Practical_Foundations&quot;&gt;paultaylor.eu &#x2F; Practical Foundations&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;A comprehensive text on the foundations of mathematics.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;9&quot;&gt;
&lt;li&gt;Lawvere, F. W., &amp;amp; Rosebrugh, R. (2003). &lt;em&gt;Sets for Mathematics&lt;&#x2F;em&gt;. Cambridge University Press. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1017&#x2F;CBO9780511810442&quot;&gt;DOI CBO9780511810442&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Introduces category theory with a focus on sets and their role in mathematics.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;10&quot;&gt;
&lt;li&gt;Harper, R. (2016). &lt;em&gt;Practical Foundations for Programming Languages&lt;&#x2F;em&gt; (2nd ed.). Cambridge University Press. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1017&#x2F;CBO9781316576892&quot;&gt;DOI CBO9781316576892&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Explores the theoretical underpinnings of programming languages.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;11&quot;&gt;
&lt;li&gt;Goguen, J. A. (1991). &lt;em&gt;A Categorical Manifesto&lt;&#x2F;em&gt;. &lt;em&gt;Mathematical Structures in Computer Science, 1&lt;&#x2F;em&gt;(1), 49–67. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1017&#x2F;S0960129500000050&quot;&gt;DOI S0960129500000050&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Discusses the role of category theory in computer science.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;12&quot;&gt;
&lt;li&gt;Lambek, J. (1980). &lt;em&gt;From λ-calculus to cartesian closed categories&lt;&#x2F;em&gt;. &lt;em&gt;Proceedings of the AMS&lt;&#x2F;em&gt;, 130(10), 3025–3035.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;The Lambek correspondence connecting typed lambda calculus to category theory.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;13&quot;&gt;
&lt;li&gt;Voevodsky, V., Kapulkin, C., &amp;amp; Lumsdaine, P. (2013). &lt;em&gt;Homotopy Type Theory: Univalent Foundations of Mathematics&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Univalence Axiom and Homotopy Type Theory (HoTT).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;14&quot;&gt;
&lt;li&gt;Awodey, S. (2010). &lt;em&gt;Category Theory&lt;&#x2F;em&gt;. Oxford University Press.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Standard reference for categorical foundations of computation.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;15&quot;&gt;
&lt;li&gt;Lurie, J. (2009). &lt;em&gt;Higher Topos Theory&lt;&#x2F;em&gt;. Princeton University Press.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Introduces (∞,1)-categories, which play a key role in parametrized perspectives.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;16&quot;&gt;
&lt;li&gt;Shulman, M. (2018). &lt;em&gt;Brouwer’s fixed-point theorem in real-cohesive homotopy type theory&lt;&#x2F;em&gt;. &lt;em&gt;Mathematical Structures in Computer Science, 28&lt;&#x2F;em&gt;(6), 856–941.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Connections between cohesive homotopy type theory and computation.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;17&quot;&gt;
&lt;li&gt;Schreiber, U. (2020). &lt;em&gt;Twisted Non-Abelian Cohomology &amp;amp; Parametrized Homotopy Theory&lt;&#x2F;em&gt;. &lt;em&gt;nLab Preprint&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Non-abelian cohomology and parametrized homotopy types, relevant to computational tetralogy.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;18&quot;&gt;
&lt;li&gt;Girard, J.-Y. (1987). &lt;em&gt;Linear Logic&lt;&#x2F;em&gt;. &lt;em&gt;Theoretical Computer Science, 50&lt;&#x2F;em&gt;(1), 1–102.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Linear logic and its connection to resource-sensitive computation.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;19&quot;&gt;
&lt;li&gt;Abramsky, S., &amp;amp; Coecke, B. (2004). &lt;em&gt;Categorical Quantum Mechanics&lt;&#x2F;em&gt;. In &lt;em&gt;Proceedings of the International Symposium on Logic in Computer Science (LICS)&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Monoidal categories as a framework for quantum computation.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;20&quot;&gt;
&lt;li&gt;Selinger, P. (2004). &lt;em&gt;Towards a quantum programming language&lt;&#x2F;em&gt;. &lt;em&gt;Mathematical Structures in Computer Science, 14&lt;&#x2F;em&gt;(4), 527–586.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Quantum computation and category theory.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;21&quot;&gt;
&lt;li&gt;Lafont, Y. (2003). &lt;em&gt;Towards an algebraic theory of Boolean circuits&lt;&#x2F;em&gt;. &lt;em&gt;Journal of Pure and Applied Algebra, 184&lt;&#x2F;em&gt;(2), 257–310.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Connections between linear logic and quantum gates.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;22&quot;&gt;
&lt;li&gt;Wadler, P. (2015). &lt;em&gt;Propositions as Types&lt;&#x2F;em&gt;. &lt;em&gt;Communications of the ACM, 58&lt;&#x2F;em&gt;(12), 75–84.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Excellent historical overview of the Curry-Howard isomorphism.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;23&quot;&gt;
&lt;li&gt;Harper, R. (2022). &lt;em&gt;Types, Logic, and Computation: A Trinitarian View&lt;&#x2F;em&gt;. &lt;em&gt;Carnegie Mellon Lecture Notes&lt;&#x2F;em&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Modern take on Computational Trinitarianism.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;24&quot;&gt;
&lt;li&gt;nLab (2024). &lt;em&gt;Computational Trilogy&lt;&#x2F;em&gt;. Available at: &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;ncatlab.org&#x2F;nlab&#x2F;show&#x2F;computational+trilogy&quot;&gt;ncatlab.org &#x2F; computational+trilogy&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Good for readers who want to dive into formal definitions.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;25&quot;&gt;
&lt;li&gt;nLab (2024). &lt;em&gt;Homotopy Type Theory and (∞,1)-Categories&lt;&#x2F;em&gt;. Available at: &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;ncatlab.org&#x2F;nlab&#x2F;show&#x2F;homotopy+type+theory&quot;&gt;ncatlab.org &#x2F; homotopy+type+theory&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Useful for readers curious about parametrized homotopy types.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;26&quot;&gt;
&lt;li&gt;Chakraborty, S. (2011). Curry-Howard-Lambek Correspondence. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;cspages.ucalgary.ca&#x2F;~robin&#x2F;class&#x2F;617&#x2F;projects-10&#x2F;Subashis.pdf&quot;&gt;cspages.ucalgary.ca &#x2F; Subashis&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;This paper explores the equivalence between proof systems, typed λ-calculi, and Cartesian closed categories, commonly referred to as the Curry-Howard-Lambek correspondence.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol start=&quot;27&quot;&gt;
&lt;li&gt;Category Theory and Diagrammatic Reasoning (2019). &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;ioc.ee&#x2F;~amar&#x2F;notes&#x2F;ct2019_lecture5.pdf&quot;&gt;ioc.ee &#x2F; ct2019 lecture5&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;ul&gt;
&lt;li&gt;Lecture notes discussing the Curry-Howard-Lambek correspondence, highlighting the relationship between categories, processes, and logic.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
</description>
      </item>
      <item>
          <title>Why We Keep Proving The Same Damn Theorems</title>
          <pubDate>Wed, 26 Feb 2025 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/multiple-proofs/</link>
          <guid>https://seniormars.com/posts/multiple-proofs/</guid>
          <description xml:base="https://seniormars.com/posts/multiple-proofs/">&lt;h2 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I was procrastinating on Reddit at 2am and found this &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;math&#x2F;comments&#x2F;1ixgz44&#x2F;what_is_the_importance_of_there_being_multiple&#x2F;&quot;&gt;thread&lt;&#x2F;a&gt; asking why mathematicians care about multiple proofs of the same theorem. Once something’s proven, it’s proven, right?&lt;&#x2F;p&gt;
&lt;p&gt;Then I spent four hours reading about proof complexity and had a little crisis.&lt;&#x2F;p&gt;






&lt;div class=&quot;character-note character-hooded character-comment character-right&quot;&gt;
    &lt;div class=&quot;character-avatar&quot;&gt;
        
            &lt;img src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;images&#x2F;characters&#x2F;hooded.png&quot;
                 alt=&quot;hooded&quot;
                 loading=&quot;lazy&quot;
                 decoding=&quot;async&quot;
                 style=&quot;border: none !important;&quot;
                 width=&quot;80&quot;
                 height=&quot;80&quot; &#x2F;&gt;
        
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;character-content&quot;&gt;
        &lt;div class=&quot;character-bubble&quot;&gt;
            &lt;p&gt;Oh no, not another rabbit hole…&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
    &lt;&#x2F;div&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;This one’s good though! Turns out Gödel predicted P vs NP in 1956, so I’ll use this as an excuse to try out character dialogue and try to overexplain things a bit.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;proofs-are-programs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#proofs-are-programs&quot; aria-label=&quot;Anchor link for: proofs-are-programs&quot;&gt;Proofs Are Programs&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Via the Curry-Howard correspondence: a theorem is a type, a proof is a program with that type, and simplifying a proof is running the program.&lt;&#x2F;p&gt;
&lt;p&gt;When you write a proof, you’re constructing a computational object. In fact, a constructive proof? That’s an algorithm computing the solution. A proof by contradiction? That might encode an exponential search through all possibilities.&lt;&#x2F;p&gt;
&lt;p&gt;Two different proofs of the same theorem are two different algorithms computing the same result.&lt;&#x2F;p&gt;






&lt;div class=&quot;character-note character-hooded character-comment character-left&quot;&gt;
    &lt;div class=&quot;character-avatar&quot;&gt;
        
            &lt;img src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;images&#x2F;characters&#x2F;hooded.png&quot;
                 alt=&quot;hooded&quot;
                 loading=&quot;lazy&quot;
                 decoding=&quot;async&quot;
                 style=&quot;border: none !important;&quot;
                 width=&quot;80&quot;
                 height=&quot;80&quot; &#x2F;&gt;
        
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;character-content&quot;&gt;
        &lt;div class=&quot;character-bubble&quot;&gt;
            &lt;p&gt;So finding multiple proofs is like… optimizing algorithms?&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
    &lt;&#x2F;div&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;Exactly! Which is why Gödel’s 1956 letter to von Neumann is so wild.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;godel-s-question&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#godel-s-question&quot; aria-label=&quot;Anchor link for: godel-s-question&quot;&gt;Gödel’s Question&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Before complexity theory existed, Gödel asked: “We can build a Turing machine that checks if a formula has a proof of length n. But how fast does verification time grow for an optimal machine?”&lt;&#x2F;p&gt;
&lt;p&gt;Then he speculates: “If we could solve this efficiently, the mental work of a mathematician could be completely replaced by a machine.”&lt;&#x2F;p&gt;
&lt;p&gt;He was asking if we can measure and automate mathematical thought. This is the P vs NP question before anyone formalized it! Unforatunately, Von Neumann never was able to respond.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;when-obvious-things-are-hard&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#when-obvious-things-are-hard&quot; aria-label=&quot;Anchor link for: when-obvious-things-are-hard&quot;&gt;When Obvious Things Are Hard&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;For instance, the pigeonhole principle: if you have $m$ pigeons and $n$ holes with $m &amp;gt; n$, some hole contains multiple pigeons. Trivially obvious.&lt;&#x2F;p&gt;
&lt;p&gt;Yet, in resolution proof systems (what SAT solvers use), this requires exponentially long proofs. The proof length grows exponentially with the number of pigeons.&lt;&#x2F;p&gt;






&lt;div class=&quot;character-note character-hooded character-comment character-right&quot;&gt;
    &lt;div class=&quot;character-avatar&quot;&gt;
        
            &lt;img src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;images&#x2F;characters&#x2F;hooded.png&quot;
                 alt=&quot;hooded&quot;
                 loading=&quot;lazy&quot;
                 decoding=&quot;async&quot;
                 style=&quot;border: none !important;&quot;
                 width=&quot;80&quot;
                 height=&quot;80&quot; &#x2F;&gt;
        
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;character-content&quot;&gt;
        &lt;div class=&quot;character-bubble&quot;&gt;
            &lt;p&gt;Wait, so some true things are just… fundamentally hard to prove?&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
    &lt;&#x2F;div&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;Yes…depending on your proof system! How we formalize mathematics matters computationally.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;a-core-insight&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-core-insight&quot; aria-label=&quot;Anchor link for: a-core-insight&quot;&gt;A Core Insight&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Here’s what made everything click for me:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A theorem is an equivalence class of all its proofs.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;When we say “the Pythagorean theorem is true,” we don’t mean a specific sequence of logical steps. We mean the mathematical fact itself, and there are infinitely many ways to derive it.&lt;&#x2F;p&gt;
&lt;p&gt;Each proof is a representative of this equivalence class revealing something different. Some generalize to higher dimensions. Some show connections to other areas. Some show interesting techiniques. Others are just shorter.&lt;&#x2F;p&gt;
&lt;p&gt;We’re not re-deriving the same fact. We’re exploring the space of computational paths to that fact.&lt;&#x2F;p&gt;
&lt;p&gt;A sad part is that this idea is very hard to formalize.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;optimal-proofs-and-hard-limits&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#optimal-proofs-and-hard-limits&quot; aria-label=&quot;Anchor link for: optimal-proofs-and-hard-limits&quot;&gt;Optimal Proofs and Hard Limits&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;For some theorems, we can prove lower bounds on proof length. “Any proof of this statement in this system must be at least this long.” No matter how clever you are, you can’t prove it more efficiently.&lt;&#x2F;p&gt;
&lt;p&gt;The Paris-Harrington theorem is a finitary statement about combinatorics that’s true but unprovable in Peano arithmetic. Not unprovable in general, just in that specific system. You need stronger axioms.&lt;&#x2F;p&gt;
&lt;p&gt;If we had a general method to find the shortest proof of any theorem, we could probably solve P vs NP. That’s not happening anytime soon.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;why-this-matters&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#why-this-matters&quot; aria-label=&quot;Anchor link for: why-this-matters&quot;&gt;Why This Matters&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;If P = NP, every theorem with a short proof has a short proof we can find efficiently. We could automate mathematics.&lt;&#x2F;p&gt;
&lt;p&gt;If P ≠ NP, there exist theorems with short proofs we literally cannot efficiently discover. The proof exists somewhere in proof space, we just can’t reach it.&lt;&#x2F;p&gt;
&lt;p&gt;This means fundamental limits to mathematical knowledge. Not limits on what’s true, but limits on what we can prove in practice.&lt;&#x2F;p&gt;
&lt;p&gt;We’re in a world where AI-assisted theorem proving is becoming practical. Understanding proof complexity isn’t academic curiosity anymore. If we want machines to help us do math, we need to understand the computational structure of proofs.&lt;&#x2F;p&gt;
&lt;p&gt;Some theorems might have beautiful short proofs we’ll never find because searching proof space is exponentially hard. Mathematical truth exists, but our computational ability to access it is fundamentally limited.&lt;&#x2F;p&gt;






&lt;div class=&quot;character-note character-hooded character-comment character-left&quot;&gt;
    &lt;div class=&quot;character-avatar&quot;&gt;
        
            &lt;img src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;images&#x2F;characters&#x2F;hooded.png&quot;
                 alt=&quot;hooded&quot;
                 loading=&quot;lazy&quot;
                 decoding=&quot;async&quot;
                 style=&quot;border: none !important;&quot;
                 width=&quot;80&quot;
                 height=&quot;80&quot; &#x2F;&gt;
        
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;character-content&quot;&gt;
        &lt;div class=&quot;character-bubble&quot;&gt;
            &lt;p&gt;That’s kind of horrifying.&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
    &lt;&#x2F;div&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;And beautiful. That’s the whole point.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Automated Backups Using rclone + Box</title>
          <pubDate>Tue, 25 Feb 2025 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/box-rclone/</link>
          <guid>https://seniormars.com/posts/box-rclone/</guid>
          <description xml:base="https://seniormars.com/posts/box-rclone/">&lt;h2 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;As a college student, I’ve had my fair share of data loss nightmares. From the time my final project got corrupted right before finals week to accidentally deleting important files, I’ve learned the hard way that &lt;strong&gt;regular backups are non-negotiable&lt;&#x2F;strong&gt;. Fortunately, most universities provide students with cloud storage – in my case, Rice University gives each student a generous 2TB of Box storage. But how do we efficiently use this resource for automatic, reliable backups? Enter rclone, the command-line Swiss Army knife for cloud storage.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what-is-rclone&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#what-is-rclone&quot; aria-label=&quot;Anchor link for: what-is-rclone&quot;&gt;What is rclone?&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Rclone is a command-line program that allows you to sync files between your local machine and various cloud storage providers. Think of it as rsync for the cloud, but with Windows support built-in! It supports dozens of cloud storage systems including Box, Google Drive, Dropbox, and OneDrive. The beauty of rclone is that it’s:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Free and open-source&lt;&#x2F;li&gt;
&lt;li&gt;Feature-rich (encryption, filtering, mounting, etc.)&lt;&#x2F;li&gt;
&lt;li&gt;Incredibly efficient with bandwidth and resources&lt;&#x2F;li&gt;
&lt;li&gt;Cross-platform (works on Windows, macOS, Linux, and more)&lt;&#x2F;li&gt;
&lt;li&gt;No GUI required (though GUI wrappers exist for those who prefer them)&lt;&#x2F;li&gt;
&lt;li&gt;Scriptable for easy automation&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Here’s what my Box storage usage looks like after using rclone for over a year:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Storage Used&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;764.9 GB of 2.0 TB&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Max File Size&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;50.0 GB&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;While rclone is a command-line tool, don’t let that intimidate you if you have never used your terrminal! I’ll provide detailed instructions for all platforms! Let’s get started with setting up your own automated backup system!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;installation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#installation&quot; aria-label=&quot;Anchor link for: installation&quot;&gt;Installation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;First, we need to install rclone on your machine. The process varies slightly depending on your operating system.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;windows&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#windows&quot; aria-label=&quot;Anchor link for: windows&quot;&gt;Windows&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;For Windows users, there are several installation methods:&lt;&#x2F;p&gt;
&lt;p&gt;Method 1: Installer (Recommended for most users)&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Download the installer from the &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;rclone.org&#x2F;downloads&#x2F;&quot;&gt;rclone downloads page&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Run the &lt;code&gt;.exe&lt;&#x2F;code&gt; file&lt;&#x2F;li&gt;
&lt;li&gt;Follow the installation wizard&lt;&#x2F;li&gt;
&lt;li&gt;The installer will add rclone to your PATH automatically&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Method 2: Portable zip file&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Download the zip file from the &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;rclone.org&#x2F;downloads&#x2F;&quot;&gt;rclone downloads page&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Extract the zip file to a location of your choice (e.g., &lt;code&gt;C:\Program Files\rclone&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;Add the folder to your PATH:
&lt;ul&gt;
&lt;li&gt;Right-click on “This PC” or “My Computer” and select “Properties”&lt;&#x2F;li&gt;
&lt;li&gt;Click on “Advanced system settings”&lt;&#x2F;li&gt;
&lt;li&gt;Click the “Environment Variables” button&lt;&#x2F;li&gt;
&lt;li&gt;In the “System variables” section, find and select the “Path” variable&lt;&#x2F;li&gt;
&lt;li&gt;Click “Edit”&lt;&#x2F;li&gt;
&lt;li&gt;Click “New” and add the path to your rclone folder&lt;&#x2F;li&gt;
&lt;li&gt;Click “OK” on all dialogs to save the changes&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Method 3: Using Scoop
If you use the &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;scoop.sh&#x2F;&quot;&gt;Scoop&lt;&#x2F;a&gt; package manager for Windows:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;powershell&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;scoop install rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Method 4: WSL (Windows Subsystem for Linux)
If you use WSL, you can follow the Linux instructions below within your WSL environment.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;macos&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#macos&quot; aria-label=&quot;Anchor link for: macos&quot;&gt;macOS&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;If you’re using macOS (as I am), the easiest way to install rclone is with Homebrew:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; brew install rclone flock&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;linux&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#linux&quot; aria-label=&quot;Anchor link for: linux&quot;&gt;Linux&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;On most Linux distributions, you can install rclone using your package manager:&lt;&#x2F;p&gt;
&lt;p&gt;Debian&#x2F;Ubuntu:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo apt install rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Arch Linux&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo pacman&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -S&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;setting-up-rclone-with-box&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setting-up-rclone-with-box&quot; aria-label=&quot;Anchor link for: setting-up-rclone-with-box&quot;&gt;Setting Up rclone with Box&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Now that rclone is installed, we need to configure it to work with our Box account.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;initial-configuration&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#initial-configuration&quot; aria-label=&quot;Anchor link for: initial-configuration&quot;&gt;Initial Configuration&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Run the following command to start the configuration process:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; rclone config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This interactive setup will walk you through creating a new remote connection. Here’s what to expect:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;No remotes found, make a new one?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;n) New remote&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;s) Set configuration password&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;q) Quit config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;n&#x2F;s&#x2F;q&amp;gt; n&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;name&amp;gt; box&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Enter &lt;code&gt;n&lt;&#x2F;code&gt; to create a new remote, and name it &lt;code&gt;box&lt;&#x2F;code&gt; (or whatever you prefer).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type of storage to configure.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Choose a number from below, or type in your own value&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[list of storage types]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;XX &#x2F; Box&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   \ &amp;quot;box&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[more options]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Storage&amp;gt; box&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Choose &lt;code&gt;box&lt;&#x2F;code&gt; from the list of storage types.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Box App Client Id - leave blank normally.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;client_id&amp;gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Box App Client Secret - leave blank normally.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;client_secret&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unless you’ve created your own Box App (I’ll show you how later), leave these blank and press Enter.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Box App config.json location&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Leave blank normally.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Enter a string value. Press Enter for the default (&amp;quot;&amp;quot;).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;box_config_file&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Box App Primary Access Token&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Leave blank normally.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Enter a string value. Press Enter for the default (&amp;quot;&amp;quot;).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;access_token&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Again, leave these blank and press Enter.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Enter a string value. Press Enter for the default (&amp;quot;user&amp;quot;).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Choose a number from below, or type in your own value&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; 1 &#x2F; Rclone should act on behalf of a user&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   \ &amp;quot;user&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; 2 &#x2F; Rclone should act on behalf of a service account&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   \ &amp;quot;enterprise&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;box_sub_type&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Press Enter to select the default option (&lt;code&gt;user&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Remote config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Use web browser to automatically authenticate rclone with remote?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; * Say Y if the machine running rclone has a web browser you can use&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; * Say N if running rclone on a (remote) machine without web browser access&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;If not sure try Y. If Y failed, try N.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;y) Yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;n) No&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;y&#x2F;n&amp;gt; y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Type &lt;code&gt;y&lt;&#x2F;code&gt; and press Enter to authenticate via your web browser.&lt;&#x2F;p&gt;
&lt;p&gt;A browser window should open automatically. Log in to your Box account and authorize rclone for access. Once authorized, the browser window will display a success message, and you can close it and return to the terminal.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;If your browser doesn&amp;#39;t open automatically go to the following link: http:&#x2F;&#x2F;127.0.0.1:53682&#x2F;auth?state=XXXXXXXXXXXXXXXXXXXXXX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Log in and authorize rclone for access&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Waiting for code...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Got code&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Configuration complete.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Options:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;- type: box&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;- client_id:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;- client_secret:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;- token: {&amp;quot;access_token&amp;quot;:&amp;quot;XXX&amp;quot;,&amp;quot;token_type&amp;quot;:&amp;quot;bearer&amp;quot;,&amp;quot;refresh_token&amp;quot;:&amp;quot;XXX&amp;quot;,&amp;quot;expiry&amp;quot;:&amp;quot;XXX&amp;quot;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Keep this &amp;quot;remote&amp;quot; remote?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;y) Yes this is OK&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;e) Edit this remote&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;d) Delete this remote&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;y&#x2F;e&#x2F;d&amp;gt; y&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Type &lt;code&gt;y&lt;&#x2F;code&gt; and press Enter to save the configuration.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;testing-the-connection&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#testing-the-connection&quot; aria-label=&quot;Anchor link for: testing-the-connection&quot;&gt;Testing the Connection&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Let’s make sure our connection works by listing the files in your Box account:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; rclone ls box:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This command should list all files at the root of your Box account. If you see the file listing, congratulations – your rclone configuration is working correctly!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;creating-a-backup-script&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-a-backup-script&quot; aria-label=&quot;Anchor link for: creating-a-backup-script&quot;&gt;Creating a Backup Script&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Now that rclone is configured, let’s create a backup script to automate the process. The script will synchronize specified directories from your local machine to Box.&lt;&#x2F;p&gt;
&lt;p&gt;Here’s a basic example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;#!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SOURCE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DEST&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;box:backup&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EXCLUDE_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&#x2F;.config&#x2F;rclone&#x2F;exclude_backup&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --update --verbose --transfers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 30&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --checkers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;  --contimeout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 60s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --timeout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 300s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --retries&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --low-level-retries&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;  --stats&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 30s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --exclude-from&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$EXCLUDE_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;  --delete-excluded&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$SOURCE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$DEST&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Let’s break down what this script does:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;SOURCE=&quot;$HOME&quot;&lt;&#x2F;code&gt; - Sets the source directory to your home directory.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;DEST=&quot;box:backup&quot;&lt;&#x2F;code&gt; - Sets the destination to a folder called “backup” in your Box account.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;EXCLUDE_FILE=&quot;$HOME&#x2F;.config&#x2F;rclone&#x2F;exclude_backup&quot;&lt;&#x2F;code&gt; - Specifies a file containing patterns of files&#x2F;directories to exclude.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;rclone sync&lt;&#x2F;code&gt; - Synchronizes the source directory to the destination.
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--update&lt;&#x2F;code&gt; - Skip files that are newer on the destination.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--verbose&lt;&#x2F;code&gt; - Show detailed progress.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--transfers 30&lt;&#x2F;code&gt; - Number of file transfers to run in parallel.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--checkers 8&lt;&#x2F;code&gt; - Number of checkers to run in parallel.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--contimeout 60s&lt;&#x2F;code&gt; - Connect timeout.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--timeout 300s&lt;&#x2F;code&gt; - I&#x2F;O timeout.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--retries 3&lt;&#x2F;code&gt; - Number of retries if a file transfer fails.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--low-level-retries 10&lt;&#x2F;code&gt; - Number of low-level retries.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--stats 30s&lt;&#x2F;code&gt; - Print stats every 30 seconds.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--exclude-from &quot;$EXCLUDE_FILE&quot;&lt;&#x2F;code&gt; - Read exclude patterns from the specified file.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--delete-excluded&lt;&#x2F;code&gt; - Delete files from the destination that are excluded.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;creating-an-exclude-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-an-exclude-file&quot; aria-label=&quot;Anchor link for: creating-an-exclude-file&quot;&gt;Creating an Exclude File&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The exclude file is crucial for efficient backups. It prevents unnecessary files from being backed up, saving both time and storage space.&lt;&#x2F;p&gt;
&lt;p&gt;For macOS&#x2F;Linux:&lt;&#x2F;p&gt;
&lt;p&gt;Create the exclude file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ~&#x2F;.config&#x2F;rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; touch ~&#x2F;.config&#x2F;rclone&#x2F;exclude_backup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For Windows:&lt;&#x2F;p&gt;
&lt;p&gt;Create the exclude file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;bat&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;C:\Users\YourUsername\rclone&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt;. &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;C:\Users\YourUsername\rclone\exclude_backup.txt&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now edit this file with your favorite text editor and add patterns for files and directories you want to exclude from your backups.&lt;&#x2F;p&gt;
&lt;p&gt;Example for macOS:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Temporary files&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*.tmp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*.temp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;.DS_Store&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Cache directories&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;*&#x2F;Library&#x2F;Caches&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;*&#x2F;Library&#x2F;Application Support&#x2F;Google&#x2F;Chrome&#x2F;Default&#x2F;Cache&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;*&#x2F;Library&#x2F;Containers&#x2F;com.docker.docker&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Package managers&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;*&#x2F;node_modules&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;*&#x2F;.npm&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;*&#x2F;.cargo&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;*&#x2F;.rustup&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Virtual environments&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;*&#x2F;venv&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;*&#x2F;.venv&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;*&#x2F;env&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;Users&#x2F;*&#x2F;.env&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Large data and logs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*.log&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*.iso&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*.dmg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example for Windows:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Temporary files&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*.tmp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*.temp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Thumbs.db&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Cache directories&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;C:\Users\*\AppData\Local\Temp\**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;C:\Users\*\AppData\Local\Google\Chrome\User Data\Default\Cache\**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;C:\Users\*\AppData\Local\Docker\**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Package managers&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;C:\Users\*\node_modules\**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;C:\Users\*\AppData\Roaming\npm\**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;C:\Users\*\.cargo\**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;C:\Users\*\.rustup\**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Virtual environments&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;C:\Users\*\venv\**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;C:\Users\*\.venv\**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;C:\Users\*\env\**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;C:\Users\*\.env\**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Large data and logs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*.log&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*.iso&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*.wim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Feel free to customize this list according to your needs. The patterns follow the same format as &lt;code&gt;.gitignore&lt;&#x2F;code&gt; files, with a few additions:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*&lt;&#x2F;code&gt; matches any sequence of non-separator characters&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;**&lt;&#x2F;code&gt; matches any sequence of characters including separators&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;?&lt;&#x2F;code&gt; matches any single non-separator character&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;[chars]&lt;&#x2F;code&gt; matches any character in the set&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;{alt1,alt2}&lt;&#x2F;code&gt; matches any of the alternatives&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;making-the-script-executable&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#making-the-script-executable&quot; aria-label=&quot;Anchor link for: making-the-script-executable&quot;&gt;Making the Script Executable&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Save your backup script to a file, e.g., &lt;code&gt;~&#x2F;bin&#x2F;backup_to_box.sh&lt;&#x2F;code&gt;, and make it executable:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ~&#x2F;bin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; nano ~&#x2F;bin&#x2F;backup_to_box.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Paste the script content and save&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; chmod +x ~&#x2F;bin&#x2F;backup_to_box.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;enhancing-your-backup-script&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#enhancing-your-backup-script&quot; aria-label=&quot;Anchor link for: enhancing-your-backup-script&quot;&gt;Enhancing Your Backup Script&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Let’s improve our basic script with some additional features. I’ll provide examples for both macOS&#x2F;Linux and Windows.&lt;&#x2F;p&gt;
&lt;p&gt;For macOS&#x2F;Linux:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;#!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Configuration&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SOURCE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DEST&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;box:backup&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EXCLUDE_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&#x2F;.config&#x2F;rclone&#x2F;exclude_backup&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;LOG_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&#x2F;.local&#x2F;share&#x2F;backup&#x2F;rclone_backup.log&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;LOCK_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&#x2F;tmp&#x2F;box_backup.lock&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Create log directory if it doesn&amp;#39;t exist&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;dirname&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$LOG_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;)&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&#x2F;.local&#x2F;share&#x2F;backup&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Save a list of installed packages before backup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -v&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; brew&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&#x2F;dev&#x2F;null&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; 2&amp;gt;&amp;amp;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;    &#x2F;opt&#x2F;homebrew&#x2F;bin&#x2F;brew&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; list&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&#x2F;.local&#x2F;share&#x2F;backup&#x2F;brew_list.txt&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Use flock to ensure only one instance runs at a time&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -v&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; flock&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&#x2F;dev&#x2F;null&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; 2&amp;gt;&amp;amp;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;    exec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &#x2F;opt&#x2F;homebrew&#x2F;bin&#x2F;flock&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$LOCK_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; rclone sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;        --update --verbose --transfers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 30&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --checkers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;        --contimeout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 60s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --timeout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 300s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --retries&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;        --low-level-retries&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --stats&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 30s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;        --exclude-from&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$EXCLUDE_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --delete-excluded \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$SOURCE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$DEST&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; 2&amp;gt;&amp;amp;1 |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; tee&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$LOG_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    # If flock is not available, just run rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;    rclone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --update --verbose --transfers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 30&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --checkers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;        --contimeout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 60s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --timeout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 300s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --retries&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;        --low-level-retries&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --stats&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 30s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;        --exclude-from&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$EXCLUDE_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --delete-excluded \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;        &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$SOURCE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$DEST&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; 2&amp;gt;&amp;amp;1 |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; tee&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$LOG_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For Windows:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;bat&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;echo off&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;setlocal enabledelayedexpansion&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;:: Configuration&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;SOURCE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;C:\Users\YourUsername&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;DEST&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;box:windows_backup&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;EXCLUDE_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;C:\Users\YourUsername\rclone\exclude_backup.txt&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;LOG_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;C:\Users\YourUsername\rclone\logs\rclone_backup.log&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;LOCK_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;C:\Users\YourUsername\rclone\backup.lock&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;DATE_TIME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;%date&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:~&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;-4&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;4&lt;&#x2F;span&gt;&lt;span&gt;%%date&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:~&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;-7&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;%%date&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:~&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;-10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;_&lt;&#x2F;span&gt;&lt;span&gt;%time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:~&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;%%time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:~&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;%%time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:~&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;6&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;DATE_TIME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;!DATE_TIME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;: =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;!&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;:: Create log directory if it doesn&amp;#39;t exist&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; not&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; exist&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;C:\Users\YourUsername\rclone\logs&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;C:\Users\YourUsername\rclone\logs&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;:: Save a list of installed programs before backup (using PowerShell)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;powershell&lt;&#x2F;span&gt;&lt;span&gt; -Command &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName | Sort-Object -Property DisplayName | Out-File -FilePath &amp;#39;C:\Users\YourUsername\rclone\installed_programs.txt&amp;#39;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;:: Check if another instance is already running&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;if exist&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%LOCK_FILE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    echo&lt;&#x2F;span&gt;&lt;span&gt; Another backup is already in progress. Exiting... &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%LOG_FILE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    exit&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;b &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;:: Create the lock file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt; %DATE_TIME%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%LOCK_FILE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;:: Start the backup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt; Starting backup at %DATE_TIME%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%LOG_FILE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;:: Run rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;C:\Program Files\rclone\rclone.exe&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; sync &lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    --update --verbose --transfers &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;30&lt;&#x2F;span&gt;&lt;span&gt; --checkers &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; ^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    --contimeout 60s --timeout 300s --retries &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; ^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    --low-level-retries &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;10&lt;&#x2F;span&gt;&lt;span&gt; --stats 30s &lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    --exclude-from &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%EXCLUDE_FILE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; --delete-excluded &lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%SOURCE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%DEST%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%LOG_FILE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;:: Remove the lock file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;del&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%LOCK_FILE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt; Backup completed at %date% %time%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%LOG_FILE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt;. &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%LOG_FILE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The Windows script includes:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Proper path handling for Windows file systems&lt;&#x2F;li&gt;
&lt;li&gt;Lock file mechanism to prevent multiple instances&lt;&#x2F;li&gt;
&lt;li&gt;Capturing installed programs using PowerShell&lt;&#x2F;li&gt;
&lt;li&gt;Detailed logging with timestamps&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;This enhanced script adds:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Logging to a file for easier troubleshooting&lt;&#x2F;li&gt;
&lt;li&gt;A lock mechanism to prevent multiple instances from running simultaneously&lt;&#x2F;li&gt;
&lt;li&gt;Automatic saving of installed packages (in this case, Homebrew packages)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;automating-backups&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#automating-backups&quot; aria-label=&quot;Anchor link for: automating-backups&quot;&gt;Automating Backups&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Now that we have our script, let’s set it up to run automatically at regular intervals.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;using-cron-macos-linux&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-cron-macos-linux&quot; aria-label=&quot;Anchor link for: using-cron-macos-linux&quot;&gt;Using cron (macOS&#x2F;Linux):&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;On macOS and Linux, cron is the traditional way to schedule recurring tasks.&lt;&#x2F;p&gt;
&lt;p&gt;Edit your crontab file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; crontab&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here’s my personal crontab setup that runs the backup twice daily (8 AM and 8 PM) and logs the output:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;0 8 * * * &#x2F;Users&#x2F;charlie&#x2F;.local&#x2F;bin&#x2F;backup-rclone &amp;amp;&amp;gt; &#x2F;Users&#x2F;charlie&#x2F;.config&#x2F;rclone&#x2F;backup-rclone.log&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;0 20 * * * &#x2F;Users&#x2F;charlie&#x2F;.local&#x2F;bin&#x2F;backup-rclone &amp;amp;&amp;gt; &#x2F;Users&#x2F;charlie&#x2F;.config&#x2F;rclone&#x2F;backup-rclone.log&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here’s what the numbers mean:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;0&lt;&#x2F;code&gt; - minute (0-59)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;8&#x2F;20&lt;&#x2F;code&gt; - hour (0-23), running at 8 AM and 8 PM&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;*&lt;&#x2F;code&gt; - day of month (1-31)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;*&lt;&#x2F;code&gt; - month (1-12)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;*&lt;&#x2F;code&gt; - day of week (0-7, both 0 and 7 represent Sunday)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;The cron job runs in a limited environment, so you might need to use full paths to all executables in your script. Notice how I’ve used absolute paths in my example above.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h4 id=&quot;using-launchd-macos&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-launchd-macos&quot; aria-label=&quot;Anchor link for: using-launchd-macos&quot;&gt;Using launchd (macOS)&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;On macOS, you can also use launchd, which offers more flexibility than cron.&lt;&#x2F;p&gt;
&lt;p&gt;Create a plist file at &lt;code&gt;~&#x2F;Library&#x2F;LaunchAgents&#x2F;com.user.box-backup.plist&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;?&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;xml&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; version&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;1.0&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; encoding&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;UTF-8&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;?&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;!&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;DOCTYPE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; plist&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt; PUBLIC &amp;quot;-&#x2F;&#x2F;Apple&#x2F;&#x2F;DTD PLIST 1.0&#x2F;&#x2F;EN&amp;quot; &amp;quot;http:&#x2F;&#x2F;www.apple.com&#x2F;DTDs&#x2F;PropertyList-1.0.dtd&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;plist&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; version&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;1.0&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;dict&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;Label&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;string&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;com.user.box-backup&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;string&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;Program&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;string&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;Users&#x2F;YOUR_USERNAME&#x2F;bin&#x2F;backup_to_box.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;string&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;StartCalendarInterval&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;dict&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;Hour&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;integer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;integer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;Minute&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;integer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;integer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;dict&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;StandardOutPath&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;string&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;Users&#x2F;YOUR_USERNAME&#x2F;.local&#x2F;share&#x2F;backup&#x2F;stdout.log&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;string&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;StandardErrorPath&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;string&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;Users&#x2F;YOUR_USERNAME&#x2F;.local&#x2F;share&#x2F;backup&#x2F;stderr.log&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;string&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt;RunAtLoad&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;false&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&#x2F;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;dict&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;plist&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE680;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Replace &lt;code&gt;YOUR_USERNAME&lt;&#x2F;code&gt; with your actual username. Then load the job:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; launchctl load ~&#x2F;Library&#x2F;LaunchAgents&#x2F;com.user.box-backup.plist&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;using-task-scheduler-windows&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-task-scheduler-windows&quot; aria-label=&quot;Anchor link for: using-task-scheduler-windows&quot;&gt;Using Task Scheduler (Windows)&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;p&gt;Windows users can use Task Scheduler for automated backups. Here’s a detailed guide:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;First, create a batch file for your rclone command. Create a new file called &lt;code&gt;backup_to_box.bat&lt;&#x2F;code&gt; in an appropriate location (e.g., &lt;code&gt;C:\Users\YourUsername\Scripts\&lt;&#x2F;code&gt;):&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;bat&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;echo off&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt; Starting Box backup at %date% %time%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;C:\Users\YourUsername\backup_logs.txt&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;:: Set paths with quotes to handle spaces in filenames&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span&gt; SOURCE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;C:\Users\YourUsername&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span&gt; DEST&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;box:windows_backup&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span&gt; EXCLUDE_FILE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;C:\Users\YourUsername\rclone\exclude_backup.txt&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;:: Create directories if they don&amp;#39;t exist&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; not&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; exist&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;C:\Users\YourUsername\rclone&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;C:\Users\YourUsername\rclone&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;:: Run rclone with appropriate parameters&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;C:\Program Files\rclone\rclone.exe&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; sync --update --verbose --transfers &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;30&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; ^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  --checkers &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;8&lt;&#x2F;span&gt;&lt;span&gt; --contimeout 60s --timeout 300s --retries &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; ^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  --low-level-retries &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;10&lt;&#x2F;span&gt;&lt;span&gt; --stats 30s &lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  --exclude-from &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%EXCLUDE_FILE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; --delete-excluded &lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%SOURCE%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;%DEST%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;C:\Users\YourUsername\backup_logs.txt&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt; Backup completed at %date% %time%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;C:\Users\YourUsername\backup_logs.txt&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt;. &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;C:\Users\YourUsername\backup_logs.txt&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;
&lt;p&gt;Now set up the task:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Open Task Scheduler (search for it in the Start menu)&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Click “Create Task” (not “Create Basic Task” for more options)&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;On the General tab:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Enter a Name (e.g., “Box Backup”)&lt;&#x2F;li&gt;
&lt;li&gt;Select “Run whether user is logged on or not” for unattended operation&lt;&#x2F;li&gt;
&lt;li&gt;Check “Run with highest privileges”&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;On the Triggers tab:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Click “New” to add a trigger&lt;&#x2F;li&gt;
&lt;li&gt;Select “Daily” and set it to run at your preferred time(s)&lt;&#x2F;li&gt;
&lt;li&gt;You can add multiple triggers for morning and evening backups&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;On the Actions tab:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Click “New”&lt;&#x2F;li&gt;
&lt;li&gt;Action: “Start a program”&lt;&#x2F;li&gt;
&lt;li&gt;Program&#x2F;script: Browse to your batch file (&lt;code&gt;C:\Users\YourUsername\Scripts\backup_to_box.bat&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;On the Conditions tab:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Uncheck “Start the task only if the computer is on AC power” if you want it to run on battery&lt;&#x2F;li&gt;
&lt;li&gt;Consider checking “Start only if the following network connection is available” if you want it to run only on certain networks&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;On the Settings tab:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Check “Run task as soon as possible after a scheduled start is missed”&lt;&#x2F;li&gt;
&lt;li&gt;Set “If the task fails, restart every:” to handle temporary failures&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Click “OK” and enter your password when prompted.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;Windows paths use backslashes (\) instead of forward slashes. Make sure all your paths use the correct format. Also, if you install rclone in a non-standard location, adjust the path to rclone.exe accordingly.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h2 id=&quot;advanced-rclone-features&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#advanced-rclone-features&quot; aria-label=&quot;Anchor link for: advanced-rclone-features&quot;&gt;Advanced rclone Features&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;bandwidth-limiting&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#bandwidth-limiting&quot; aria-label=&quot;Anchor link for: bandwidth-limiting&quot;&gt;Bandwidth Limiting&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;If you don’t want your backups to saturate your internet connection, you can limit the bandwidth:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --bwlimit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 1M ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This limits the transfer to 1 megabyte per second. You can also specify a time schedule:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --bwlimit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;08:00,512k 12:00,1M 18:00,512k 23:00,2M&amp;quot; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This sets different limits throughout the day.&lt;&#x2F;p&gt;
&lt;p&gt;Windows Example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;bat&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rclone sync --bwlimit &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;08:00,512k 12:00,1M 18:00,512k 23:00,2M&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; ^&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;  &amp;quot;C:\Users\YourUsername&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; box:backup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;encryption&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#encryption&quot; aria-label=&quot;Anchor link for: encryption&quot;&gt;Encryption&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;If you’re concerned about the privacy of your data in the cloud, rclone supports encryption:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Create an encrypted remote&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; rclone config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;n&lt;&#x2F;span&gt;&lt;span&gt;) New remote&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;name&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; box-crypt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; of storag&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; crypt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Remote&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; to encrypt&#x2F;decryp&lt;&#x2F;span&gt;&lt;span&gt;t&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; box:encrypted&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then use &lt;code&gt;box-crypt:&lt;&#x2F;code&gt; as your destination in your backup script.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;fast-listing&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#fast-listing&quot; aria-label=&quot;Anchor link for: fast-listing&quot;&gt;Fast Listing&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;For large directories with many files, you can speed up operations with fast list:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --fast-list&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This uses more memory but can significantly speed up the listing process.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;mount&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mount&quot; aria-label=&quot;Anchor link for: mount&quot;&gt;Mount&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;One of my favorite features is the ability to mount your Box storage as a local filesystem:&lt;&#x2F;p&gt;
&lt;p&gt;For macOS&#x2F;Linux:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; rclone mount box: ~&#x2F;box&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --vfs-cache-mode&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; writes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For Windows:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;bat&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rclone &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;mount&lt;&#x2F;span&gt;&lt;span&gt; box: X: --vfs-cache-mode writes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This mounts your entire Box account at &lt;code&gt;~&#x2F;box&lt;&#x2F;code&gt; on macOS&#x2F;Linux or as drive &lt;code&gt;X:&lt;&#x2F;code&gt; on Windows. You can then browse it like any local directory.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;For Windows users, the mount command requires WinFsp to be installed. Download the WinFsp installer from &lt;a href=&#x27;https:&#x2F;&#x2F;winfsp.dev&#x2F;&#x27;&gt;winfsp.dev&lt;&#x2F;a&gt; and install it before attempting to mount.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;serve&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#serve&quot; aria-label=&quot;Anchor link for: serve&quot;&gt;Serve&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Rclone can also serve your files over HTTP, WebDAV, FTP, or SFTP:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; rclone serve http box:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --addr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; :8080&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This allows you to access your Box files through a web browser at &lt;code&gt;http:&#x2F;&#x2F;localhost:8080&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;filtering-options&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#filtering-options&quot; aria-label=&quot;Anchor link for: filtering-options&quot;&gt;Filtering Options&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Rclone offers powerful filtering beyond the exclude file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --min-size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 100k&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --max-size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 5M ...&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # Only files between 100KB and 5MB&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --include&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;*.jpg&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --include&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;*.png&amp;quot; ...&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # Only include JPGs and PNGs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --exclude-if-present&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; .norclone ...&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # Skip directories with .norclone file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;troubleshooting&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#troubleshooting&quot; aria-label=&quot;Anchor link for: troubleshooting&quot;&gt;Troubleshooting&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;authentication-errors&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#authentication-errors&quot; aria-label=&quot;Anchor link for: authentication-errors&quot;&gt;Authentication Errors&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;If you encounter authentication errors, you may need to reauthorize rclone:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; rclone config reconnect box:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;connection-timeouts&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#connection-timeouts&quot; aria-label=&quot;Anchor link for: connection-timeouts&quot;&gt;Connection Timeouts&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;For unreliable internet connections, increase the timeout values:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --contimeout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 120s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --timeout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 600s ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;path-issues-on-windows&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#path-issues-on-windows&quot; aria-label=&quot;Anchor link for: path-issues-on-windows&quot;&gt;Path Issues on Windows&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Windows users might encounter issues with path formats:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Backslash vs. Forward Slash: Windows uses backslashes (&lt;code&gt;\&lt;&#x2F;code&gt;) in file paths, but you need to escape them in batch files with another backslash or use caret (&lt;code&gt;^&lt;&#x2F;code&gt;) before special characters.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Long Path Names: If you encounter “path too long” errors, you can prefix your paths with &lt;code&gt;\\?\&lt;&#x2F;code&gt; to enable long path support:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;bat&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rclone sync &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;\\?\C:\Very Long Path\...&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; box:backup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Spaces in Paths: Always enclose paths with spaces in quotes:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;bat&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rclone sync &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;C:\Users\Your Name\Documents&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; box:backup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;sync-taking-too-long&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#sync-taking-too-long&quot; aria-label=&quot;Anchor link for: sync-taking-too-long&quot;&gt;Sync Taking Too Long&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;If syncs are taking too long, consider:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Refining your exclude list&lt;&#x2F;li&gt;
&lt;li&gt;Using &lt;code&gt;--max-age&lt;&#x2F;code&gt; to only sync recent files&lt;&#x2F;li&gt;
&lt;li&gt;Using &lt;code&gt;--size-only&lt;&#x2F;code&gt; to compare file sizes instead of modification times&lt;&#x2F;li&gt;
&lt;li&gt;Using &lt;code&gt;--transfers&lt;&#x2F;code&gt; to adjust concurrent transfers (higher for fast connections)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;windows-specific-performance-tips&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#windows-specific-performance-tips&quot; aria-label=&quot;Anchor link for: windows-specific-performance-tips&quot;&gt;Windows-Specific Performance Tips&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Windows users can improve performance with:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Disable Virus Scanning for rclone: Add exclusions in your antivirus for rclone.exe and your backup directories.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Adjust Priorities: Run rclone with higher priority:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;bat&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;start&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;b &#x2F;high rclone sync ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Disable Indexing: Disable Windows Search indexing on your backup directories.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;logging-and-debugging&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#logging-and-debugging&quot; aria-label=&quot;Anchor link for: logging-and-debugging&quot;&gt;Logging and Debugging&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;For detailed troubleshooting, add the &lt;code&gt;-vv&lt;&#x2F;code&gt; flag for very verbose output:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; rclone sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -vv&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For even more detailed logs:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;rclone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --dump&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; headers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --dump&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; bodies ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This will dump all HTTP headers and response bodies to the log.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;windows-event-log-integration&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#windows-event-log-integration&quot; aria-label=&quot;Anchor link for: windows-event-log-integration&quot;&gt;Windows Event Log Integration&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Windows users can log to the Windows Event Log:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;bat&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rclone sync ... --log-file=eventlog:rclone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You can then view these logs in the Windows Event Viewer.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#conclusion&quot; aria-label=&quot;Anchor link for: conclusion&quot;&gt;Conclusion&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Setting up automated backups to Box using rclone is a powerful way to ensure your important data is safely stored in the cloud. The initial setup might seem a bit technical, but once configured, your backup system will run reliably with minimal maintenance.&lt;&#x2F;p&gt;
&lt;p&gt;Remember that a good backup strategy follows the “3-2-1 rule”:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;3 copies of your data&lt;&#x2F;li&gt;
&lt;li&gt;2 different storage types&lt;&#x2F;li&gt;
&lt;li&gt;1 copy offsite&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Box with rclone helps you satisfy the offsite requirement, but consider combining it with local backups for a comprehensive strategy.&lt;&#x2F;p&gt;
&lt;p&gt;I hope this guide helps you keep your data safe! Let me know in the comments if you have any questions or suggestions for improving this backup system.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Ergo: A collection of short stories</title>
          <pubDate>Wed, 15 Jan 2025 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/short-stories-one/</link>
          <guid>https://seniormars.com/posts/short-stories-one/</guid>
          <description xml:base="https://seniormars.com/posts/short-stories-one/">&lt;h1 id=&quot;ergo-a-collection-of-short-stories&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ergo-a-collection-of-short-stories&quot; aria-label=&quot;Anchor link for: ergo-a-collection-of-short-stories&quot;&gt;Ergo: A collection of short stories&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;A while back I said I would finish writing a book — I’m still working on it. In the meantime, here are some short stories I’ve written.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;passengers&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#passengers&quot; aria-label=&quot;Anchor link for: passengers&quot;&gt;Passengers&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The subway car sat motionless, its hum reverberating through the stagnant air, mingling with the metallic tang of iron, the acrid bite of oil, and a faint, sour undertone that clung to the platform walls. Inside, I sat alone, the cold, unyielding plastic seat pressing into my back, grounding me in the stillness. The window beside me, scratched and smeared with grime, offered a distorted reflection of a figure just beyond the yellow safety line.
Him. Me. The boy I used to be.&lt;&#x2F;p&gt;
&lt;p&gt;He shuffled his feet, his sneakers scuffing against the platform’s uneven concrete. His hoodie hung off him, loose and shapeless, the way I used to wear it—like armor that didn’t quite fit. His hands fidgeted inside the kangaroo pocket, fingers moving like he was trying to hold on to something that wasn’t there.&lt;&#x2F;p&gt;
&lt;p&gt;He didn’t meet my eyes. His gaze stayed locked on the empty tracks, as if the steel rails might whisper some elusive truth he couldn’t yet grasp. Overhead, the intercom sputtered to life, slicing through the oppressive quiet: “Ladies and gentlemen, we are delayed momentarily due to train traffic ahead of us.” The static lingered like a ghost, then faded.&lt;&#x2F;p&gt;
&lt;p&gt;I leaned forward, elbows resting on my knees, my hands clasped tightly together. “Are you getting on?” I asked, my voice slicing through the silence.&lt;&#x2F;p&gt;
&lt;p&gt;He flinched, his shoulders stiffening, his head jerking slightly as though the question had startled him. “What’s the point?” he muttered, his voice low, almost swallowed by the distant sound of something clattering in the tunnel. “The train’s not moving.”&lt;&#x2F;p&gt;
&lt;p&gt;“It will,” I said, my voice firm, though it felt like the weight of doubt pressed against my chest. “They always do, eventually.”&lt;&#x2F;p&gt;
&lt;p&gt;He didn’t respond, but his jaw clenched, his eyes betraying a flicker of something—hesitation? Fear? It wasn’t disbelief in me. It was disbelief in everything.&lt;&#x2F;p&gt;
&lt;p&gt;“You could wait out there forever,” I said, leaning back against the hard plastic, “but you’d still be stuck.”&lt;&#x2F;p&gt;
&lt;p&gt;His head snapped up, his expression sharp and cutting. “Yeah? And what about you?” His voice cracked through the silence, raw and biting. “You’re sitting here, stuck on this train, acting like that’s any better. You call this moving forward?”&lt;&#x2F;p&gt;
&lt;p&gt;The words hit harder than they should have. Not because they were wrong, but because they weren’t.&lt;&#x2F;p&gt;
&lt;p&gt;“I’m trying,” I said quietly, my voice catching in the air between us. The words felt too small, but they were all I had. “Isn’t that something?”&lt;&#x2F;p&gt;
&lt;p&gt;He stared at me, his face a mixture of defiance and something more fragile, something I recognized all too well: the sharp edges of hope dulled by the grind of disappointment.&lt;&#x2F;p&gt;
&lt;p&gt;He let out a bitter laugh, his head shaking as though my words had only solidified his doubts. “Trying,” he said, the word dripping with disdain. “That’s it? That’s what I have to look forward to? Sitting on a train that doesn’t even know where it’s going?” His hands moved inside his hoodie pocket, restless, searching for some kind of anchor. “You’re sitting there calling yourself a dreamer, like that makes it all okay. But what has dreaming ever done for you? You’re still here. Still nowhere.”&lt;&#x2F;p&gt;
&lt;p&gt;The word hung in the air: dreamer. It felt heavy, hollow, like a worn-out promise.&lt;&#x2F;p&gt;
&lt;p&gt;I swallowed hard, my fingers curling around the edge of the seat. “Dreaming doesn’t mean standing still,” I said finally. “It’s about moving, even when you don’t know where the track ends. It’s about believing there’s something—anything—on the other side of the tunnel, even if you can’t see it yet.”&lt;&#x2F;p&gt;
&lt;p&gt;He turned his head, his eyes fixed on the streaks of graffiti along the platform wall. “And what if there’s nothing?” he asked, his voice quieter now, but no less sharp.&lt;&#x2F;p&gt;
&lt;p&gt;“Then at least I’ll know I tried,” I said, my voice steady. “You’re afraid to fail. I get it. I’ve been there. But failure’s not the worst thing. The worst thing is standing outside, watching the train leave without you.”&lt;&#x2F;p&gt;
&lt;p&gt;The intercom crackled again. “Please stand clear of the closing doors. We will be departing soon.”&lt;&#x2F;p&gt;
&lt;p&gt;“I’ve fallen more times than I can count,” I continued, leaning back, my voice soft but firm. “But every time, I got back up. Not because I had to, but because I wanted to. That’s what dreaming is—it’s wanting to get back up, no matter how many times you fall.”&lt;&#x2F;p&gt;
&lt;p&gt;He looked at me then, his eyes meeting mine for the first time. They were sharp, narrowed with defiance, but I saw the cracks beneath—softer, quieter things he didn’t know how to hide. His foot shifted closer to the edge of the platform. For a fleeting moment, I thought he might step forward, might take that final step onto the train.&lt;&#x2F;p&gt;
&lt;p&gt;But he stopped, his hesitation palpable. Relief flickered in me, unbidden and faint, but it was swallowed by something darker, something hotter—a feeling that burned in my chest and curled in my throat.&lt;&#x2F;p&gt;
&lt;p&gt;Anger.&lt;&#x2F;p&gt;
&lt;p&gt;He was still standing there, hesitant, like stepping onto the train would mean conceding some unseen battle. As if this whole situation wasn’t already a loss. That hesitation, that fragile indecision, cracked something open in me—a heat I’d been swallowing for too long, waiting for the right words that never came.&lt;&#x2F;p&gt;
&lt;p&gt;“You think I’m proud of this?” I snapped, the words spilling out sharper than I intended. “You think I wanted us to be here, stuck in this goddamn system, fighting for scraps, waiting for trains that don’t even come on time?”&lt;&#x2F;p&gt;
&lt;p&gt;His head jerked up, startled. For a moment, he looked small, fragile even. But the fire in my chest didn’t care.&lt;&#x2F;p&gt;
&lt;p&gt;“I’m angry too,” I said, my voice rising. “I’m furious that we had to fight so hard just to stand in this place, on this platform, waiting for something we were told was already ours. I’m angry that I had to spend my entire life dreaming of a world where you wouldn’t have to feel this way—scared, stuck, uncertain.”&lt;&#x2F;p&gt;
&lt;p&gt;He stared at me, wide-eyed, his hands stilling in his pockets. The platform was silent except for the distant rumble of another train somewhere far away.&lt;&#x2F;p&gt;
&lt;p&gt;“I’m mad because you don’t deserve this. I didn’t deserve this. And no matter how hard I’ve worked, how much I’ve dreamed, it feels like I’ve spent every moment since you existed just trying to make the world a little less cruel for you. But here we are.”&lt;&#x2F;p&gt;
&lt;p&gt;He didn’t say anything, but something shifted in his gaze. The sharpness softened, replaced by something quieter, something that made him seem older and younger all at once. His fingers curled and uncurled in slow, deliberate movements, like he was holding and releasing the weight of my words.&lt;&#x2F;p&gt;
&lt;p&gt;“I’ve carried your fear, your hopes, your goddamn weight for years,” I said, quieter now but no less fierce. “I’ve fallen, I’ve failed, and I’ve bled to make something better for us. And you know what?” I leaned forward, my reflection in the window merging with his face. “It still might not be enough. That’s the hardest part. I might not ever be enough.”&lt;&#x2F;p&gt;
&lt;p&gt;The admission hung in the air, uncomfortably honest, but it didn’t feel as heavy as I thought it would. I leaned back, staring into the tunnel ahead, letting the stillness settle over me.&lt;&#x2F;p&gt;
&lt;p&gt;“I’m not proud of this,” I said, the edge of my voice softening. “But I’m still here. I’m still standing. I’m still dreaming, even when I’m mad at the world for making us fight this hard just to be seen. I dream because it’s all I’ve got, and because you deserve better. So yeah, I’m angry. But I’m not done. Not for you, not for me.”&lt;&#x2F;p&gt;
&lt;p&gt;He didn’t move right away, but something in his posture shifted. His shoulders relaxed just slightly, the tension in his frame melting into something more hesitant, more open. His hands slipped out of his hoodie pocket, resting at his sides like he was finally ready to stop bracing himself.&lt;&#x2F;p&gt;
&lt;p&gt;“Come on,” I said, even quieter now, my voice losing its edge. “Get on the train. It’s not about where it’s going. It’s about not staying here.”&lt;&#x2F;p&gt;
&lt;p&gt;He hesitated, staring down at the narrow gap between the platform and the train. His foot hovered for a moment, trembling like the whole world was balanced on the edge of that decision. Then he stepped forward. And then again. Slowly, almost reluctantly, he crossed the threshold and sat down across from me, his movements stiff and uncertain.&lt;&#x2F;p&gt;
&lt;p&gt;For a moment, neither of us spoke. The train jolted forward, its lights flickering as the platform slid into darkness behind us. He leaned back against the seat, his eyes fixed on the streaking tunnel walls outside. I noticed the way his lips quirked, just faintly—almost a smile.&lt;&#x2F;p&gt;
&lt;p&gt;And for the first time in what felt like years, I smiled back.&lt;&#x2F;p&gt;
&lt;p&gt;The anger still sat with me, low and simmering. I doubted it would ever leave. How could it? It wasn’t just anger at the world or the circumstances that had shaped us—it was anger at myself. At how long I’d spent fighting, clawing, and falling, only to end up here, still searching for stability, still carrying his weight.&lt;&#x2F;p&gt;
&lt;p&gt;But as I looked at him—at the boy I used to be, the boy I still carried in so many ways—I realized something: that anger, that weight, it was what drove me. It was why I kept getting back up, even after every failure, every broken dream. I was still living for him, and maybe I always would be.&lt;&#x2F;p&gt;
&lt;p&gt;And yet, for the first time, I didn’t resent it.&lt;&#x2F;p&gt;
&lt;p&gt;Because that drive, that weight—it wasn’t just his. It was mine. It was about learning to carry it, to move forward step by step, even when the tracks ahead were nothing but shadows and questions.&lt;&#x2F;p&gt;
&lt;p&gt;The train’s rhythm steadied, a quiet pulse beneath us. He looked up, his lips curving into the smallest of smiles—uncertain, but real.&lt;&#x2F;p&gt;
&lt;p&gt;“You think we’ll make it?” he asked, his voice barely louder than the hum of the wheels.&lt;&#x2F;p&gt;
&lt;p&gt;I held his gaze for a moment, then let out a breath I didn’t realize I was holding. “I don’t know,” I said, my own smile breaking through, soft but sure. “But maybe not knowing is part of it.”&lt;&#x2F;p&gt;
&lt;p&gt;The tunnel stretched ahead, its darkness yielding to the faint, flickering glow of the next station in the distance.
And together, we moved forward.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-reasonable-man&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-reasonable-man&quot; aria-label=&quot;Anchor link for: the-reasonable-man&quot;&gt;The Reasonable Man&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Thomas had always considered himself a rational person. Then he got cursed with extreme reasonableness.&lt;&#x2F;p&gt;
&lt;p&gt;It started innocently enough, during a perfectly normal Tuesday lunch break when Kurt Gödel materialized beside his sandwich. Not a flesh-and-blood Gödel, mind you, but a shimmering, mathematical apparition composed entirely of logical symbols and set theory notation.&lt;&#x2F;p&gt;
&lt;p&gt;“Congratulations,” the spectral Gödel announced, adjusting his incorporeal glasses. “You’ve been chosen to bear the burden of ultimate reasonableness. Have fun with that.” Then he vanished, leaving behind only the faint scent of chalk dust and broken axioms.&lt;&#x2F;p&gt;
&lt;p&gt;At first, Thomas didn’t notice anything different. But then the affliction began to manifest.&lt;&#x2F;p&gt;
&lt;p&gt;He found himself unable to get angry at traffic jams because he kept considering the complex systems of urban planning and the reasonable limitations of infrastructure development. Road rage became road mild-understanding.&lt;&#x2F;p&gt;
&lt;p&gt;During arguments, he’d stop mid-sentence to acknowledge valid points in his opponent’s reasoning. His girlfriend broke up with him after he spent three hours explaining why her frustration with his emotional unavailability was “logically sound given the predetermined axioms of romantic expectations in contemporary society.”&lt;&#x2F;p&gt;
&lt;p&gt;The real crisis came during a mathematics lecture when he raised his hand and asked, “But why base 10? Isn’t it arbitrary? Couldn’t we just as reasonably use base 12? Or base π? Is anything real?”&lt;&#x2F;p&gt;
&lt;p&gt;Gödel appeared again that night, floating above Thomas’s bed while he tried to sleep.&lt;&#x2F;p&gt;
&lt;p&gt;“How’s the reasonable life treating you?” the apparition asked, smirking.&lt;&#x2F;p&gt;
&lt;p&gt;“Well,” Thomas began, sitting up, “it’s both optimal and suboptimal, depending on one’s chosen metric for evaluation. Though of course, the very concept of metrics is inherently subjective, built upon arbitrary foundations of measurement that we’ve collectively agreed upon through social contract, which itself is a construct based on…”&lt;&#x2F;p&gt;
&lt;p&gt;“Yes, yes,” Gödel interrupted, “you’re getting it. Keep going.”&lt;&#x2F;p&gt;
&lt;p&gt;The next week was a descent into deeper realizations. Thomas spent three hours in the grocery store, paralyzed by the reasonable arguments for and against each breakfast cereal. He wrote a 47-page proof explaining why his preference for chocolate over vanilla was simultaneously valid and invalid based on different sets of axioms.&lt;&#x2F;p&gt;
&lt;p&gt;His coworkers found him in the break room, surrounded by coffee cups, muttering about how the concept of a “coffee break” was a social construct built on arbitrary divisions of time, and really, wasn’t time itself just another axiom we’d chosen to believe in?&lt;&#x2F;p&gt;
&lt;p&gt;Gödel’s appearances became more frequent. He’d show up in mirrors, in puddles, once as a particularly mathematical-looking cloud.&lt;&#x2F;p&gt;
&lt;p&gt;“Having fun yet?” he’d ask, while Thomas hyperventilated over the inherent incompleteness of his tax returns.&lt;&#x2F;p&gt;
&lt;p&gt;The breaking point came during a dinner date (with someone who hadn’t yet heard about the cereal incident). Thomas spent two hours explaining why the restaurant’s rating system was based on subjective value judgments that couldn’t be proven consistent within their own system.&lt;&#x2F;p&gt;
&lt;p&gt;“But that’s perfectly reasonable,” he insisted to his fleeing date’s back. “Just like how the Axiom of Choice is both consistent and independent of ZFC! Wait, come back! I can prove it using a well-ordered set of relationship definitions!”&lt;&#x2F;p&gt;
&lt;p&gt;That night, Gödel found Thomas sitting in his kitchen, surrounded by textbooks, empty coffee cups, and scattered notes covered in increasingly desperate attempts to prove that anything at all was objectively true.&lt;&#x2F;p&gt;
&lt;p&gt;“Ready to understand the joke?” Gödel asked, perching on a stack of philosophy books.&lt;&#x2F;p&gt;
&lt;p&gt;“There is no objective truth, is there?” Thomas whispered. “It’s all just different sets of assumptions leading to different kinds of reasonable conclusions. Even this conversation could be reasonably interpreted multiple ways depending on our chosen axioms of reality.”&lt;&#x2F;p&gt;
&lt;p&gt;“Now you’re getting it!” Gödel beamed. “Isn’t it wonderful?”&lt;&#x2F;p&gt;
&lt;p&gt;Thomas started laughing. Then crying. Then both at once, which was perfectly reasonable given the circumstances.&lt;&#x2F;p&gt;
&lt;p&gt;“So what do I do now?” he asked, wiping his eyes. “How do I live in a world where everything is simultaneously reasonable and unreasonable?”&lt;&#x2F;p&gt;
&lt;p&gt;Gödel shrugged, his form flickering like a faulty mathematical projection. “Same way everyone else does. Pick your axioms, live with the inconsistencies, and try not to think too hard about why we use base 10.”&lt;&#x2F;p&gt;
&lt;p&gt;“That’s… that’s not very reasonable,” Thomas protested.&lt;&#x2F;p&gt;
&lt;p&gt;“Exactly!” Gödel exclaimed. “Now you’re really getting it!”&lt;&#x2F;p&gt;
&lt;p&gt;And with that, he vanished, leaving Thomas alone with his reasonable confusion, which was, all things considered, the only reasonable response to an unreasonable universe.&lt;&#x2F;p&gt;
&lt;p&gt;Thomas still has his extreme reasonableness, but he’s learning to live with it. These days, he only spends an average of 45 minutes choosing breakfast cereal, and he’s almost convinced himself that it’s okay to prefer chocolate for no logically rigorous reason.&lt;&#x2F;p&gt;
&lt;p&gt;Sometimes, late at night, he swears he can hear Gödel laughing. But then again, that’s just one reasonable interpretation of many possible sound wave phenomena, isn’t it?&lt;&#x2F;p&gt;
&lt;h2 id=&quot;opposite-ends-of-the-spectrum&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#opposite-ends-of-the-spectrum&quot; aria-label=&quot;Anchor link for: opposite-ends-of-the-spectrum&quot;&gt;Opposite Ends of the Spectrum&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;If there’s a spectrum of happiness, I’m pretty sure I’m on one extreme: the wide-eyed, goofy, relentlessly optimistic quokka. The kind of creature that smiles at every shadow, assuming it’s a friend. And her? She’s the viscacha—calm, serious, with that perpetual frown that seems to carry the weight of ancient wisdom. She doesn’t believe in frivolous smiles or fleeting joys; she believes in caution, in stillness, in thinking twice.&lt;&#x2F;p&gt;
&lt;p&gt;We met in a world that wasn’t quite hers or mine. Somewhere between my sunlit, carefree fields and her rocky, contemplative cliffs. She looked at me like I was a joke. I looked at her like she was a puzzle I wanted to solve.&lt;&#x2F;p&gt;
&lt;p&gt;“You can’t just… smile all the time,” she said one day, watching me scurry around, making the most out of nothing. “It’s exhausting just to look at you.”&lt;&#x2F;p&gt;
&lt;p&gt;“And you can’t just frown forever,” I replied, hopping closer. “How do you even enjoy the world if you keep your head down so much?”&lt;&#x2F;p&gt;
&lt;p&gt;For a while, we were stuck in our corners of the spectrum. She would sit in the shade, arms crossed, watching as I tried to turn every moment into an adventure. I would try to pull her out of her stillness, only to be met with her exasperated sighs. It felt impossible—how could we ever compromise when we were made so differently?&lt;&#x2F;p&gt;
&lt;p&gt;But slowly, we began to meet in the middle.&lt;&#x2F;p&gt;
&lt;p&gt;She taught me the beauty of quiet moments. How not every second has to be filled with action, that some joys are found in stillness. We’d sit together on her favorite rock, overlooking a world that seemed a little less chaotic when we were side by side.&lt;&#x2F;p&gt;
&lt;p&gt;And I taught her to loosen up. That it’s okay to chase sunbeams and let your guard down every now and then. She even smiled once—a small, fleeting thing, but I swear it lit up the cliffs.&lt;&#x2F;p&gt;
&lt;p&gt;We didn’t change completely. I still smile at shadows, and she still sighs at my antics. But somewhere along the way, we found a rhythm that worked. Her grounded nature anchored my energy, and my optimism softened her edges.&lt;&#x2F;p&gt;
&lt;p&gt;We weren’t the same. We didn’t need to be. We were the quokka and the viscacha—opposite ends of the happiness spectrum, somehow meeting in the middle.&lt;&#x2F;p&gt;
&lt;p&gt;And it worked. It really worked.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;unfinished-sketches&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#unfinished-sketches&quot; aria-label=&quot;Anchor link for: unfinished-sketches&quot;&gt;Unfinished Sketches&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The kitchen table trembles as I write, each equation bleeding through the thin paper onto the wood beneath. It’s 3 AM, and the house breathes with the quiet rhythm of my sleeping family. The margin of my daughter’s math homework has become my blackboard – careful not to obscure her own neat calculations, I’ve filled every empty space with fragments of quantum mechanics, trying to understand how light bends and time flows.&lt;&#x2F;p&gt;
&lt;p&gt;My son’s cough echoes from down the hall. I pause, pen hovering over half-finished derivations, listening for the pattern I’ve memorized: three sharp coughs means his asthma is flaring, four means I need to ready the nebulizer. Two coughs, then silence. He settles back to sleep, and I return to my stolen education.&lt;&#x2F;p&gt;
&lt;p&gt;The kitchen walls are a patchwork of my obsessions. Between the calendar of doctor’s appointments and school events, I’ve pinned diagrams of flying machines sketched on the backs of past-due notices. Next to the grocery list hangs a study of muscle mechanics, drawn while waiting at the pharmacy for my wife’s medication. The refrigerator holds my daughter’s artwork alongside my attempts to decode the mathematics of beauty – the golden ratio found in her crooked smile, the fractal patterns in the way her hair curls.&lt;&#x2F;p&gt;
&lt;p&gt;During my lunch breaks at the warehouse, I read. Today it’s a worn copy of da Vinci’s notebooks, rescued from the library’s discard pile. My coworkers joke about it – call me “Professor” as they pass by. They don’t understand why anyone would choose to spend their precious thirty minutes studying the flight patterns of birds or the flow of blood through the heart. But in those pages, I see myself – or rather, who I could have been. A universal mind. A Renaissance soul trapped in the machinery of necessity.&lt;&#x2F;p&gt;
&lt;p&gt;At night, after the dishes are done and homework is checked, I sometimes allow myself to dream. I imagine my name in academic journals, my designs changing the world, my understanding of the universe expanding beyond these cramped kitchen walls. The possibilities unfold like infinite reflections in parallel mirrors – each one perfect, pristine, and permanently out of reach.&lt;&#x2F;p&gt;
&lt;p&gt;“Daddy?”&lt;&#x2F;p&gt;
&lt;p&gt;My daughter stands in the doorway, blanket clutched to her chest. The clock reads 3:47 AM.&lt;&#x2F;p&gt;
&lt;p&gt;“What are you doing?”&lt;&#x2F;p&gt;
&lt;p&gt;“Just some work, sweetheart.” I close the notebook, sliding it under bills I need to sort tomorrow. “Bad dream?”&lt;&#x2F;p&gt;
&lt;p&gt;She nods, and I open my arms. She climbs into my lap, small and warm and real, while Leonardo’s sketches peek out from beneath the overdue electric bill. Her breathing slows as I hold her, and I feel the weight of her trust – heavier than any textbook, more complex than any equation.&lt;&#x2F;p&gt;
&lt;p&gt;The next morning, I receive an email from the online physics course I’ve been taking. My latest paper on theoretical quantum mechanics has caught the professor’s attention. He wants to discuss my ideas, mentions words like “potential” and “extraordinary insight.” He suggests I consider applying to their graduate program.&lt;&#x2F;p&gt;
&lt;p&gt;I read the email three times during my break, then delete it.&lt;&#x2F;p&gt;
&lt;p&gt;That night, my wife falls asleep on the couch waiting for me to finish my “studies.” I cover her with a blanket, noting how the shadows under her eyes have deepened since she took the second job. On the coffee table, her nursing school application sits half-completed. She’s put it off three years now, always saying my dreams should come first because “you’re the genius in the family.”&lt;&#x2F;p&gt;
&lt;p&gt;I stand in our dark living room, surrounded by the ghosts of unfinished ideas. They hover in the shadows – perpetual motion machines, revolutionary algorithms, philosophical treatises. Each one a road not taken, a universe unexplored. My mind races with possibilities, with the burning certainty that I could solve these puzzles if only I had time, if only I had resources, if only, if only…&lt;&#x2F;p&gt;
&lt;p&gt;My son’s inhaler needs to be refilled next week. My daughter’s school shoes are wearing thin. The car makes a sound that means expensive repairs are coming. Each necessity is a door closing, each responsibility a weight anchoring me to earth while my mind strains toward the stars.&lt;&#x2F;p&gt;
&lt;p&gt;I gather my notebooks – physics, engineering, philosophy, art – and stack them neatly in a box. My hands shake as I close the lid, but my heart is steady. The truth is, I’ve always known this choice was coming. The world is full of undiscovered brilliance, potential locked away by circumstance. History only remembers the geniuses who had the luxury of time, the freedom to pursue their obsessions to their natural conclusions.&lt;&#x2F;p&gt;
&lt;p&gt;I am not Leonardo. I will never be Einstein. My theorems will remain unproven, my inventions unbuilt, my understanding of the universe fragmentary and incomplete. But my children will be fed. My wife will finally apply to nursing school. Our home will be warm in winter.&lt;&#x2F;p&gt;
&lt;p&gt;That night, I dream of flying machines and unified theories. But when I wake, I make breakfast, pack lunches, kiss foreheads, and drive to the warehouse. My mind still soars with questions about light and time and the architecture of reality. But my love is anchored here, in the solid world of small needs and vital necessities.&lt;&#x2F;p&gt;
&lt;p&gt;Sometimes, on my lunch breaks, I still read. But now I keep my notes in my head, let my dreams live in the spaces between breaths. The universe whispers its secrets, and I listen, even though I can no longer answer back. Perhaps that’s enough – to know that I could have soared, but chose instead to build a nest, to shelter the dreams of those who depend on me.&lt;&#x2F;p&gt;
&lt;p&gt;After all, some forms of genius lie in the choices we make, in knowing when to fold our paper wings and walk the solid earth. There’s a different kind of renaissance in learning to live with the weight of unrealized potential, in finding grace in the gap between what we could become and what we choose to be.&lt;&#x2F;p&gt;
&lt;p&gt;Tonight, I will help my daughter with her math homework. And if she asks me about the stars, I will tell her everything I know, and then I will tell her to fly higher than I ever could.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;notes-from-a-thursday-night&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#notes-from-a-thursday-night&quot; aria-label=&quot;Anchor link for: notes-from-a-thursday-night&quot;&gt;Notes from a Thursday Night&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I sit here, cross-legged on unwashed sheets,&lt;br &#x2F;&gt;
surrounded by textbooks I pretend to read.&lt;br &#x2F;&gt;
Another night of almost-understanding,&lt;br &#x2F;&gt;
of reaching for thoughts that slip like smoke&lt;br &#x2F;&gt;
through fingers too clumsy to catch them.&lt;&#x2F;p&gt;
&lt;p&gt;They say college is where minds catch fire.&lt;br &#x2F;&gt;
Mine just smolders, giving off toxic fumes&lt;br &#x2F;&gt;
that smell like yesterday’s coffee&lt;br &#x2F;&gt;
and tomorrow’s disappointment.&lt;br &#x2F;&gt;
(God, I’m so tired of disappointing.)&lt;&#x2F;p&gt;
&lt;p&gt;My roommate’s out again, living what they call&lt;br &#x2F;&gt;
“the best years of our lives” while I&lt;br &#x2F;&gt;
conjugate verbs in languages I’ll never speak,&lt;br &#x2F;&gt;
memorize formulas I’ll never use,&lt;br &#x2F;&gt;
chase dreams I’ll never catch.&lt;&#x2F;p&gt;
&lt;p&gt;The library closes in twenty minutes.&lt;br &#x2F;&gt;
I should go – pretend I belong among&lt;br &#x2F;&gt;
the bright ones, the quick ones,&lt;br &#x2F;&gt;
those who understand on first reading,&lt;br &#x2F;&gt;
who raise their hands without their hearts racing.&lt;&#x2F;p&gt;
&lt;p&gt;Instead, I stare at my reflection&lt;br &#x2F;&gt;
in a laptop screen gone dark,&lt;br &#x2F;&gt;
counting the hours until dawn,&lt;br &#x2F;&gt;
adding them to the collection&lt;br &#x2F;&gt;
of nights I’ve wasted being almost-good.&lt;&#x2F;p&gt;
&lt;p&gt;My father calls these growing pains.&lt;br &#x2F;&gt;
(He means well, they all mean well.)&lt;br &#x2F;&gt;
But what grows in these fluorescent hours&lt;br &#x2F;&gt;
besides the stack of half-filled notebooks&lt;br &#x2F;&gt;
and the weight of what I cannot grasp?&lt;&#x2F;p&gt;
&lt;p&gt;Sometimes I think I feel it coming –&lt;br &#x2F;&gt;
that moment when it all makes sense,&lt;br &#x2F;&gt;
when the fog lifts and reveals&lt;br &#x2F;&gt;
the person I’m supposed to be.&lt;br &#x2F;&gt;
But it’s just another false dawn.&lt;&#x2F;p&gt;
&lt;p&gt;The group chat buzzes with plans:&lt;br &#x2F;&gt;
Friday nights and future dreams.&lt;br &#x2F;&gt;
I type “maybe next time” with practiced ease,&lt;br &#x2F;&gt;
then return to these pages&lt;br &#x2F;&gt;
that refuse to yield their secrets.&lt;&#x2F;p&gt;
&lt;p&gt;My high school valedictorian speech&lt;br &#x2F;&gt;
sits in a drawer somewhere, yellowing,&lt;br &#x2F;&gt;
full of promises about potential&lt;br &#x2F;&gt;
and the future’s bright horizon.&lt;br &#x2F;&gt;
(God, we were all so young.)&lt;&#x2F;p&gt;
&lt;p&gt;Now I’m here, three years deep&lt;br &#x2F;&gt;
in a game I don’t know how to win,&lt;br &#x2F;&gt;
watching others soar past&lt;br &#x2F;&gt;
while I remain earthbound,&lt;br &#x2F;&gt;
heavy with the weight of mediocrity.&lt;&#x2F;p&gt;
&lt;p&gt;But still I sit, and still I try,&lt;br &#x2F;&gt;
and still I fill these margins&lt;br &#x2F;&gt;
with desperate annotations,&lt;br &#x2F;&gt;
as if understanding might come&lt;br &#x2F;&gt;
through sheer stubborn repetition.&lt;&#x2F;p&gt;
&lt;p&gt;Tomorrow I’ll smile in class,&lt;br &#x2F;&gt;
nod at all the right moments,&lt;br &#x2F;&gt;
pretend I’m keeping pace.&lt;br &#x2F;&gt;
Tonight, I’ll sit with my failure,&lt;br &#x2F;&gt;
let it teach me what it will.&lt;&#x2F;p&gt;
&lt;p&gt;Maybe that’s all I’ll ever be:&lt;br &#x2F;&gt;
The one who tried too hard&lt;br &#x2F;&gt;
to be what others are by nature.&lt;br &#x2F;&gt;
The one who loved the dream&lt;br &#x2F;&gt;
enough to bear the waking.&lt;&#x2F;p&gt;
&lt;p&gt;So here’s to another night&lt;br &#x2F;&gt;
of almost-understanding,&lt;br &#x2F;&gt;
of reaching for thoughts that slip away,&lt;br &#x2F;&gt;
of being less than I should be,&lt;br &#x2F;&gt;
but more than I was yesterday.&lt;&#x2F;p&gt;
&lt;p&gt;The library’s closed now.&lt;br &#x2F;&gt;
My coffee’s gone cold.&lt;br &#x2F;&gt;
The words still swim before my eyes,&lt;br &#x2F;&gt;
but I remain here, drowning slowly,&lt;br &#x2F;&gt;
in the beauty of the trying.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Braille, Dyscalculia, and Mathematics: How?</title>
          <pubDate>Tue, 31 Dec 2024 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/braille-math/</link>
          <guid>https://seniormars.com/posts/braille-math/</guid>
          <description xml:base="https://seniormars.com/posts/braille-math/">&lt;h1 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Yes, I am a math major, and yes, I am a linguistics major. I know what you’re thinking: “Of course, he is into category theory and formal languages because of this 🙄.” Wrong. I am into those things, but that’s just because I’m a “nerd”™ not because of my majors. The truth is I like Math because [too long to explain here], and I like Linguistics because [also too long to explain here], yet I never thought about the obvious intersection until I took a course on Braille at my university.&lt;&#x2F;p&gt;
&lt;p&gt;“Ling 327: Research on Braille” transformed my understanding of writing systems, disabilities, and most importantly, how we encode mathematical meaning. What began as a fascinating exploration of a tactile writing system evolved into a profound questioning of how we represent abstract mathematical concepts. The class didn’t just teach me about Braille – it challenged my fundamental assumptions about notation systems and accessibility in mathematics (this blog is, in part, an excuse to share that rabbit hole with you).&lt;&#x2F;p&gt;
&lt;p&gt;I should note upfront: this isn’t your typical academic exposition. While I’ve written a formal research proposal on being multipled disabilities, tactile systems, and mathematics for my final paper, this blog aims to be something different. Consider it a journey through the questions that kept me awake at night, the unexpected connections I discovered, and the sobering realizations about accessibility in mathematical education.&lt;&#x2F;p&gt;
&lt;p&gt;A disclaimer: I’m still learning Grade 2 Braille (don’t worry, we’ll get to what that means), and I make no claims to expertise. Instead, I offer perspective as someone straddling two worlds – the abstract realm of mathematics and the structured landscape of linguistics – discovering how they converge in unexpected ways through Braille. My hope is that by sharing these insights and questions, we can spark a broader conversation about how we represent and teach mathematics across different modalities.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;I have tried my best to make this blog accessible to all readers, including those who are blind or visually impaired. If you encounter any issues with accessibility, please let me know so I can address them.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h1 id=&quot;braille-a-brief-introduction&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#braille-a-brief-introduction&quot; aria-label=&quot;Anchor link for: braille-a-brief-introduction&quot;&gt;Braille: A Brief Introduction&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;If you’ve ever run your fingers across Braille text, you’ve encountered one of humanity’s most ingenious writing systems. But calling Braille merely a “translation” of print does it a disservice – it’s a fully realized tactile representation of language, as distinct from print English as cursive is from typeface. Like any writing system, Braille has evolved to meet the needs of its users, developing its own conventions, shortcuts, and solutions to linguistic challenges.&lt;&#x2F;p&gt;
&lt;p&gt;At its core, Braille consists of cells – small rectangular units containing up to six raised dots arranged in two columns of three. These dots, through various combinations, can represent letters, numbers, punctuation marks, and even entire words.&lt;&#x2F;p&gt;
&lt;p&gt;Below is a visual representation of the basic Braille alphabet:&lt;&#x2F;p&gt;
&lt;img src=&quot;basic_letters.png&quot; alt=&quot;Braille english letters from wikipeida&quot; width=&quot;1444&quot; height=&quot;848&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;But what makes Braille fascinating isn’t just its tactile nature – it’s how it has evolved into different grades of complexity to serve different needs.&lt;&#x2F;p&gt;
&lt;p&gt;Grade 1 Braille is what most people envision: a one-to-one representation of letters and numbers. Each letter corresponds to a specific dot pattern, making it ideal for beginners or materials requiring exact spelling, like dictionaries. Grade 2 Braille introduces contractions – symbols that represent common letter combinations or whole words. Imagine an entire system of abbreviations akin to how “&amp;amp;” represents “and” in print. The word “the,” for example, is reduced to a single character, enhancing reading speed and efficiency. For personal notes and shorthand, there is Grade 3 Braille, a more abbreviated form used informally.&lt;&#x2F;p&gt;
&lt;p&gt;It’s important to note that Braille isn’t exclusively for those with total vision loss. Legal blindness, defined as visual acuity of 20&#x2F;200 or worse in the better-seeing eye with correction or a visual field of 20 degrees or less, affects individuals across a spectrum of visual abilities. Many legally blind people can perceive shapes, light, or read large print, and Braille remains a vital tool for literacy.&lt;&#x2F;p&gt;
&lt;p&gt;The digital age has expanded Braille’s accessibility. Refreshable Braille displays, online tutorials, and Braille translation software have made learning and using Braille more convenient. This shift has democratized Braille education, allowing broader access beyond specialized instruction.&lt;&#x2F;p&gt;
&lt;p&gt;Ultimately, Braille stands as a testament to human ingenuity, demonstrating how language can transcend sight. While print English relies on visual spacing and layout, Braille translates the same information into a form accessible by touch. It is not just a writing system – it’s a bridge that ensures literacy and communication for all.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;how-do-you-do-math-in-braille&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#how-do-you-do-math-in-braille&quot; aria-label=&quot;Anchor link for: how-do-you-do-math-in-braille&quot;&gt;How Do You Do Math in Braille?&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Mathematics in Braille is where language meets logic – where theoretical elegance confronts practical necessity. If you thought reading math in print was challenging, imagine transforming the spatial dance of equations into linear patterns of raised dots. This fundamental challenge birthed two remarkable systems: Nemeth Code and Unified English Braille (UEB) technical notation, each representing different philosophies about how mathematical concepts should be touched, read, and understood.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;nemeth-code-a-system-born-from-necessity&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#nemeth-code-a-system-born-from-necessity&quot; aria-label=&quot;Anchor link for: nemeth-code-a-system-born-from-necessity&quot;&gt;Nemeth Code: A System Born from Necessity&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Nemeth Code, developed by Dr. Abraham Nemeth in 1952, revolutionized how blind and visually impaired individuals engage with mathematics. As a blind mathematician frustrated by the inadequacies of existing Braille systems for higher math, Nemeth designed a code that could represent everything from simple arithmetic to advanced calculus.&lt;&#x2F;p&gt;
&lt;p&gt;Nemeth’s brilliance lies in how it repurposes the lower part of the Braille cell to represent numbers and mathematical symbols. This makes numbers immediately distinguishable from letters, akin to having a dedicated “math mode” in LaTeX. For instance, the digit “5” and the letter “e” might share the same dot pattern, but context and specific rules ensure no confusion. This compact and efficient system allows for clearer, more streamlined representations of complex expressions.&lt;&#x2F;p&gt;
&lt;p&gt;Here are some examples of Nemeth Code in action:&lt;&#x2F;p&gt;
&lt;img src=&quot;.&#x2F;newmeth_example0.png&quot; alt=&quot;Newman example&quot; width=&quot;1196&quot; height=&quot;886&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;newman_example1.png&quot; alt=&quot;Another Newman example&quot; width=&quot;784&quot; height=&quot;402&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h2 id=&quot;unified-english-braille-ueb-the-all-in-one-approach&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#unified-english-braille-ueb-the-all-in-one-approach&quot; aria-label=&quot;Anchor link for: unified-english-braille-ueb-the-all-in-one-approach&quot;&gt;Unified English Braille (UEB): The All-in-One Approach&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;UEB, adopted officially in the United States in 2016, strives to standardize Braille across all contexts – including literature, science, and mathematics. UEB technical notation integrates math within the general Braille code, avoiding the need to switch between different systems (like literary Braille and Nemeth). However, this comes at a cost: UEB often requires more cells to represent mathematical expressions.&lt;&#x2F;p&gt;
&lt;p&gt;Consider a basic equation like (2 + 2 = 4). In UEB, each operator (like “+” and “=”) typically takes two cells to convey, whereas Nemeth can express the same equation more compactly. UEB prioritizes consistency over efficiency, making it more intuitive for individuals who prefer seamless transitions between math and text.&lt;&#x2F;p&gt;
&lt;img src=&quot;.&#x2F;ueb_example0.png&quot; alt=&quot;UEB Example&quot; width=&quot;1392&quot; height=&quot;752&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;ueb2.png&quot; alt=&quot;Another UEB Example&quot; width=&quot;1168&quot; height=&quot;1480&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h2 id=&quot;the-u-s-approach-a-dual-system-landscape&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-u-s-approach-a-dual-system-landscape&quot; aria-label=&quot;Anchor link for: the-u-s-approach-a-dual-system-landscape&quot;&gt;The U.S. Approach: A Dual-System Landscape&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;In the United States, students are not strictly bound to one system. Educational institutions often let students and educators choose between Nemeth and UEB, depending on factors such as:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;The student’s prior exposure to Braille math systems.&lt;&#x2F;li&gt;
&lt;li&gt;Academic aspirations (Nemeth is generally preferred for advanced STEM fields).&lt;&#x2F;li&gt;
&lt;li&gt;Instructional resources available in each code.&lt;&#x2F;li&gt;
&lt;li&gt;Cognitive and learning preferences of the student.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Think of it like programming languages: Nemeth is Python – concise, specialized, and efficient for math-heavy environments. UEB, on the other hand, is Java – verbose but consistent, allowing integration across different domains.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;handling-spatial-relationships-in-braille-math&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#handling-spatial-relationships-in-braille-math&quot; aria-label=&quot;Anchor link for: handling-spatial-relationships-in-braille-math&quot;&gt;Handling Spatial Relationships in Braille Math&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;One of the most remarkable challenges in Braille math is conveying spatial relationships. In print, superscripts, subscripts, and fractions are visually obvious. Braille, being linear, can’t rely on visual positioning. Instead, both Nemeth and UEB use special markers and indicators to show spatial concepts.&lt;&#x2F;p&gt;
&lt;p&gt;For example:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Fractions are denoted by opening and closing symbols, much like parentheses in programming, clearly outlining the numerator and denominator.&lt;&#x2F;li&gt;
&lt;li&gt;Superscripts and subscripts are indicated by specific prefix symbols that “shift” the reader into a different context temporarily.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;This ensures that mathematical structure isn’t lost – a crucial aspect of learning math tactilely.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-choice-a-story-of-trade-offs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-choice-a-story-of-trade-offs&quot; aria-label=&quot;Anchor link for: the-choice-a-story-of-trade-offs&quot;&gt;The Choice: A Story of Trade-offs&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The existence of both systems in the U.S. isn’t just about providing options – it’s about recognizing the deeply personal nature of mathematical understanding. Some students thrive with Nemeth’s efficient specialization, while others prefer UEB’s consistent approach across all subjects. This choice mirrors broader debates in education about specialization versus integration, efficiency versus accessibility.&lt;&#x2F;p&gt;
&lt;p&gt;What makes this narrative particularly compelling is how it challenges our assumptions about mathematical notation. For sighted readers, mathematical symbols are visual shortcuts, but in Braille, they become tactile pathways to understanding. Whether through Nemeth’s elegant efficiency or UEB’s systematic consistency, these codes demonstrate that mathematics isn’t just about what we see – it’s about how we think.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;a-random-segment-math-on-the-web&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-random-segment-math-on-the-web&quot; aria-label=&quot;Anchor link for: a-random-segment-math-on-the-web&quot;&gt;A Random Segment: Math on the Web&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Let’s talk about something that often flies under the radar: how do blind and visually impaired individuals read mathematical equations online? While sighted users enjoy beautifully rendered LaTeX or MathML equations (thanks to tools like MathJax), navigating mathematical content without vision requires an entirely different toolkit.&lt;&#x2F;p&gt;
&lt;p&gt;Take this Type Theory proof tree, for instance:&lt;&#x2F;p&gt;
&lt;p&gt;\begin{prooftree}
\AxiomC{$f : A \rightarrow B$}
\AxiomC{$g : \neg B = B \rightarrow \bot$}
\AxiomC{$x : A$}
\UnaryInfC{$f(x) : B$}
\UnaryInfC{$g(f(x)) : \bot$}
\UnaryInfC{$h : A \rightarrow \bot$}
\BinaryInfC{$h \in \neg A$}
\BinaryInfC{$f \rightarrow g \rightarrow \neg A$}
\end{prooftree}&lt;&#x2F;p&gt;
&lt;p&gt;Or this theorem: &lt;em&gt;Theorem:&lt;&#x2F;em&gt; Let $f: [a, b] \rightarrow \mathbb{R}$ be a continuous function such
that $f(a)$ and $f(b)$ have opposite signs (i.e., $ f(a) \cdot f(b) &amp;lt; 0 $).
Then, there exists a point $ c \in [a, b] $ such that $ f(c) = 0 $.&lt;&#x2F;p&gt;
&lt;p&gt;To a sighted user, this renders as an elegant tree structure, with branches clearly showing logical dependencies. But for a Braille user, this same proof needs to be transformed into a linear sequence of symbols that preserves both the logical structure and the mathematical notation. This is where modern screen readers and specialized tools come into play, each taking a different approach to this complex translation problem.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;mathjax-bridging-the-divide&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mathjax-bridging-the-divide&quot; aria-label=&quot;Anchor link for: mathjax-bridging-the-divide&quot;&gt;MathJax: Bridging the Divide&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;MathJax marks a major leap forward. Known for rendering LaTeX and MathML on web pages, MathJax now supports Braille outputs. This means users can experience equations tactilely or through screen readers, dynamically generating representations in either Nemeth or “Euro”, depending on personal preference.&lt;&#x2F;p&gt;
&lt;p&gt;The flexibility is remarkable – the same equation that appears visually stunning to one user can be explored in tactile form by another. This multimodal approach not only enhances accessibility but also promotes deeper engagement with mathematical content.&lt;&#x2F;p&gt;
&lt;img src=&quot;.&#x2F;mathjax4.png&quot; alt=&quot;MathJax&quot; width=&quot;1448&quot; height=&quot;670&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;mathjax2.png&quot; alt=&quot;Another MathJax&quot; width=&quot;1862&quot; height=&quot;670&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h2 id=&quot;the-role-of-screen-readers-jaws-and-math-navigation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-role-of-screen-readers-jaws-and-math-navigation&quot; aria-label=&quot;Anchor link for: the-role-of-screen-readers-jaws-and-math-navigation&quot;&gt;The Role of Screen Readers: JAWS and Math Navigation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;MathJax isn’t alone in this effort. JAWS (Job Access With Speech), one of the leading screen readers, has developed impressive math capabilities. When encountering equations in Microsoft Word or MathML on web pages, JAWS activates its Math Viewer – essentially an interactive tool that breaks down equations into manageable components.&lt;&#x2F;p&gt;
&lt;p&gt;Users can navigate equations piece by piece using keyboard shortcuts, with tactile feedback via Braille displays. It’s like dissecting an equation step-by-step, mirroring how sighted users might “scan” an equation visually.&lt;&#x2F;p&gt;
&lt;p&gt;Even more exciting is JAWS’s Braille Math Editor. This feature allows users to input equations in Nemeth Braille directly from a Braille display. As they type, the system generates a visual preview for teachers or collaborators, fostering seamless interaction between sighted and visually impaired mathematicians.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;math-isn-t-just-visual-it-s-multimodal&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#math-isn-t-just-visual-it-s-multimodal&quot; aria-label=&quot;Anchor link for: math-isn-t-just-visual-it-s-multimodal&quot;&gt;Math Isn’t Just Visual – It’s Multimodal&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The real significance of these tools extends beyond accessibility. They challenge the assumption that mathematics is inherently visual. When complex spatial relationships (like fractions, superscripts, and matrices) are translated into linear Braille sequences, new insights into mathematical structure and logic emerge.&lt;&#x2F;p&gt;
&lt;p&gt;This shift highlights something profound: mathematics is about relationships and patterns, not just symbols on a page. By adapting to tactile and auditory forms, math becomes a richer, more inclusive experience.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;challenges-ahead&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#challenges-ahead&quot; aria-label=&quot;Anchor link for: challenges-ahead&quot;&gt;Challenges Ahead&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Despite these advancements, barriers persist. Not all online math content is accessible – many equations exist as images or untagged PDFs, which screen readers can’t interpret. Even when MathML is used, improper markup can create stumbling blocks.&lt;&#x2F;p&gt;
&lt;p&gt;Moreover, while tools like MathJax and JAWS excel with structured equations, more esoteric notations or heavily visual mathematical diagrams (like graphs or geometry) remain challenging to translate.&lt;&#x2F;p&gt;
&lt;p&gt;Yet the progress is undeniable. As these technologies evolve, they promise to reshape the landscape of online math education, ensuring that everyone, regardless of visual ability, can explore the beauty and rigor of mathematics.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;latex2nemeth and programming&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;Check this out! &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.tug.org&#x2F;tug2021&#x2F;assets&#x2F;pdf&#x2F;Andreas-Papasalouros-slides.pdf&quot;&gt;latex2nemeth&lt;&#x2F;a&gt;. I geeked out when I found this – it’s a LaTeX package that converts LaTeX math expressions into Nemeth Braille. The fact that someone thought to create this shows the incredible creativity and dedication of the accessibility community.&lt;&#x2F;p&gt;
&lt;p&gt;Also, there is this cool video: &lt;div &gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;iframe&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    src=&amp;quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;embed&#x2F;94swlF55tVc&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    loading=&amp;quot;lazy&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    width=&amp;quot;560&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    height=&amp;quot;315&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    style=&amp;quot;width: 100%; max-width: 100%; aspect-ratio: 16 &#x2F; 9; height: auto;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    webkitallowfullscreen&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    mozallowfullscreen&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    allowfullscreen&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&#x2F;iframe&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;div&gt;
 that shows how a blind programmer...well, programs. It&#x27;s a fascinating look at how someone navigates code without sight, relying on screen readers and Braille displays. It&#x27;s a reminder that accessibility isn&#x27;t just about reading content – it&#x27;s about creating content, too.
    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h1 id=&quot;the-question&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-question&quot; aria-label=&quot;Anchor link for: the-question&quot;&gt;The Question&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Here’s what sent me down this rabbit hole: the intersection of dyscalculia and Braille mathematics. Let me back up a bit—dyscalculia, often oversimplified as “math dyslexia,” is a learning disability that affects the ability to understand and process numerical concepts. Some people seem to inherently “get” numbers, while others wrestle with even basic mathematical relationships. Dyscalculia makes those struggles neurological rather than purely educational.&lt;&#x2F;p&gt;
&lt;p&gt;While taking “Ling 327: Research on Braille,” I stumbled across an idea that wouldn’t let me sleep. We know dyslexia is fundamentally neurological—it persists whether someone reads print or Braille. This hit me like a mathematical proof that just clicks: if dyslexia transcends the medium, what about dyscalculia? And more importantly, what happens when these conditions intersect with visual impairment, creating what researchers term “multiple disabled” conditions?&lt;&#x2F;p&gt;
&lt;p&gt;The academic silence on this is almost poetic in its completeness. There’s extensive research on multiple disabilities in education, yet this intersection—dyscalculia and visual impairment—remains largely unexplored. Dig through papers and databases, and you’ll find studies on visual impairment and learning, or on dyscalculia in sighted learners. But the overlap? It’s a void where understanding should be.&lt;&#x2F;p&gt;
&lt;p&gt;Consider this: reading text, whether in print or Braille, is linear—you follow a path, tracing a thread through space. Mathematics, though, demands more. A fraction isn’t just a string of symbols; it’s a spatial relationship. An equation isn’t merely characters in a line; it’s a choreography of elements arranged in patterns that convey meaning. How does the brain interpret these spatial relationships when they’re translated into linear sequences of raised dots? And what happens when that brain already processes numbers differently?&lt;&#x2F;p&gt;
&lt;p&gt;This isn’t just academic curiosity—it’s about understanding the nuanced interplay of multiple disabilities. If someone experiences both visual impairment and dyscalculia, are they simply dealing with two parallel challenges, or does something more intricate emerge from that intersection? Research on multiple disabilities shows that conditions rarely stack neatly; they interact, creating unique learning needs that can’t be addressed by treating each condition separately.&lt;&#x2F;p&gt;
&lt;p&gt;The implications are profound. Systems like Nemeth and UEB already translate visual mathematics into tactile representations, but have we ever considered how those systems interact with neurodivergent cognition? Could the very tools designed to make math accessible inadvertently pose new obstacles for learners with dyscalculia?&lt;&#x2F;p&gt;
&lt;p&gt;I couldn’t shake these questions. They followed me from the classroom to the library, from research papers to late-night conversations. And maybe that’s exactly what’s needed—not immediate answers, but better questions about how to support learners navigating multiple intersecting disabilities.&lt;&#x2F;p&gt;
&lt;p&gt;The way forward isn’t just about plugging gaps in academic literature—it’s about recognizing that every intersection of disability offers unique insights into how we process and learn mathematics. This exploration might not only aid students with multiple disabilities; it could shift how we fundamentally understand mathematical cognition.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;what-comes-next&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#what-comes-next&quot; aria-label=&quot;Anchor link for: what-comes-next&quot;&gt;What Comes Next?&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;And here we are—at the end of this mathematical journey (or perhaps just the beginning?). I’ve dragged you through the fascinating world of Braille mathematics, down the rabbit hole of multiple disabilities, and into the uncharted territory of dyscalculia in tactile systems. If your head is spinning with questions, welcome to the club – that’s exactly how I felt after that Braille course!&lt;&#x2F;p&gt;
&lt;p&gt;The gap in our understanding of dyscalculia in Braille users isn’t just a research oversight – it’s a call to action. Each unanswered question represents an opportunity to make mathematics more accessible, to deepen our understanding of how the brain processes numerical concepts, and ultimately, to foster more inclusive educational environments.&lt;&#x2F;p&gt;
&lt;p&gt;I hope this exploration has sparked your curiosity as much as it did mine. Whether you’re a mathematician, educator, disability researcher, or just someone who enjoys diving into unexpected intellectual adventures, there’s something profound about discovering these unexplored intersections. They remind us that even in fields as well-studied as mathematics and disability research, mysteries remain—waiting to be unraveled.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>My life&#x27;s mission</title>
          <pubDate>Thu, 27 Jun 2024 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/life-misson/</link>
          <guid>https://seniormars.com/posts/life-misson/</guid>
          <description xml:base="https://seniormars.com/posts/life-misson/">&lt;p&gt;I consider myself lucky; I wasn’t born with many things, but when I needed help, I had people willing to help me. Truthfully, I got to where I currently am due to some luck – that’s a privilege. Unfortunately, some people haven’t been as lucky. Look, I don’t consider myself a brilliant person – and that’s okay because I can keep learning. It’s Okay to be dumb right now, but it’s not Okay to keep being dumb – that’s how I live my life. To understand my goal, you need to know that I love learning. I’m unsure how I ended up like this, but the desire for knowledge drives all my actions. In fact, if possible, I want to be hired by a rich person to be their personal research jester. I would spend my day in their basement, and they would throw me a topic, and I would spend the day researching it (ideally with a wage and a gym, though). Despite what I just said, even if such a job existed, I would never take it because there is something more important to me. See, I don’t think you understand: I &lt;strong&gt;LOVE&lt;&#x2F;strong&gt; learning. This is why I hate, despise, and am tormented when someone doesn’t have the resources to do their best. It fills me with rage that some individuals weren’t lucky enough to write their history-shattering thoughts. Think about it. We had hundreds of years of slavery, discrimination, and even now, suppression of certain groups.&lt;&#x2F;p&gt;
&lt;p&gt;I am filled with rage when I think how many individuals who are deviations smarter than me have existed but ended up killing their passion because they didn’t have time, luck, or the resources needed to succeed. Imagine what kind of books, papers, and projects those individuals would have created. It hurts to think about it, and I refuse to let it happen anymore. I was lucky – I fell into a group currently being oppressed, but I managed to overcome it with luck. But that’s bullshit. Both my parents never completed middle school, and my sisters are way more intelligent than I am, but I was the only one blessed with luck. I refuse any reason to understand why this is the case. Anyone who wants to learn, do their best, or prove themselves should be able to. I want to read and learn from their work, but life prevents them from doing their best. I want to change that. I will ignite change so that education is genuinely seen as a basic need. Please look forward to my work and proving my words.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>An Experienced (Neo)Vimmer&#x27;s Workflow</title>
          <pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/neovim-workflow/</link>
          <guid>https://seniormars.com/posts/neovim-workflow/</guid>
          <description xml:base="https://seniormars.com/posts/neovim-workflow/">&lt;h1 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Ever since &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tjdevries&quot;&gt;TJ&lt;&#x2F;a&gt; said “Personalized Development Environment,” the phrase latched onto me like a cobweb in a mineshaft. A Personalized Development Environment (PDE) describes an ideal setup that is tailored to your needs and preferences – it lies between a bare-bone text editor and a full-fledged IDE. It is a place where you can be productive, efficient, and comfortable. It is a place that suits you and only you.&lt;&#x2F;p&gt;
&lt;p&gt;I started using Vim in my sophomore year of high school when my computer couldn’t run Visual Studio Code and Windows simultaneously, so the terminal (and Linux) became my home. I still remember my early days as a Linux user — filled with frustration, confusion, and much googling. I remember my computer being unable to connect to my printer because Linux didn’t have a patch yet. I remember the first time my bootloader was corrupted due to a Windows update, and I was praying I could still boot into my precious setup. I remember when I decided to delete Windows for good, but I forgot that I had mounted the partition and ended up nuking my hard drive. Going down this path means headaches, but it also means growth. It means learning how to fix your own problems and learning how to be self-sufficient.&lt;&#x2F;p&gt;
&lt;p&gt;I cannot, in good faith, teach you how to debug every issue you will encounter (those errors will structure your ideal PDE), but I can inspire you and your setup. I am now going to be a junior in College, so I have had a few years to refine my setup, and I hope you do the same. I’ll show you the workflow that I have built over the years and how I have optimized it to be as efficient as possible. This is the way of SeniorMars; this is my way!&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Dotfiles&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;I know people will ask, so here they are: &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;SeniorMars&#x2F;dotfiles&quot;&gt;SeniorMars’ Dotfiles&lt;&#x2F;a&gt;. Moreover, I will be assuming you are using Neovim 0.10!&lt;&#x2F;p&gt;
&lt;p&gt;Moreover, throughout this I use lua to configure my Neovim, and use &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;folke&#x2F;lazy.nvim&quot;&gt;lazy.nvim&lt;&#x2F;a&gt; to install and mange my plugins.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h1 id=&quot;improving-the-neo-vim-experience&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#improving-the-neo-vim-experience&quot; aria-label=&quot;Anchor link for: improving-the-neo-vim-experience&quot;&gt;Improving the (Neo)Vim Experience&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Although, I stated this was not for beginners, I still need to point out the fundamentals. Without these, I would not consider neovim to even approach the basics of a PDE. If you think this is too basic, then you can skip this section – I promise you will learn something.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;search-and-replace&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#search-and-replace&quot; aria-label=&quot;Anchor link for: search-and-replace&quot;&gt;Search and Replace&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Let’s first start with something simple, so you get a taste on what kind of tips I will be giving you.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.ignorecase&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; -- search case insensitive&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.smartcase&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; -- search matters if capital letter&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.inccommand&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;split&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- &amp;quot;for incsearch while sub&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The first two options are self-explanatory. &lt;code&gt;ignorecase&lt;&#x2F;code&gt; makes search case-insensitive, and &lt;code&gt;smartcase&lt;&#x2F;code&gt; makes search case-sensitive if you use a capital letter. The third option is where the magic happens. Ever since, I first learned of &lt;code&gt;incsearch&lt;&#x2F;code&gt;, I have been in love. &lt;code&gt;incsearch&lt;&#x2F;code&gt; highlights the search pattern as you type it, giving you a real-time preview of where your pattern matches. The magic doesn’t stop at highlighting, though; by setting &lt;code&gt;inccommand&lt;&#x2F;code&gt; to &lt;code&gt;split&lt;&#x2F;code&gt;, we have a preview of what our substitution will look like.&lt;&#x2F;p&gt;
&lt;video autoplay loop muted playsinline preload=&quot;metadata&quot;&gt;
  &lt;source src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;posts&#x2F;neovim-workflow&#x2F;incsearch.mp4&quot; type=&quot;video&#x2F;mp4&quot;&gt;
  Your browser doesn&#x27;t support the video tag, which I use in place of .gifs, and&#x2F;or the video formats in use here – sorry!
&lt;&#x2F;video&gt;
&lt;p&gt;Now, let’s move on to keybindings.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.mapleader&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;,&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; keyset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.keymap.set&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;sr&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:%s&#x2F;&amp;lt;&amp;lt;C-r&amp;gt;&amp;lt;C-w&amp;gt;&amp;gt;&#x2F;&#x2F;g&amp;lt;Left&amp;gt;&amp;lt;Left&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Moreover, when I know I want to rename a variable, I do the following:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Place my cursor on the variable I would like to rename.&lt;&#x2F;li&gt;
&lt;li&gt;Use the keybinding &lt;code&gt;*&lt;&#x2F;code&gt; in normal mode to highlight all instances of the variable.&lt;&#x2F;li&gt;
&lt;li&gt;Do &lt;code&gt;cgn&lt;&#x2F;code&gt; to change the word under the cursor and move to the next instance.&lt;&#x2F;li&gt;
&lt;li&gt;Press &lt;code&gt;.&lt;&#x2F;code&gt; to repeat the change on the next instance.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;video autoplay loop muted playsinline preload=&quot;metadata&quot;&gt;
  &lt;source src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;posts&#x2F;neovim-workflow&#x2F;change_word.mp4&quot; type=&quot;video&#x2F;mp4&quot;&gt;
  Your browser doesn&#x27;t support the video tag, which I use in place of .gifs, and&#x2F;or the video formats in use here – sorry!
&lt;&#x2F;video&gt;
&lt;p&gt;Now, for some plugins.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- I use lazy.nvim to load plugins &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;mhinz&#x2F;vim-grepper&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.mapleader&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;,&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; keyset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.keymap.set&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;fs&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;:GrepperRg &amp;quot;&amp;quot; .&amp;lt;Left&amp;gt;&amp;lt;Left&amp;gt;&amp;lt;Left&amp;gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;fS&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Rg&amp;lt;space&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;*&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Grepper -tool rg -cword -noprompt&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;gs&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;Plug&amp;gt;(GrepperOperator)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;x&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;gs&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;Plug&amp;gt;(GrepperOperator)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This allows me to use &lt;code&gt;rg&lt;&#x2F;code&gt; to search for a word under the cursor, search for a word in the current director, and search for a word in the current directory. Grepper Operator allows me to use other vim motions to select text and search for it.&lt;&#x2F;p&gt;
&lt;video autoplay loop muted playsinline preload=&quot;metadata&quot;&gt;
  &lt;source src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;posts&#x2F;neovim-workflow&#x2F;grepper.mp4&quot; type=&quot;video&#x2F;mp4&quot;&gt;
  Your browser doesn&#x27;t support the video tag, which I use in place of .gifs, and&#x2F;or the video formats in use here – sorry!
&lt;&#x2F;video&gt;
&lt;p&gt;Now, to do something similar to other commands like &lt;code&gt;:norm&lt;&#x2F;code&gt;, I use:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;smjonas&#x2F;live-command.nvim&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- live command&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;live-command&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setup&lt;&#x2F;span&gt;&lt;span&gt;({commands&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {Norm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {cmd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;norm&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}}})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;ex-commands-and-g-command&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ex-commands-and-g-command&quot; aria-label=&quot;Anchor link for: ex-commands-and-g-command&quot;&gt;Ex Commands and &lt;code&gt;g&lt;&#x2F;code&gt; command&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;If you have read the vim help docs, you may know some of these, but these are the little things that make a big difference.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.wildmode&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;list:longest,list:full&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- for : stuff&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;wildignore&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;append&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.javac&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;node_modules&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;*.pyc&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;wildignore&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;append&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.aux&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.out&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.toc&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- LaTeX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;wildignore&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;append&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;.o&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.obj&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.dll&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.exe&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.so&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.a&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.lib&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.pyc&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.pyo&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.pyd&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;.swp&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.swo&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.class&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.DS_Store&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.git&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.hg&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.orig&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;suffixesadd&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;append&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.java&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.rs&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- search for suffexes using gf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The first option is for the &lt;code&gt;:&lt;&#x2F;code&gt; command. It allows you to use the tab completion to find the longest common match and then show the full list. The second option is for the &lt;code&gt;wildignore&lt;&#x2F;code&gt; option. It allows you to ignore certain files when using tab completion. The third option is for the &lt;code&gt;suffixesadd&lt;&#x2F;code&gt; option. It allows you to use &lt;code&gt;gf&lt;&#x2F;code&gt; to open files with the given suffixes. You can customize these to your liking, but adding this allows you to filter out the noise and focus on what you want to see.&lt;&#x2F;p&gt;
&lt;p&gt;Additionally, this is one of the must-have plugins:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;--- lazy.nvim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;gelguy&#x2F;wilder.nvim&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, build&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;:UpdateRemotePlugins&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- : autocomplete&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- wilder&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; wilder&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;wilder&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;wilder.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setup&lt;&#x2F;span&gt;&lt;span&gt;({modes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&#x2F;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;?&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;wilder.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;set_option&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;pipeline&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    wilder.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;branch&lt;&#x2F;span&gt;&lt;span&gt;(wilder.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;python_file_finder_pipeline&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;        file_command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;(_&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; arg)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.find&lt;&#x2F;span&gt;&lt;span&gt;(arg, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;~=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; nil&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                return&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;fd&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;-tf&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;-H&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                return&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;fd&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;-tf&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        end&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        dir_command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;fd&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;-td&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        filters&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;fuzzy_filter&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;difflib_sorter&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }), wilder.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;cmdline_pipeline&lt;&#x2F;span&gt;&lt;span&gt;(), wilder.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;python_search_pipeline&lt;&#x2F;span&gt;&lt;span&gt;())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;wilder.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;set_option&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;renderer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, wilder.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;popupmenu_renderer&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    highlighter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; wilder.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;basic_highlighter&lt;&#x2F;span&gt;&lt;span&gt;(),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    left&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    right&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, wilder.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;popupmenu_scrollbar&lt;&#x2F;span&gt;&lt;span&gt;({thumb_char&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;})},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    highlights&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {default&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;WilderMenu&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, accent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;WilderAccent&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Wilder is a fuzzy finder for Ex commands, search history, and command history. It is a must-have plugin for me because it allows me to search for commands and history in a more efficient way.&lt;&#x2F;p&gt;
&lt;img src=&quot;wilder.png&quot; alt=&quot;Wilder&quot; width=&quot;3024&quot; height=&quot;1896&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h1 id=&quot;undo-and-redo&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#undo-and-redo&quot; aria-label=&quot;Anchor link for: undo-and-redo&quot;&gt;Undo and Redo&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Undo and Redo are essential to any text editor. However, in Vim, you can make this more powerful! First,&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.undofile&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; -- save undo history&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; keyset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.keymap.set&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;,&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;,&amp;lt;C-g&amp;gt;U&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.&amp;lt;C-g&amp;gt;U&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;!&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;!&amp;lt;C-g&amp;gt;U&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;?&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;?&amp;lt;C-g&amp;gt;U&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The first option allows you to save your undo history. The next options add more power to undo as this updates undo when you use other vim operations. Now, we add:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;mbbill&#x2F;undotree&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, lazy&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;, cmd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;UndotreeToggle&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- see undo tree&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;u&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:UndotreeToggle&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;img src=&quot;undotree.png&quot; alt=&quot;Undo Tree&quot; width=&quot;3024&quot; height=&quot;1894&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;This allows you to see your undo tree and navigate it with diffs – extremely useful when you want to see what you have done and what you can undo.&lt;&#x2F;p&gt;
&lt;p&gt;Combine this with &lt;code&gt;AutoSession&lt;&#x2F;code&gt;, I can open a project and have all my windows, buffers, and undo history saved.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;rmagatti&#x2F;auto-session&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- auto save session&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;auto-session&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setup&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            log_level&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;error&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            auto_session_suppress_dirs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;                &amp;quot;~&#x2F;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;~&#x2F;Downloads&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;~&#x2F;Documents&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            auto_session_use_git_branch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            auto_save_enabled&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        })&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;movement&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#movement&quot; aria-label=&quot;Anchor link for: movement&quot;&gt;Movement&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Movement is essential to any text editor. However, in Vim, you can make this more powerful! First,&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.splitbelow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; -- split windows below&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.splitright&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; -- split windows right&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- Movement&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; keyset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.keymap.set&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;jk&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;esc&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;v&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;J&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:m &amp;#39;&amp;gt;+1&amp;lt;cr&amp;gt;gv=gv&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;v&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;K&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:m &amp;#39;&amp;lt;-2&amp;lt;cr&amp;gt;gv=gv&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;space&amp;gt;h&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;c-w&amp;gt;h&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;space&amp;gt;j&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;c-w&amp;gt;j&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;space&amp;gt;k&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;c-w&amp;gt;k&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;space&amp;gt;l&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;c-w&amp;gt;l&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;wh&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;c-w&amp;gt;t&amp;lt;c-h&amp;gt;H&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;wk&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;c-w&amp;gt;t&amp;lt;c-h&amp;gt;K&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;down&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:resize +2&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;up&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:resize -2&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;right&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:vertical resize +2&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;left&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:vertical resize -2&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;j&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;(v:count ? &amp;#39;j&amp;#39; : &amp;#39;gj&amp;#39;)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {expr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;k&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;(v:count ? &amp;#39;k&amp;#39; : &amp;#39;gk&amp;#39;)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {expr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This allows us to move line around in visual mode, move windows, and reside windows. Moreover, we can go up and down in long lines!&lt;&#x2F;p&gt;
&lt;p&gt;Furthermore, I have some auto commands that allow me to move between windows and resize them:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; autocmd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.api.nvim_create_autocmd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_create_augroup&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Random&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {clear&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;autocmd&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;VimResized&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    group&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Random&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    desc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Keep windows equally resized&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;tabdo wincmd =&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;autocmd&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;TermOpen&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    group&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Random&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;setlocal nonumber norelativenumber signcolumn=no&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This allows me to keep my windows equally resized and to remove the number column when I open a terminal.&lt;&#x2F;p&gt;
&lt;p&gt;Finally, I have some plugins that help me with movement and manipulating text:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;tpope&#x2F;vim-repeat&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- repeat&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;kylechui&#x2F;nvim-surround&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- surround objects&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nvim-surround&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setup&lt;&#x2F;span&gt;&lt;span&gt;({}) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;windwp&#x2F;nvim-autopairs&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- autopairs &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;#39;andymass&#x2F;vim-matchup&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_set_hl&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;OffScreenPopup&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                            {fg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;#fe8019&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, bg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;#3c3836&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, italic&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.g.matchup_matchparen_offscreen&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            method&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;popup&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            highlight&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;OffScreenPopup&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;wellle&#x2F;targets.vim&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- adds more targets like [ or ,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;--- setup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; rule&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nvim-autopairs.rule&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; cond&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nvim-autopairs.conds&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; autopairs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nvim-autopairs&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;autopairs.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;add_rules&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;    rule&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;$&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;$&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;tex&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;latex&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}):&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;with_cr&lt;&#x2F;span&gt;&lt;span&gt;(cond.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;none&lt;&#x2F;span&gt;&lt;span&gt;())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;autopairs.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;get_rules&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;`&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;].not_filetypes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;tex&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;latex&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;autopairs.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;get_rules&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;#39;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;].not_filetypes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;tex&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;latex&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;rust&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This allows me to repeat commands, add more targets like &lt;code&gt;[]&lt;&#x2F;code&gt;, and auto complete pairs like &lt;code&gt;()&lt;&#x2F;code&gt;. Moreover, with nvim-surround, I can surround text objects with different characters like quotes, brackets, and braces. Finally with vim-matchup, I can see the matching pair of brackets, braces, and quotes. If the code is very long it also shows the top matching pair in a popup window.&lt;&#x2F;p&gt;
&lt;img src=&quot;matchup.png&quot; alt=&quot;Matchup&quot; width=&quot;2078&quot; height=&quot;1396&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h2 id=&quot;better-quickfix&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#better-quickfix&quot; aria-label=&quot;Anchor link for: better-quickfix&quot;&gt;Better quickfix&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;If are not taking advantage of the quickfix list, you are missing out. The quickfix list is a powerful tool that allows you to navigate through errors, warnings, and search results – anything as long as you know how to use it. However, I like to use a plugin to make it more powerful.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;kevinhwang91&#x2F;nvim-bqf&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- better quickfix&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;--- later in the config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;cn&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:cnext&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;cp&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:cprevious&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This allows me to navigate through the quickfix list with ease. In fact, this is the setup I used to showoff grepper.&lt;&#x2F;p&gt;
&lt;video autoplay loop muted playsinline preload=&quot;metadata&quot;&gt;
  &lt;source src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;posts&#x2F;neovim-workflow&#x2F;grepper.mp4&quot; type=&quot;video&#x2F;mp4&quot;&gt;
  Your browser doesn&#x27;t support the video tag, which I use in place of .gifs, and&#x2F;or the video formats in use here – sorry!
&lt;&#x2F;video&gt;
&lt;p&gt;I integrated the quickfix list with other tools I’ll get to later.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;spell-check&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#spell-check&quot; aria-label=&quot;Anchor link for: spell-check&quot;&gt;Spell Check&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Vim has a built-in spell checker, but of course, we need to make it better.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; SpellToggle&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; vim.opt.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;spell&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span&gt;() &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.opt_local.spell&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.opt_local.spelllang&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;en&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.opt_local.spell&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.opt_local.spelllang&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;en_us&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;5&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:lua SpellToggle()&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;z&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[s1z=``&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This allows me to toggle spell check and fix spelling mistakes with &lt;code&gt;&amp;lt;leader&amp;gt;z&lt;&#x2F;code&gt; while not moving my cursor! In addition to this I use a language server (LSP) to check my spelling through language tool: &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;coc-ltex&#x2F;v&#x2F;12.2.0&quot;&gt;ltex&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;status-line&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#status-line&quot; aria-label=&quot;Anchor link for: status-line&quot;&gt;Status Line&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;At one point in your vim carer, you would have downloaded a status line plugin. After a while, though, you realize that you don’t need a status line plugin. You can make your own status line! Here is mine (with cache implmented):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; cache&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; refresh_cache&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;(key)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; cache[key] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then&lt;&#x2F;span&gt;&lt;span&gt; cache[key].value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; cache[key].&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span&gt;() &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; cache_get&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;(key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; compute_fn)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; cached&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; cache[key]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; cached&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then return&lt;&#x2F;span&gt;&lt;span&gt; cached.value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; compute_fn&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    cache[key] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; value, fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; compute_fn}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span&gt; value&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; SpellToggle&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; vim.opt.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;spell&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span&gt;() &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.opt_local.spell&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.opt_local.spelllang&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;en&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.opt_local.spell&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.opt_local.spelllang&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;en_us&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; spell_status&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; spellLang&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.opt_local.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;spelllang&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; type&lt;&#x2F;span&gt;&lt;span&gt;(spellLang) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;table&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        spellLang&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; table.concat&lt;&#x2F;span&gt;&lt;span&gt;(spellLang, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.upper&lt;&#x2F;span&gt;&lt;span&gt;(spellLang)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; git_branch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; cache_get&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;git_branch&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span&gt; vim.g.loaded_fugitive&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            local&lt;&#x2F;span&gt;&lt;span&gt; branch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;FugitiveHead&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            if&lt;&#x2F;span&gt;&lt;span&gt; branch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ~=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                if&lt;&#x2F;span&gt;&lt;span&gt; vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_win_get_width&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;lt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 80&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                    return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot; &amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.upper&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;branch&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;sub&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot; &amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.upper&lt;&#x2F;span&gt;&lt;span&gt;(branch)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; update_status_for_file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;(file_path)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    -- Get number of lines added and deleted using git diff --numstat&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; diff_stats&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;system&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;git diff --numstat &amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                                         vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;shellescape&lt;&#x2F;span&gt;&lt;span&gt;(file_path))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; vim.v.shell_error&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ~=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; or&lt;&#x2F;span&gt;&lt;span&gt; diff_stats&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; added, deleted&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; diff_stats&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;match&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;(%d+)%s+(%d+)%s+%S+&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    added, deleted&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; tonumber&lt;&#x2F;span&gt;&lt;span&gt;(added), &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;tonumber&lt;&#x2F;span&gt;&lt;span&gt;(deleted)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; delta&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; math.min&lt;&#x2F;span&gt;&lt;span&gt;(added, deleted)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; status&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        changed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; delta,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        added&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; added&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span&gt; delta,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        removed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; deleted&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span&gt; delta&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    -- Format the status for display&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; status_txt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; status.added&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; table.insert&lt;&#x2F;span&gt;&lt;span&gt;(status_txt, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;+&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt; status.added) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; status.changed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        table.insert&lt;&#x2F;span&gt;&lt;span&gt;(status_txt, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;~&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt; status.changed)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; status.removed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        table.insert&lt;&#x2F;span&gt;&lt;span&gt;(status_txt, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;-&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt; status.removed)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; #&lt;&#x2F;span&gt;&lt;span&gt;status_txt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        for&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span&gt;status_txt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; do&lt;&#x2F;span&gt;&lt;span&gt; status_txt[i] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;,&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt; status_txt[i] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; formatted_status&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; #&lt;&#x2F;span&gt;&lt;span&gt;status_txt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        formatted_status&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[%s]&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;table.concat&lt;&#x2F;span&gt;&lt;span&gt;(status_txt))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        formatted_status&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span&gt; formatted_status&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; status_for_file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; cache_get&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_status&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; file_path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_buf_get_name&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span&gt; file_path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; update_status_for_file&lt;&#x2F;span&gt;&lt;span&gt;(file_path)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; human_file_size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; cache_get&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_size&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_buf_get_name&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;getfsize&lt;&#x2F;span&gt;&lt;span&gt;(file)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; suffixes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;B&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;KB&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;MB&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;GB&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        while&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1024&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1024&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;lt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; and&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;or&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[%.0f%s]&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, size, suffixes[i])&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; smart_file_path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; cache_get&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_path&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; buf_name&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_buf_get_name&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; is_wide&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_win_get_width&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 80&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span&gt; buf_name&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;[No Name]&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; file_dir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; buf_name&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;sub&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;5&lt;&#x2F;span&gt;&lt;span&gt;):&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;find&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;term&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;and&lt;&#x2F;span&gt;&lt;span&gt; vim.env.PWD&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; or&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                             vim.fs.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;dirname&lt;&#x2F;span&gt;&lt;span&gt;(buf_name)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        file_dir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; file_dir&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;gsub&lt;&#x2F;span&gt;&lt;span&gt;(vim.env.HOME, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;~&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; not&lt;&#x2F;span&gt;&lt;span&gt; is_wide&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;span&gt; file_dir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;pathshorten&lt;&#x2F;span&gt;&lt;span&gt;(file_dir) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; buf_name&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;sub&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;5&lt;&#x2F;span&gt;&lt;span&gt;):&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;find&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;term&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            return&lt;&#x2F;span&gt;&lt;span&gt; file_dir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ..&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;%s&#x2F;%s &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, file_dir, vim.fs.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;basename&lt;&#x2F;span&gt;&lt;span&gt;(buf_name))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; word_count&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; words&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;wordcount&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; words.visual_words&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ~=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; nil&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[%s]&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, words.visual_words)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[%s]&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, words.words)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; modes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; setmetatable&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;NORMAL&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;N&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;no&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;N·OPERATOR&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;N·P&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nov&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;O·PENDING&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;O·P&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;noV&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;O·PENDING&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;O·P&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;no&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\22&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;O·PENDING&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;O·P&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;niI&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;NORMAL&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;N&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;niR&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;NORMAL&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;N&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;niV&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;NORMAL&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;N&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nt&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;NORMAL&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;N&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;ntT&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;NORMAL&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;N&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;v&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;VISUAL&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·LINE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·L&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\22&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·BLOCK&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·B&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\22&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;s&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·BLOCK&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·B&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;s&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;SELECT&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;S&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;S&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;S·LINE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;S·L&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\19&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;S·BLOCK&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;S·B&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;INSERT&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;I&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;ic&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;INSERT&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;I&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;ix&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;INSERT&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;I&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;R&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;REPLACE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;R&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Rv&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·REPLACE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·R&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Rc&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;REPLACE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;R&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Rx&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;REPLACE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;R&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Rvc&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·REPLACE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·R&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Rvx&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·REPLACE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·R&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;c&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;COMMAND&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;C&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;cv&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;VIM·EX&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;V·E&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;ce&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;EX&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;E&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;r&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;PROMPT&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;P&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;rm&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;MORE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;M&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;r?&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;CONFIRM&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;C&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;!&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;SHELL&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;S&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;t&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;TERMINAL&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;T&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}, {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    __index&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;UNKNOWN&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;U&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;} &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- handle edge cases&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; get_current_mode&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; mode&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; modes[vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_get_mode&lt;&#x2F;span&gt;&lt;span&gt;().mode]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_win_get_width&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;lt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 80&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;%s &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, mode[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;]) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- short name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;%s &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, mode[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;]) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- long name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; file_type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; cache_get&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; buf_name&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_buf_get_name&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; width&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_win_get_width&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; ft&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.bo.filetype&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span&gt; ft&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;[None]&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            if&lt;&#x2F;span&gt;&lt;span&gt; width&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 80&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[%s]&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, ft)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                local&lt;&#x2F;span&gt;&lt;span&gt; ext&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;fnamemodify&lt;&#x2F;span&gt;&lt;span&gt;(buf_name, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:e&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                local&lt;&#x2F;span&gt;&lt;span&gt; shorter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;string.len&lt;&#x2F;span&gt;&lt;span&gt;(ft) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.len&lt;&#x2F;span&gt;&lt;span&gt;(ext)) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;and&lt;&#x2F;span&gt;&lt;span&gt; ft&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; or&lt;&#x2F;span&gt;&lt;span&gt; ext&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[%s]&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, shorter)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;---&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6C08A;font-style: italic;&quot;&gt;@diagnostic&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;font-style: italic;&quot;&gt; disable-next-line&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;font-style: italic;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; lowercase-global&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; status_line&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; table.concat&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        get_current_mode&lt;&#x2F;span&gt;&lt;span&gt;(), &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- get current mode&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        spell_status&lt;&#x2F;span&gt;&lt;span&gt;(), &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- display language and if spell is on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        git_branch&lt;&#x2F;span&gt;&lt;span&gt;(), &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- branch name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;        &amp;quot; %&amp;lt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- spacing&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        smart_file_path&lt;&#x2F;span&gt;&lt;span&gt;(), &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- smart full path filename&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;        &amp;quot;%h%m%r%w&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- help flag, modified, readonly, and preview&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;        &amp;quot;%=&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- right align&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        status_for_file&lt;&#x2F;span&gt;&lt;span&gt;(), &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- git status for file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        word_count&lt;&#x2F;span&gt;&lt;span&gt;(), &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- word count&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;        &amp;quot;[%-3.(%l|%c]&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- line number, column number&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        human_file_size&lt;&#x2F;span&gt;&lt;span&gt;(), &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- file size&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        file_type&lt;&#x2F;span&gt;&lt;span&gt;() &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- file type&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    })&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_create_augroup&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;StatusLineCache&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_create_autocmd&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;BufEnter&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    pattern&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;*&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    group&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;StatusLineCache&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    callback&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        refresh_cache&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;git_branch&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- this should be another event&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        refresh_cache&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_status&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        refresh_cache&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_size&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        refresh_cache&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_path&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        refresh_cache&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_create_autocmd&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;BufWritePost&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    pattern&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;*&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    group&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;StatusLineCache&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    callback&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        refresh_cache&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_status&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        refresh_cache&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_size&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        refresh_cache&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_path&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_create_autocmd&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;WinResized&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    pattern&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;*&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    group&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;StatusLineCache&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    callback&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        refresh_cache&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;git_branch&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        refresh_cache&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_path&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        refresh_cache&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;file_type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.statusline&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;%!luaeval(&amp;#39;status_line()&amp;#39;)&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.wo.fillchars&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;eob:~&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- fillchars of windows&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This is my status line. It shows the current mode, language, branch name, file path, git status, word count, line number, column number, file size, and file type. It is a lot, but I hope my documentation helps you understand what each part does. It is extremely minimum but provides me with all the information I require depending on my current state.&lt;&#x2F;p&gt;
&lt;img src=&quot;status1.png&quot; alt=&quot;Status Line&quot; width=&quot;3024&quot; height=&quot;76&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;status2.png&quot; alt=&quot;Status Line&quot; width=&quot;1500&quot; height=&quot;62&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;status3.png&quot; alt=&quot;Status Line&quot; width=&quot;3024&quot; height=&quot;80&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h2 id=&quot;formatting&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#formatting&quot; aria-label=&quot;Anchor link for: formatting&quot;&gt;Formatting&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Formatting is essential to any text editor:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_create_user_command&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;FixWhitespace&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;[[%s&#x2F;\s\+$&#x2F;&#x2F;e]]&lt;&#x2F;span&gt;&lt;span&gt;, {})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;3&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:retab&amp;lt;cr&amp;gt;:FixWhitespace&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;However, I use a plugin to make it more powerful:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;sbdchd&#x2F;neoformat&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- format&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.neoformat_try_formatprg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This allows me to format my code with &lt;code&gt;neoformat&lt;&#x2F;code&gt; and remove trailing whitespace with &lt;code&gt;FixWhitespace&lt;&#x2F;code&gt;. Moreover, I can still use the class &lt;code&gt;=&lt;&#x2F;code&gt; and &lt;code&gt;gq&lt;&#x2F;code&gt; to format my code. Very useful!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;better-netrw&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#better-netrw&quot; aria-label=&quot;Anchor link for: better-netrw&quot;&gt;Better netrw&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I know, I know, netrw is not the best file explorer, but I don’t use it enough to care that much. However, I do have some settings to make it more bearable:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.netrw_banner&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.netrw_browse_split&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.netrw_liststyle&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.netrw_winsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; = -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;28&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.netrw_browsex_viewer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;open -a firefox&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;These settings remove the banner, open the file explorer in a vertical split, use the tree style, and set the size of the file explorer. Moreover, I can open files in the browser with &lt;code&gt;gx&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;img src=&quot;tree.png&quot; alt=&quot;Netrw&quot; width=&quot;3018&quot; height=&quot;1880&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h2 id=&quot;git-integration&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#git-integration&quot; aria-label=&quot;Anchor link for: git-integration&quot;&gt;Git Integration&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Now, I made a &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=57x4ZzzCr2Y&quot;&gt;video about this Git workflow&lt;&#x2F;a&gt;, so I won’t go into too much detail. However, I will show you how I set it up:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;tpope&#x2F;vim-fugitive&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- Git control for vim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- fugitive&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;gg&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Git&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;ga&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Git add %:p&amp;lt;cr&amp;gt;&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;gd&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Gdiff&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;ge&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Gedit&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;gw&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Gwrite&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;gf&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Commits&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Honestly, although this pretty simple, it is extremely powerful. I can see the git status, add files, diff files, edit files, write files, and see commits. Together with &lt;code&gt;gh&lt;&#x2F;code&gt; the github cli, I can do everything I need to do with git (though I do have more, which I will talk about in a later section)!&lt;&#x2F;p&gt;
&lt;p&gt;Finally, I set Neovim to be my merge tool and diff tool (through &lt;code&gt;~&#x2F;gitconfig&lt;&#x2F;code&gt;):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[user]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	email = seniormars@rice.edu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	name = SeniorMars&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	username = SeniorMars&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	signingkey = 7C668A6D13D5729989FB126B183357B41320BB2B&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[core]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	pager = delta&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	editor = nvim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	excludesfile = &#x2F;Users&#x2F;charlie&#x2F;.config&#x2F;git&#x2F;gitignore_global&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[credential]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	helper = cache&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[init]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	defaultBranch = main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[diff]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	algorithm = patience&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	compactionHeuristic = true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	tool = nvimdiff&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[difftool &amp;quot;nvimdiff&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	cmd = nvim -d \&amp;quot;$LOCAL\&amp;quot; \&amp;quot;$REMOTE\&amp;quot; -c \&amp;quot;wincmd w\&amp;quot; -c \&amp;quot;wincmd L\&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[merge]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	tool = nvimdiff4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	prompt = false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[mergetool &amp;quot;nvimdiff4&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	cmd = nvim -d $LOCAL $BASE $REMOTE $MERGED -c &amp;#39;$wincmd w&amp;#39; -c &amp;#39;wincmd J&amp;#39; -c &amp;#39;set diffopt&amp;amp;&amp;#39; -c &amp;#39;set diffopt+=algorithm:patience&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	keepBackup = false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I then use &lt;code&gt;diffget&lt;&#x2F;code&gt; and &lt;code&gt;diffput&lt;&#x2F;code&gt; to merge my files with &lt;code&gt;git mergetool&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;diffopt&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;append&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;linematch:50&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;img src=&quot;merge.png&quot; alt=&quot;Fugitive&quot; width=&quot;3024&quot; height=&quot;1894&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;With this, we have completed all the fundamentals!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;getting-the-full-power-out-of-neovim&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#getting-the-full-power-out-of-neovim&quot; aria-label=&quot;Anchor link for: getting-the-full-power-out-of-neovim&quot;&gt;Getting the full power out of Neovim&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;In the last section, I spent a lot of time buffing vim features. However, Neovim has been progressing and has added many new features that I have been taking advantage of. In this section, I will show you how I use these features to make my workflow more efficient.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;treesitter&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#treesitter&quot; aria-label=&quot;Anchor link for: treesitter&quot;&gt;Treesitter&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Treesitter is a parser library that is used in real-time editing contexts, where it aims to fill the gap to manipulate and understand your code through the Abstract syntax tree (AST). Take, for instance, syntax highlighting. Originally, syntax highlighting was achieved through regular expressions that would match the tokens of the language you used. However, for large files that was a large tax. Now imagine if instead of matching the literal text to then syntax highlight, your text editor matches the nodes in the AST (and context) to highlight your code. Because treesitter operates within context, it is much more accurate to read your code and provides “better” syntax highlighting. For instance, what is the difference between a macro and a function — should that be highlighted different to notate that it has different behavior? Treesitter says yes, and I agree.&lt;&#x2F;p&gt;
&lt;p&gt;However, if this were the only benefit, I would just shrug off the tool. It’s a lot of development to support a feature like this. It turns out however that treesitter updates its tree while you are typing in real time, which provides additional benefits than just more stable syntax highlighting. Yet, what catches my eyes is the extensibility of treesitter. Here we have a tool that can manipulate the AST – what can you with that? Well, you decide, but here are some of my uses: better code folding, swap function parameters, refactoring entire functions in a way a LSP can’t, and provide integration across multiple programming files.  Note the last one, which, I believe, is a feature that should impress you because if treesitter can work on a file with multiple languages, it can tell you what how comments work in that language, what indentation is ideal, what.a function block is in a language. That’s compelling, and what you can do with treesitter is up to you: you have full control of your text editor and AST.&lt;&#x2F;p&gt;
&lt;p&gt;Treesitter is a tool for a programmer to do more with their code editor and I believe it brings more power to editing, reviewing, and writing code. Let’s take a look at how I write these blogs; I often have Rust, Markdown, and LaTeX:&lt;&#x2F;p&gt;
&lt;img src=&quot;treesitter.png&quot; alt=&quot;Treesitter&quot; width=&quot;3016&quot; height=&quot;1888&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;Notice, that treesitter can highlight the syntax of all three languages in the same file!&lt;&#x2F;p&gt;
&lt;p&gt;Here is how I set up treesitter:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;--- I use lazy.nvim to load plugins &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;numToStr&#x2F;Comment.nvim&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- comment&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nvim-treesitter&#x2F;nvim-treesitter&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, build&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;:TSUpdate&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- :TSInstallFromGrammar&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nvim-treesitter&#x2F;nvim-treesitter-textobjects&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, event&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;InsertEnter&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- TS objects&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;JoosepAlviste&#x2F;nvim-ts-context-commentstring&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- use TS for comment.nvim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;danymat&#x2F;neogen&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;neogen&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setup&lt;&#x2F;span&gt;&lt;span&gt;({}) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This setups treesitter, treesitter text objects, treesitter context, and treesitter commentstring. I also use neogen to generate doc comments for me. Additionally, I have the following settings:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;t&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:lua require(&amp;#39;neogen&amp;#39;).generate()&amp;lt;CR&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.foldmethod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;expr&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- treesiter time&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.foldexpr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;nvim_treesitter#foldexpr()&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- treesiter&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.skip_ts_context_commentstring_module&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Comment&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setup&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    pre_hook&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;            require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;ts_context_commentstring.internal&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;calculate_commentstring&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; ts_repeat_move&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nvim-treesitter.textobjects.repeatable_move&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;x&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;o&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, ts_repeat_move.repeat_last_move_next)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;x&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;o&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;,&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, ts_repeat_move.repeat_last_move_previous)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;x&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;o&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;f&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, ts_repeat_move.builtin_f)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;x&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;o&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;F&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, ts_repeat_move.builtin_F)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;x&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;o&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;t&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, ts_repeat_move.builtin_t)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;x&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;o&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;T&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, ts_repeat_move.builtin_T)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nvim-treesitter.configs&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setup&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    highlight&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {enable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;, disable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;latex&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    indent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {enable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;, disable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;python&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    textobjects&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        move&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            enable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            set_jumps&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- whether to set jumps in the jumplist&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            goto_next_start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;]m&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@function.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;]]&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {query&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@class.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, desc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Next class start&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;]s&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    query&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@scope&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    query_group&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;locals&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    desc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Next scope&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            goto_previous_start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[m&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@function.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[[&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@class.outer&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            goto_next_end&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;]M&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@function.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;][&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@class.outer&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            goto_previous_end&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[M&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@function.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[]&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@class.outer&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            goto_next&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;]d&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@conditional.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            goto_previous&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[d&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@conditional.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        swap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            enable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            swap_next&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;a&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@parameter.inner&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            swap_previous&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;A&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@parameter.inner&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        select&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            enable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            lookahead&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            keymaps&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;af&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@function.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;if&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@function.inner&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;ac&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@class.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;ic&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;@class.inner&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            selection_modes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;@parameter.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;v&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- charwise&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;@function.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;V&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- linewise&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;@class.outer&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;lt;c-v&amp;gt;&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- blockwise&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    incremental_selection&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        enable&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        keymaps&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            init_selection&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;lt;space&amp;gt;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            scope_incremental&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;lt;space&amp;gt;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            node_incremental&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;lt;space&amp;gt;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            node_decremental&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;lt;space&amp;gt;p&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Together, I am able to swap function parameters, select text objects, and move between text objects. More important, I can generate doc comments and use treesitter to provide context for my code.&lt;&#x2F;p&gt;
&lt;video autoplay loop muted playsinline preload=&quot;metadata&quot;&gt;
  &lt;source src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;posts&#x2F;neovim-workflow&#x2F;treesitter.mp4&quot; type=&quot;video&#x2F;mp4&quot;&gt;
  Your browser doesn&#x27;t support the video tag, which I use in place of .gifs, and&#x2F;or the video formats in use here – sorry!
&lt;&#x2F;video&gt;
&lt;h2 id=&quot;better-terminal&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#better-terminal&quot; aria-label=&quot;Anchor link for: better-terminal&quot;&gt;Better terminal&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Neovim has &lt;code&gt;:Term&lt;&#x2F;code&gt;, but I prefer a terminal that persists, can open other TUI apps, and is customizable.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;akinsho&#x2F;toggleterm.nvim&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- for smart terminal&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;toggleterm&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setup&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    shade_terminals&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    highlights&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        StatusLine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {guifg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;#ffffff&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, guibg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;#0E1018&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        StatusLineNC&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {guifg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;#ffffff&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, guibg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;#0E1018&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt.laststatus&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Combined, this allows me to focus on one window and have a terminal that is always available:&lt;&#x2F;p&gt;
&lt;img src=&quot;toggleterm.png&quot; alt=&quot;Toggleterm&quot; width=&quot;3018&quot; height=&quot;1886&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;In fact, I can combine this with &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;jesseduffield&#x2F;lazygit&quot;&gt;LazyGit&lt;&#x2F;a&gt; to have a terminal that can run &lt;code&gt;lazygit&lt;&#x2F;code&gt; and &lt;code&gt;nvim&lt;&#x2F;code&gt; at the same time. Let’s have a look:&lt;&#x2F;p&gt;
&lt;video autoplay loop muted playsinline preload=&quot;metadata&quot;&gt;
  &lt;source src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;posts&#x2F;neovim-workflow&#x2F;lazygit.mp4&quot; type=&quot;video&#x2F;mp4&quot;&gt;
  Your browser doesn&#x27;t support the video tag, which I use in place of .gifs, and&#x2F;or the video formats in use here – sorry!
&lt;&#x2F;video&gt;
&lt;p&gt;This allows me to work with git extremely efficiently. Here is the config I use:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;space&amp;gt;&amp;lt;space&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:ToggleTerm size=15&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;space&amp;gt;t&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:ToggleTerm size=70 direction=vertical&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; Terminal&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;toggleterm.terminal&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).Terminal&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; lg_cmd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;lazygit -w $PWD&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span&gt; vim.v.servername&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ~=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; nil&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    lg_cmd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;                 &amp;quot;NVIM_SERVER=%s lazygit -ucf ~&#x2F;.config&#x2F;nvim&#x2F;lazygit.toml -w $PWD&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                 vim.v.servername)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.env.GIT_EDITOR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;nvr -cc split --remote-wait +&amp;#39;set bufhidden=wipe&amp;#39;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; lazygit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Terminal&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    cmd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; lg_cmd,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    count&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    direction&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;float&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    float_opts&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        border&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;double&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;        width&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; return&lt;&#x2F;span&gt;&lt;span&gt; vim.o.columns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;        height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; return&lt;&#x2F;span&gt;&lt;span&gt; vim.o.lines&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    -- function to run on opening the terminal&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    on_open&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;(term)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;cmd&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;startinsert!&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_buf_set_keymap&lt;&#x2F;span&gt;&lt;span&gt;(term.bufnr, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;q&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;cmd&amp;gt;close&amp;lt;CR&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                                    {noremap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;, silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; Edit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;(fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; line_number)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; edit_cmd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:e %s&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, fn)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; line_number&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ~=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; nil&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        edit_cmd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:e +%d %s&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, line_number, fn)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    vim.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;cmd&lt;&#x2F;span&gt;&lt;span&gt;(edit_cmd)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; Lazygit_toggle&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; lazygit&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;toggle&lt;&#x2F;span&gt;&lt;span&gt;() &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;lg&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;cmd&amp;gt;lua Lazygit_toggle()&amp;lt;CR&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And here is the &lt;code&gt;lazygit.toml&lt;&#x2F;code&gt; file I use:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;os:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  edit: &amp;#39;nvim --server $NVIM_SERVER&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  editAtLine: &amp;quot;{{editor}} --remote-send &amp;#39;&amp;lt;C-\\&amp;gt;&amp;lt;C-n&amp;gt;:5ToggleTerm&amp;lt;CR&amp;gt;:lua Edit({{filename}}, {{line}})&amp;lt;CR&amp;gt;&amp;#39;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;git:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  branchLogCmd: &amp;quot;git log --graph &lt;&#x2F;span&gt;&lt;span&gt;--color&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;lways --abbrev-commit --decorate &lt;&#x2F;span&gt;&lt;span&gt;--date&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;r&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;elative &lt;&#x2F;span&gt;&lt;span&gt;--pretty&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;m&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;edium --oneline {{branchName}} --&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  commitPrefixes:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;    my_project:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;      pattern: &amp;quot;^\\w+\\&#x2F;(\\w+-\\w+).*&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;      replace: &amp;#39;[$1] &amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  paging:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;    colorArg: always&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;    pager: delta --dark &lt;&#x2F;span&gt;&lt;span&gt;--paging&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;ever&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  commit:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;    signOff: false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  merging:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;    manualCommit: false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;    args: &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  log:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;    order: &amp;#39;topo-order&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;    showGraph: &amp;#39;when-maximised&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;    showWholeGraph: false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  skipHookPrefix: WIP&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  autoFetch: true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  autoRefresh: true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  allBranchesLogCmd: &amp;#39;git log --graph --all &lt;&#x2F;span&gt;&lt;span&gt;--color&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;lways --abbrev-commit --decorate &lt;&#x2F;span&gt;&lt;span&gt;--date&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;r&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;elative  &lt;&#x2F;span&gt;&lt;span&gt;--pretty&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;m&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;edium&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  overrideGpg: false&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  disableForcePushing: false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  parseEmoji: false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D95757;&quot;&gt;  diffContextSize: 3 &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# how many lines of context are shown around a change in diffs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This all works through &lt;code&gt;nvr&lt;&#x2F;code&gt;, the neovim remote plugin, so make sure you have that installed.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; not&lt;&#x2F;span&gt;&lt;span&gt; vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;executable&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nvr&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_command&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;!pip3 install --user neovim-remote&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;telescope&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#telescope&quot; aria-label=&quot;Anchor link for: telescope&quot;&gt;Telescope&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Telescope is one of those Neovim plugins that transform how you interact with virtually everything in your development environment—from files, code, documentation, to even running tasks and previewing media. Its extensible and customizable nature makes it a powerhouse for creating a truly personalized development environment. For instance, this is telescope in action with man pages:&lt;&#x2F;p&gt;
&lt;img src=&quot;man.png&quot; alt=&quot;Telescope&quot; width=&quot;3022&quot; height=&quot;1896&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;Now, let’s set up telescope:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;nvim-telescope&#x2F;telescope.nvim&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    dependencies&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nvim-lua&#x2F;plenary.nvim&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;nvim-lua&#x2F;popup.nvim&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}, {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;nvim-telescope&#x2F;telescope-frecency.nvim&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;        require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;telescope&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;load_extension&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;frecency&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This sets up telescope and telescope-frecency. Frequency is a plugin that allows you to search for files based on how frequently you use them. Here is how I map telescope:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- Telescope&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;&amp;lt;leader&amp;gt;f&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Telescope git_files&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;fl&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Telescope live_grep&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;ff&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Telescope frecency workspace=CWD theme=ivy layout_config={height=0.4} path_display={&amp;#39;shorten&amp;#39;}&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;fb&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Telescope buffers&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;fm&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Telescope man_pages&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;ft&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Telescope treesitter&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;fk&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Telescope keymaps&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;fh&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;:Telescope help_tags&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Finally, let’s get to the good parts. Customizing telescope:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- https:&#x2F;&#x2F;github-wiki-see.page&#x2F;m&#x2F;nvim-telescope&#x2F;telescope.nvim&#x2F;wiki&#x2F;Configuration-Recipes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; actions&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;telescope.actions&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; previewers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;telescope.previewers&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; Job&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;plenary.job&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; _bad&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.*%.csv&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;} &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- Put all filetypes that slow you down in this array&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; bad_files&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;(filepath)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; _, v&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; ipairs&lt;&#x2F;span&gt;&lt;span&gt;(_bad) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;do if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; filepath&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;match&lt;&#x2F;span&gt;&lt;span&gt;(v) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; end end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;---&lt;&#x2F;span&gt;&lt;span style=&quot;color: #E6C08A;font-style: italic;&quot;&gt;@diagnostic&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;font-style: italic;&quot;&gt; disable-next-line&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;font-style: italic;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; redefined-local&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; new_maker&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;(filepath&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; bufnr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; opts)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    opts&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; opts&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; or&lt;&#x2F;span&gt;&lt;span&gt; {}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; opts.use_ft_detect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; nil&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;span&gt; opts.use_ft_detect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    opts.use_ft_detect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; opts.use_ft_detect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; and&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; or&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;                             bad_files&lt;&#x2F;span&gt;&lt;span&gt;(filepath)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    filepath&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;expand&lt;&#x2F;span&gt;&lt;span&gt;(filepath)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;    Job&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;file&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        args&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;--mime-type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;-b&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, filepath},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;        on_exit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;(j)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            local&lt;&#x2F;span&gt;&lt;span&gt; mime_type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;split&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;j&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;result&lt;&#x2F;span&gt;&lt;span&gt;()[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;], &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&#x2F;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            if&lt;&#x2F;span&gt;&lt;span&gt; mime_type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;text&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                vim.loop.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;fs_stat&lt;&#x2F;span&gt;&lt;span&gt;(filepath, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;(_&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; stat)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; not&lt;&#x2F;span&gt;&lt;span&gt; stat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then return end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                    if&lt;&#x2F;span&gt;&lt;span&gt; stat.size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 100000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        vim.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;schedule&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                            vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_buf_set_lines&lt;&#x2F;span&gt;&lt;span&gt;(bufnr, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                                                       {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;FILE TOO LARGE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                        end&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                    else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        previewers.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;buffer_previewer_maker&lt;&#x2F;span&gt;&lt;span&gt;(filepath, bufnr, opts)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                end&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                -- maybe we want to write something to the buffer here&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                vim.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;schedule&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_buf_set_lines&lt;&#x2F;span&gt;&lt;span&gt;(bufnr, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;false&lt;&#x2F;span&gt;&lt;span&gt;, {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;BINARY&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                end&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }):&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;sync&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Since I have some large files, I have to check if the file is too large to preview. This is what the &lt;code&gt;new_maker&lt;&#x2F;code&gt; function dos and applies it to the previewer:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;telescope&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setup&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    defaults&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        file_sorter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;telescope.sorters&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).get_fzy_sorter,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        buffer_previewer_maker&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; new_maker,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        layout_config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {prompt_position&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;bottom&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        mappings&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;Esc&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; actions.close,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;C-q&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; actions.send_to_qflist,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;C-k&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; actions.move_selection_previous,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;C-j&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; actions.move_selection_next,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;C-d&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; actions.delete_buffer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; actions.move_to_top&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    pickers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        find_files&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;ivy&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, layout_config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.4&lt;&#x2F;span&gt;&lt;span&gt;}},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        git_files&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;ivy&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, layout_config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.4&lt;&#x2F;span&gt;&lt;span&gt;}},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        live_grep&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;ivy&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, layout_config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.4&lt;&#x2F;span&gt;&lt;span&gt;}},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        buffers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;ivy&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, layout_config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.4&lt;&#x2F;span&gt;&lt;span&gt;}},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        keymaps&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;ivy&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, layout_config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.4&lt;&#x2F;span&gt;&lt;span&gt;}},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        file_browser&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;ivy&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, layout_config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.4&lt;&#x2F;span&gt;&lt;span&gt;}},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        treesitter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;ivy&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, layout_config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.4&lt;&#x2F;span&gt;&lt;span&gt;}},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        help_tags&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;ivy&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, layout_config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.5&lt;&#x2F;span&gt;&lt;span&gt;}},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        man_pages&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            sections&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;1&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;2&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;3&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            theme&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;ivy&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            layout_config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.4&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    extensions&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        frecency&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            auto_validate&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            matcher&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;fuzzy&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            path_display&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;shorten&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Together, I can move around my codebase with ease and preview files without slowing down my editor.&lt;&#x2F;p&gt;
&lt;video autoplay loop muted playsinline preload=&quot;metadata&quot;&gt;
  &lt;source src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;posts&#x2F;neovim-workflow&#x2F;tele.mp4&quot; type=&quot;video&#x2F;mp4&quot;&gt;
  Your browser doesn&#x27;t support the video tag, which I use in place of .gifs, and&#x2F;or the video formats in use here – sorry!
&lt;&#x2F;video&gt;
&lt;p&gt;Note: I wish I could set a default theme for telescope, but I can’t. I have to set it for each picker.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;completion&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#completion&quot; aria-label=&quot;Anchor link for: completion&quot;&gt;Completion&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Just a fair warning, I still use &lt;code&gt;coc.nvim&lt;&#x2F;code&gt;, but it works well for me!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;copilot&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#copilot&quot; aria-label=&quot;Anchor link for: copilot&quot;&gt;Copilot&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;First, I use copilot to complete test cases and boilercode – I don’t trust it for logic, but it has its uses. Specifically, I use the lua version as I find it more configurable:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;zbirenbaum&#x2F;copilot.lua&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- Copilot but lua&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    cmd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Copilot&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    event&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;InsertEnter&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;require&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;copilot&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setup&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    panel&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        enabled&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        auto_refresh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        keymap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            jump_prev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;[[&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            jump_next&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;]]&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            accept&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;lt;CR&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            refresh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;gr&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            open&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;lt;leader&amp;gt;ck&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        layout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; { position&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;bottom&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, ratio&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.4&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    suggestion&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        enabled&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        auto_trigger&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        debounce&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 75&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        keymap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            accept&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;lt;C-v&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            accept_word&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            accept_line&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;lt;C-q&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            next&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            prev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            dismiss&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;lt;C-]&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    copilot_node_command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;node&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;leader&amp;gt;ck&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;&amp;lt;cmd&amp;gt;lua require(&amp;quot;copilot.suggestion&amp;quot;).toggle_auto_trigger()&amp;lt;cr&amp;gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This allows me to use copilot to generate boilerplate code and test cases. Moreover, I can toggle the auto trigger with &lt;code&gt;&amp;lt;leader&amp;gt;ck&lt;&#x2F;code&gt;. This allows me to use copilot when I need it and not when I don’t.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;coc-nvim&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#coc-nvim&quot; aria-label=&quot;Anchor link for: coc-nvim&quot;&gt;Coc.nvim&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;I use coc.nvim for completion, but I have customized almost every single thing:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;neoclide&#x2F;coc.nvim&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, branch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;release&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, build&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;:CocUpdate&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- auto complete&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;honza&#x2F;vim-snippets&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- Snippets are separated from the engine so coc can use&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This sets up coc.nvim and vim-snippets. Here is how I set up coc.nvim:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_create_user_command&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Format&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;call CocAction(&amp;#39;format&amp;#39;)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; _G&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;check_back_space&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; col&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_win_get_cursor&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; has_backspace&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_get_current_line&lt;&#x2F;span&gt;&lt;span&gt;():&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;sub&lt;&#x2F;span&gt;&lt;span&gt;(col, col):&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;match&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;                              &amp;quot;%s&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;~=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; nil&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    return&lt;&#x2F;span&gt;&lt;span&gt; col&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; or&lt;&#x2F;span&gt;&lt;span&gt; has_backspace&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; opts&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;, noremap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;, expr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_set_keymap&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;TAB&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;                        &amp;#39;coc#pum#visible() ? coc#pum#next(1) : v:lua.check_back_space() ? &amp;quot;&amp;lt;TAB&amp;gt;&amp;quot; : coc#refresh()&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        opts)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_set_keymap&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;S-TAB&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;                        [[coc#pum#visible() ? coc#pum#prev(1) : &amp;quot;\&amp;lt;C-h&amp;gt;&amp;quot;]]&lt;&#x2F;span&gt;&lt;span&gt;, opts)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_set_keymap&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;cr&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;                        [[coc#pum#visible() ? coc#pum#confirm() : &amp;quot;\&amp;lt;C-g&amp;gt;u\&amp;lt;CR&amp;gt;\&amp;lt;c-r&amp;gt;=coc#on_enter()\&amp;lt;CR&amp;gt;&amp;quot;]]&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        opts)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;c-j&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;Plug&amp;gt;(coc-snippets-expand-jump)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;i&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;c-space&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;coc#refresh()&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;, expr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;--- more keymaps &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;keyset&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;K&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    local&lt;&#x2F;span&gt;&lt;span&gt; cw&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;expand&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;lt;cword&amp;gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;index&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;vim&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;help&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, vim.bo.filetype) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_command&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;h &amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt; cw)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    elseif&lt;&#x2F;span&gt;&lt;span&gt; vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_eval&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;coc#rpc#ready()&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;CocActionAsync&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;doHover&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_command&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;string.format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;!%s %s&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, vim.o.keywordprg, cw))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;span&gt;, {silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I know that nvim-lsp is the new hotness, but coc.nvim just has everything I need. I can use it to format my code, check diagnostics, and use snippets. Moreover, I can use it to check the documentation of a function or keyword. I can also use it to check the definition of a function or keyword. Finally, I can use it to check the references of a function or keyword. I can do all of this with a single plugin.&lt;&#x2F;p&gt;
&lt;p&gt;Moreover, I am able to combine it with the quickfix list:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; _G&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;diagnostic&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;CocActionAsync&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;diagnosticList&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;(err&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; res)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span&gt; err&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span&gt; vim.NIL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            if&lt;&#x2F;span&gt;&lt;span&gt; vim.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;tbl_isempty&lt;&#x2F;span&gt;&lt;span&gt;(res) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then return end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            local&lt;&#x2F;span&gt;&lt;span&gt; items&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            for&lt;&#x2F;span&gt;&lt;span&gt; _, d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt; ipairs&lt;&#x2F;span&gt;&lt;span&gt;(res) &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                local&lt;&#x2F;span&gt;&lt;span&gt; text&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                local&lt;&#x2F;span&gt;&lt;span&gt; type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; d.severity&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                local&lt;&#x2F;span&gt;&lt;span&gt; msg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; d.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;message&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;match&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;([^&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;]+)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;*&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                local&lt;&#x2F;span&gt;&lt;span&gt; code&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; d.code&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                if&lt;&#x2F;span&gt;&lt;span&gt; code&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span&gt; vim.NIL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; or&lt;&#x2F;span&gt;&lt;span&gt; code&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; nil&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; or&lt;&#x2F;span&gt;&lt;span&gt; code&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;NIL&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    text&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[%s] %s&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;):&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;type&lt;&#x2F;span&gt;&lt;span&gt;, msg)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    text&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;[%s|%s] %s&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;):&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;type&lt;&#x2F;span&gt;&lt;span&gt;, code, msg)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                local&lt;&#x2F;span&gt;&lt;span&gt; item&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    filename&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; d.file,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    lnum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; d.lnum,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    end_lnum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; d.end_lnum,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    col&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; d.col,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    end_col&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; d.end_col,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    text&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; text&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;                table.insert&lt;&#x2F;span&gt;&lt;span&gt;(items, item)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setqflist&lt;&#x2F;span&gt;&lt;span&gt;({}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                             {title&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;CocDiagnosticList&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, items&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; items})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            vim.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;cmd&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;bo cope&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_create_augroup&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;CocGroup&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;autocmd&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;User&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    group&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;CocGroup&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    pattern&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;CocLocationsChange&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    desc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Update location list on locations change&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    callback&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; locs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.g.coc_jump_locations&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;setloclist&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;, {}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {title&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;CocLocationList&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, items&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; locs})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        local&lt;&#x2F;span&gt;&lt;span&gt; winid&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.fn.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;getloclist&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;, {winid&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;}).winid&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span&gt; winid&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            vim.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;cmd&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;bel lw&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            vim.api.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;nvim_set_current_win&lt;&#x2F;span&gt;&lt;span&gt;(winid)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;autocmd&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;User&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    group&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;CocGroup&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    pattern&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;CocJumpPlaceholder&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;call CocActionAsync(&amp;#39;showSignatureHelp&amp;#39;)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    desc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Update signature help on jump placeholder&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;autocmd&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;CursorHold&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    group&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;CocGroup&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;silent call CocActionAsync(&amp;#39;highlight&amp;#39;)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    desc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Highlight symbol under cursor on CursorHold&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;})&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For instance, Coc makes it easy to use random LSPs like ltex, which I use for grammar checking in LaTeX:&lt;&#x2F;p&gt;
&lt;video autoplay loop muted playsinline preload=&quot;metadata&quot;&gt;
  &lt;source src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;posts&#x2F;neovim-workflow&#x2F;coc.mp4&quot; type=&quot;video&#x2F;mp4&quot;&gt;
  Your browser doesn&#x27;t support the video tag, which I use in place of .gifs, and&#x2F;or the video formats in use here – sorry!
&lt;&#x2F;video&gt;
&lt;p&gt;Finally, here is my config:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;suggest.noselect&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;coc.preferences.jumpCommand&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;drop&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;coc.preferences.messageLevel&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;warning&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;coc.preferences.maxFileSize&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;1MB&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;coc.preferences.enableMarkdown&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;ltex.language&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;en-US&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;ltex.additionalRules.motherTongue&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;en-US&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;ltex.completionEnabled&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;ltex.sentenceCacheSize&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 6000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;ltex.languageToolHttpServerUri&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;https:&#x2F;&#x2F;api.languagetoolplus.com&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;ltex.checkFrequency&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;save&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;ltex.enabled&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;bibtex&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;context&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;context.tex&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;html&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;latex&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;markdown&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;org&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;restructuredtext&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;rsweave&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;mail&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;norg&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;help&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;ltex.diagnosticSeverity&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;CONFUSED_WORDS&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;warning&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;UPPERCASE_SENTENCE_START&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;warning&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;DATE_WEEKDAY&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;warning&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;MORFOLOGIK_RULE_EN_US&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;error&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;EN_CONTRACTION_SPELLING&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;error&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;EN_A_VS_AN&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;error&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;IN_A_X_MANNER&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;hint&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;PASSIVE_VOICE&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;hint&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;EN_SPECIFIC_CASE&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;hint&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;APOS_AR&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;hint&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;DOUBLE_HYPHEN&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;hint&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;hint&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;hint&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;default&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;information&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;ltex.configurationTarget&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;dictionary&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;userExternalFile&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;disabledRules&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;userExternalFile&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;hiddenFalsePositives&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;userExternalFile&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;ltex.additionalRules.enablePickyRules&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;diagnostic.hintSign&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;✹&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;diagnostic.errorSign&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;✘&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;diagnostic.warningSign&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;diagnostic.infoSign&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;codeLens.enable&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;codeLens.separator&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;codeLens.subseparator&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot; | &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;notification.disabledProgressSources&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;*&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;diagnostic.virtualText&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;diagnostic.virtualTextCurrentLineOnly&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;diagnostic.virtualTextLineSeparator&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;. &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;diagnostic.virtualTextPrefix&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;diagnostic.checkCurrentLine&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;diagnostic.messageTarget&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;float&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;semanticTokens.enable&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;semanticTokens.highlightPriority&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 4096&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;sumneko-lua.enableNvimLuaDev&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;Lua.semantic.enable&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;Lua.hint.enable&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;Lua.hint.arrayIndex&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Disable&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;Lua.hint.paramName&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Literal&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;Lua.hint.setType&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;coc.source.word.filetypes&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;norg&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;text&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;mail&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;suggest.snippetIndicator&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \ue796&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;suggest.completionItemKindLabels&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;keyword&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf1de&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;variable&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\ue79b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;value&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf89f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;operator&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\u03a8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;function&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\u0192&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;reference&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\ufa46&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;constant&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf8fe&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;method&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf09a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;struct&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\ufb44&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;class&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf0e8&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;interface&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf417&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;text&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\ue612&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;enum&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf435&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;enumMember&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf02b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;module&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf40d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;color&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\ue22b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;property&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\ue624&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;field&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf9be&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;unit&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf475&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;event&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\ufacd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;file&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf723&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;folder&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf114&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;snippet&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\ue60b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;typeParameter&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf728&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;    &amp;quot;default&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\uf29c&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;snippets.ultisnips.enable&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;  &amp;quot;snippets.ultisnips.pythonPrompt&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;latex&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#latex&quot; aria-label=&quot;Anchor link for: latex&quot;&gt;Latex&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Finally, as a Math major, I use LaTeX a lot. I use the following plugins to make my LaTeX experience better:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;lervag&#x2F;vimtex&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- LaTeX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- Vimtex config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.vimtex_quickfix_mode&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.vimtex_compiler_latexmk_engines&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;_&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;-lualatex -shell-escape&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.vimtex_indent_on_ampersands&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.vimtex_view_method&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;sioyek&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.matchup_override_vimtex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- Other settings&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.g.latexindent_opt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;-m&amp;quot; &lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;-- for neoformat, I use latexindent&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Together with &lt;code&gt;sioyek&lt;&#x2F;code&gt;, I can compile my LaTeX documents and view them in a pdf viewer automatically. Moreover, I can use &lt;code&gt;latexindent&lt;&#x2F;code&gt; to format my LaTeX documents.&lt;&#x2F;p&gt;
&lt;video autoplay loop muted playsinline preload=&quot;metadata&quot;&gt;
  &lt;source src=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;posts&#x2F;neovim-workflow&#x2F;latex.mp4&quot; type=&quot;video&#x2F;mp4&quot;&gt;
  Your browser doesn&#x27;t support the video tag, which I use in place of .gifs, and&#x2F;or the video formats in use here – sorry!
&lt;&#x2F;video&gt;
&lt;h1 id=&quot;conclusions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#conclusions&quot; aria-label=&quot;Anchor link for: conclusions&quot;&gt;Conclusions&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I know that was a lot, but I hope you learned something new. I have been using Neovim for a while now, and I have to say that it has been a game changer. I have been able to customize my text editor to fit my needs and make me more productive. I hope that you can do the same.&lt;&#x2F;p&gt;
&lt;p&gt;Please let me know if you have any questions or comments. I would love to hear from you.&lt;&#x2F;p&gt;
&lt;p&gt;SeniorMars&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>How To SeniorMars: A Workflow Series</title>
          <pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/tooling/</link>
          <guid>https://seniormars.com/posts/tooling/</guid>
          <description xml:base="https://seniormars.com/posts/tooling/">&lt;h1 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Time and time again, I see people struggling with their workflow. They are either too slow, too inefficient, or too unproductive. I have been there, and I have seen the light. I even taught a college class on how to maximize your workflow. However, now it is time to share my personal workflow with the world. This means I will assume you know the basics of these tools in order for us to get into the nitty-gritty of how I use them. This is the way of the SeniorMars; I’ll teach you how I use my tools and how I have optimized my workflow to be as efficient as possible.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;part-zero-terminal&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#part-zero-terminal&quot; aria-label=&quot;Anchor link for: part-zero-terminal&quot;&gt;Part Zero: Terminal&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Okay, you have been using the terminal for a while now. You know the basics, and you are comfortable with it. But are you using it to its full potential? Do you know the tools that can make your life easier? In this post, I will show you how I use the terminal to its full potential.&lt;&#x2F;p&gt;
&lt;p&gt;Read the full post: &lt;a href=&quot;&#x2F;posts&#x2F;terminal&#x2F;&quot;&gt;A Terminal Workflow for Productivity&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;part-one-neovim&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#part-one-neovim&quot; aria-label=&quot;Anchor link for: part-one-neovim&quot;&gt;Part One: Neovim&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;At the heart of my productivity (and unproductively) is Neovim. To convince you how powerful it is, I will be going through my configuration and workflow demos! Enough of beginner tutorials and basic setups; let’s get into the real stuff. This is part one of the series, and I hope you enjoy it!&lt;&#x2F;p&gt;
&lt;p&gt;Read the full post: &lt;a href=&quot;&#x2F;posts&#x2F;neovim-workflow&#x2F;&quot;&gt;An Experienced Vimmer’s Workflow&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;part-two-neomutt&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#part-two-neomutt&quot; aria-label=&quot;Anchor link for: part-two-neomutt&quot;&gt;Part Two: Neomutt&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Email is a necessary evil. We all have to deal with it, and we all have to manage it. But are you managing it efficiently? In this post, I will show you how I use Neomutt to manage my email efficiently. Spoiler alert: I don’t use a mouse.&lt;&#x2F;p&gt;
&lt;p&gt;Read the full post: &lt;a href=&quot;&#x2F;posts&#x2F;neomutt&#x2F;&quot;&gt;A Terminal Email Client As An Alternative To Gmail: The Old Dog Neomutt And Pals.&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;I intend to make this a series of posts, each focusing on a different tool or aspect of my workflow. This will be updated once a new part is published. Stay tuned!&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Every day is an Owl&#x27;s Birthday! A rigorous exploration to a classic problem through math and rust</title>
          <pubDate>Thu, 20 Jun 2024 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/everyday-birthday/</link>
          <guid>https://seniormars.com/posts/everyday-birthday/</guid>
          <description xml:base="https://seniormars.com/posts/everyday-birthday/">&lt;h1 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;A few days ago, I was working on a UI framework (in rust btw) for a personal project; abruptly, I decided to check my group chat and noticed a screenshot of a question from our university’s anonymous forum, Fizz. As it so happened, the question was a math problem–instantly, it became clear to me that I was &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;xkcd.com&#x2F;356&#x2F;&quot;&gt;nerd sniped&lt;&#x2F;a&gt; (as any math major would). The question was simple and one you have probably thought about at some point in your life:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Do yall think there is a person at rice for every birthday in the year? Like
do you think every birthday is represented in the student body?&lt;br&gt;
&lt;cite&gt;– Anonymous&lt;&#x2F;cite&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Not only that, but it was a classic problem in probability theory! Unfortunately, by the time I saw the question, someone had posted a pretty good answer (funnily enough, someone thought I was the one who anonymously posted the answer). Alas, my nerd-sniped brain was already in full gear, so instead, I am taking this as an opportunity to polish my writing skills 😎. Join me as I walk you through my (hopefully rigorous) exploration of this classic problem.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;the-problem-and-possible-leads&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-problem-and-possible-leads&quot; aria-label=&quot;Anchor link for: the-problem-and-possible-leads&quot;&gt;The Problem and possible leads&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;In all honestly, this question is fun and can be approached in many ways. Clearly, a trivial solution would involve me, a rice student, having 365 (.25?) friends and checking if each has a different birthday. In the best case, the answer is yes; in the worst case, the answer is no. Unfortunately, I spend most of my time at the library, so such a method would be infeasible; a more rigorous approach is desirable. As a math major, I have found abstraction often easier to work with than a specific case. Naturally, we’ll start by abstracting the problem to a more general form and then returning to the original problem.&lt;&#x2F;p&gt;
&lt;p&gt;If you are familiar with continuous probability theory, perhaps you’ve heard about the Birthday Paradox. The paradox states that for a random group of 23 people, there is a 50% chance that two people share the same birthday (surprising, I know). While this is not the same problem as our question, they are tangentially related! Hence, we will use some of the same techniques (notably counting 😭). Let’s rephrase the question with some assumptions for our first lead!&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Do you think it’s likely that a collection of Rice University students would include at least one student with each possible birthday? Assuming each birthday is equally likely, how many students would be needed to expect that every day of the year, 365 days, is someone’s birthday?” &lt;br&gt;
— Problem 1.1&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;The most important part of this rephrasing is the assumption (a restriction which we will remove later) of equally likely birthdays and the number of days. Moreover, while the rephrasing is a bit awkward to some, to others, it may remind them of another problem: The Coupon Collector!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;the-coupon-collector-problem-and-expected-value&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-coupon-collector-problem-and-expected-value&quot; aria-label=&quot;Anchor link for: the-coupon-collector-problem-and-expected-value&quot;&gt;The Coupon Collector Problem and Expected Value&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Now, I’m not a computer scientist, so I won’t simply “reduce” the problem and call it a day. First, the goal of the coupon collector problem is to determine the expected number of coupons needed to collect all coupons. Instead of coupons, we deal with birthdays and quantify the number of students needed to ensure having all birthdays. In other words, we are trying to calculate the expected number of students required to have all birthdays, which is precisely Problem 1.1!&lt;&#x2F;p&gt;
&lt;p&gt;The idea is simple: keep adding students one by one until you have all birthdays. Following this process, you notice that the first student is guaranteed a unique birthday. Moreover, each new student has a probability of $\frac{x}{365}$ of having a new birthday, where $x$ is the number of unique birthdays left. In contrast, the expected probability of how many students you have to go through until you see a new birthday is the reciprocal probability of seeing a new birthday, i.e., $\frac{365}{x}$. We derive this as if $k$ birthdays are already taken, the probability of $P_{\text{new}}$ is given by $P_{\text{new}} = \frac{365 - k}{365}$; hence, geometric distribution (proof:&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;) tell us that the probability to counter an event with probability $P_{\text{new}}$ is $\frac{1}{P_{\text{new}}}$—which is $\frac{365}{365 - k}$. Finally, from our assumptions, we know that the birthday is equally likely (independent), which means a new birthday does not depend on the previous birthdays. Therefore, I claim we can sum the expected number of students needed to see a new birthday for each $k$ unique birthday multiplied by the number of birthdays. Let’s prove this:&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-center&quot;&gt;
          &lt;p&gt;Proof of claim&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;&lt;strong&gt;Proof&lt;&#x2F;strong&gt;: Let $T$ be the number of students needed for all birthdays to be seen, and let $T_k$ be the number of students needed to see a new birthday, given that $k - 1$ birthdays are already taken. As we have noted before, the probability of seeing a new birthday is $P_k = \frac{365 - k}{365}$, which means the expected number of students needed to see a new birthday is $\frac{1}{p_k} = \frac{365}{365 - k}$. Now, let’s readjust the sum to avoid diving by zero, and we see:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\begin{align*}
\mathbb{E}[T] &amp;amp;= \mathbb{E}[(T_1 + T_2 + \ldots + T_{365})]&amp;amp; &amp;amp;\\
&amp;amp;= \mathbb{E}[T_1] + \mathbb{E}[T_2] + \ldots + \mathbb{E}[T_{365}]&amp;amp; &amp;amp;\quad\text{by linearity of expectation}\\
&amp;amp;= \frac{1}{p_1} + \frac{1}{p_2} + \ldots + \frac{1}{p_{365}}&amp;amp; &amp;amp;\quad\text{by definition of expectation}\\
&amp;amp;= \frac{365}{365} + \frac{365}{364} + \ldots + \frac{365}{1}&amp;amp; &amp;amp;\quad\text{by definition of } \frac{1}{p_k}\\
&amp;amp;= 365 \left( \frac{1}{365} + \frac{1}{364} + \ldots + \frac{1}{1} \right)&amp;amp; &amp;amp;\quad\text{by distributive property}\\
&amp;amp;= 365 \sum_{i=1}^{365} \frac{1}{i}&amp;amp; &amp;amp;\quad\text{as desired} \tag*{$\blacksquare$}
\end{align*}
$$&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;Now, we would be done here, but notice that the last summation is the $n^{th}$ &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Harmonic_number&quot;&gt;harmonic number&lt;&#x2F;a&gt;, $H_n$. This summation is known to be $\ln(n) + \gamma + \epsilon(n)$, where $\gamma$ is the Euler-Mascheroni constant and $\epsilon(n)$ is the error term. Hence, we can approximate the expected number of students needed to see all birthdays as $365 H_{365} \approx 365 \ln(365) + 365 \gamma + \epsilon(365)$. If we let $\gamma \approx 0.5772156649$ and the error bound be bounded by $\frac{1}{2} + \mathcal{O}(\frac{1}{n})$, then we can calculate this as approximately $2364$ students needed!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;exploring-leap-days-through-our-lead&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#exploring-leap-days-through-our-lead&quot; aria-label=&quot;Anchor link for: exploring-leap-days-through-our-lead&quot;&gt;Exploring leap days through our lead&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;However, an astute reader would notice that this is still the expected number of students needed to see all birthdays, not the number required to ensure all birthdays are seen. For now, however, we will explore this setup more. For instance, what if we account for leap days, i.e., someone is born on February 29th? Let’s rephrase the problem with this in mind:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Do you think it’s likely that a collection of Rice University students would include at least one student with each possible birthday? Assuming each birthday is equally likely, how many students would be needed to expected that every day of the year, including leap days, is someone’s birthday?” &lt;br&gt;
— Problem 1.15&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Easily, we can change our sum to $365.25$ instead of $365$, and the expected number of students needed to see all birthdays would be $\frac{365.25}{365} \cdot 2364 \approx 2366$ students, but this is &lt;em&gt;without&lt;&#x2F;em&gt; our error bound, i.e., the probabilities of the event happening to adjust for leap days. In fact, to get the error bound, we have to multiply the likelihood of covering all possible birthdays in a random group process such that each day has a slightly different probability due to our leap day. Using the logic described previously, to calculate such a risk, we can multiply:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\frac{365}{365.25} \times \frac{364}{364.25} \times \frac{363}{363.25} \times \cdots \times \frac{1}{1.25} = \frac{365!}{365.25^{365}} = \prod_{i=1}^{365} \frac{i}{i + 0.25}
$$&lt;&#x2F;p&gt;
&lt;p&gt;While this might look complicated (it is!) – thankfully, this looks like the &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Gamma_function&quot;&gt;gamma function&lt;&#x2F;a&gt;! The gamma function is a generalization of the factorial function to the $\mathbb{C}^+$, and it is defined as $\Gamma(n) = (n - 1)!$. This allows us to deal with some non-integer values, and in our case, we can use the gamma function to calculate the probability of seeing all birthdays in a group of 365.25 students. Hence,&lt;&#x2F;p&gt;
&lt;p&gt;$$
\prod_{i=1}^{365} \frac{i}{i + 0.25} = \frac{\Gamma(366)\Gamma(1.25)}{\Gamma(366.25)}
$$&lt;&#x2F;p&gt;
&lt;p&gt;Now, thanks to Wolfram Alpha, we can calculate this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;result = (Gamma[366] * Gamma[1.25]) &#x2F; Gamma[366.25]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;result&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;But we are exploring, so let’s calculate this by hand! Honestly, without Wikipedia, I would have been stuck, but it turns out that we have a general formula for the gamma function in the form of $\Gamma(n + \frac{1}{4}) = \Gamma(\frac{1}{4}) \frac{(4n - 3)!!!!}{4^n}$. However, what’s even nicer is that we can approximate: $\frac{\Gamma(n + \frac{1}{4})}{\Gamma(n)}$ by using $\frac{\Gamma(a + \epsilon)}{\Gamma(a)} \approx \left(a + \frac{\epsilon}{2} - \frac{1}{2}\right)^{\epsilon}$. Hence, we get:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\frac{\Gamma(366.25)}{\Gamma(366)} \approx \left(366 + \frac{0.25}{2} - \frac{1}{2}\right)^{0.25} = \left(366 + 0.125 - 0.5\right)^{0.25} = \left(365.625\right)^{0.25}
$$&lt;&#x2F;p&gt;
&lt;p&gt;This means the original expression can then be approximated as:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\frac{\Gamma(366) \Gamma(1.25)}{\Gamma(366.25)} \approx \Gamma(1.25) \left(365.625\right)^{-0.25}
$$&lt;&#x2F;p&gt;
&lt;p&gt;Now by expanding out the gamma function $\Gamma(\frac{5}{4}) = \frac{1}{4} \Gamma(\frac{1}{4})$, we can calculate this as&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-2-1&quot;&gt;&lt;a href=&quot;#fn-2&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\frac{\Gamma(366)\Gamma(1.25)}{\Gamma(366.25)} \approx \frac{\Gamma(\frac14)}{4 \sqrt[4]{365.625}}
$$&lt;&#x2F;p&gt;
&lt;p&gt;Now, thanks to the work of &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;oeis.org&#x2F;A068466&quot;&gt;others&lt;&#x2F;a&gt;, we find that $\Gamma(\frac{1}{4}) = 3.6256099082219083119$. This means we can calculate the probability of seeing all birthdays in a group of 365.25 students as:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\frac{\Gamma(366)\Gamma(1.25)}{\Gamma(366.25)} \approx 0.20728
$$&lt;&#x2F;p&gt;
&lt;p&gt;Hell ya! Finally, we can calculate the expected number of students needed to see all birthdays in a group of 365.25 students as follows:&lt;&#x2F;p&gt;
&lt;p&gt;$$
2366 + 0.20728 \cdot \frac{365.25}{0.25} \approx 2669
$$&lt;&#x2F;p&gt;
&lt;p&gt;We can continue with this lead, but I want to explore another lead I have in mind for now – we’ll return to this later!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;the-inclusion-exclusion-principle&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-inclusion-exclusion-principle&quot; aria-label=&quot;Anchor link for: the-inclusion-exclusion-principle&quot;&gt;The Inclusion-Exclusion Principle&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;So far, we’ve explored the Coupon Collector approach, which is a solid starting point. But now, let’s delve into a more powerful tool in combinatorics: the Inclusion-Exclusion Principle. This is the very method that the person who responded on Fizz used! It’s a fascinating approach, particularly useful for counting the number of elements in the union of several sets, even when those sets are not disjoint.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Do you think it’s likely that a collection of Rice University students would include at least one student with each possible birthday? How can we calculate the probability that every birthday is represented assuming uniform distribution?” &lt;br&gt;
— Problem 1.2&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;In other words, we want to find the probability that at least one student has each birthday. In fact, this is the reverse of asking if nobody has a birthday on those days, which is easier to calculate (I’ll explain in a bit). We can use the Inclusion-Exclusion Principle to calculate the probability that nobody has a birthday on a particular day! The inclusion principle states that if we have events $A_i, i = { 1, 2, \ldots, n}$ and $\mathcal{P}(A_i)$ is the probability of event $A_i$. The probability of the union of their union (i.e., the likelihood that at least one of the events occurs) is given by:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\begin{align*}
\mathcal{P} \left( \bigcup_{i=1}^n A_i \right) &amp;amp;= \sum_{i=1}^n \mathcal{P}(A_i)\ - \sum_{1\leq i&amp;lt;j\leq n} \mathcal{P}(A_i \cap A_j) \\
&amp;amp;+ \quad \sum_{1\leq i&amp;lt;j&amp;lt;k\leq n}\mathcal{P}(A_i \cap A_j \cap A_k) - \cdots + (-1)^{n-1} \mathcal{P}( A_1 \cap \cdots \cap A_n) \\
&amp;amp;= \sum_{\emptyset \neq J\subseteq {1,2,\ldots ,n}} (-1)^{|J|-1}\mathcal{P}\left(\bigcap_{j\in J}A_{j}\right)
\end{align*}
$$&lt;&#x2F;p&gt;
&lt;p&gt;The intuitive way to think about the Inclusion-Exclusion Principle is as a method for correcting overcounts when calculating the probability of at least one of several events occurring. In the context of our problem with Rice University students, each event $A_i$ can be thought of as the event that no student has their birthday on day $i$. Since these events overlap (students can share birthdays or not have birthdays on multiple specific days), we need to adjust for the overlap to avoid double-counting the probabilities. Now, before we use it, however, let’s prove it and a claim that will be useful for our proof.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-center&quot;&gt;
          &lt;p&gt;Proof of Inclusion-Exclusion Principle&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;&lt;strong&gt;Proof&lt;&#x2F;strong&gt;: We proceed by the principle of induction. Let’s denote the principle as&lt;&#x2F;p&gt;
&lt;p&gt;$$
p(n) = \mathcal{P} \left( \bigcup_{i=1}^n A_i \right) = \sum_{\emptyset \neq J\subseteq {1,2,\ldots ,n}} (-1)^{|J|-1}\mathcal{P}\left(\bigcap_{j\in J}A_{j}\right), n \in \mathbb{N}, |A_i| = n, n \geq 2
$$&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Base Case&lt;&#x2F;strong&gt;: For $n = 2$, let us denote $A_1 = E$ and $A_2 = F$. Then, observe that $E$ and $F-E$ are exclusive events, which means that their union $\mathcal{P}(E \cup F) = \mathcal{P}(E \cup (F - E)) = \mathcal{P}(E) + \mathcal{P}(F - E)$. Moreover, we also know that $F-E$  and $F \cup E$ are exclusive events with their union being $F$. Hence, we can write $\mathcal{P}(F)$ $= \mathcal{P}((F - E) \cup (F \cap E)) = \mathcal{P}(F - E) + \mathcal{P}(F \cap E)$. Thus:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\begin{align*}
\mathcal{P}(E \cup F) &amp;amp;= \mathcal{P}(E) + \mathcal{P}(F - E)\\
&amp;amp;= \mathcal{P}(E) + \left(\mathcal{P}(F) - \mathcal{P}(E \cap F)\right)\\
&amp;amp;= \sum_{\emptyset \neq J\subseteq {1,2}} (-1)^{|J|-1}\mathcal{P}\left(\bigcap_{j\in J}A_{j}\right)
\end{align*}
$$&lt;&#x2F;p&gt;
&lt;p&gt;Where the second line follows from the fact that $E \cap F = E$ and $F - E = F$. To read the last line notice that the non-empty subsets of $J$ are $\{1, 2\}$, $\{1\}$, $\{2\}$, so the summation is $\mathcal{P}(E) + \mathcal{P}(F) - \mathcal{P}(E \cap F)$; the base case holds.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Inductive Step&lt;&#x2F;strong&gt;: Assume that $p(k)$ holds for some $k \in \mathbb{N}$, we show that $p(k+1)$ holds. Let $A_1, A_2, \ldots, A_{k+1}$ be events, then we can write:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\begin{align*}
\mathcal{P} \left( \bigcup_{i=1}^{k+1} A_i \right) &amp;amp;= \mathcal{P} \left( \left[\bigcup_{i=1}^{k} A_i \right] \cup A_{k+1} \right)&amp;amp; &amp;amp;\text{by definition}\\
&amp;amp;= \mathcal{P}\left( \bigcup_{i=1}^{k} A_i \right) + \mathcal{P}(A_{k+1}) - \mathcal{P} \left( \left[\bigcup_{i=1}^{k} A_i \right] \cap A_{k+1} \right)&amp;amp; &amp;amp;\text{base case with } E = \bigcup_{i=1}^{k} A_i, F = A_{k+1}\\
&amp;amp;= \mathcal{P}\left( \bigcup_{i=1}^{k} A_i \right) + \mathcal{P}(A_{k+1}) - \mathcal{P} \left( \bigcup_{i=1}^{k} \left(A_i \cap A_{k+1}\right) \right)&amp;amp; &amp;amp;\text{by distributive property}
\end{align*}
$$&lt;&#x2F;p&gt;
&lt;p&gt;Notice that the first and last terms are $n-$unions, thus the inductive hypothesis holds:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\begin{align*}
\mathcal{P} \left( \bigcup_{i=1}^{k+1} A_i \right) &amp;amp;= \mathcal{P}\left( \bigcup_{i=1}^{k} A_i \right) + \mathcal{P}(A_{k+1}) - \mathcal{P} \left( \bigcup_{i=1}^{k} \left(A_i \cap A_{k+1}\right) \right)&amp;amp; &amp;amp;\\
&amp;amp;= \left[\sum_{\emptyset \neq J\subseteq {1,2,\ldots ,k}} (-1)^{|J|-1}\mathcal{P}\left(\bigcap_{j\in J}A_{j}\right)\right] + \mathcal{P}(A_{k+1})&amp;amp; &amp;amp; \\
&amp;amp;- \left[\sum_{\emptyset \neq J\subseteq {1,2,\ldots ,k}} (-1)^{|J|-1}\mathcal{P}\left(\bigcap_{j\in J} \left(A_{j} \cap A_{k+1}\right)\right)\right]&amp;amp; &amp;amp;\text{by inductive hypothesis}\\
\end{align*}
$$&lt;&#x2F;p&gt;
&lt;p&gt;Now, observe:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\mathcal{P}(A_{k+1}) = \sum_{\substack{J \subseteq {1, 2, \ldots, k+1} \ k+1 \in J, |J|=1}} (-1)^{|J|-1} \mathcal{P} \left( \bigcap_{j \in J} A_j \right)
$$&lt;&#x2F;p&gt;
&lt;p&gt;And for the terms with intersections $ A_j \cap A_{k+1} $:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\mathcal{P} \left( \bigcap_{j \in J} (A_j \cap A_{k+1}) \right) = \mathcal{P} \left( \bigcap_{j \in (J \cup {k+1})} A_j \right)
$$&lt;&#x2F;p&gt;
&lt;p&gt;Thus, the equation becomes:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\begin{align*}
\mathcal{P} \left( \bigcup_{i=1}^{k+1} A_i \right) &amp;amp;= \sum_{\emptyset \neq J \subseteq {1, 2, \ldots, k}} (-1)^{|J|-1} \mathcal{P} \left( \bigcap_{j \in J} A_j \right) \\
&amp;amp;\quad + \sum_{\substack{J \subseteq {1, 2, \ldots, k+1} \ k+1 \in J, |J|=1}} (-1)^{|J|-1} \mathcal{P} \left( \bigcap_{j \in J} A_j \right) \\
&amp;amp;\quad - \sum_{\emptyset \neq J \subseteq {1, 2, \ldots, k}} (-1)^{|J|-1} \mathcal{P} \left( \bigcap_{j \in (J \cup {k+1})} A_j \right)
\end{align*}
$$&lt;&#x2F;p&gt;
&lt;p&gt;Combining all these terms, I claim we have $(\star)$:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\mathcal{P} \left( \bigcup_{i=1}^{k+1} A_i \right) = \sum_{\emptyset \neq J’ \subseteq {1, 2, \ldots, k+1}} (-1)^{|J’|-1} \mathcal{P} \left( \bigcap_{j \in J’} A_j \right)\quad (\star)
$$&lt;&#x2F;p&gt;
&lt;p&gt;All that is left is proving $(\star)$, but it’s not that important for the reader.&lt;&#x2F;p&gt;
&lt;details&gt;
&lt;summary&gt;Proof of $(\star)$&lt;&#x2F;summary&gt;
&lt;p&gt;
&lt;p&gt;Let $E = { J \subseteq {1, 2, \ldots, k} \mid J \neq \emptyset }$ and $F = { J \subseteq {1, 2, \ldots, k+1} \mid J \neq \emptyset }$. Then, $F - E = { {k+1} } \cup { {k+1} \cup x \mid x \in E }$.&lt;&#x2F;p&gt;
&lt;p&gt;To prove the claim, we need to show that every element $y$ in $F - E$ is in ${ {k+1} } \cup { {k+1} \cup x \mid x \in E }$ and vice versa. Suppose $y \in F - E$. This means $y \in F$ and $y \notin E$. Since $y \in F$, we have $y \subseteq {1, 2, \ldots, k+1}$ and $y \neq \emptyset$. Additionally, $y \notin E$ implies $y \not\subseteq {1, 2, \ldots, k}$. This means there exists an element $m \in y$ such that $m \notin {1, 2, \ldots, k}$. The only such $m$ is $k+1$, so $k+1 \in y$.&lt;&#x2F;p&gt;
&lt;p&gt;Consider two cases: $y = {k+1}$ or $y \supset {k+1}$, i.e., $y = {k+1} \cup x$ for some $x \subseteq {1, 2, \ldots, k}$. In the second case, since $y \notin E$, $x \neq \emptyset$, implying $x \in E$. Thus, $y \in { {k+1} } \cup { {k+1} \cup x \mid x \in E }$.&lt;&#x2F;p&gt;
&lt;p&gt;Conversely, suppose $y \in { {k+1} } \cup { {k+1} \cup x \mid x \in E }$. This means either $y = {k+1}$ or $y = {k+1} \cup x$ for some $x \in E$. In both cases, $y \subseteq {1, 2, \ldots, k+1}$ and $y \neq \emptyset$, so $y \in F$. Additionally, $y \notin E$ because if $y = {k+1}$, clearly $y \not\subseteq {1, 2, \ldots, k}$, and if $y = {k+1} \cup x$ and $x \in E$, $y$ contains $k+1$ which is not in ${1, 2, \ldots, k}$. Hence, $y \in F - E$.&lt;&#x2F;p&gt;
&lt;p&gt;Combining both directions, we have shown $F - E = { {k+1} } \cup { {k+1} \cup x \mid x \in E }$. This completes the proof of $(\star)$.&lt;&#x2F;p&gt;
&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;p&gt;Equivalently, we can express $J’$ as $J’ = (J \cup { \{k+1\} } \cup \{ \{k+1\} \cup x \mid x \in J \})$ through our claim. This completes the inductive step; thus, through the principle of induction, we have proven the Inclusion-Exclusion Principle, $p(n)$ for $n \in \mathbb{N}$. $$\tag*{$\blacksquare$}$$&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;That took a bit, but now we can use it freely 😎! Fix $n$, the number of students, and let $m$ be a set of birthdays. Clearly, for a set of $m$ days, the probability that nobody has a birthday on those days is $(1 - \frac{m}{365})^n$. Now to tie this to the Inclusion-Exclusion Principle, we need to state a corollary 🙃:&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-center&quot;&gt;
          &lt;p&gt;Corollary of IEP&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;&lt;strong&gt;Corollary&lt;&#x2F;strong&gt;: In the probabilistic version of the inclusion-exclusion principle, the probability of the intersection $A_i, i \in I$ only depends on the cardinality of $I$, meaning for every $k \in {1, \ldots, n}$, there exists $a_k$ such that&lt;&#x2F;p&gt;
&lt;p&gt;$$
a_k = \mathcal{P}(A_I) \quad \text{for every} \quad I \subseteq {1, \ldots, n} \quad \text{with} \quad |I| = k
$$&lt;&#x2F;p&gt;
&lt;p&gt;Then, the formula simplifies to&lt;&#x2F;p&gt;
&lt;p&gt;$$
\mathcal{P} \left( \bigcup_{i=1}^n A_i \right) = \sum_{k=1}^n (-1)^{k-1} \binom{n}{k} a_k
$$&lt;&#x2F;p&gt;
&lt;p&gt;This result arises due to the combinatorial interpretation of the binomial coefficient $\binom{n}{k}$ and the independence of the events $A_i$.&lt;&#x2F;p&gt;
&lt;details&gt;
&lt;summary&gt;Proof of Corollary&lt;&#x2F;summary&gt;
 &lt;p&gt;
&lt;p&gt;Let’s denote the probability of the union of $n$ events $A_i$ as $\mathcal{P} \left( \bigcup_{i=1}^n A_i \right)$. According to the inclusion-exclusion principle, we have:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\mathcal{P} \left( \bigcup_{i=1}^n A_i \right) = \sum_{\emptyset \neq J \subseteq {1, 2, \ldots, n}} (-1)^{|J|-1} \mathcal{P} \left( \bigcap_{j \in J} A_j \right)
$$&lt;&#x2F;p&gt;
&lt;p&gt;Given that the probability of the intersection $A_i$ only depends on the cardinality of $I$, we let $a_k = \mathcal{P}(A_I)$ for any $I$ with $|I| = k$. We can then rewrite the inclusion-exclusion formula as:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\mathcal{P} \left( \bigcup_{i=1}^n A_i \right) = \sum_{k=1}^n \sum_{\substack{J \subseteq {1, 2, \ldots, n} \ |J| = k}} (-1)^{k-1} a_k
$$&lt;&#x2F;p&gt;
&lt;p&gt;Since there are $\binom{n}{k}$ subsets $J$ of size $k$ from $n$ elements, the expression simplifies to:
$$
\mathcal{P} \left( \bigcup_{i=1}^n A_i \right) = \sum_{k=1}^n (-1)^{k-1} \binom{n}{k} a_k
$$&lt;&#x2F;p&gt;
&lt;p&gt;For the case where the events $A_i$ are independent and identically distributed, we have $\mathcal{P}(A_i) = p$ for all $i$, and thus $a_k = p^k$. Substituting $a_k = p^k$ into the formula, we get:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\mathcal{P} \left( \bigcup_{i=1}^n A_i \right) = \sum_{k=1}^n (-1)^{k-1} \binom{n}{k} p^k
$$&lt;&#x2F;p&gt;
&lt;p&gt;Which completes the proof of the corollary. $$
\tag*{$\blacksquare$}
$$&lt;&#x2F;p&gt;
&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;Using the corollary, we can finally calculate the probability our question asks for! Let $A_i$ be the event that nobody has a birthday on day $i$, then the probability that at least one student has each birthday is given by:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\sum_{m=0}^{365} (-1)^m \binom{365}{m} \left(1 - \frac{m}{365}\right)^n = \frac{1}{365^n} \sum_{m=0}^{365} (-1)^m \binom{365}{m} (365 - m)^n
$$&lt;&#x2F;p&gt;
&lt;p&gt;Now, we can calculate this for $n = 2366$ and $n = 2669$ to see if our results match up!&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;(* Define the summation function *)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;s[n_] := Sum[(-1)^m Binomial[365, m] (1 - m&#x2F;365)^n, {m, 0, 365}]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;(* Compute the summation for n = 2366 *)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;s2366 = s[2366]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;(* Compute the summation for n = 2669 *)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;s2669 = s[2669]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We end up with $n = 2366$ having a probability of $0.573$ and $n = 2669$ having a probability of $0.785$. This is a bit surprising, as the expected number of students needed to see all birthdays was $2366$ students, but the likelihood of seeing all birthdays was only $57.3%$ using that number. This is because the expected number of students needed to see all birthdays is the average number of students needed to see all birthdays. Still, the probability of seeing all birthdays is one minus the probability of not seeing all birthdays. This subtle but essential distinction shows the power of different probability theory methods (and leads)!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;monte-carlo-simulation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#monte-carlo-simulation&quot; aria-label=&quot;Anchor link for: monte-carlo-simulation&quot;&gt;Monte Carlo Simulation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Now that we have come up with two different methods to solve similar problems, I want to explore another lead: Monte Carlo Simulation (honestly, so this blog has pictures, lol). Monte Carlo simulations are beneficial when dealing with complex probability problems. Instead of solving the problem analytically, we often simulate the scenario and observe the outcomes. In our case, we will simulate the assignment of birthdays to students repeatedly and count how often all 365 days are represented. Unfortunately, we must move to the computing land and code it up. I wanted an easy, fast, and clean language to prototype this, so, of course, I chose &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.rust-lang.org&#x2F;&quot;&gt;rust&lt;&#x2F;a&gt; 🦀&lt;&#x2F;p&gt;
&lt;p&gt;Since this is a math blog, I’ll keep the code to a minimum. The concept is straightforward: we assign a random birthday to each student and check if all 365 days are represented. We repeat this process numerous times and calculate the probability of seeing all birthdays. To optimize our models for the problem, I’ve decided to create an interface for our simulations (or a trait in Rust land):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;pub trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Simulation&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    &#x2F;&#x2F; Number of students that will be assigned birthdays&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; students&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u16&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 10&lt;&#x2F;span&gt;&lt;span&gt;] {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2366&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 2669&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 3000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 4000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 4500&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 5000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 6000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 7000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 8000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 9000&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; days&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; u16&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; Number of days in a year&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;        365&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; simulations&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; u16&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; Number of simulations to run&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;        10_000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; run&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This will allow us to create different models for our simulations, such as a simple model randomly assigning birthdays to students and two more I have in mind. Here is our first model:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;pub struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; BasicModel&lt;&#x2F;span&gt;&lt;span&gt;{}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Simulation&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; BasicModel&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; run&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; (days, simulations, students)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;days&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;simulations&lt;&#x2F;span&gt;&lt;span&gt;(),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;students&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let mut&lt;&#x2F;span&gt;&lt;span&gt; rng&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; rand&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;thread_rng&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let mut&lt;&#x2F;span&gt;&lt;span&gt; birthdays&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; HashSet&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;_,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; RandomState&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; HashSet&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;with_capacity&lt;&#x2F;span&gt;&lt;span&gt;(days);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        students&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;into_iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;            &#x2F;&#x2F; for each number of students&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;simulations)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; we run the simulation&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                    &#x2F;&#x2F; for each simulation&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                    .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;_&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        birthdays&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; so we don&amp;#39;t have to allocate each time&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        birthdays&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;extend&lt;&#x2F;span&gt;&lt;span&gt;((&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;num)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;_&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                            rng&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;gen_range&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;days)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; Generate a random day of the year&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        }));&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; add a random birthday to the HashSet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;                        usize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(birthdays&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;len&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span&gt; days)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    })&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                    .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;usize&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; sum the results of the simulations&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                    &#x2F;&lt;&#x2F;span&gt;&lt;span&gt; simulations&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; divide by the number of simulations&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            })&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;collect&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In this model, we generate a random birthday for each student and check if all 365 days are represented through a hash set. We repeat this process many times and calculate the probability of seeing all birthdays. We then get the likelihood of seeing all birthdays for each number of students in our &lt;code&gt;students&lt;&#x2F;code&gt; array. Now, we run the code with &lt;code&gt;cargo run --release&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Instant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; Benchmarking&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; basic&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;BasicModel&lt;&#x2F;span&gt;&lt;span&gt; {};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;run&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; (num, result)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;students&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;zip&lt;&#x2F;span&gt;&lt;span&gt;(results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;()) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Num Students: {}, Probability: {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, num, result);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Elapsed: {:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;elapsed&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here are the results:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; cargo run&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --release&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 2366, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.5698&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 2669, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.7893&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 3000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.9072&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 4000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.9948&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 4500, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.9988&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 5000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.9996&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 6000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.9999&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 7000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 8000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 9000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Elapsed:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 6.503436542s&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Anyway, I wanted to make this fast enough to run more simulations, so here is a slightly optimized version of the model where we parallelize the simulation. Parallelizing is a technique that allows us to run multiple computations simultaneously, which can be useful when we have a large number of simulations to run, as in this case!&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Simulation&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; ParModel&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; run&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; (days, simulations, students)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;days&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;simulations&lt;&#x2F;span&gt;&lt;span&gt;(),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;students&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        students&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;into_par_iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; parallelize the outer loop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map_init&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                &#x2F;&#x2F; init set and rand generator&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                ||&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;HashSet&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;with_capacity&lt;&#x2F;span&gt;&lt;span&gt;(days),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; rand&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;thread_rng&lt;&#x2F;span&gt;&lt;span&gt;()),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                &#x2F;&#x2F; for each number of students&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                |&lt;&#x2F;span&gt;&lt;span&gt;(birthdays, rng), num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;simulations)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;_&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                            birthdays&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; so we don&amp;#39;t have to allocate each time&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                            birthdays&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;extend&lt;&#x2F;span&gt;&lt;span&gt;((&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;num)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;_&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                                rng&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;gen_range&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;days&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; u16&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; Generate a random day of the year&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                            }));&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; add a random birthday to the HashSet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;                            u16&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(birthdays&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;len&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span&gt; days)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        })&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u16&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                        &#x2F;&lt;&#x2F;span&gt;&lt;span&gt; simulations&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; sum the results of the simulations&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;collect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, let’s change the main function and the number of simulations to run &lt;code&gt;100,000&lt;&#x2F;code&gt; simulations and test the models:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;pub trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Simulation&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;fmt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Debug&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; Add Debug trait&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; students&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u16&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 10&lt;&#x2F;span&gt;&lt;span&gt;] {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2366&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 2669&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 3000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 4000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 4500&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 5000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 6000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 7000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 8000&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 9000&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; days&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; u16&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;        365&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; simulations&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;        100_000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; run&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; models&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Box&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;dyn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Simulation&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; vec!&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;        Box&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;basic&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;BasicModel&lt;&#x2F;span&gt;&lt;span&gt; {}),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;        Box&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;parallel&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;ParModel&lt;&#x2F;span&gt;&lt;span&gt; {}),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; models {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Instant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;run&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Model: {:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, model);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        for&lt;&#x2F;span&gt;&lt;span&gt; (num, result)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;students&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;zip&lt;&#x2F;span&gt;&lt;span&gt;(results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;()) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;            println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Num Students: {}, Probability: {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, num, result);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Elapsed: {:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;elapsed&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Surprisingly, it only took &lt;code&gt;2m 40s&lt;&#x2F;code&gt; for both models to run $100000$ simulations, which is pretty fast! Here are the results again:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; cargo run&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --release&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Model:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; BasicModel&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 2366, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.57235&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 2669, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.7869&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 3000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.90672&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 4000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.99357&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 4500, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.99841&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 5000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.99958&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 6000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.99997&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 7000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 8000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 9000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Elapsed:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 141.827488417s&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Model:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ParModel&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 2366, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.5726&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 2669, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.78389&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 3000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.90653&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 4000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.99389&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 4500, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.99826&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 5000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.99954&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 6000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.99999&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 7000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 8000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 9000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Elapsed:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 12.1203835s&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Clearly, paralleling the model was worth it. In either case, we see that using a Monte Carlo simulation, we can get a good approximation of the probability of seeing all birthdays in a group of students. I don’t like computation, but you gotta admit, this is cool as it matches our work so far! But now, let’s move on to the proof of&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-3-1&quot;&gt;&lt;a href=&quot;#fn-3&quot;&gt;3&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;—jk the third model and pretty pictures!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;the-iep-model-and-plots&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-iep-model-and-plots&quot; aria-label=&quot;Anchor link for: the-iep-model-and-plots&quot;&gt;The IEP model and plots!&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Let’s move on to the third model, which uses the Inclusion-Exclusion Principle. Since the IEP is deterministic, we don’t need to run simulations. Instead, we can calculate the probability of seeing all birthdays in a group of students directly. Here is the code for the model:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Simulation&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; IEPModel&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; run&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; (days, students)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;days&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;students&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        students&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;into_par_iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; parallelize the outer loop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;iep&lt;&#x2F;span&gt;&lt;span&gt;(days, num))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;collect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; IEPModel&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; iep&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;, days&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span&gt;, students&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; u16&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; scale&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;pow&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;12&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let mut&lt;&#x2F;span&gt;&lt;span&gt; sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; BigInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;i8&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let mut&lt;&#x2F;span&gt;&lt;span&gt; sign&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;i8&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; year&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; BigUint&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(days);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; power&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; BigInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from_biguint&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;num_bigint&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Sign&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Plus&lt;&#x2F;span&gt;&lt;span&gt;, year&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;pow&lt;&#x2F;span&gt;&lt;span&gt;(students&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;into&lt;&#x2F;span&gt;&lt;span&gt;()));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; big_days&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; BigUint&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(days);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let mut&lt;&#x2F;span&gt;&lt;span&gt; binomial_iter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; IterBinomial&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(big_days);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        for&lt;&#x2F;span&gt;&lt;span&gt; (m, binom)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..=&lt;&#x2F;span&gt;&lt;span&gt;days)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;zip&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;mut&lt;&#x2F;span&gt;&lt;span&gt; binomial_iter) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            let&lt;&#x2F;span&gt;&lt;span&gt; diff&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;year&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; BigUint&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(m))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;pow&lt;&#x2F;span&gt;&lt;span&gt;(students&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;into&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            let&lt;&#x2F;span&gt;&lt;span&gt; iterm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; BigInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from_biguint&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;num_bigint&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Sign&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Plus&lt;&#x2F;span&gt;&lt;span&gt;, binom&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span&gt; diff);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            match&lt;&#x2F;span&gt;&lt;span&gt; sign&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;                true&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; +=&lt;&#x2F;span&gt;&lt;span&gt; iterm,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;                false&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -=&lt;&#x2F;span&gt;&lt;span&gt; iterm,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;            &#x2F;&#x2F; Alternate signs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            sign&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; *= -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; scaled_probability&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; = &amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; BigInt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(scale)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &#x2F; &amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;power;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; Scaled by 10e12 to allow precision&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; actual_probability&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; scaled_probability&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;to_u64_digits&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        actual_probability&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span&gt; scale&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Running the model, we get the following results:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Model:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; IEPModel&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 2366, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.573025123519&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 2669, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.785229207305&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 3000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.907229336079&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 4000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.993761854096&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 4500, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.998414022451&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 5000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.999597463865&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 6000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.999974093862&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 7000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.999998333033&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 8000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.999999892737&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Students: 9000, Probability:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.999999993098&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Elapsed:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; 73.884958ms&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;WOW, the IEP model is super fast and accurate! It makes sense since it’s a formula, but I expected something other than $73$ms. With that being said, let’s make some pretty graphs :). First, since this is an exploration, I’ll show the trace graphs of the models (I think it’s really cool). To make these graphs, I used &lt;code&gt;env CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --root -o flamegraph.svg&lt;&#x2F;code&gt; with the &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;flamegraph-rs&#x2F;flamegraph&quot;&gt;flamegraph crate&lt;&#x2F;a&gt;. You can right-click and open these images in a new tab to explore their traces!&lt;&#x2F;p&gt;
&lt;p&gt;The basic model:
&lt;img src=&quot;.&#x2F;flamegraph0.svg&quot; alt=&quot;flamegraph basic&quot; width=&quot;1200&quot; height=&quot;278&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The parallel model:
&lt;img src=&quot;.&#x2F;flamegraph1.svg&quot; alt=&quot;flamegraph parallel&quot; width=&quot;1200&quot; height=&quot;438&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The IEP model:
&lt;img src=&quot;.&#x2F;flamegraph2.svg&quot; alt=&quot;flamegraph iep&quot; width=&quot;1200&quot; height=&quot;470&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Now, let’s plot the results&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-4-1&quot;&gt;&lt;a href=&quot;#fn-4&quot;&gt;4&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt; of the parallel and IEP model to see how they compare. To make these graphs prettier, I decided to map over a range of students, 0 to 9,000, and to run only 10,000 simulations.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;false&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Code to generate plots&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: none;&quot;&gt;
      &lt;p&gt;First, here is the rust code I used to write the data.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;for&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; models {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; title&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;{:?}.csv&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, model);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; csv&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; File&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;create&lt;&#x2F;span&gt;&lt;span&gt;(title)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; bufread&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; BufWriter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(csv);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; header&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;model,students,probability,time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    bufread&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;write_all&lt;&#x2F;span&gt;&lt;span&gt;(header&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;as_bytes&lt;&#x2F;span&gt;&lt;span&gt;())&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;run&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; (num, (result, time))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;enumerate&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; line&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;{:?},{},{},{:?}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, model, num, result, time);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        bufread&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;write_all&lt;&#x2F;span&gt;&lt;span&gt;(line&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;as_bytes&lt;&#x2F;span&gt;&lt;span&gt;())&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here is the python code to generate the plots.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; pandas&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; pd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; seaborn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; sns&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; matplotlib&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;pyplot&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; plt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Load your data&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;df&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; pd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;read_csv&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;data.csv&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Set the overall aesthetics&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;set_theme&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Create the plot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;figure&lt;&#x2F;span&gt;&lt;span&gt;(figsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;  # Larger figure size for better visibility&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Define custom colors for each model&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;palette&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;IEPModel&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;deepskyblue&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;ParModel&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;coral&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plot&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;lineplot&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;students&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;probability&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    hue&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;model&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    style&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;model&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    markers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;False&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    dashes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;False&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;df&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    palette&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;palette&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Customizing x-axis ticks&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xticks&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 2000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 3000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 4000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 5000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 6000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 7000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 8000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 9000&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;0&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;1k&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;2k&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;3k&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;4k&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;5k&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;6k&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;7k&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;8k&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;9k&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Adding annotations (customize as needed)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;axhline&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0.57&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;--&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; color&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;gray&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;axvline&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2366&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;--&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; color&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;gray&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;  # Example vertical line&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plot&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;text&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.55&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;Expected Average&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; verticalalignment&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;bottom&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; horizontalalignment&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;right&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Enhancing the plot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;title&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Probability Comparison Between Models&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xlabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Number of Students&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Probability&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylim&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;  # Set y-axis limits&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;grid&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;True&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; which&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;both&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;--&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; linewidth&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0.5&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Legend&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;legend&lt;&#x2F;span&gt;&lt;span&gt;(title&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Model&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; loc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;upper left&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Save or show the plot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;savefig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;comparison_plot.png&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# clear plot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;clf&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Create a violin plot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;figure&lt;&#x2F;span&gt;&lt;span&gt;(figsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;violinplot&lt;&#x2F;span&gt;&lt;span&gt;(x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;model&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;probability&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;df&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; palette&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Pastel1&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Enhancing the plot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;title&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Probability Distribution by Model&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xlabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Model&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Probability&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Show the plot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;savefig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;violin.png&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;clf&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Assuming time is in the format &amp;#39;866.458µs&amp;#39; and you want to convert it to milliseconds&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;df[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;time_ms&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; df[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;time&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;replace&lt;&#x2F;span&gt;&lt;span&gt;({&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;µs&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;*1e-3&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;ms&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;*1&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;s&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;*1000&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; regex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;True&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(pd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;eval)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Create the scatter plot with regression line&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;figure&lt;&#x2F;span&gt;&lt;span&gt;(figsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;lmplot&lt;&#x2F;span&gt;&lt;span&gt;(x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;students&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;time_ms&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; hue&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;model&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;df&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; ci&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;None&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; palette&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Set1&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Enhancing the plot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;title&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Simulation Time vs Number of Students&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; pad&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;5&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;subplots_adjust&lt;&#x2F;span&gt;&lt;span&gt;(top&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0.85&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;  # Adjust the top spacing of the subplot area&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xlabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Number of Students&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Time (milliseconds)&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;grid&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;True&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Show the plot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;savefig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;scatter.png&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;show&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;Now, here are our plots:&lt;&#x2F;p&gt;
&lt;img src=&quot;.&#x2F;comparison_plot.png&quot; alt=&quot;comparison&quot; width=&quot;1400&quot; height=&quot;800&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;violin.png&quot; alt=&quot;violin&quot; width=&quot;1400&quot; height=&quot;800&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;scatter.png&quot; alt=&quot;scatter&quot; width=&quot;621&quot; height=&quot;500&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;I like graphs because they help us visualize the data and see patterns that might not be immediately obvious from the numbers. In this case, we can see that the IEP model is much faster than the parallel model and that the probability of seeing all birthdays increases as the number of students increases. The violin plot also shows the distribution of probabilities for each model, with the IEP model having a narrower distribution than the parallel model. Finally, we can see that IEP scales linearly with the number of students, while the parallel model scales exponentially. Now, let’s move on to our final section and last model!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;i-read-a-paper-and-found&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#i-read-a-paper-and-found&quot; aria-label=&quot;Anchor link for: i-read-a-paper-and-found&quot;&gt;I read a paper and found…&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Honestly, I was going to call it a day because although I said we would explore the original question, I didn’t know how to account for the fact that birthdays are not uniformly distributed. I had an idea on how to get the actual probabilities, and the last model (soon btw) was going to implement this based on data I got, but it felt like a cop-out. Or at least it was until I found a paper!&lt;&#x2F;p&gt;
&lt;p&gt;First, let’s talk about the assumptions we made. The most important thing to note is that birthdays are not uniformly distributed. The most famous blog about this is Roy Murphy’s &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.panix.com&#x2F;~murphy&#x2F;bday.html&quot;&gt;birthday distribution analysis&lt;&#x2F;a&gt;. For instance, according to the data he collected, August is the most common month to have a birthday. This means that the probability of seeing all birthdays in a group of students is not simply $1 - \frac{m}{365}$, but rather a more complex function that depends on the distribution of birthdays. Moreover, Rice is a specific group of the general population, so it could have a different distribution of birthdays than the general population. It might be possible to answer the question well if I got specific data like zip code and birthdate, but due to ethical reasons, I totally don’t have that data. So that was a dead end — until I found this &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;doi.org&#x2F;10.1016&#x2F;0166-218X(92)90177-C&quot;&gt;paper&lt;&#x2F;a&gt;, &lt;cite&gt; Birthday paradox, coupon collectors, caching algorithms and self-organizing search by Philippe Flajolet&lt;&#x2F;cite&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;So I read the paper (I totally didn’t just read the part that was relevant to my problem 🤧), and it turns out the Coupon Collector’s Problem can be generalized to non-uniform distributions. Specifically, in Theorem $4.1$, Dr. Flajolet gives us the equation:&lt;&#x2F;p&gt;
&lt;p&gt;$$
E(T) = \int_0^\infty \left(1 - \prod_{i=1}^m (1 - e^{-p_i t}) \right) dt.
$$&lt;&#x2F;p&gt;
&lt;p&gt;This is equal to&lt;&#x2F;p&gt;
&lt;p&gt;$$
E(T) = \sum_{q=0}^{m-1} (-1)^{m-1-q} \sum_{|J|=q} \frac{1}{1 - P_J},
$$&lt;&#x2F;p&gt;
&lt;p&gt;Where $ m $ denotes the number of coupons to be collected, and $ P_J $ denotes the probability of getting any coupon in the set of coupons $ J $. Let’s prove this!&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;false&quot;&gt;
      
        &lt;div class=&quot;note-center&quot;&gt;
          &lt;p&gt;Proof of Theorem 4.1&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: none;&quot;&gt;
      &lt;p&gt;I lied to you. While I did understand Dr. Flajolet’s general proof, I am not confident I can provide a great proof here. However, he used generating functions to generalize the Coupon Collector’s Problem to non-uniform distributions, and it’s pretty cool! In either case, if you want proof, please read the paper!&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;With the proof finished 😎, we will allow ourselves to use the theorem. Moreover, we will implement this as our last model. Let’s first talk about the data to generate the probabilities. The SSA (Social Security Administration) records birthdays in the US. Since we want to talk about Rice students, I got the data for 2002 to 2005 (sorry super seniors). I found this data in the &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;fivethirtyeight&#x2F;data&#x2F;blob&#x2F;master&#x2F;births&#x2F;US_births_2000-2014_SSA.csv&quot;&gt;FiveThirtyEight SSA births dataset&lt;&#x2F;a&gt;. Calculating the probabilities for each day was easy:&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;false&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Code to calculate probabilities&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: none;&quot;&gt;
      &lt;p&gt;Note that the original version of this had an error, I have corrected it here. The error was in the &lt;code&gt;day_of_year&lt;&#x2F;code&gt; function, which was not correctly calculating the day of the year standardly.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Datelike&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; NaiveDate&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;collections&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;HashMap&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;File&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;PathBuf&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;&#x2F;&#x2F;&#x2F; standarized day of year&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; standarized_doy&lt;&#x2F;span&gt;&lt;span&gt;(year&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span&gt;, month&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span&gt;, day&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Option&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;    NaiveDate&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from_ymd_opt&lt;&#x2F;span&gt;&lt;span&gt;(year&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; i32&lt;&#x2F;span&gt;&lt;span&gt;, month, day)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; is_leap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;leap_year&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; day&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ordinal&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;        &#x2F;&#x2F; to keep it standarized if it&amp;#39;s not a leap year&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;        &#x2F;&#x2F; otherwise the ranges will be off&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; !&lt;&#x2F;span&gt;&lt;span&gt;is_leap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt; day&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 60&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            day&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; else&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            day&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    })&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; get_probabilities&lt;&#x2F;span&gt;&lt;span&gt;(file_path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; PathBuf&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Option&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;HashMap&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u32&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; total_births&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; birth_counts&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; HashMap&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u32&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; HashMap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;with_capacity&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;366&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; File&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;open&lt;&#x2F;span&gt;&lt;span&gt;(file_path)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ok&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; rdr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; csv&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Reader&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from_reader&lt;&#x2F;span&gt;&lt;span&gt;(file);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; record&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; rdr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;records&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; record&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; record&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ok&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; year&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; record[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;parse&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;i32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ok&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; month&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; record[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;parse&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ok&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; day&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; record[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;parse&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ok&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; births&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; record[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;4&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;parse&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ok&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        total_births&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; +=&lt;&#x2F;span&gt;&lt;span&gt; births&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; day_index&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; standarized_doy&lt;&#x2F;span&gt;&lt;span&gt;(year&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span&gt;, month, day)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        birth_counts&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;entry&lt;&#x2F;span&gt;&lt;span&gt;(day_index)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;and_modify&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;| *&lt;&#x2F;span&gt;&lt;span&gt;b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; +=&lt;&#x2F;span&gt;&lt;span&gt; births&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;or_insert&lt;&#x2F;span&gt;&lt;span&gt;(births&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; (_, prob)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; birth_counts&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;iter_mut&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;        *&lt;&#x2F;span&gt;&lt;span&gt;prob&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &#x2F;=&lt;&#x2F;span&gt;&lt;span&gt; total_births&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;    Some&lt;&#x2F;span&gt;&lt;span&gt;(birth_counts)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;Now, we just gotta implement the formula to get the expected number of students needed to see all birthdays given the data from 2002 to 2005:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;pub struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Flajolet&lt;&#x2F;span&gt;&lt;span&gt; {}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Simulation&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Flajolet&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; run&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; probabilities&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; self&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;get_probabilities&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;failed to get probabilities&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; days&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;days&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; 366 days&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;        vec!&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;flajolet&lt;&#x2F;span&gt;&lt;span&gt;(days, probabilities)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Flajolet&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; flajolet&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;, days&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; u16&lt;&#x2F;span&gt;&lt;span&gt;, probabilities&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; HashMap&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u32&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; total_coupons&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; days&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let mut&lt;&#x2F;span&gt;&lt;span&gt; expected_value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let mut&lt;&#x2F;span&gt;&lt;span&gt; memo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; HashMap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        for&lt;&#x2F;span&gt;&lt;span&gt; curr_coupons&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;total_coupons {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            let&lt;&#x2F;span&gt;&lt;span&gt; sign&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; if&lt;&#x2F;span&gt;&lt;span&gt; (total_coupons&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span&gt; curr_coupons)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;                1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; else&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;            &#x2F;&#x2F; we will memorize the product of the probabilities of the subsets&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;            let&lt;&#x2F;span&gt;&lt;span&gt; subset_sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; match&lt;&#x2F;span&gt;&lt;span&gt; curr_coupons {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;                0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                    &#x2F;&#x2F; the probability of getting any coupon in the empty set&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                    &#x2F;&#x2F; is zero, so (1 - 0) = 1 and 1&#x2F;1 = 1:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;                    1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;                1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                    let mut&lt;&#x2F;span&gt;&lt;span&gt; inner_sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    probabilities&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;keys&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;for_each&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                        let&lt;&#x2F;span&gt;&lt;span&gt; val&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span&gt; probabilities[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;key];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        inner_sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; +=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span&gt; val;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        memo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;insert&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;vec!&lt;&#x2F;span&gt;&lt;span&gt;[key], val);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    });&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    inner_sum&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                _&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                    let mut&lt;&#x2F;span&gt;&lt;span&gt; inner_sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                    for&lt;&#x2F;span&gt;&lt;span&gt; subset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; probabilities&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;keys&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;combinations&lt;&#x2F;span&gt;&lt;span&gt;(curr_coupons) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                        let&lt;&#x2F;span&gt;&lt;span&gt; subset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; subset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;into_iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;copied&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;collect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;_&amp;gt;&amp;gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                        let&lt;&#x2F;span&gt;&lt;span&gt; rest&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; = &amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;subset[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;curr_coupons&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                        let&lt;&#x2F;span&gt;&lt;span&gt; new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [subset[curr_coupons&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;]];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                        let&lt;&#x2F;span&gt;&lt;span&gt; product&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; memo[rest]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span&gt; memo[new&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;as_slice&lt;&#x2F;span&gt;&lt;span&gt;()];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;                        let&lt;&#x2F;span&gt;&lt;span&gt; val&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span&gt; product);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        inner_sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; +=&lt;&#x2F;span&gt;&lt;span&gt; val;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        memo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;insert&lt;&#x2F;span&gt;&lt;span&gt;(subset, product);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    inner_sum&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            expected_value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; +=&lt;&#x2F;span&gt;&lt;span&gt; sign&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span&gt; subset_sum;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        expected_value&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, all we have to do is modify our main function to run the Flajolet model and plot the results:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; flajolet&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Flajolet&lt;&#x2F;span&gt;&lt;span&gt; {};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;run&lt;&#x2F;span&gt;&lt;span&gt;()[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;The expected value is: {}, This took {:?} to calculate&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;, result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After I ran it, I found the actual expected number of Rice Owls needed to see all birthdays, including leap days and real birthday distributions, was:&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;false&quot;&gt;
      
        &lt;div class=&quot;note-center&quot;&gt;
          &lt;p&gt;Final Answer&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: none;&quot;&gt;
      &lt;p&gt;I lied naturally as I breathed. Look, honestly, I ran the model, but there is a &lt;strong&gt;huge&lt;&#x2F;strong&gt; problem! Let’s take a look:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;for&lt;&#x2F;span&gt;&lt;span&gt; subset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; probabilities&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;keys&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;combinations&lt;&#x2F;span&gt;&lt;span&gt;(curr_coupons) {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;...&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Which is supposed to implement this part of the formula:&lt;&#x2F;p&gt;
&lt;p&gt;$$
\sum_{|J|=q} \frac{1}{1 - P_J}
$$&lt;&#x2F;p&gt;
&lt;p&gt;If you know anything about computational complexity, you will immediately realize the problem: combinatorial explosion. The number of subsets of a set of size $n$ is $2^n$, so the number of subsets of a set of size $366$ is $2^{366}$. This is a huge number, and even after all my clever optimizations (I tried, really), the model won’t ever end. I tried it for a small number of days, and it worked as per my calculations; however, the universe would end before I got the answer for $366$ days. So, I am sorry, but I can’t give you the final answer because I will die before I get it. In a way, that’s motivation, honestly. If the $P = NP$ problem is solved, then we can come back to this problem knowing there might be a polynomial time solution. But until then, we need to be content with an approximation.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;With that, we finally have a good enough answer to our original question 😉! I hope you enjoyed this exploration, and I hope you learned something new. Before we conclude, I wanted to compare an informed Monte Carlo simulation with the parallel model assuming equal probabilities for 366 days. I will use the probabilities we calculated from the data to run the simulation.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;one-last-time-informed-monte-carlo-simulation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#one-last-time-informed-monte-carlo-simulation&quot; aria-label=&quot;Anchor link for: one-last-time-informed-monte-carlo-simulation&quot;&gt;One Last Time: Informed Monte Carlo Simulation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Since we have the data, we can use the probabilities to make a more informed Monte Carlo simulation. I will use the same model as the parallel model, but instead of assuming equal probabilities for each day, I will use the probabilities we calculated from the data. Here is the code for the model:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Simulation&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; InformedModel&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; run&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; (days, simulations, students)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;days&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;simulations&lt;&#x2F;span&gt;&lt;span&gt;(),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;students&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; days&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; days&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; 366 days&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; probabilities&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;font-style: italic;&quot;&gt; self&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;get_probabilities&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;failed to get probabilities&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; (keys, values)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;u32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; probabilities&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;into_iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;unzip&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;        &#x2F;&#x2F; Create a WeightedIndex distribution based on the probabilities&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; dist&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; WeightedIndex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;values)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Invalid probabilities&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        students&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;into_par_iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; parallelize the outer loop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map_init&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                &#x2F;&#x2F; init set and rand generator&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                ||&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;HashSet&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;with_capacity&lt;&#x2F;span&gt;&lt;span&gt;(days),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; rand&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;thread_rng&lt;&#x2F;span&gt;&lt;span&gt;()),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;                &#x2F;&#x2F; for each number of students&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                |&lt;&#x2F;span&gt;&lt;span&gt;(birthdays, rng), num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;simulations)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;_&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                            birthdays&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;clear&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; so we don&amp;#39;t have to allocate each time&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                            birthdays&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;extend&lt;&#x2F;span&gt;&lt;span&gt;((&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;num)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;_&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                                keys[dist&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;sample&lt;&#x2F;span&gt;&lt;span&gt;(rng)]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; Generate a random day based on the probabilities&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                            }));&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; add a random birthday to the HashSet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;                            usize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(birthdays&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;len&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span&gt; days)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                        })&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;usize&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;                        &#x2F;&lt;&#x2F;span&gt;&lt;span&gt; simulations&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; &#x2F;&#x2F; sum the results of the simulations&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;collect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, that we are done with everything. I’d like to show you why I implemented the &lt;code&gt;Simulation&lt;&#x2F;code&gt; trait:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; models&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Box&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;dyn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Simulation&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; vec!&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;        Box&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;basic&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;BasicModel&lt;&#x2F;span&gt;&lt;span&gt; {}),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;        Box&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;parallel&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;ParModel&lt;&#x2F;span&gt;&lt;span&gt; {}),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;        Box&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;iep&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;IEPModel&lt;&#x2F;span&gt;&lt;span&gt; {}),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;        Box&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;flajolet&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Flajolet&lt;&#x2F;span&gt;&lt;span&gt; {}),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;        Box&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;informed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;InformedModel&lt;&#x2F;span&gt;&lt;span&gt; {}),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; models&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Instant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;run&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Model: {:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, model);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;        for&lt;&#x2F;span&gt;&lt;span&gt; (num, result)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; model&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;students&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;zip&lt;&#x2F;span&gt;&lt;span&gt;(results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;()) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;            println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Num Students: {}, Probability: {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, num, result);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Elapsed: {:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;elapsed&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;See! We can easily run all the models and compare them (even if some won’t ever finish) and another pretty plot:&lt;&#x2F;p&gt;
&lt;img src=&quot;.&#x2F;last_lineplot.png&quot; alt=&quot;last_lineplot&quot; width=&quot;1000&quot; height=&quot;600&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;last_scatterplot.png&quot; alt=&quot;last_scatterplot&quot; width=&quot;1000&quot; height=&quot;600&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;last_boxplot.png&quot; alt=&quot;last_boxplot&quot; width=&quot;1000&quot; height=&quot;600&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;last_scatterplot2.png&quot; alt=&quot;last_scatterplot2&quot; width=&quot;1000&quot; height=&quot;600&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;last_violinplot.png&quot; alt=&quot;last_violinplot&quot; width=&quot;1000&quot; height=&quot;600&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;last_density_scatterplot.png&quot; alt=&quot;last_density_scatterplot&quot; width=&quot;1400&quot; height=&quot;800&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;last_jointplot.png&quot; alt=&quot;last_jointplot&quot; width=&quot;800&quot; height=&quot;800&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;img src=&quot;.&#x2F;last_pairplot.png&quot; alt=&quot;last_pairplot&quot; width=&quot;900&quot; height=&quot;900&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;false&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Code to generate plots&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: none;&quot;&gt;
      &lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; seaborn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; sns&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; matplotlib&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;pyplot&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; plt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; pandas&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; pd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; numpy&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; np&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt; scipy&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;ndimage&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt; import&lt;&#x2F;span&gt;&lt;span&gt; gaussian_filter&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;set_theme&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Load the data from the uploaded CSV file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; pd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;read_csv&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;.&#x2F;final.csv&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Rename &amp;#39;students&amp;#39; to &amp;#39;Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;rename&lt;&#x2F;span&gt;&lt;span&gt;(columns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;students&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;Rice Owls&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; inplace&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;True&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Line plot of average_time_ms by &amp;#39;Rice Owls&amp;#39; for each model&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;figure&lt;&#x2F;span&gt;&lt;span&gt;(figsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;lineplot&lt;&#x2F;span&gt;&lt;span&gt;(data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;average_time_ms&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; hue&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;model&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;title&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Average Time (ms) by Number of Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xlabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Number of Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Average Time (ms)&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;savefig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;last_lineplot.png&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;clf&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Scatter plot of &amp;#39;Rice Owls&amp;#39; vs. unique_birthday_days&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;figure&lt;&#x2F;span&gt;&lt;span&gt;(figsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;scatterplot&lt;&#x2F;span&gt;&lt;span&gt;(data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;unique_birthday_days&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; hue&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;model&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; style&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;model&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;title&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Rice Owls vs. Unique Birthday Days&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xlabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Number of Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Unique Birthday Days&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;savefig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;last_scatterplot.png&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;clf&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Box plot of average_time_ms for each model&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;figure&lt;&#x2F;span&gt;&lt;span&gt;(figsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;boxplot&lt;&#x2F;span&gt;&lt;span&gt;(data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;model&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;average_time_ms&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;title&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Box Plot of Average Time (ms) by Model&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xlabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Model&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Average Time (ms)&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;savefig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;last_boxplot.png&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;clf&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Scatter plot of &amp;#39;Rice Owls&amp;#39; vs. average_time_ms&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;figure&lt;&#x2F;span&gt;&lt;span&gt;(figsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;scatterplot&lt;&#x2F;span&gt;&lt;span&gt;(data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;average_time_ms&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; hue&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;model&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; style&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;model&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;title&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Rice Owls vs. Average Time (ms)&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xlabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Number of Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Average Time (ms)&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;savefig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;last_scatterplot2.png&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;clf&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Violin plot of average_time_ms for each model&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;figure&lt;&#x2F;span&gt;&lt;span&gt;(figsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;violinplot&lt;&#x2F;span&gt;&lt;span&gt;(data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;model&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;average_time_ms&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;title&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Violin Plot of Average Time (ms) by Model&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xlabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Model&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Average Time (ms)&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;savefig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;last_violinplot.png&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;clf&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Adjust the plot to only show densities above a certain threshold&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Correcting the density sorting and plotting method&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Data preparation&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; data[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Rice Owls&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; data[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;unique_birthday_days&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Calculate density using Gaussian filter on the histogram&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;data_points&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; np&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;vstack&lt;&#x2F;span&gt;&lt;span&gt;([x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y])&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; gaussian_filter&lt;&#x2F;span&gt;&lt;span&gt;(np&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;histogram2d&lt;&#x2F;span&gt;&lt;span&gt;(x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; bins&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span&gt;)[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; sigma&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Convert histogram to coordinates&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;x_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; np&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;meshgrid&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    np&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;linspace&lt;&#x2F;span&gt;&lt;span&gt;(x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;min&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;max&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 100&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; np&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;linspace&lt;&#x2F;span&gt;&lt;span&gt;(y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;min&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;max&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 100&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ravel&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;x_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; x_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ravel&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;y_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; y_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ravel&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Sorting points by density (for plotting purposes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;idx&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; np&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;argsort&lt;&#x2F;span&gt;&lt;span&gt;(density)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;x_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; x_density[idx]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y_density[idx]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; density[idx]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Define a density threshold&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;density_threshold&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 0.1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Filter out points below the density threshold&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mask&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; density_threshold&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;filtered_x_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; x_density[mask]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;filtered_y_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; y_density[mask]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;filtered_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; density[mask]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Plotting with the density threshold&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;figure&lt;&#x2F;span&gt;&lt;span&gt;(figsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;scatter&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    filtered_x_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; filtered_y_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; c&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;filtered_density&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; cmap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;viridis&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;50&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;colorbar&lt;&#x2F;span&gt;&lt;span&gt;(sc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; label&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Density&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xlabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Number of Rice Owls&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Unique Birthday Days&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;title&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;    &amp;quot;Filtered Density Scatter Plot of Unique Birthday Days vs. Number of Rice Owls&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;grid&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;True&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;savefig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;last_density_scatterplot.png&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Hexbin Plot with a Color Bar&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;figure&lt;&#x2F;span&gt;&lt;span&gt;(figsize&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Joint Plot with Regression Line&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;jointplot&lt;&#x2F;span&gt;&lt;span&gt;(x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; y&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;unique_birthday_days&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; kind&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;reg&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; color&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;g&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;8&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;title&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Joint Plot with Regression Line and Distributions&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xlabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Number of Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Unique Birthday Days&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;tight_layout&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;savefig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;last_jointplot.png&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Pair Plot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sns&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;pairplot&lt;&#x2F;span&gt;&lt;span&gt;(data[[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;unique_birthday_days&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;average_time_ms&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; height&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;3&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;suptitle&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Pair Plot of Rice Owls, Unique Birthday Days, and Average Time (ms)&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;xlabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Number of Rice Owls&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;ylabel&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;Unique Birthday Days&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;tight_layout&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;plt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;savefig&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;last_pairplot.png&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;That said, we are at the end of our journey. In the end, we found a formula that works, but the power of today’s computation is holding me back 😔. While that may disappoint you, the reader, I know how to fix it: give me a polynomial time equation, and I’ll be back with an exact answer 😎. Anyways, I hope everything was clear; I tried my best. If you see any mistakes, know it’s not me who made a mistake; it’s you who needs a check-up&#x2F;s (email me at seniormars@rice.edu or write a comment below). Have a great year!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;and-then-the-physicst-attacked&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#and-then-the-physicst-attacked&quot; aria-label=&quot;Anchor link for: and-then-the-physicst-attacked&quot;&gt;And then, the Physicst attacked&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Sometimes, theory can only get us so far (please imagine me saying this while sobbing 😭😭😭). As a math major, I have always been told to pursue the idea of rigorousness, but we NEED an answer. I can’t provide that; however, I know someone who can. A physicist – one that is armed with computational tricks and pragmatism. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;wisha.page&#x2F;&quot;&gt;Enter Wisha, a rising senior, a rustacean, and Rice’s best physicist&lt;&#x2F;a&gt;&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-5-1&quot;&gt;&lt;a href=&quot;#fn-5&quot;&gt;5&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;. Overhearing my frustration with the birthday problem, he decided to take matters into his own hands. He has given me a solution, and now it is my job to wrap his argument into a neat little package!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;revisiting-our-formula&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#revisiting-our-formula&quot; aria-label=&quot;Anchor link for: revisiting-our-formula&quot;&gt;Revisiting our formula&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Remember, we found that a generalized Coupon Collector’s Problem that assumes non-uniform distributions, however, for large $m$ ($366$ in our case), the formula Dr. Flajolet gave us is computationally infeasible. That being said, let’s take a closer look at the the first version of the formula:&lt;&#x2F;p&gt;
&lt;p&gt;$$
E(T) = \int_0^\infty \left(1 - \prod_{i=1}^m (1 - e^{-p_i t}) \right) \textrm{dt}.
$$&lt;&#x2F;p&gt;
&lt;p&gt;To be finished…&lt;&#x2F;p&gt;
&lt;h1 id=&quot;conclusion&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#conclusion&quot; aria-label=&quot;Anchor link for: conclusion&quot;&gt;Conclusion&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Throughout this article, I came to realize that I hate stats. Thank you fizz, I’ll probably deregister from MATH 412: Probability Theory now. On a serious note, writing for a public audience – especially for math – is incredibly hard. If you read up to this point, I hope you enjoyed it.&lt;&#x2F;p&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;This is a very easy proof, so let’s do it. Let $X$ be a random variable, that has a probability between $[0,1]$, then $$
\begin{align*}
\mathbb{E}[X] &amp;amp;= \sum_i^\infty i p_x(i) = \sum_i^\infty i (1 - p_x)^{x - 1} p = p \sum_i^\infty i (1 - p)^{i - 1}&amp;amp; &amp;amp; \\
&amp;amp;= p \sum_i^\infty -\frac{d(1 - p)^i}{dp} &amp;amp; &amp;amp;\text{taking the derivative and } x = 1-p\\
&amp;amp;= p \frac{d}{dp} \left( -\sum_i^\infty (1 - p)^i \right)&amp;amp; &amp;amp;\text{by linearity of derivative}\\
&amp;amp;= p \frac{d}{dp} \left( -\frac{1}{1 - (1 - p)} \right)&amp;amp; &amp;amp;\text{by geometric series formula}\\
&amp;amp;= p \frac{d}{dp} \left( -\frac{1}{p} \right) = \frac{p}{p^2} = \frac{1}{p}&amp;amp; &amp;amp;\text{algebra} \tag*{$\blacksquare$}
\end{align*}
$$ &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-2&quot;&gt;
&lt;p&gt;This might be wrong, 😎😎😎. &lt;a href=&quot;#fr-2-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-3&quot;&gt;
&lt;p&gt;If I have time I’ll research on how to prove things about Monte Carlo simulations, and update this section. &lt;a href=&quot;#fr-3-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-4&quot;&gt;
&lt;p&gt;I was going to plot these graphs in Rust, but I do have a life… &lt;a href=&quot;#fr-4-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-5&quot;&gt;
&lt;p&gt;He is also my cool ass friend 😎😎😎. I know, it’s hard to believe, but I HAVE friends! &lt;a href=&quot;#fr-5-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</description>
      </item>
      <item>
          <title>I decided to write a book</title>
          <pubDate>Wed, 05 Jun 2024 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/book/</link>
          <guid>https://seniormars.com/posts/book/</guid>
          <description xml:base="https://seniormars.com/posts/book/">&lt;p&gt;Truth be told, this is not the first time I decided this nor will it be the last, so let’s make this short in case future me reads this with shame. In the past, when I decided to do this, I mostly &lt;em&gt;didn’t&lt;&#x2F;em&gt;. Sometimes I started, and sometimes I got a chapter done, but typically, it ended with me saying, “nah, this ain’t it.” As you can guess, I’m my worst enemy.&lt;&#x2F;p&gt;
&lt;p&gt;Writing is scary–at least to me, and every time I get an idea I brainstorm it in my head. Usually, the idea, once conceived, goes through an extra pass in my brain until I decide this is &lt;em&gt;garbage&lt;&#x2F;em&gt;. I know, I know. I should be more kind to myself, but when most of your life is spent reading books, you end up having &lt;em&gt;expectations&lt;&#x2F;em&gt; (scary, I know) about how good a piece should be. Now, there are ideas that were good enough to pass the initial pass: a book about programming languages, one about teaching, and other about code switching. Unfortunately, when I start to write I end up with two realizations: 1) someone has already written about this in a tone and format I wished I envision, 2) I need to research more, or I lack anything meaningful to add.&lt;&#x2F;p&gt;
&lt;p&gt;Perhaps, it’s not writing I like, but the &lt;em&gt;idea&lt;&#x2F;em&gt; of writing. I’ve always felt that with how much I read, I should at least give back and contribute to this idea of a resource. The problem was that I wanted to contribute something &lt;em&gt;great&lt;&#x2F;em&gt;. I made videos, wrote research papers, and brought proofs to life, but every time I look back, I end up wishing, “damn I could’ve done that better”. Eventually, I realized this was idiotic, since I need experience to get better and to get experience I need to start. I could end up waiting for the right moment, and it could be that it will be great, but I think future me would appreciate having a funny little thing to look back on than a potential masterpiece (please future me 😭).&lt;&#x2F;p&gt;
&lt;p&gt;In either case, while I did resolve myself into finishing something, it took a while longer to realize what I wanted to write.  That is until I recited my favorite poem at an open mic:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Democracy will not come&lt;br &#x2F;&gt;
Today, this year&lt;br &#x2F;&gt;
Nor ever&lt;br &#x2F;&gt;
Through compromise and fear.&lt;&#x2F;p&gt;
&lt;p&gt;I have as much right&lt;br &#x2F;&gt;
As the other fellow has&lt;br &#x2F;&gt;
To stand&lt;br &#x2F;&gt;
On my two feet&lt;br &#x2F;&gt;
And own the land.&lt;&#x2F;p&gt;
&lt;p&gt;I tire so of hearing people say,&lt;br &#x2F;&gt;
Let things take their course.&lt;br &#x2F;&gt;
Tomorrow is another day.&lt;br &#x2F;&gt;
I do not need my freedom when I’m dead.&lt;br &#x2F;&gt;
I cannot live on tomorrow’s bread.&lt;&#x2F;p&gt;
&lt;p&gt;Freedom&lt;br &#x2F;&gt;
Is a strong seed&lt;br &#x2F;&gt;
Planted&lt;br &#x2F;&gt;
In a great need.&lt;&#x2F;p&gt;
&lt;p&gt;I live here, too.&lt;br &#x2F;&gt;
I want freedom&lt;br &#x2F;&gt;
Just as you.&lt;br &#x2F;&gt;
&lt;cite&gt;– Langston Hughes&lt;&#x2F;cite&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Perhaps, I may be a dog-shit writer, but I do have an interesting life. The only thing is that while I have resolved myself to write something, it’s kinda &lt;em&gt;embarrassing&lt;&#x2F;em&gt; to write about myself. At the end of the day, while these feelings are true, my desire to improve and write surpasses that–and well I am minoring in creative writing. I am going to write poetry. It may not be filled with pretty words or creative formats, but it will be true to myself. I hope you guys look forward to my work.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Don&#x27;t forget about New York! A crucial ingredient to a GREAT Spider-Man movie!</title>
          <pubDate>Tue, 20 Jun 2023 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/spiderman-across/</link>
          <guid>https://seniormars.com/posts/spiderman-across/</guid>
          <description xml:base="https://seniormars.com/posts/spiderman-across/">&lt;p&gt;After watching Spider-Man: Across the Spider-Verse (ATSV) for the fifth time in theaters today, I finally
realized why I adore this movie. In fact, this simple realization made me understand why I wasn’t so
big on the Tom Holland or Andrew Garfield films: New York City and the spirit the city brings to the
hero. Batman has Gotham City, Superman has Metropolis, and Spider-Man has New York—the Big Apple.
Talk to any New Yorker, and you will get a consensus: Spider-Man is one of our most significant
symbols. And, it goes without saying: Spider-man is a New Yorker. Simple as that. Thus, a simple
extension to this idea is that if you want to get Spider-Man right, you must capture New York right,
or it won’t work. Imagine Spider-Man swinging in a rural town — it’s silly. It just can’t work;
unless you intend to power down a hero. Now, with all this said and done, I want to highlight why
some Spider-Man films are so beloved among die-hard fans and why some failed to impact the public
through an analysis of New York’s Music, Culture, and People in these films.&lt;&#x2F;p&gt;
&lt;p&gt;Ever since I gained consciousness, I only remembered one place: New York City. My sweet, dirty, and
magnificent home. While I’m personally from the best borough–Brooklyn, I take pride in all of New
York City and my fellow New Yorkers. This is why, I believe, I’m qualified to talk shit and praise
the city when it is needed and why I notice when there is something fundamentally odd about
establishing the city in an adaption. With that as a preface, let’s get started!&lt;&#x2F;p&gt;
&lt;p&gt;“Stand clear of the closing doors please.”, When I first heard this phrase in Spider-Man: Into the
Spider-Verse (ITSV), as Miles was trying to escape the Prowler, I knew the film’s creators truly
understood how to make New York City culture shine. After a beaming introduction to Miles’s neighborhood
filled with teenagers playing basketball, walking, and trying to get to school, you are placed at
the heart of Brooklyn with all its busyness and liveliness. You are set in a film that
happens to focus on our protagonist, Miles, but with how packed the block is, you understand the New
York is a city where events occur 24&#x2F;7. These shots characterize and make the viewer understand
why any Spider-man would have difficulty with time management — it’s part of the culture of New
York to always hustling. So, when you see and hear the train make that little announcement after
nearly crushing Miles, it only furthers the viewer’s understanding that the city never stops and
the environment that makes shapes Spider-Man’s ability to always get up.&lt;&#x2F;p&gt;
&lt;p&gt;Now, moving on to a different movie, Spider-Man 2 (Raimi), we see similar characteristics displayed
as we journey through Peter’s everyday life. Immediately after Peter tries to jump off a building,
fails, and lands on a car injuring his back, we get a slow shot of Peter walking away with no one
paying attention. While the scene was definitely included for comedic effect, it illustrates a
unique characteristic of New York: everyone is doing their thing. It significantly contributes to
why many people consider New Yorkers cold, distant, or unfriendly if they are from somewhere other
than the city. Yet, from the perspective of a New Yorker, this is our way of showing kindness: we
are aware that everyone has their problems, which is why we give them space unless they ask for our
help. Despite all of this, the famous train scene cements my opinion that Spider-Man 2 did New York
right. Immediately after Peter stops the train from falling off the bridge, we are shown an
incredible scene where New Yorkers, on their own, form a shield to protect Spider-man from Doc Ock.
As previously stated, New Yorkers try to leave other New Yorkers alone. Still, when the time comes,
you find us protesting and roaming the streets to bring awareness to societal problems. Being
released a few months after 9&#x2F;11, this scene highlighted and condensed another significant quirk of
New York: we protect our own even if we aren’t strong enough. The action taken by the people on the
train supplements that the love between Spider-man and New York goes both ways and that Spider-man
is at his best when interacting with his people: New Yorkers.&lt;&#x2F;p&gt;
&lt;p&gt;Even more, Spider-Man Into, Across, and the Raimi trilogy further this claim by combining music and
striking visuals. Hip-hop is a genre crucial to New York’s nightlife. With songs like “The Empire
State Of Mind” by Alicia Keys and Jay-Z or “Big Poppa” by Notorious B.I.G., New York has a
reputation for being a center of music and creativity. By hiring specifically Black and Latino
artists to create both Spider-verse’s soundtracks, we receive songs that describe the culture of the
people in New York. For instance, “Familia” by Nicki Minaj, Anuel AA, and Bantu merges Spanish and
English to represent the hundreds of Spanish immigrants that grow with both languages. Combined with
visuals that include both New Yorkers and Spider-man, viewers are allowed to experience the mass
diversity that New York has without it being forced down their throats. Furthermore, the Raimi
trilogy instead opts to show the creativity of New York by having an underground Asian violinist
sing and perform songs about Spider-Man. Reflecting a common experience in New York, where Musicians
try to prompt their selves by performing live in train stations or busy New York streets. Both
examples demonstrate how these films lean onto New York experiences to enhance Spider-Man’s
reputation as a friendly and local superhero – creating a realistic world that hosts the
web-slinger that you can imagine living instead of a pure fantasy world with no ties to the real New
York.&lt;&#x2F;p&gt;
&lt;p&gt;As a juxtaposition, we can see why most die-hard Spider-Man fans were not pleased by Tom Holland or
Andrew Garfield’s editions of our webbed hero as their versions aren’t engrained in New York
culture. Tom Holland’s Spider-Man, in specific, lacks the charm of a local Spider-man in most of his
trilogy. With one film completely taking place away from New York. Spider-Man is a tragic hero who
understands he can use his powers to help others. At the core of his character is a funny individual
who uses his abilities to fight various supervillains and, more importantly, helps the people in his
community. Garfield and Holland’s Spider-Man only really did the former as both heavily needed more
interactions with nonimportant characters, i.e., their local new yorkers. Spider-Man is supposed to
be relatable, but how can viewers relate to a character if his environment is highly unrealistic? In
a way, these films were cinematic superhero movies but not actual Spider-Man films.&lt;&#x2F;p&gt;
&lt;p&gt;Spider-Man shines when he interacts with his community. Any superhero can have fantastic action
scenes that place them in dangerous situations, but not every superhero can be relatable. Spider-Man
is supposed to be relatable. Anyone can be Spider-Man with the drive and connection to their
environment. If you get the setting right, you enhance Spider-Man. If you get it wrong or a lack his
friendliness, then he is just a superhero, but he isn’t a true Spider-Man. Spider-Man Across the
Spider-Verse gets it right, which is why I love it. Simple as that.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;Another thing, I want to talk about is how much I relate to Miles and his Mom LOL. I got a full
scholarship to a good school, and my mom tried to convince me to rejected it cuz it was too far. She
wanted me to go a community college a few miles from my house. See, this is what I mean Spider-Man
needs to be relatable.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>A Terminal Email Client As An Alternative To Gmail: The Old Dog Neomutt And Pals</title>
          <pubDate>Sun, 02 Apr 2023 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/neomutt/</link>
          <guid>https://seniormars.com/posts/neomutt/</guid>
          <description xml:base="https://seniormars.com/posts/neomutt/">&lt;h1 id=&quot;motivation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation&quot; aria-label=&quot;Anchor link for: motivation&quot;&gt;Motivation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;In this day and age, every university pairs a student’s email address with their administered Google suite platform.
Typically, for most students, this default saves them a lot of trouble—that is, if you stay
within the constraints of what your university considers “normal use”. For instance, if you want to
use Google domains, Google cloud’s APIs, or customize your Google security options, you are going to have a
bad time. Don’t get me wrong, I understand why some of these rules are forced upon students, but
precisely because they are forced, I believe that there should be leeway for students that wish to
opt out of the default settings. Now, this blog post won’t teach how to petition your university to
rid of Google, but it will teach you how to set up a terminal alternative to Gmail (most notably
this blog is for college students that are forced to use Google’s email platform).&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;This blog assumes basic terminal maturity. &lt;br&gt;&lt;br&gt; Moreover, this blog has now been &lt;strong&gt;updated&lt;&#x2F;strong&gt; to cover isync and more. See the &lt;a href=&#x27;#update&#x27;&gt;update section&lt;&#x2F;a&gt; near the end!&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h1 id=&quot;neomutt&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#neomutt&quot; aria-label=&quot;Anchor link for: neomutt&quot;&gt;Neomutt&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;end-goal&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#end-goal&quot; aria-label=&quot;Anchor link for: end-goal&quot;&gt;End Goal&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Before I continue, I would like to show you what the result will look like:&lt;&#x2F;p&gt;
&lt;img src=&quot;neomutt0.png&quot; alt=&quot;Neomutt&quot; width=&quot;3024&quot; height=&quot;1964&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;Here is an image with an email open:&lt;&#x2F;p&gt;
&lt;img src=&quot;neomutt1.png&quot; alt=&quot;Neomutt&quot; width=&quot;3024&quot; height=&quot;1964&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;Finally, here is an image with a reply open (also &lt;code&gt;s&#x2F;crack&#x2F;cracked&lt;&#x2F;code&gt;):
&lt;img src=&quot;reply.png&quot; alt=&quot;Neomutt reply&quot; width=&quot;3024&quot; height=&quot;1962&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;At the end of this blog, I’ll show the configuration we came up with.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;introduction-and-why&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#introduction-and-why&quot; aria-label=&quot;Anchor link for: introduction-and-why&quot;&gt;Introduction and WHY?&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Ok, you have seen the images, but now you wonder: 1) what am I looking at? And 2) why would I want
to use this? Let’s start with the first question. These images are of a terminal email client called
Neomutt and it is my go-to email client. It supports all the basic email features that you would expect
from an email client, plus way more! The second question is a bit more
complex, as I cannot speak for everyone, but I will explain why I use Neomutt.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Auto-image blocking: In the age where everyone is trying to get your attention, it is nice to have
a client that doesn’t render images by default. Instead of those annoying images, I get a plain
view of the email, and concentrate on the content of the email.&lt;&#x2F;li&gt;
&lt;li&gt;Lightweight: Gmail is a resource hog. It takes seconds to load, and a
pain to use when you have a slow internet connection. Neomutt loads in a fraction of a second and
allows you filter through your emails quickly.&lt;&#x2F;li&gt;
&lt;li&gt;Configurable: Neomutt is extremely configurable. You can change the color scheme, the keybindings,
and even the email client’s behavior. For instance, In my current configuration, I have grammar
checking, auto-completion for words, and auto-completion for email addresses. Everything is done
through the keyboard.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Now, if none of these reasons appeal to you, then Neomutt is not for you. Click the back button.
But, if you are still here, then let’s get started!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;installation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#installation&quot; aria-label=&quot;Anchor link for: installation&quot;&gt;Installation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;For this blog, I’ll be detailing the installation process for Arch Linux, Gentoo, Ubuntu, and macOS.
Since I know these distributions extremely well, I can provide more detailed instructions. If
you are using Windows, I recommend using WSL2, and you can follow along with the Ubuntu instructions.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;macos&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#macos&quot; aria-label=&quot;Anchor link for: macos&quot;&gt;macOS&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;I’ll be using Homebrew to install Neomutt:&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;&lt;code&gt;$&lt;&#x2F;code&gt; is the prompt for a user without root access. You don’t need to type it.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -c&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -fsSL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;Homebrew&#x2F;install&#x2F;HEAD&#x2F;install.sh)&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # wait for the installation to finish and put homebrew in your path&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; brew install neomutt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # additionally, I would recommend installing:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; brew install gnupg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # I&amp;#39;ll explain why later&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;arch-linux&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#arch-linux&quot; aria-label=&quot;Anchor link for: arch-linux&quot;&gt;Arch Linux&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo pacman&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -Syu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; neomutt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo pacman&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -Syu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; gnupg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # or&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo paru&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -Syu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; neomutt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo paru&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -Syu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; gnupg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;gentoo&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#gentoo&quot; aria-label=&quot;Anchor link for: gentoo&quot;&gt;Gentoo&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo emerge&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --ask&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; mail-client&#x2F;neomutt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo emerge&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --ask&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; app-crypt&#x2F;gnupg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;ubuntu-and-wsl2-using-ubuntu&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ubuntu-and-wsl2-using-ubuntu&quot; aria-label=&quot;Anchor link for: ubuntu-and-wsl2-using-ubuntu&quot;&gt;Ubuntu and WSL2 using Ubuntu&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo apt install neomutt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo apt install gnupg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;running-neomutt-for-the-first-time&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#running-neomutt-for-the-first-time&quot; aria-label=&quot;Anchor link for: running-neomutt-for-the-first-time&quot;&gt;Running Neomutt for the first time&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The first time you run Neomutt, you will be greeted with a screen that looks like this that prompts
you for your email address and password:&lt;&#x2F;p&gt;
&lt;img src=&quot;after_install.png&quot; alt=&quot;fresh&quot; width=&quot;3024&quot; height=&quot;1900&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;This is the default configuration that Neomutt comes with, but not very useful. We need to customize it first.
To demonstrate how to configure Neomutt, I’ll have two code blocks for each section.
The first code block will be the configuration that I use, and the second code block is the one you
should modify to fit your needs.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;initial-mutt-configuration&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#initial-mutt-configuration&quot; aria-label=&quot;Anchor link for: initial-mutt-configuration&quot;&gt;Initial Mutt Configuration&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;We are going to take configuration step by step. I will explain what each section does, and why.
The first we need to do is make a &lt;code&gt;muttrc&lt;&#x2F;code&gt; file. This file is where we will store all of our configuration.
By default, Neomutt will look for a file called &lt;code&gt;muttrc&lt;&#x2F;code&gt; in the following location: &lt;code&gt;XDG_CONFIG_HOME&#x2F;mutt&#x2F;muttrc&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;&lt;code&gt;$XDG_CONFIG_HOME&lt;&#x2F;code&gt; is an environment variable that points to the location of your configuration files. Read the &lt;a href=&#x27;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;XDG_Base_Directory&#x27;&gt;Arch Wiki page on the XDG Base Directory&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;For example, on my machine, the location of my &lt;code&gt;muttrc&lt;&#x2F;code&gt; file is &lt;code&gt;~&#x2F;.config&#x2F;mutt&#x2F;muttrc&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;If this file does not exist, then you can create it by running the following command:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; ~&#x2F;.config&#x2F;mutt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; touch ~&#x2F;.config&#x2F;mutt&#x2F;muttrc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Let’s put a hold on this to introduce the next section:&lt;&#x2F;p&gt;
&lt;h3 id=&quot;google-gmail-and-app-specific-passwords&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#google-gmail-and-app-specific-passwords&quot; aria-label=&quot;Anchor link for: google-gmail-and-app-specific-passwords&quot;&gt;Google, Gmail, and App-specific passwords&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;As I said before, this blog is intended for students that are forced to use Google’s email platform. Which
means I’ll be detailing how to configure Neomutt to work with Gmail. Thus, before we move any further, it is important to get an “app-specific password” from Google.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;An app-specific password is a password for applications that do not support 2-factor authentication or are considered ‘unsecure’. Google wants you to use Gmail &amp;gt;:(&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;To get an app-specific password, follow these steps:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Go to &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;security.google.com&#x2F;settings&#x2F;security&#x2F;apppasswords&quot;&gt;Google’s app-specific password page&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Sign in with your Google account&lt;&#x2F;li&gt;
&lt;li&gt;Select “Mail” as the app or other and select “Other (custom name)” as the device. I use “Mutt” as
the name.&lt;&#x2F;li&gt;
&lt;li&gt;Click “Generate” and copy the password that is generated. You will need this password later. Store
it!&lt;&#x2F;li&gt;
&lt;li&gt;Profit??!!!&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Here is a screenshot of the result:
&lt;img src=&quot;gpass.png&quot; alt=&quot;Google app password&quot; width=&quot;3024&quot; height=&quot;1632&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;accessing-gmail-with-neomutt&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#accessing-gmail-with-neomutt&quot; aria-label=&quot;Anchor link for: accessing-gmail-with-neomutt&quot;&gt;Accessing Gmail with Neomutt&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Now that we have an app-specific password, we can configure Neomutt to access Gmail. To accomplish this,
let’s open up our &lt;code&gt;muttrc&lt;&#x2F;code&gt; (i.e., &lt;code&gt;$EDITOR XDG_CONFIG_HOME&#x2F;mutt&#x2F;muttrc&lt;&#x2F;code&gt;) file with our favorite editor. I’ll be using &lt;code&gt;nvim&lt;&#x2F;code&gt; for this blog, but
you can use any editor you want. Now, let’s add the following configuration to our &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;p&gt;Mine:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# User&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set from = &amp;quot;cjh16@rice.edu&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set realname = &amp;quot;Charlie Cruz&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set imap_user = &amp;quot;cjh16@rice.edu&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set smtp_url = &amp;quot;smtps:&#x2F;&#x2F;cjh16@rice.edu@smtp.gmail.com:465&#x2F;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set smtp_authenticators = &amp;#39;gssapi:login&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set imap_pass = &amp;quot;my_app_specific_password&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set smtp_pass = &amp;quot;my_app_specific_password&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Ensure TLS is enforced&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set ssl_starttls = yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set ssl_force_tls = yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Yours:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# User&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set from = &amp;quot;your_email_address&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set realname = &amp;quot;Your Name&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set imap_user = &amp;quot;your_email_address&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set smtp_url = &amp;quot;smtps:&#x2F;&#x2F;YOUR_EMAIL@smtp.gmail.com:465&#x2F;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set smtp_authenticators = &amp;#39;gssapi:login&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set imap_pass = &amp;quot;your_app_specific_password&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set smtp_pass = &amp;quot;your_app_specific_password&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Ensure TLS is enforced&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set ssl_starttls = yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set ssl_force_tls = yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;Plain text for passwords is a bad idea. See the encryption section of this blog.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;Let’s break down this section:
First, it’s pretty self-explanatory for the first few lines, but for &lt;code&gt;set smtp*&lt;&#x2F;code&gt;, we need to
explain.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;set smtp_url&lt;&#x2F;code&gt; is the URL that Neomutt will use to send emails. The format is as follows:
&lt;code&gt;smtps:&#x2F;&#x2F;email@server:port&lt;&#x2F;code&gt;. For Gmail, the server is &lt;code&gt;smtp.gmail.com&lt;&#x2F;code&gt; and the port is &lt;code&gt;465&lt;&#x2F;code&gt;. This
is from the &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;support.google.com&#x2F;mail&#x2F;answer&#x2F;7126229?hl=en&quot;&gt;Gmail SMTP server documentation&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;set smtp_authenticators&lt;&#x2F;code&gt; is the authentication method that Neomutt will use to send emails. For
Gmail, we will use &lt;code&gt;gssapi:login&lt;&#x2F;code&gt; as the authentication method.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;set imap_pass&lt;&#x2F;code&gt; and &lt;code&gt;set smtp_pass&lt;&#x2F;code&gt; are the passwords that Neomutt will use to access your email.
Note this is plaintext, we will fix this later.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;set ssl_starttls&lt;&#x2F;code&gt; and &lt;code&gt;set ssl_force_tls&lt;&#x2F;code&gt; are used to ensure that Neomutt uses TLS when connecting
to the server. This is important because Gmail will not allow you to connect to the server without
these properties.&lt;&#x2F;p&gt;
&lt;p&gt;After you have added this configuration to your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file, save it, and in theory, you
can now access your email! But, there are a few more things we need to do to make this more useful.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;mailboxes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mailboxes&quot; aria-label=&quot;Anchor link for: mailboxes&quot;&gt;Mailboxes&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The next step is to specify which mailboxes you want to access. To achieve this, we add:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# My mailboxes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set folder = &amp;quot;imaps:&#x2F;&#x2F;imap.gmail.com:993&#x2F;[Gmail]&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set spoolfile = &amp;quot;+All Mail&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set postponed = &amp;quot;+Drafts&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set record = &amp;quot;+Sent Mail&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set trash = &amp;quot;+Trash&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mailboxes =Important =Starred =Drafts =&amp;quot;Sent Mail&amp;quot; =Spam =Trash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Where to put the stuff&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set header_cache = &amp;quot;$XDG_CACHE_HOME&#x2F;mutt&#x2F;headers&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set message_cachedir = &amp;quot;$XDG_CACHE_HOME&#x2F;mutt&#x2F;bodies&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set certificate_file = &amp;quot;$XDG_CACHE_HOME&#x2F;mutt&#x2F;certificates&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;unset record&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Let’s break this down:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;set folder&lt;&#x2F;code&gt; is the folder that Neomutt will use to access your emails. 993 is just the port for imap.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;set spoolfile&lt;&#x2F;code&gt; is your home inbox. This is the inbox that you see when you log into Gmail. You
can change this to whatever you want. i.e., &lt;code&gt;set spoolfile = &quot;+Important&quot;&lt;&#x2F;code&gt;. I like to see all my
emails, so I use &lt;code&gt;+All Mail&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;set record&lt;&#x2F;code&gt;, &lt;code&gt;set postponed&lt;&#x2F;code&gt;, and &lt;code&gt;set trash&lt;&#x2F;code&gt; are the folders that Neomutt will use to store
emails that you have sent, drafts, and trash respectively in Gmail.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;mailboxes&lt;&#x2F;code&gt; is a list of mailboxes that you want to access. You can add as many as you want, but I
keep it simple with just the ones I use.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;set header_cache&lt;&#x2F;code&gt; and &lt;code&gt;set message_cachedir&lt;&#x2F;code&gt; are the locations that Neomutt will use to cache
your emails. This is important because it will make your email client much faster. &lt;code&gt;set certificate_file&lt;&#x2F;code&gt; is similar.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;unset record&lt;&#x2F;code&gt; is used to disable the recording of sent emails. This is because Gmail already
records sent emails, so we don’t need to do it twice.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;At this point, you should be able to access your email! Now, let’s make this even more useful.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;settings-i-highly-recommend&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#settings-i-highly-recommend&quot; aria-label=&quot;Anchor link for: settings-i-highly-recommend&quot;&gt;Settings I highly recommend&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Alright, so now that we have a basic configuration, but what about modifying how we reply to emails,
or how we interact with our email client? Let’s add the following to our &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;p&gt;I added comments to explain what each line does.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# settings&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set pager_index_lines = 10          &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set pager_context = 3                # show 3 lines of context&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set pager_stop                       # stop at end of message&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set menu_scroll                      # scroll menu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set tilde                            # use ~ to pad mutt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set move=no                          # don&amp;#39;t move messages when marking as read&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set mail_check = 30                  # check for new mail every 30 seconds&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set imap_keepalive = 900             # 15 minutes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set sleep_time = 0                   # don&amp;#39;t sleep when idle&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set wait_key = no		     # mutt won&amp;#39;t ask &amp;quot;press key to continue&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set envelope_from                    # which from?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set edit_headers                     # show headers when composing&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set fast_reply                       # skip to compose when replying&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set askcc                            # ask for CC:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set fcc_attach                       # save attachments with the body&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set forward_format = &amp;quot;Fwd: %s&amp;quot;       # format of subject when forwarding&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set forward_decode                   # decode when forwarding&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set forward_quote                    # include message in forwards&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set mime_forward                     # forward attachments as part of body&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set attribution = &amp;quot;On %d, %n wrote:&amp;quot; # format of quoting header&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set reply_to                         # reply to Reply to: field&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set reverse_name                     # reply as whomever it was to&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set include                          # include message in replies&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set text_flowed=yes                  # correct indentation for plain text&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;unset sig_dashes                     # no dashes before sig&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;unset markers&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Sort by newest conversation first.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set charset = &amp;quot;utf-8&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set uncollapse_jump&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set sort_re&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set sort = reverse-threads&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set sort_aux = last-date-received&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# How we reply and quote emails.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set reply_regexp = &amp;quot;^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set quote_regexp = &amp;quot;^( {0,4}[&amp;gt;|:#%]| {0,4}[a-z0-9]+[&amp;gt;|]+)+&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set send_charset = &amp;quot;utf-8:iso-8859-1:us-ascii&amp;quot; # send in utf-8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I highly recommend these settings, but you may want to change &lt;code&gt;askcc, edit_headers, fast_reply, envelope_from&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;sidebar&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#sidebar&quot; aria-label=&quot;Anchor link for: sidebar&quot;&gt;Sidebar&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The sidebar is a very useful feature that allows you to see all your mailboxes in a sidebar. Here is
a screenshot of what it looks like:&lt;&#x2F;p&gt;
&lt;img src=&quot;sidebar.png&quot; alt=&quot;Sidebar&quot; width=&quot;3024&quot; height=&quot;1902&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;Here is how to add it to your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#sidebar&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set sidebar_visible # comment to disable sidebar by default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set sidebar_short_path&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set sidebar_folder_indent&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set sidebar_format = &amp;quot;%B %* [%?N?%N &#x2F; ?%S]&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set mail_check_stats&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind index,pager \CJ sidebar-prev&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind index,pager \CK sidebar-next&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind index,pager \CE sidebar-open&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind index,pager B sidebar-toggle-visible&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, you should be able to see the sidebar when you open your email client and press &lt;code&gt;&amp;lt;shift-b&amp;gt;&lt;&#x2F;code&gt; to toggle it!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;signature&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#signature&quot; aria-label=&quot;Anchor link for: signature&quot;&gt;Signature&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The signature is the text that you add to the bottom of your emails. To add it to Neomutt, you need
to:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Create a file (call it &lt;code&gt;signature&lt;&#x2F;code&gt; or whatever you prefer)&lt;&#x2F;li&gt;
&lt;li&gt;Add your signature to the file. For example, here is mine:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; cat signature&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Charlie&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; Cruz&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; changing my legal name!&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;Math&lt;&#x2F;span&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; Linguistics&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; @ Rice University &amp;#39;26&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;link the file to your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set signature = &amp;quot;$XDG_CONFIG_HOME&#x2F;mutt&#x2F;signature&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, when you send an email, your signature will be added to the bottom of the email.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;editor&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#editor&quot; aria-label=&quot;Anchor link for: editor&quot;&gt;Editor&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The editor is the program that you use to compose emails. By default, Neomutt uses &lt;code&gt;vi&lt;&#x2F;code&gt; as the editor, but you can change this to whatever you want. For instance, I use &lt;code&gt;nvim&lt;&#x2F;code&gt; as my editor, so I add the following to my &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set editor = &amp;quot;nvim&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;In (Neo)Vim with patch 6e649224926b and partial 113cb513f76d now include mail.vim, which is a filetype plugin for mail. This plugin provides syntax highlighting, indentation, and other features for mail files.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;n-vim-and-mail&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#n-vim-and-mail&quot; aria-label=&quot;Anchor link for: n-vim-and-mail&quot;&gt;(N)vim and Mail&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;If you use &lt;code&gt;nvim&lt;&#x2F;code&gt; as your editor, you may want to add the following to your &lt;code&gt;nvim&#x2F;after&#x2F;ftplugin&#x2F;mail.{lua,vim}&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;p&gt;Lua:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;lua&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt_local.spell&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt_local.spelllang&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;en_us&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;vim.opt_local.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;fo&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;append&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;aw&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; map&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; vim.api.nvim_buf_set_keymap&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;local&lt;&#x2F;span&gt;&lt;span&gt; options&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; { noremap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;, silent&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;n&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;&amp;lt;leader&amp;gt;x&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;#39;ZZ&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;, options)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Vim:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;viml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;setlocal&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt; spell&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;setlocal&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt; spelllang&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;en_us&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;setlocal&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt; fo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;+=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #39BAE6;&quot;&gt;aw&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;nnoremap&lt;&#x2F;span&gt;&lt;span&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;leader&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;x ZZ&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;These settings will enable spell checking, better paragraph wrapping, and &lt;code&gt;&amp;lt;leader&amp;gt;x&lt;&#x2F;code&gt; will save and quit.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;keybindings&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#keybindings&quot; aria-label=&quot;Anchor link for: keybindings&quot;&gt;Keybindings&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;I highly recommend adding the following keybindings to your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file for more vim-like keybindings:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;macro index A \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &amp;quot;&amp;lt;tag-pattern&amp;gt;~N&amp;lt;enter&amp;gt;&amp;lt;tag-prefix&amp;gt;&amp;lt;clear-flag&amp;gt;N&amp;lt;untag-pattern&amp;gt;.&amp;lt;enter&amp;gt;&amp;quot; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &amp;quot;mark all new as read&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind index j next-entry&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind index k previous-entry&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind pager j next-line&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind pager k previous-line&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind attach,index,pager \CD next-page&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind attach,index,pager \CU previous-page&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind pager g top&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind pager G bottom&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind attach,index g first-entry&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind attach,index G last-entry&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The first marco isn’t very vim-like, but it is very useful. It allows you to mark all new emails as read by pressing &lt;code&gt;A&lt;&#x2F;code&gt; in the index.&lt;&#x2F;p&gt;
&lt;p&gt;The next set of keybindings are for scrolling. I use &lt;code&gt;j&lt;&#x2F;code&gt; and &lt;code&gt;k&lt;&#x2F;code&gt; to scroll up and down, and &lt;code&gt;g&lt;&#x2F;code&gt; and &lt;code&gt;G&lt;&#x2F;code&gt; to go to the top and bottom of the page.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;mailcap&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mailcap&quot; aria-label=&quot;Anchor link for: mailcap&quot;&gt;Mailcap&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The mailcap file is used to determine how to open attachments. For instance, if you have a &lt;code&gt;.pdf&lt;&#x2F;code&gt;
file, you would want to open it with your prefer PDF viewer. This is most useful for rendering HTML
in emails.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Create a file called &lt;code&gt;mailcap&lt;&#x2F;code&gt; in your &lt;code&gt;$XDG_CONFIG_HOME&#x2F;mutt&lt;&#x2F;code&gt; directory.&lt;&#x2F;li&gt;
&lt;li&gt;Add the following to the file:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;text&#x2F;html; firefox %s; test=test -n &amp;quot;$display&amp;quot;; needsterminal;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;text&#x2F;html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;text&#x2F;plain; cat %s; copiousoutput&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;application&#x2F;pdf; firefox %s; test=test -n &amp;quot;$display&amp;quot;; needsterminal;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Of course, you can change the browser, and pdf viewer to whatever you want. On Mac, you might want
&lt;code&gt;open -a firefox %s&lt;&#x2F;code&gt; or &lt;code&gt;open -a Preview %s&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;Firefox now supports editing PDFs!&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Now install &lt;code&gt;lynx&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;macOS&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; brew install lynx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Arch Linux&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo pacman&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -Syu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; lynx&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # or paru -Syu lynx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Gentoo&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo emerge&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -av&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; www-client&#x2F;lynx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Ubuntu&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo apt install lynx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;Link the file to your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file and add the following to your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# link to mailcap file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set mailcap_path = &amp;quot;$XDG_CONFIG_HOME&#x2F;mutt&#x2F;mailcap&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# open attachments with mailcap with &amp;lt;return&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind attach &amp;lt;return&amp;gt; view-mailcap             &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# save attachments to a folder&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;macro attach s &amp;#39;&amp;lt;save-entry&amp;gt; &amp;lt;bol&amp;gt;~&#x2F;Documents&#x2F;attachments&#x2F;&amp;lt;eol&amp;gt;&amp;#39; &amp;#39;save attachment&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;auto_view text&#x2F;html		# automatically show html (mailcap uses lynx)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You can see more mailcap examples in &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;SeniorMars&#x2F;dotfiles&#x2F;blob&#x2F;master&#x2F;.config&#x2F;mutt&#x2F;mailcap&quot;&gt;my dotfiles mailcap file&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Now you should be able to open attachments with your prefered program and automatically render HTML in emails! NO PICTURES THOUGH :)&lt;&#x2F;p&gt;
&lt;h2 id=&quot;colors&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#colors&quot; aria-label=&quot;Anchor link for: colors&quot;&gt;Colors&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;You can change the colors of Neomutt by adding the following to your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;color status green default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# in general, the order is:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# color &amp;lt;element&amp;gt; &amp;lt;color&amp;gt; &amp;lt;attr&amp;gt; optional&amp;lt;regex&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;My theme can be found in &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;SeniorMars&#x2F;dotfiles&#x2F;blob&#x2F;master&#x2F;.config&#x2F;mutt&#x2F;colors.muttrc&quot;&gt;my Neomutt colors file&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;external-programs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#external-programs&quot; aria-label=&quot;Anchor link for: external-programs&quot;&gt;External programs&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;While, Neomutt is a great email client, it is not perfect. For instance, it doesn’t have a built-in
query support, urls are not clickable, and it doesn’t encrypt emails. To resolve these issues, we can
use external programs.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;urlscan&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#urlscan&quot; aria-label=&quot;Anchor link for: urlscan&quot;&gt;Urlscan&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Let’s take a look at the first issue: urls are not clickable. To fix this, we can use &lt;code&gt;urlscan&lt;&#x2F;code&gt; to make urls clickable.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;firecat53&#x2F;urlscan&quot;&gt;&lt;code&gt;urlscan&lt;&#x2F;code&gt; GitHub repository&lt;&#x2F;a&gt; has installation details, and you can install it
via pip:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; pip install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --user&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; urlscan&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, we need to add the following to our &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;macro index,pager \cb &amp;quot;&amp;lt;pipe-message&amp;gt; urlscan&amp;lt;Enter&amp;gt;&amp;quot; &amp;quot;call urlscan to extract URLs out of a message&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;macro attach,compose \cb &amp;quot;&amp;lt;pipe-entry&amp;gt; urlscan&amp;lt;Enter&amp;gt;&amp;quot; &amp;quot;call urlscan to extract URLs out of a message&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, when you press &lt;code&gt;&amp;lt;Ctrl+b&amp;gt;&lt;&#x2F;code&gt; in the index or pager, &lt;code&gt;urlscan&lt;&#x2F;code&gt; will be called and the urls will be
extracted. You can then press &lt;code&gt;&amp;lt;Enter&amp;gt;&lt;&#x2F;code&gt; to open the url in your browser.&lt;&#x2F;p&gt;
&lt;p&gt;See image below:&lt;&#x2F;p&gt;
&lt;img src=&quot;urls.png&quot; alt=&quot;Urls&quot; width=&quot;3020&quot; height=&quot;1942&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h3 id=&quot;query&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#query&quot; aria-label=&quot;Anchor link for: query&quot;&gt;Query&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;The next issue is that Neomutt doesn’t have a built-in query support. To fix this, we can use
&lt;code&gt;goobook&lt;&#x2F;code&gt; to search our contacts or &lt;code&gt;lbdbq&lt;&#x2F;code&gt; to use apple’s address book.&lt;&#x2F;p&gt;
&lt;p&gt;For goobook, I recommend looking at archlinux’s &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Mutt#Goobook&quot;&gt;wiki&lt;&#x2F;a&gt; for more information. It basically comes down to getting a token from Google.&lt;&#x2F;p&gt;
&lt;p&gt;Since, I currently use macOS, I will show you how to use &lt;code&gt;lbdbq&lt;&#x2F;code&gt; to search my contacts.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Install &lt;code&gt;lbdbq&lt;&#x2F;code&gt;:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; brew install lbdbq&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;Modify &lt;code&gt;lbdbq&lt;&#x2F;code&gt;’s config file (either &lt;code&gt;$HOME&#x2F;.lbdbrc&lt;&#x2F;code&gt; or &lt;code&gt;&#x2F;opt&#x2F;homebrew&#x2F;Cellar&#x2F;lbdb&#x2F;0.51.1&#x2F;etc&#x2F;lbdb.rc&lt;&#x2F;code&gt;) to include the following:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;METHODS=&amp;quot;m_inmail m_osx_addressbook m_muttalias&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You are done!&lt;&#x2F;p&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Add the following to your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set query_command=&amp;quot;&#x2F;opt&#x2F;homebrew&#x2F;bin&#x2F;lbdbq &amp;#39;%s&amp;#39;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bind editor &amp;lt;Tab&amp;gt; complete-query&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, when you press &lt;code&gt;&amp;lt;Tab&amp;gt;&lt;&#x2F;code&gt; in the editor when prompted for an email, you will be able to search your MacBook contacts!&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;You can add your Google contacts to your MacBook contacts by linking your Google account to your MacBook contacts. Which is not great, but I still did it.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;encrypt&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#encrypt&quot; aria-label=&quot;Anchor link for: encrypt&quot;&gt;Encrypt&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;I use &lt;code&gt;gpg&lt;&#x2F;code&gt; to encrypt my emails. This is very useful for GitHub, and other services that require security. This is especially useful on mailing lists where you need to verify information. I find that everyone in the Arch Linux Mailing list uses it!&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;We already installed &lt;code&gt;gpg&lt;&#x2F;code&gt; in the beginning, so we are good to go!&lt;&#x2F;li&gt;
&lt;li&gt;Create a key and follow the instructions that are prompted:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; gpg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --full-generate-key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Copy your public key:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; gpg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --list-secret-keys --keyid-format=long&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For instance, my public key is: &lt;code&gt;7C668A6D13D5729989FB126B183357B41320BB2B&lt;&#x2F;code&gt;. You can see the full
version here: &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;SeniorMars.gpg&quot;&gt;github.com &#x2F; SeniorMars&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;Add the following to your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Use GPGME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Use my key for signing and encrypting&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set pgp_default_key = 7C668A6D13D5729989FB126B183357B41320BB2B&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Use GPGME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set crypt_use_gpgme = yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Automatically sign all out-going email&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set crypt_autosign = yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Sign replies to signed emails&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set crypt_replysign = yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Encrypt replies to encrypted emails&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set crypt_replyencrypt = yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Encrypt and sign replies to encrypted and signed email&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set crypt_replysignencrypted = yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Attempt to verify signatures automatically&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set crypt_verify_sig = yes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Attempt to encrypt automatically, if possible&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# I would recommend setting this to no as university often have spam filters&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# And this will cause your emails to be marked as spam&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# as they can&amp;#39;t decrypt your emails LMAO&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set crypt_opportunistic_encrypt = no&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# So you can view encrypted emails automatically&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;auto_view application&#x2F;pgp-encrypted&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;Plaintext is a bad idea, which is why we are going to use GPG to encrypt our passwords.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;In your &lt;code&gt;muttrc&lt;&#x2F;code&gt; delete the following lines:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set imap_pass = &amp;quot;my_app_specific_password&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set smtp_pass = &amp;quot;my_app_specific_password&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now go to your terminal and create a file called &lt;code&gt;passwords&lt;&#x2F;code&gt; in your &lt;code&gt;muttrc&lt;&#x2F;code&gt; directory and add
the lines you just deleted.
Now, encrypt the file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; gpg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --encrypt -r&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; YOUR_GPG_KEY passwords&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You should end up with a file called &lt;code&gt;passwords.gpg&lt;&#x2F;code&gt; in your &lt;code&gt;muttrc&lt;&#x2F;code&gt; directory.&lt;&#x2F;p&gt;
&lt;p&gt;Now, add the following to your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;source &amp;quot;gpg -dq $XDG_CONFIG_HOME&#x2F;passwords.gpg |&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Remove the plaintext &lt;code&gt;passwords&lt;&#x2F;code&gt; file.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; shred&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -u&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; passwords&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, you have encrypted your passwords!&lt;&#x2F;p&gt;
&lt;p&gt;Image below (notice the &lt;code&gt;Good signature&lt;&#x2F;code&gt; and &lt;code&gt; The following data is signed&lt;&#x2F;code&gt;):
&lt;img src=&quot;gpg.png&quot; alt=&quot;GPG&quot; width=&quot;3024&quot; height=&quot;1964&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;And that’s it! You should now have a fully functional email client!&lt;&#x2F;p&gt;
&lt;h1 id=&quot;update&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#update&quot; aria-label=&quot;Anchor link for: update&quot;&gt;Update&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;new-tools&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#new-tools&quot; aria-label=&quot;Anchor link for: new-tools&quot;&gt;New Tools&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Recently, I have changed my setup to use &lt;code&gt;isync&lt;&#x2F;code&gt; and &lt;code&gt;msmtp&lt;&#x2F;code&gt; to handle my email. Before this (and the original blog), we needed to have an open connection to Gmail to check for new emails. This was not ideal, as it would prevent us from reaching the speeds that neomutt can reach. Now, with &lt;code&gt;isync&lt;&#x2F;code&gt; and &lt;code&gt;msmtp&lt;&#x2F;code&gt;, I can browse my emails locally and only connect to Gmail when I want to send an email. This is awesome if you aim to limit your connection to Gmail.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;isync&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#isync&quot; aria-label=&quot;Anchor link for: isync&quot;&gt;isync&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;isync&lt;&#x2F;code&gt; is a command-line tool that synchronizes your mailbox in a local directory with a remote IMAP server, allowing you to manage your email locally. This is particularly beneficial for users who prefer not to maintain a constant connection to their email server.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;installation-1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#installation-1&quot; aria-label=&quot;Anchor link for: installation-1&quot;&gt;Installation&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;As isync requires a constant connection to your email server, you need to again create an app-specific password from google. If you need a reminder on how to do this, see the &lt;a href=&quot;https:&#x2F;&#x2F;seniormars.com&#x2F;posts&#x2F;neomutt&#x2F;#google-gmail-and-app-specific-passwords&quot;&gt;Google, Gmail, and App-specific passwords&lt;&#x2F;a&gt; section.&lt;&#x2F;p&gt;
&lt;h4 id=&quot;macos-1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#macos-1&quot; aria-label=&quot;Anchor link for: macos-1&quot;&gt;macOS&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; brew install isync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # or at least we hope this would work&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Correct Mac Installation&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;All of this info comes from the &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;moriyoshi&#x2F;cyrus-sasl-xoauth2&#x2F;issues&#x2F;9#issuecomment-2161796043&quot;&gt;com4&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; brew install cyrus-sasl libtool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # Build this xoauth2 plugin against cyrus-sasl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; git clone https:&#x2F;&#x2F;github.com&#x2F;moriyoshi&#x2F;cyrus-sasl-xoauth2.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; cd cyrus-sasl-xoauth2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; vim autogen.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Change &lt;code&gt;libtoolize&lt;&#x2F;code&gt; to &lt;code&gt;glibtoolize&lt;&#x2F;code&gt;, otherwise you’ll get a libtoolize not found error. I’m unsure if this warrants a patch.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;diff&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C594C5;&quot;&gt;1c1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F26D78;&quot;&gt;&amp;lt; libtoolize&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;background-color: #BFBDB60F;font-weight: bold;&quot;&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #70BF56;&quot;&gt;&amp;gt; glibtoolize&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then we run the command as normal:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; .&#x2F;autogen.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;  &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; .&#x2F;configure&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --with-cyrus-sasl=&#x2F;opt&#x2F;homebrew&#x2F;opt&#x2F;cyrus-sasl \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;  &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; make&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #BFBDB6B3;&quot;&gt;  &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; make&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; install&lt;&#x2F;span&gt;&lt;span&gt; &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we need to install isync properly.  Add &lt;code&gt;, &quot;--with-sasl=&#x2F;opt&#x2F;homebrew&#x2F;opt&#x2F;cyrus-sasl&quot;&lt;&#x2F;code&gt; to the &lt;code&gt;.&#x2F;configure&lt;&#x2F;code&gt; line in the def install section.  Add a depends_on &lt;code&gt;&quot;cyrus-sasl&quot;&lt;&#x2F;code&gt; below &lt;code&gt;depends_on &quot;openssl@3&quot;&lt;&#x2F;code&gt; but I’m unsure if this is required since it was manually installed. Here is the diff to isync.rb&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;diff&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C594C5;&quot;&gt;29a30&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #70BF56;&quot;&gt;&amp;gt;   depends_on &amp;quot;cyrus-sasl&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #C594C5;&quot;&gt;35c36&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F26D78;&quot;&gt;&amp;lt;     system &amp;quot;.&#x2F;configure&amp;quot;, *std_configure_args, &amp;quot;--disable-silent-rules&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;background-color: #BFBDB60F;font-weight: bold;&quot;&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #70BF56;&quot;&gt;&amp;gt;     system &amp;quot;.&#x2F;configure&amp;quot;, *std_configure_args, &amp;quot;--disable-silent-rules&amp;quot;, &amp;quot;--with-sasl=&#x2F;opt&#x2F;homebrew&#x2F;opt&#x2F;cyrus-sasl&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Finally, we can install isync:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; HOMEBREW_NO_INSTALL_FROM_API=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; brew install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; isync&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Or if you are using fish:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;fish&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ env HOMEBREW_NO_INSTALL_FROM_API=1 brew install -s isync&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This should work! I know this is a mess but it works!&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h4 id=&quot;arch-linux-1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#arch-linux-1&quot; aria-label=&quot;Anchor link for: arch-linux-1&quot;&gt;Arch Linux&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo pacman&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -Syu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; isync&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # or&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; paru&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -Syu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; isync&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;gentoo-1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#gentoo-1&quot; aria-label=&quot;Anchor link for: gentoo-1&quot;&gt;Gentoo&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo emerge&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --ask&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; net-mail&#x2F;isync&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;ubuntu-and-wsl2-using-ubuntu-1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ubuntu-and-wsl2-using-ubuntu-1&quot; aria-label=&quot;Anchor link for: ubuntu-and-wsl2-using-ubuntu-1&quot;&gt;Ubuntu and WSL2 using Ubuntu&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo apt install isync&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;configuring-isync&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#configuring-isync&quot; aria-label=&quot;Anchor link for: configuring-isync&quot;&gt;Configuring isync&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;To start, you need to create a configuration file for &lt;code&gt;isync&lt;&#x2F;code&gt;, typically named &lt;code&gt;.mbsyncrc&lt;&#x2F;code&gt; in your home directory:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; touch ~&#x2F;.mbsyncrc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here’s an example configuration that you might use for Gmail (note that &lt;code&gt;isync.gpg&lt;&#x2F;code&gt; is a file that contains your GPG-encrypted password for isync):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IMAPAccount Gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Host imap.gmail.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;User your_email@gmail.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PassCmd &amp;quot;gpg -dq ~&#x2F;.config&#x2F;mutt&#x2F;isync.gpg&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SSLType IMAPS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CertificateFile &#x2F;etc&#x2F;ssl&#x2F;certs&#x2F;ca-certificates.crt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IMAPStore Gmail-remote&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Account Gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;MaildirStore Gmail-local&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Path ~&#x2F;Mail&#x2F;Gmail&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Inbox ~&#x2F;Mail&#x2F;Gmail&#x2F;INBOX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Channel Gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Master :Gmail-remote:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Slave :Gmail-local:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Patterns &amp;quot;INBOX&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Expunge Both&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SyncState *&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here is my configuration:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IMAPAccount gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Host imap.gmail.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Port 993&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;User cjh16@rice.edu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PassCmd &amp;quot;gpg -dq --for-your-eyes-only --no-tty ~&#x2F;.config&#x2F;mutt&#x2F;isync.gpg&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SSLType IMAPS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CertificateFile  &#x2F;opt&#x2F;homebrew&#x2F;Cellar&#x2F;ca-certificates&#x2F;2024-03-11&#x2F;share&#x2F;ca-certificates&#x2F;cacert.pem&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IMAPStore gmail-remote&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Account gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;MaildirStore gmail-local&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Subfolders Verbatim&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Path ~&#x2F;.local&#x2F;share&#x2F;email&#x2F;cjh16&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;INBOX ~&#x2F;.local&#x2F;share&#x2F;email&#x2F;cjh16&#x2F;INBOX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Flatten .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Channel gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Far :gmail-remote:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Near :gmail-local:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Patterns *&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Automatically create missing mailboxes, both locally and on the server&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Create Both&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Sync the movement of messages between folders and deletions, add after making sure the sync works&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Expunge Both&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Save the synchronization state files in the relevant directory&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SyncState *&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;MaxMessages 0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This configuration tells &lt;code&gt;isync&lt;&#x2F;code&gt; to sync your Gmail’s INBOX to a local directory. It uses GPG to decrypt your password securely.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;running-isync&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#running-isync&quot; aria-label=&quot;Anchor link for: running-isync&quot;&gt;Running isync&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;To sync your mail, simply run:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; mbsync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # or `mbsync gmail`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This command will sync all channels defined in your &lt;code&gt;.mbsyncrc&lt;&#x2F;code&gt; file and download your emails to your local machine.&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;Homebrew provides a service to run mbsync every 15 minutes.&lt;&#x2F;p&gt;
&lt;p&gt;You can enable this by running &lt;code&gt;brew services start isync&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;neomutt-integration&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#neomutt-integration&quot; aria-label=&quot;Anchor link for: neomutt-integration&quot;&gt;Neomutt integration&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Now that you have &lt;code&gt;isync&lt;&#x2F;code&gt; set up, you can configure Neomutt to use the local mail directory to read your emails. To do this, you need to modify your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# My mailboxes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set mbox_type = Maildir&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set folder = &amp;quot;~&#x2F;.local&#x2F;share&#x2F;email&#x2F;cjh16&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set spoolfile = &amp;quot;+[Gmail].All Mail&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set postponed = &amp;quot;+[Gmail].Drafts&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set record = &amp;quot;+[Gmail].Sent Mail&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set trash = &amp;quot;+[Gmail].Trash&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mailboxes =&amp;quot;[Gmail].All Mail&amp;quot; =&amp;quot;[Gmail].Starred&amp;quot; =&amp;quot;[Gmail].Important&amp;quot; =&amp;quot;[Gmail].Drafts&amp;quot; =&amp;quot;[Gmail].Sent Mail&amp;quot; =&amp;quot;[Gmail].Trash&amp;quot; =&amp;quot;[Gmail].Spam&amp;quot; =INBOX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Notice that we changed the &lt;code&gt;mbox_type&lt;&#x2F;code&gt; to &lt;code&gt;Maildir&lt;&#x2F;code&gt; and set the &lt;code&gt;folder&lt;&#x2F;code&gt; to the path where &lt;code&gt;isync&lt;&#x2F;code&gt; stores your emails. This will allow Neomutt to read your emails from the local directory. Now, the next time you open Neomutt, it will be a bit slow, but after that, it will be lightning fast!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;msmtp&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#msmtp&quot; aria-label=&quot;Anchor link for: msmtp&quot;&gt;msmtp&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;msmtp&lt;&#x2F;code&gt; is a simple SMTP client that allows you to send emails from your local computer. When paired with &lt;code&gt;isync&lt;&#x2F;code&gt;, it handles the sending of emails, completing your email setup to work both offline and online. Additionally, you can set up &lt;code&gt;msmtp&lt;&#x2F;code&gt; for multiple email accounts, making it a versatile tool for managing your emails.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;installation-2&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#installation-2&quot; aria-label=&quot;Anchor link for: installation-2&quot;&gt;Installation&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;macos-2&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#macos-2&quot; aria-label=&quot;Anchor link for: macos-2&quot;&gt;macOS&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; brew install msmtp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;arch-linux-2&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#arch-linux-2&quot; aria-label=&quot;Anchor link for: arch-linux-2&quot;&gt;Arch Linux&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo pacman&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -Syu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; msmtp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # or&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; paru&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -Syu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; msmtp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;gentoo-2&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#gentoo-2&quot; aria-label=&quot;Anchor link for: gentoo-2&quot;&gt;Gentoo&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo emerge&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --ask&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; mail-mta&#x2F;msmtp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;ubuntu-and-wsl2-using-ubuntu-2&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ubuntu-and-wsl2-using-ubuntu-2&quot; aria-label=&quot;Anchor link for: ubuntu-and-wsl2-using-ubuntu-2&quot;&gt;Ubuntu and WSL2 using Ubuntu&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo apt install msmtp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;configuring-msmtp&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#configuring-msmtp&quot; aria-label=&quot;Anchor link for: configuring-msmtp&quot;&gt;Configuring msmtp&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Create a configuration file for &lt;code&gt;msmtp&lt;&#x2F;code&gt; in your home directory:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; touch ~&#x2F;.msmtprc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # or $XDG_CONFIG_HOME&#x2F;msmtprc&#x2F;config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here’s a basic configuration for Gmail (note that &lt;code&gt;msmtp.gpg&lt;&#x2F;code&gt; is a file that contains your GPG-encrypted password for Gmail):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;defaults&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;auth on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tls on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tls_trust_file &#x2F;etc&#x2F;ssl&#x2F;certs&#x2F;ca-certificates.crt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;account gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;host smtp.gmail.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;port 465&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;from your_email@gmail.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;user your_email@gmail.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;password_eval &amp;quot;gpg -dq ~&#x2F;.config&#x2F;mutt&#x2F;msmtp.gpg&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;account default : gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This is my configuration:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Set default values for all following accounts.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;defaults&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;auth           on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tls on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tls_starttls on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tls_trust_file &#x2F;opt&#x2F;homebrew&#x2F;Cellar&#x2F;ca-certificates&#x2F;2024-03-11&#x2F;share&#x2F;ca-certificates&#x2F;cacert.pem&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;logfile        ~&#x2F;.config&#x2F;msmtp&#x2F;msmtp.log&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;account        gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;host           smtp.gmail.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;port           465&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tls_starttls   off&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;from           cjh16@rice.edu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;user           cjh16@rice.edu&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;passwordeval   &amp;quot;gpg -dq ~&#x2F;.config&#x2F;mutt&#x2F;msmtp.gpg&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Set a default account&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;account default: gmail&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This configuration will use your Gmail account to send emails through SMTP, using a password fetched securely using GPG.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;using-msmtp&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-msmtp&quot; aria-label=&quot;Anchor link for: using-msmtp&quot;&gt;Using msmtp&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;To send an email using &lt;code&gt;msmtp&lt;&#x2F;code&gt;, you can pipe the content of an email file like so:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; cat email.txt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; msmtp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; default recipient@example.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To test you can run:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;  echo &amp;quot;hello there username.&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; msmtp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; default random_person@example.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You should email me for fun: &lt;code&gt;$ echo &quot;Hi SeniorMars!&quot; | msmtp -a default cjh16@rice.edu&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;neomutt-integration-1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#neomutt-integration-1&quot; aria-label=&quot;Anchor link for: neomutt-integration-1&quot;&gt;Neomutt integration&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;To integrate &lt;code&gt;msmtp&lt;&#x2F;code&gt; with Neomutt, you need to modify your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set sendmail = &amp;quot;msmtp -a cjh16@rice.edu&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;That’s it! Now, when you send an email in Neomutt, it will use &lt;code&gt;msmtp&lt;&#x2F;code&gt; to send the email.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;notmuch&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#notmuch&quot; aria-label=&quot;Anchor link for: notmuch&quot;&gt;notmuch&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;notmuch&lt;&#x2F;code&gt; is an email indexing tool that provides fast searching capabilities. It is useful when dealing with large volumes of email, helping you to quickly find exactly what you need. Especially when paired with Neomutt and isync, &lt;code&gt;notmuch&lt;&#x2F;code&gt; can significantly improve your email workflow.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;installation-3&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#installation-3&quot; aria-label=&quot;Anchor link for: installation-3&quot;&gt;Installation&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;macos-3&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#macos-3&quot; aria-label=&quot;Anchor link for: macos-3&quot;&gt;macOS&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; brew install notmuch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;arch-linux-3&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#arch-linux-3&quot; aria-label=&quot;Anchor link for: arch-linux-3&quot;&gt;Arch Linux&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo pacman&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -Syu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; notmuch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt; # or&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; paru&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -Syu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; notmuch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;gentoo-3&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#gentoo-3&quot; aria-label=&quot;Anchor link for: gentoo-3&quot;&gt;Gentoo&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo emerge&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; --ask&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; mail-filter&#x2F;notmuch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h4 id=&quot;ubuntu-and-wsl2-using-ubuntu-3&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ubuntu-and-wsl2-using-ubuntu-3&quot; aria-label=&quot;Anchor link for: ubuntu-and-wsl2-using-ubuntu-3&quot;&gt;Ubuntu and WSL2 using Ubuntu&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; sudo apt install notmuch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;configuring-notmuch&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#configuring-notmuch&quot; aria-label=&quot;Anchor link for: configuring-notmuch&quot;&gt;Configuring notmuch&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;First, initialize notmuch:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; notmuch setup&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Follow the prompts to set up your email directory (for me it is &lt;code&gt;~&#x2F;.local&#x2F;share&#x2F;email&#x2F;cjh16&lt;&#x2F;code&gt;). Then, you can start searching your emails by using:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; notmuch search &amp;quot;from:example@example.com&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Notmuch will index your emails located in the directory specified during setup, allowing you to use powerful search queries to navigate your mail efficiently.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;neomutt-integration-2&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#neomutt-integration-2&quot; aria-label=&quot;Anchor link for: neomutt-integration-2&quot;&gt;Neomutt integration&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;To integrate &lt;code&gt;notmuch&lt;&#x2F;code&gt; with Neomutt, you need to modify your &lt;code&gt;muttrc&lt;&#x2F;code&gt; file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;macro index S &amp;quot;&amp;lt;shell-escape&amp;gt;mbsync -V gmail&amp;lt;enter&amp;gt;&amp;lt;shell-escape&amp;gt;notmuch new&amp;lt;enter&amp;gt;&amp;quot; &amp;quot;sync email&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;macro index \Cf &amp;quot;&amp;lt;enter-command&amp;gt;unset wait_key&amp;lt;enter&amp;gt;&amp;lt;shell-escape&amp;gt;read -p &amp;#39;Enter a search term to find with notmuch: &amp;#39; x; echo \$x &amp;gt;~&#x2F;.cache&#x2F;mutt_terms&amp;lt;enter&amp;gt;&amp;lt;limit&amp;gt;~i \&amp;quot;\`notmuch search --output=messages \$(cat ~&#x2F;.cache&#x2F;mutt_terms) | head -n 600 | perl -le &amp;#39;@a=&amp;lt;&amp;gt;;s&#x2F;\^id:&#x2F;&#x2F; for@a;$,=\&amp;quot;|\&amp;quot;;print@a&amp;#39; | perl -le &amp;#39;@a=&amp;lt;&amp;gt;; chomp@a; s&#x2F;\\+&#x2F;\\\\+&#x2F; for@a;print@a&amp;#39; \`\&amp;quot;&amp;lt;enter&amp;gt;&amp;quot; &amp;quot;show only messages matching a notmuch pattern&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This will allow us to sync our emails and search our emails using &lt;code&gt;notmuch&lt;&#x2F;code&gt; directly from Neomutt. Pretty cool!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;things-left-desired&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#things-left-desired&quot; aria-label=&quot;Anchor link for: things-left-desired&quot;&gt;Things left desired&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Honestly, I love my setup, but there could always be improvements. Notably:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;I want to not use app-specific passwords. I would like to use OAuth2, but my school blocks us from doing anything technical.&lt;&#x2F;li&gt;
&lt;li&gt;I would like to auto complete email addresses from my contacts. I have a lot of contacts, and I don’t remember all of their emails.&lt;&#x2F;li&gt;
&lt;li&gt;Sometimes I want images lmao! I’ve been trying to mess around with Kitty but macos is a pain.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# text&#x2F;html; kitty @ launch --type overlay --title neomutt-html w3m -I %{charset} -T text&#x2F;html -graph -F -no-cookie -o confirm_qq=FALSE -o use_wide=TRUE -o display_link=TRUE -o display_link_number=TRUE -o color=TRUE -o auto_image=TRUE -o display_image=TRUE -o max_load_image=20 -o inline_img_protocol=4  %s; nametemplate=%s.html&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;text&#x2F;html; open -a Firefox %s; test=test -n &amp;quot;$DISPLAY&amp;quot;; needsterminal;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;text&#x2F;html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;text&#x2F;plain; cat %s; copiousoutput;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;image&#x2F;*; icat.sh &amp;#39;%s&amp;#39;; test=test -n &amp;quot;$DISPLAY&amp;quot;; needsterminal;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;video&#x2F;*; setsid mpv --quiet %s &amp;amp;; copiousoutput&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;audio&#x2F;*; mpv %s ;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;application&#x2F;pdf; open -a Firefox %s; test=test -n &amp;quot;$DISPLAY&amp;quot;; needsterminal;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;application&#x2F;pgp-encrypted; gpg -d &amp;#39;%s&amp;#39;; copiousoutput;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;application&#x2F;pgp-keys; gpg --import &amp;#39;%s&amp;#39;; copiousoutput;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;application&#x2F;x-subrip; $EDITOR %s ;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;application&#x2F;octet-stream; icat.sh &amp;#39;%s&amp;#39;; test=test -n &amp;quot;$DISPLAY&amp;quot;; needsterminal;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;I want to fix cache contact with &lt;code&gt;lbdbq&lt;&#x2F;code&gt; and &lt;code&gt;notmuch&lt;&#x2F;code&gt;. I have tried, but I can’t get it to work.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;#!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Query lbdbq and save results to Mutt alias file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Mutt aliases file to save results to&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ALIASES&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&#x2F;.cache&#x2F;mutt&#x2F;aliases&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;# Only save email addresses from $DOMAIN. Leave empty to save all email addresses&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DOMAIN&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;rice.edu&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;query_and_cache&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;lbdbq&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;$@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; 2&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&#x2F;dev&#x2F;null&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F07178;&quot;&gt;    printf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;%s\n&amp;#39; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    # Remove first line from results&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;sed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;#39;1d&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;lt;&amp;lt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    # Format results like mutt aliases&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;    sed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -E&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; $&amp;#39;s&#x2F;^([[:alnum:]_.]+)@([[:alnum:]_.]+)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\t&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;([[:alnum:] -]+)&#x2F;alias &lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;1 &lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;1@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;2 (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;3)&#x2F;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;lt;&amp;lt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$results&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt; awk&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -v&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; domain=&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$DOMAIN&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; &amp;#39;$3 ~ domain {$2=tolower($2);print}&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F29668;&quot;&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$ALIASES&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;font-style: italic;&quot;&gt;    # Sort and remove duplicates&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;    sort&lt;&#x2F;span&gt;&lt;span style=&quot;color: #95E6CB;&quot;&gt; -u -o&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$ALIASES&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$ALIASES&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #59C2FF;&quot;&gt;query_and_cache&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #D2A6FF;&quot;&gt;$@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;That being said, I am happy with my setup. I can send and receive emails, and I can search my emails quickly. I can also encrypt my emails, which is a plus.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;conclusion&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#conclusion&quot; aria-label=&quot;Anchor link for: conclusion&quot;&gt;Conclusion&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I hope you enjoyed this tutorial! If you have any questions, don’t ask &#x2F;s.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;SeniorMars&#x2F;dotfiles&#x2F;blob&#x2F;182ad5717def463abcc0aebbe0062c48824c3532&#x2F;.config&#x2F;mutt&#x2F;muttrc&quot;&gt;Here is my final configuration&lt;&#x2F;a&gt;. And again, here is how my email client looks (lol taxes with github now):&lt;&#x2F;p&gt;
&lt;img src=&quot;neomutt2.png&quot; alt=&quot;Final&quot; width=&quot;3022&quot; height=&quot;1890&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;p&gt;I am going to upload a talk I gave on setting up Neovim for non-programmers soon. This talks about
grammar checking, spell keybinds, and more. So stay tuned!&lt;&#x2F;p&gt;
&lt;p&gt;Thanks for reading and have a nice day!&lt;&#x2F;p&gt;
&lt;p&gt;SeniorMars&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>The Last Wish, Mental Health, and Hesitation</title>
          <pubDate>Sat, 01 Apr 2023 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/puss-thelastwish/</link>
          <guid>https://seniormars.com/posts/puss-thelastwish/</guid>
          <description xml:base="https://seniormars.com/posts/puss-thelastwish/">&lt;p&gt;At this point, I’ve seen Puss In Boots: The Last Wish at least seven times. Once in the theater, and
the rest at home with the company of my nephew and niece. Now, let me tell you, I was originally
late to the party: the first time I saw it was in theaters in late January, but I immediately fell
in love with the movie. It simply reminded me of the first time I saw Spider-verse: a thrilling ride
with a sweet story. Now, to me, Spider-verse is still the better film, however, it is
undoubtedly in my top five animated films. Now with that preface out of the way, let me detail why I
decided to write this little blog.&lt;&#x2F;p&gt;
&lt;p&gt;The Last Wish was a great representation of people with mental disabilities. In fact, it tackled so
many hardcore emotions that I’m familiar with that I almost felt myself experiencing those same
emotions in those critical moments that Puss had. Specifically, when Puss had a panic attack, I
almost cried. Partly due to the aforementioned emotions, but mostly because the way the film
captured Puss’ anxiety had me remember all the times I’ve felt the same emotions. The short breath, your
heart racing, and your vision tunneling. Honestly, I always had a hard time explaining what it’s like to
have a panic attack, but now I’m glad I have this film to show as reference—allowing people to
understand the impact of these disabilities in everyday life. I’m so glad this film exists.&lt;&#x2F;p&gt;
&lt;p&gt;Now, the other part I wanted to talk about was the difference of my level of hesitations I felt
towards “Big” Jack Horner and Perrito. Jack was a ranging psychopath. Perhaps to many he seemed like
an empty villain, but in reality there are such individuals like him that exist. And just like Jack,
they believe they have the privilege to own anything they desire. Now, to some readers this
observation may be obvious, but nonetheless, it provides a perfect transition to talking about
hesitation.&lt;&#x2F;p&gt;
&lt;p&gt;See, when I first saw Perrito, my guts screamed: “The Dog is a twist villain. DO NOT TRUST HIM.”
Now, I’m sure many people felt the same as me. Perhaps it was due to the Disney influence having us
believe that every animated film must have a twist-villain, OR, perhaps it was because we’re
incredibly biased against people who act ‘nice’. With Jack Horner, we understand that there
are psychopaths that have no sense of morality, which is why I believe our guts are fine with him
being a “pure-blood-down-right-evil villain”, but with Perrito? It was almost the opposite. My
mind refused to accept that such a good-hearted soul existed. I believe the reason for this is our
prejudice, with us believing that nobody has “pure” motives. But just like there are psychopaths,
I know that there are ‘pure-hearted souls’, the person who needs to change is me.&lt;&#x2F;p&gt;
&lt;p&gt;Overall, I’m convinced that Puss and Boots is more or less a metaphor for mental issues. In that
sense, it’s a good movie to fit adult-eccentric issues into a family friend movie. Truly a 9.5&#x2F;10.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>New Website!</title>
          <pubDate>Fri, 31 Mar 2023 00:00:00 +0000</pubDate>
          <author>SeniorMars</author>
          <link>https://seniormars.com/posts/new-website/</link>
          <guid>https://seniormars.com/posts/new-website/</guid>
          <description xml:base="https://seniormars.com/posts/new-website/">&lt;p&gt;So, I guess I have a blog now! It uses &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;&quot;&gt;Zola&lt;&#x2F;a&gt; and is hosted on &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;pages.github.com&#x2F;&quot;&gt;GitHub Pages&lt;&#x2F;a&gt;. The theme is custom, but it is based on the &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;not-matthias&#x2F;apollo&quot;&gt;Apollo theme&lt;&#x2F;a&gt;. Plus Ayu-dark for codeblocks.&lt;&#x2F;p&gt;
&lt;p&gt;Here is my fork: &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;seniormars&#x2F;redux&quot;&gt;Redux&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h1 id=&quot;mermaid&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mermaid&quot; aria-label=&quot;Anchor link for: mermaid&quot;&gt;Mermaid&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;mermaid&quot;&gt;
  graph LR
    A[Start] --&gt; B[Initialize]
    B --&gt; C[Processing]
    C --&gt; D[Complete]
    D --&gt; E[Success]
    
    style A fill:#f9f,stroke:#333
    style E fill:#9f9,stroke:#333
&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;latex&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#latex&quot; aria-label=&quot;Anchor link for: latex&quot;&gt;LaTeX&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;inline-math&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#inline-math&quot; aria-label=&quot;Anchor link for: inline-math&quot;&gt;Inline Math&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;$(a+b)^2$ = $a^2 + 2ab + b^2$&lt;&#x2F;li&gt;
&lt;li&gt;A polynomial P of degree d over $\mathbb{F}_p$ is an expression of the form
$P(s) = a_0 + a_1 . s + a_2 . s^2 + … + a_d . s^d$ for some
$a_0,..,a_d \in \mathbb{F}_p$&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;displayed-math&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#displayed-math&quot; aria-label=&quot;Anchor link for: displayed-math&quot;&gt;Displayed Math&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;$$
p := (\sum_{k∈I}{c_k.v_k} + \delta_v.t(x))·(\sum_{k∈I}{c_k.w_k} + \delta_w.t(x)) − (\sum_{k∈I}{c_k.y_k} + \delta_y.t(x))
$$&lt;&#x2F;p&gt;
&lt;h2 id=&quot;quote&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#quote&quot; aria-label=&quot;Anchor link for: quote&quot;&gt;Quote&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;blockquote&gt;
&lt;p&gt;The enjoyment of one’s tools is an essential ingredient of successful work.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;cite&gt; Donald Knuth&lt;&#x2F;cite&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;blockquote&gt;
&lt;h1 id=&quot;h1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#h1&quot; aria-label=&quot;Anchor link for: h1&quot;&gt;H1&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;h2&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#h2&quot; aria-label=&quot;Anchor link for: h2&quot;&gt;H2&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;h3&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#h3&quot; aria-label=&quot;Anchor link for: h3&quot;&gt;H3&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Aliquet sagittis id consectetur purus ut. In pellentesque massa placerat duis ultricies. Neque laoreet suspendisse interdum consectetur libero id. Justo nec ultrices dui sapien eget mi proin. Nunc consequat interdum varius sit amet mattis vulputate. Sollicitudin tempor id eu nisl nunc mi ipsum. Non odio euismod lacinia at quis. Sit amet nisl suscipit adipiscing. Amet mattis vulputate enim nulla aliquet porttitor lacus luctus accumsan. Sit amet consectetur adipiscing elit pellentesque habitant. Ac placerat vestibulum lectus mauris. Molestie ac feugiat sed lectus vestibulum mattis ullamcorper velit sed. &lt;a rel=&quot;noreferrer external&quot; href=&quot;https:&#x2F;&#x2F;www.google.com&quot;&gt;Google&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;markdown-here.com&#x2F;img&#x2F;icon256.png&quot; alt=&quot;Markdown Logo&quot; width=&quot;256&quot; height=&quot;256&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; &#x2F;&gt;
&lt;h2 id=&quot;code-block&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#code-block&quot; aria-label=&quot;Anchor link for: code-block&quot;&gt;Code Block&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Hello World&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: #5A6378A6;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot; style=&quot;background-color: #161A24;&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: #5A6378A6;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Hello World&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: #5A6378A6;&quot;&gt;3&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;ordered-list&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ordered-list&quot; aria-label=&quot;Anchor link for: ordered-list&quot;&gt;Ordered List&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ol&gt;
&lt;li&gt;First item&lt;&#x2F;li&gt;
&lt;li&gt;Second item&lt;&#x2F;li&gt;
&lt;li&gt;Third item&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;unordered-list&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#unordered-list&quot; aria-label=&quot;Anchor link for: unordered-list&quot;&gt;Unordered List&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;List item&lt;&#x2F;li&gt;
&lt;li&gt;Another item&lt;&#x2F;li&gt;
&lt;li&gt;And another item&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;nested-list&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#nested-list&quot; aria-label=&quot;Anchor link for: nested-list&quot;&gt;Nested list&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Fruit
&lt;ul&gt;
&lt;li&gt;Apple&lt;&#x2F;li&gt;
&lt;li&gt;Orange&lt;&#x2F;li&gt;
&lt;li&gt;Banana&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Dairy
&lt;ul&gt;
&lt;li&gt;Milk&lt;&#x2F;li&gt;
&lt;li&gt;Cheese&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;table-inline-markdown&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#table-inline-markdown&quot; aria-label=&quot;Anchor link for: table-inline-markdown&quot;&gt;Table Inline Markdown&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Italics&lt;&#x2F;th&gt;&lt;th&gt;Bold&lt;&#x2F;th&gt;&lt;th&gt;Code&lt;&#x2F;th&gt;&lt;th&gt;StrikeThrough&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;em&gt;italics&lt;&#x2F;em&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;strong&gt;bold&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;code&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;del&gt;strikethrough&lt;&#x2F;del&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h2 id=&quot;foldable-text&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foldable-text&quot; aria-label=&quot;Anchor link for: foldable-text&quot;&gt;Foldable Text&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;details&gt;
    &lt;summary&gt;Title 1&lt;&#x2F;summary&gt;
    &lt;p&gt;IT&#x27;S A SECRET TO EVERYBODY.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;details&gt;
    &lt;summary&gt;Title 2&lt;&#x2F;summary&gt;
    &lt;p&gt;Stay awhile, and listen!&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;h2 id=&quot;code-tags&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#code-tags&quot; aria-label=&quot;Anchor link for: code-tags&quot;&gt;Code tags&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Lorem ipsum &lt;code&gt;dolor&lt;&#x2F;code&gt; sit amet, &lt;code&gt;consectetur adipiscing&lt;&#x2F;code&gt; elit.
&lt;code&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;testing&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#testing&quot; aria-label=&quot;Anchor link for: testing&quot;&gt;Testing&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Here is an example of the &lt;code&gt;note&lt;&#x2F;code&gt; shortcode:&lt;&#x2F;p&gt;
&lt;p&gt;This one is static!
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note!&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;This blog assumes basic terminal maturity&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;&#x2F;p&gt;
&lt;p&gt;This one is clickable!
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Quiz!&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;The answer to the quiz!&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;&#x2F;p&gt;
&lt;p&gt;Syntax:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{ note(header=&amp;quot;Note!&amp;quot;, body=&amp;quot;This blog assumes basic terminal maturity&amp;quot;) }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{ note(clickable=true, header=&amp;quot;Quiz!&amp;quot;, body=&amp;quot;The answer to the quiz!&amp;quot;) }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You can also use some HTML in the text:
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Note!&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;h1&gt;This blog assumes basic terminal maturity&lt;&#x2F;h1&gt;
    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;&#x2F;p&gt;
&lt;p&gt;Literal shortcode:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{ note(header=&amp;quot;Note!&amp;quot;, body=&amp;quot;&amp;lt;h1&amp;gt;This blog assumes basic terminal maturity&amp;lt;&#x2F;h1&amp;gt;&amp;quot;) }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Pretty cool, right?&lt;&#x2F;p&gt;
&lt;p&gt;Finally, you can do something like this (hopefully):&lt;&#x2F;p&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Quiz!&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;h1 id=&quot;hello-this-is-markdown-inside-a-note-shortcode&quot;&gt;Hello this is markdown inside a note shortcode&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Hello World&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We can’t call another shortcode inside a shortcode, but this is good enough.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;Here is the raw markdown:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #BFBDB6; background-color: #0D1017;&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{ note(clickable=true, header=&amp;quot;Quiz!&amp;quot;) }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #AAD94C;font-weight: bold;&quot;&gt;# Hello this is markdown inside a note shortcode&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;background-color: #BFBDB6;&quot;&gt;```&lt;&#x2F;span&gt;&lt;span&gt;rust&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FF8F40;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFB454;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #AAD94C;&quot;&gt;&amp;quot;Hello World&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #5A6673;background-color: #BFBDB6;&quot;&gt;```&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;We can&amp;#39;t call another shortcode inside a shortcode, but this is good enough.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{&#x2F;* end *&#x2F;}}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Cartesian Closed Category&lt;&#x2F;th&gt;&lt;th&gt;$\mathbf{Set}$&lt;&#x2F;th&gt;&lt;th&gt;$\mathbf{P}$ (Logic)&lt;&#x2F;th&gt;&lt;th&gt;Typed $\lambda$-calculus&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Objects&#x2F;1-cells&lt;&#x2F;td&gt;&lt;td&gt;Sets&lt;&#x2F;td&gt;&lt;td&gt;Propositions&lt;&#x2F;td&gt;&lt;td&gt;Types&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Morphisms&#x2F;2-cells&lt;&#x2F;td&gt;&lt;td&gt;Functions&lt;&#x2F;td&gt;&lt;td&gt;Entailment&lt;&#x2F;td&gt;&lt;td&gt;Terms&#x2F;Programs&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;1-cell composition&lt;&#x2F;td&gt;&lt;td&gt;Cartesian product $S \times T$&lt;&#x2F;td&gt;&lt;td&gt;Conjunction $A \wedge B$&lt;&#x2F;td&gt;&lt;td&gt;Product type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Identity 1-cell&lt;&#x2F;td&gt;&lt;td&gt;One-element set ${*}$&lt;&#x2F;td&gt;&lt;td&gt;True proposition $\top$&lt;&#x2F;td&gt;&lt;td&gt;Unit type $()$&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Right Kan extension&lt;&#x2F;td&gt;&lt;td&gt;Function set $T^S$&lt;&#x2F;td&gt;&lt;td&gt;Implication $A \rightarrow B$&lt;&#x2F;td&gt;&lt;td&gt;Function type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Evaluation morphism&lt;&#x2F;td&gt;&lt;td&gt;Function application&lt;&#x2F;td&gt;&lt;td&gt;Modus ponens&lt;&#x2F;td&gt;&lt;td&gt;Term application&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Currying&lt;&#x2F;td&gt;&lt;td&gt;$f: C\times A\rightarrow B$ to $\Lambda f: C\rightarrow B^A$&lt;&#x2F;td&gt;&lt;td&gt;Deduction theorem&lt;&#x2F;td&gt;&lt;td&gt;Lambda abstraction&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h3 id=&quot;basic-note-types&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#basic-note-types&quot; aria-label=&quot;Anchor link for: basic-note-types&quot;&gt;Basic Note Types&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Default Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;This is a standard note with default styling.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-info&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Information Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;This note contains important information you should know.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-warning&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Warning Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;Be careful! This note warns you about something important.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-success&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Success Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;Congratulations! This operation was successful.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-danger&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Danger Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;Critical error! Something went seriously wrong.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-tip&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Tip Note&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;Here’s a useful tip to make your work easier.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;custom-icons&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#custom-icons&quot; aria-label=&quot;Anchor link for: custom-icons&quot;&gt;Custom Icons&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;div class=&quot;note-container note-type-info&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
            &lt;span class=&quot;custom-icon&quot;&gt;📌&lt;&#x2F;span&gt;
          
          &lt;p&gt;Custom Icon&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;This note uses a custom pin icon instead of the default info icon.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-warning&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
            &lt;span class=&quot;custom-icon&quot;&gt;🔥&lt;&#x2F;span&gt;
          
          &lt;p&gt;Fire Warning&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;This warning uses a fire emoji as its custom icon.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-success&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
            &lt;span class=&quot;custom-icon&quot;&gt;🌟&lt;&#x2F;span&gt;
          
          &lt;p&gt;Star Success&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;A star icon celebrates this success message.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;clickable-notes-collapsible&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#clickable-notes-collapsible&quot; aria-label=&quot;Anchor link for: clickable-notes-collapsible&quot;&gt;Clickable Notes (Collapsible)&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Click to Expand&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;This content can be toggled by clicking the header.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;false&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Hidden Content (Click to Show)&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: none;&quot;&gt;
      &lt;p&gt;This content is initially hidden but can be revealed.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-tip&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Expandable Tip&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;This tip is in a collapsible block.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;center-alignment&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#center-alignment&quot; aria-label=&quot;Anchor link for: center-alignment&quot;&gt;Center Alignment&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-center&quot;&gt;
          &lt;p&gt;Centered Header&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;This note has a centered header.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-success&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-center&quot;&gt;
          &lt;p&gt;Centered Success&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;This success note has a centered header.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-default&quot;&gt;
  
    &lt;button class=&quot;note-toggle&quot; aria-expanded=&quot;true&quot;&gt;
      
        &lt;div class=&quot;note-center&quot;&gt;
          &lt;p&gt;Centered &amp;amp; Clickable&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;button&gt;
    &lt;div class=&quot;note-content&quot; style=&quot;display: block;&quot;&gt;
      &lt;p&gt;This note has both center alignment and is clickable.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;rich-content-examples&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#rich-content-examples&quot; aria-label=&quot;Anchor link for: rich-content-examples&quot;&gt;Rich Content Examples&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;div class=&quot;note-container note-type-info&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Rich Content&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;This note includes &lt;strong&gt;bold text&lt;&#x2F;strong&gt;, &lt;em&gt;italic text&lt;&#x2F;em&gt;, and &lt;code&gt;inline code&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;div class=&quot;note-container note-type-warning&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Warning with List&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;p&gt;Things to watch out for:\n\n1. First issue\n2. Second issue\n3. Third issue&lt;&#x2F;p&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;h3 id=&quot;tables-inside-notes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tables-inside-notes&quot; aria-label=&quot;Anchor link for: tables-inside-notes&quot;&gt;Tables Inside Notes&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;div class=&quot;note-container note-type-info&quot;&gt;
  
    &lt;div class=&quot;note-header&quot;&gt;
      
        &lt;div class=&quot;note-icon&quot;&gt;
          
          &lt;p&gt;Data Table!&lt;&#x2F;p&gt;

        &lt;&#x2F;div&gt;
      
    &lt;&#x2F;div&gt;
    &lt;div class=&quot;note-content&quot;&gt;
      &lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Name&lt;&#x2F;th&gt;&lt;th&gt;Age&lt;&#x2F;th&gt;&lt;th&gt;Role&lt;&#x2F;th&gt;&lt;th&gt;Height&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Alice&lt;&#x2F;td&gt;&lt;td&gt;28&lt;&#x2F;td&gt;&lt;td&gt;Developer&lt;&#x2F;td&gt;&lt;td&gt;5’6“&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Bob&lt;&#x2F;td&gt;&lt;td&gt;34&lt;&#x2F;td&gt;&lt;td&gt;Designer&lt;&#x2F;td&gt;&lt;td&gt;6’1“&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Carol&lt;&#x2F;td&gt;&lt;td&gt;42&lt;&#x2F;td&gt;&lt;td&gt;Manager&lt;&#x2F;td&gt;&lt;td&gt;5’8“&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;

    &lt;&#x2F;div&gt;
  
&lt;&#x2F;div&gt;
&lt;p&gt;It works good enough for me!&lt;&#x2F;p&gt;
</description>
      </item>
    </channel>
</rss>
