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

Re: How is U2 different from XyWrite?



** Reply to message from "John H. Kessel"  on Tue, 15 Aug
2006 16:20:25 -0400

John:

When I get a chance, I'll look at your several posted files (STARTUP.INT etc).
You don't need to "RUN STARTUP.INT"; it is run automatically when XyWrite
starts up, as long as it is in the same directory as Editor.EXE (and you launch
Editor in that directory).

In a nutshell, U2 is a library of about 700 or 800 programs large and small
which extend and enlarge the tasks that XyWrite can perform. As you know,
there are many "native" commands, like DIR, CALL, SAVE, etc -- you type their
names on the command line, then you hit an execute key to launch them. XyWrite
has a user programming language that enables users to construct their own
commands, to do things not "built-in" to Editor. In the main, users construct
programs to perform repetitive tasks, such as issuing a long series of
keystrokes -- in computerdom, these are called "keystroke macros"
(macro=program, usually a *user-created* program). Most such macros are of a
very personal nature: they repeat keystrokes that are appropriate to your
documents only. U2 is different: it consists entirely of "public programs",
programs that anyone can employ if they meet certain criteria or have a
particular need. And it does not simply cobble together a bunch of keystrokes
that you already have at the ready; it invents new actions. The most
interesting thing about the XyWrite Programming Language is that it uses the
same set of functions and capabilities that Editor itself uses for its "native"
commands -- it just employs them in different ways.

One of U2's specialities is interacting with external programs. Most modern
programs do this. For example, if I type
 http://users.datarealm.com/xywwweb/index.shtml
and you click on that within your Emailer, your browser opens and goes to that
website. So your Email program is communicating with Internet Explorer or
Firefox or whatever browser you use, even though Emailer and browser are
entirely separate programs. U2 has this capability too. If you wrote that web
address in a XyWrite document, you could highlight (DeFine) it, then command
"VU" (or "URL" or "ViewURL", all synonyms for VU), and a browser
window would open and go there. How do we do this? By using XyWrite's ability
to run ("shell out to") external programs (the native "DOS" command), and
sometimes with the help of external programs that are specifically installed by
users, at our direction (we being the authors of U2, Carl Distefano and
myself), to "make things happen". For example, there is no native (built-in)
XyWrite command to turn a XyWrite document into a PDF. But if you install
Ghostscript and GSView, converting your XyWrite document into a PDF is nearly
instantaneous, using U2's XY2PDF command (it even handles TIFF graphics).

U2 tries to be as easy to use as a native command. The only difference is that
you hit (what we call) your Helpkey instead of XyWrite's execute key.
Otherwise, there isn't a lot of difference. Both kinds of commands can be run
from the command line, or assigned to keystrokes in your keyboard file.

> there has to be interaction between XyW and
> VDM, the OS, and any other applications involved.
> Does U2 "translate" the XyW output so it can be
> understood by the "external programs?" "Translate"
> commands from the "external" programs so XyW can
> respond to them? Or is its fundamental task
> something different?

Look, no matter how much Microsoft tries to simplify things using mouse clicks
and shortcut icons and programs that just suddenly start to work at the
(hopefully) appropriate time, behind and hidden beneath all those glitzy user
interfaces are simple written commands, usually in the form of "program_name
optional_arguments". In other words, there's an underlying procedure that
differs little from the way DOS worked back in the 80s. And -- importantly --
you can still use those old-style, manual, written commands (in many many
cases, it's much faster too). For example, if you click on a website address
in an Email, what is *really happening* is that your Emailer looks at the
EXTension on the remote filename ("shtml", from "index.shtml") and then, using
its ASSOCiation table, finds out what program has been designated to launch
files with an "shtml" extension (on my computer, the ASSOC and FTYPE tables
report "F:\Firefox\FIREFOX.EXE -url "%1") and consequently the computer
executes this command:
 F:\Firefox\FIREFOX.EXE -url "http://users.datarealm.com/xywwweb/index.shtml;
In a sense, I suppose this is the equivalent of "translating" information from
one program to another -- although "translate" is not a common term or way of
thinking about these events. The point here is, that U2 does exactly the same
thing: it issues similar commands to other programs. It's really pretty
simple.

Modern Microsoft operating systems have an internal command language, and the
human interface to that language is called a VDM, or "Virtual DOS Machine".
For all intents and purposes you can think of the internal command language and
the VDM as being identical (they actually aren't, but... on a need-to-know
basis, you don't need to distinguish them). XyWrite runs in a VDM, and,
indeed, each program runs in its own VDM or "process" environment, isolated
(under NT) from every other running programs. But it's easy to open new
processes whenever you want, and have them in turn spawn additional processes.

To lump XyWrite, the VDM, U2, the OS, and other programs together as "entities"
is to confuse apples and oranges. There is a hierarchy. The Operating System
sits on top (actually, directly beneath the hardware, which is at
the pinnacle of the hierarchy). Beneath the OS are various VDMs or processes.
XyWrite occupies one of these VDMs; other programs inhabit other processes or
VDMs. U2 is a subsidiary dependency of XyWrite, but it also issues
instructions to XyWrite to tell it how to behave & what to do.

This should not be at all confusing. The great majority of U2 commands simply
manipulate text in new ways. Command HELP CONTENTS to see a pithy
list of included programs. Good luck.