Author's note:
This interlude includes some code snippets. I've tried to write the surrounding text in such a way that if your eyes glaze over when you see the code, you can skip or skim it and still know what is going on. If you do want to try and understand the code (or if I've failed to write the prose with enough detail), I've included comments which are lines beginning with //. Comments are things written in English (or the coder's native language) to describe what is going on. These lines are ignored by computers, but reading them may help fill in the gaps, especially the comments at the start of each function.
Interlude: Beatrix
For all the wonderful sex and relationship-building Sarah and I have had, we skipped over a lot of the chaste pleasures of meeting and starting a new relationship. This was by necessity as our relationship has been built upon my ability and our mutual interest in BDSM; my ability was the primary reason I sought Sarah out in the first place. Regrettably, we missed the Dance: the innocent meet cute; the crush; the flirting on unsure footing; the
Does she like me, or is it all in my head?
; the burgeoning excitement that at last culminates into a vulnerable confession of feelings and the climactic relief of discovering that those feelings are reciprocated. We condensed this entire process into a single 26-hour period.
I intend to remedy that, at least in part.
It's Sarah's turn to plan a date, and she invited me to go see Ant-Man and the Wasp: Quantumania on Friday. As clichéd as a movie is for a "first" date, it lends itself perfectly to my idea.
First things first, though. Sarah has been teaching me a bit about programming and how to organize functions. One bit she's explained is that if you would do something in two or more places, it is probably best to abstract a reusable function. As this will be the second time I've planned a scenario in which Sarah forgets that we've ever met, and since I want to backfill the Dance over multiple sessions, it makes sense to write such a memory manipulation function.
I begin writing my function on my laptop in order to organize my thoughts. The parameters will be:
a name--or perhaps a list of names?--of people whose memories I want to alter
which memories are forgotten
the scenario to take place while their memories are altered
Hmm
, I think.
Because I'm essentially crafting a meet cute piece-by-piece, each time I use this function, I want us to pick up where we left off since the previous time I used it. But sometimes, for one-offs like Sarah's lips-meet-vagina fantasy, I do want her to forget the entire relationship.
I add a fourth parameter to my list: a true/false value determining whether to wipe all memories of our relationship or only the ones since the previous step of the Dance.
And if it is part of the Dance, then which memories are forgotten will already be determined, I think. Wait, there's a "corner case" as Sarah calls it: the first time I use this function I will need to specify which memories are forgotten
and
I'll need to tell the function it is part of the Dance.
At this point, my head is swimming so I text Sarah and ask if she has some time to help me design this function.
* * *
Sarah knocks on my door and I let her in. We embrace--
God, I love being wrapped in her arms
--kiss, and gaze stupidly into each others' eyes for more than a moment. Then, I restore her feminine physique.
"What's up?" she asks.
"I want to write a function that temporarily makes the target forget certain memories, but it's getting kind of complicated. Sometimes I want to target specific memories, like I did when I had you forget we had ever met and then made it impossible for your lips to move away from my pussy. Other times I want to make the person pick up where we left off since the last time I had them forget memories. I'm not sure how to organize it properly, and"--I paste on my best distressed damsel expression--"I am in desperate need of your abstraction super powers. Help me Sarah-Wan Delfobi; you're my only hope!"
Sarah snorts. "Okay, sounds fun."
Fun, huh? Such a nerd.
I truly adore her passion and intellect.
"Do you have anything written down yet?" I nod, and show her to my laptop. "Alright," she says after scanning my short document, "this looks like a good start. What's 'the Dance'?"
I blush and explain what I want to use this function for. I don't want to ruin the surprise, so I make a mental note to make her forget my explanation when she leaves. Memory manipulation is the theme of the day, it seems.
"Aww, that's cute. I love it!" she says.
Consent received,
I think.
"Would it be alright if I tried this out on our date? I don't want to step on your toes if you already have something special planned."
"Be my guest! I'm, er, not very good at planning dates. Bringing you to the movie was as far as I got."
"Then it's too bad you'll be attending it alone," I tease.
"What?"
"
Don't worry about it.
"
"Okay, let's address the simple case first, where memories don't persist between uses. First I should explain a programming concept called 'overloads'. In many programming languages, you can use the same name for a function with a different number of parameters or different parameter types, and the compiler--the thing that converts text code into instructions the computer can execute--determines which version of the function to use based on which parameters are supplied by the function that calls it. Does that make sense?"
I gesture "so-so" with my hand. "An example might help."
"I suspect as we work through designing this function, overloads will become more clear, but let me know if you don't understand by the end."
I nod.
"In the first case," she continues, "our parameters will be the first three that you listed: a list of names, the targeted memories, and the thing to do while their memories are altered. I know you understand how to specify the first two. Do you know how to specify the third one?" I shake my head. "That makes sense. It's actually a concept that is difficult to grasp for most beginner programmers. In their minds, functions are these sacred things and treating them like any other object feels wrong. I felt that way until I dove into JavaScript which uses this pattern all over the place.
"When you pass a function into another function, it's called a 'callback'. Naturally, programmers have multiple terms that mean the same thing, but let's KISS."
Confused by the non sequitur, I lean in for a kiss. Sarah snorts and presses her lips to mine.
When we pull back, Sarah says, "KISS is an acronym: keep it simple, stupid."
I chuckle. "I'm not sure you wanted me to know that ahead of time."
"Good instincts.
"Anyway, callback functions define arbitrary code that you want the 'wrapping function' to execute, usually somewhere in the middle of the wrapping function. In this case, our wrapping function-- err, do you have a name for this you want to use?"
I consider for a second. "DonaldDuck?"
"Ha! Nice."
"How about WithForgottenMemories?"
"Perfect. So, this overload of WithForgottenMemories will erase the specified memories from the target or targets' minds, call our scenario callback function, and then restore those same specified memories." She taps out some "pseudo-code" as programmers call it.
💻
// makes the specified list of people forget the described memories for
// the duration of the specified scenario