[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: The value of $X



Reply to note from Harry Binswanger  Fri, 03 Oct
2008 15:48:05 -0400

Harry:

> Having to distinguish between what calls for  and what
> doesn't has a subtle effect, giving an ever-so-faint priority
> to native commands. The $X key routine erases that distinction.

"Erases"? Surely you mean "magnifies". It's $X that gives ever-so-
explicit priority to native commands, by forcing native execution
when the command could be issued either way, native or U2. $X walls
you off -- albeit with an escape hatch -- from any U2 routine that's
named identically to a native command (typically because it's
intended to be a replacement -- with significant enhancements -- for
the native command; see, notably, Robert's frames CH*,CI*,CV*,SE*).
By contrast, with separate eXeCute and Helpkeys you have unfettered
access to *all* U2 resources and all native commands, without
exception (and with no need to preface native commands with "U2 " to
force Helpkey execution -- the aforementioned escape hatch). Yes, $X
can be a convenience, but it comes at a price, as you note at length
in your post. Call it a palpable advance or a PITA; opinions on that
will vary.

Having ironed out the kinks in $X, I've adopted a best-of-both-
worlds approach: reverted to my usual dedicated eXeCute and
Helpkeys, but assigned Q8$X to Enter key #28 (with a standard Enter
key assignment elsewhere on the keyboard). For me, that's value-
added that doesn't get in the way.

BTW, do you find that constantly swapping KBD files leads to OOM
(Out-Of-Memory) errors and ultimately renders XyWrite unstable? I've
never tested that rigorously, but it might be a risk. In my
experience, repeatedly LOADing and reLOADing the KBD file eventually
spells dOOM (although it may be a case of post hoc ergo propter
hoc). You'd be well advised to keep an eye on it.

You realize, of course, that the opposite approach, preferring U2
over native execution, is very easy to implement. Just keep your
normal Helpkey and add a catchall frame at the very end of U2 that
looks like this:

{{5*}}
{2}XC {2}

(where "{2}" represents the Ascii-2 smiley character and "XC " the
3-byte function produced by commanding PFUN XC). This way, if
(and only if) the command line doesn't match any framename earlier
in the U2 file, the catchall frame eXeCutes it as a native command.
For various reasons this doesn't work for me, but in principle it's
an elegant and viable choice.

--
Carl Distefano
cld@xxxxxxxx