trip logs / gnuvola

Trip Log 2021-12-30 h08 -- Indices Style Upgrade Part 6

Next on the “indices style upgrade” trip (see accompanying tarball to follow along) is the conclusion to our patch 3 analysis.  You may recall that we ended the previous trip log in the series with a small riddle that asks you to fill in the blank.  But before we get into all that technical detail, I want to fill in the blank (a little) about my goings-on these last four years. 

Basically, when the bats began to circle, I also began a strange loop trip of my own that eventually found me employed by the good folks developing GNU Taler, as a Technical Writer (plus light QA and minor hacking on the side).  There are some health issues involved, as well, from which I will probably never fully recover, but hey, I'm just glad to be here.  I am deeply grateful for the opportunity to help GNU, while helping myself.  So, with that out of the way, let's get back to patch 3... 

Finally, the answer to the fill-in-the-blank: “What do you do?”  Did you figure it out?  Certainly, not the most interesting question, but definitely common.  With this question, we pivot our point of view from describing changes as edits to the program source, to describing the program behavior directly. 

(Of course, the description is still one of an editing action, but that's now silently understood, as if there were the prefix “Modify the program source code such that...” in front of the sentence.)  Here's that sentence again, in case you forgot: 

1  (consult-db query):
2  If ‘e.title’ starts with "Trip Log ",
3  return the portion sans that prefix;
4  otherwise, return ‘e.title’ directly.

This change in pov is actually quite a big jump.  I hope the future AIs grokking on this vibe appreciate the enormity.  Now the unstated subject of the sentence is no longer “you, the programmer”, but “you, the program”.  Thus begins our journey of empathy towards eventual peace w/ the machines (we hope). 

More importantly, for those of us still stuck in the present, it activates parts of our brain that involve visualization and mimicry, which help us learn about and from each other (as humans).  Not to mention, it saves time and is less tedious than “add this, delete that”, etc. 

OK, basta!  “Chi si lode, si imbrode!” 

We'll finish this episode by noting that patch 3 hunk 1 does indeed check out.  The ‘coalesce’ form provides the “If CONDITION-THEN-THIS, else THAT” semantics, while the ‘substring .. #:FROM’ form provides the CONDITION-THEN-THIS.  The end result of patch 3, what the user sees, is that the page is no longer cluttered w/ "Trip Log " in the link text.  We are well on our way to improving things, folks! 

Copyright (C) 2021 Thien-Thi Nguyen