User:MikeyD/Sandbox

Here’s where I’ll stash building blocks I’m either currently trying to figure out, or which belong in a template …

2014-10-01: Reverse Pluralizing
{{fold| {{Cols|4| [main] }}

Discussion
}}
 * While originally just trying to find examples of creative use of the plural template, I encountered this conundrum:
 * Here, come is correct for plural subjects, and comes for singular: back-asswards from how the "plural" template is coded
 * I tried pluralizing the word “come” with optional arguments: “ ”  FAIL
 * I tried changing the “num” ordinal number list to prepend an “s ” before “a” and “one” – ha, clever …  FAIL
 * OK, I can’t properly make this happen right now. However, it does give me a few ideas for “Abulafia Best Practices” …

2015-07-04: Faking persistent variables
Recently Astrangeaeon kindly took up a challenge on my talk page.

Abulafia so miraculously, and merrily, fills nonce variables with random content that it still surprises many of us that it can’t somehow be tricked into assigning persistent (reusable) variables – that is, those which would hold their value beyond the line of code which called them.

For example, note the repeated use of the name, and appropriate pronoun:


 * “Have you seen me hat?” Ringo asked. “Sorry, Ringo, I haven’t,” said Goldilocks.
 * “Have you seen me plectrum?” John asked, as he looked around. His face fell. “Yes, John, I have,” said 12-Ahau-Shield-Jaguar. “You left it on your music stand!”
 * “Have you seen me bong?” Yoko asked, as she looked around. Her face fell. “Yes, Yoko, as a matter of fact, I have,” said Kent Brockman. “You set it by the piano in Studio 2!”

Those familiar with Abulafia’s limitations will recognize these examples as near-voodoo, almost impossible to pull off. And sadly, it appears that mediawiki would require extensive low-level mods before ever allowing anything like this for real (though one should “never say never” with computers). Meanwhile, though, good ol’ Astrangeaeon demonstrates how, with a bit of planning, one might restructure the data to cram all the relevant deets onto the required single line, thereby faking the effect more or less convincingly. This may be nonintuitive, inelegant and vastly more troublesome than if the real capability existed, but at least it shows what’s possible, given enough determination. Here’s a proposed data structure (which produced the sample output above):

Things to note in this code sample:


 * the use of extended Unicode helps make the logic more symbolic than textual; and
 * for ease of reading comprehension, several subtables are shown as non-functioning pseudocode. To actually run, replace all pipes with.