[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: XPL Functions vs. external utilities
- Subject: Re: XPL Functions vs. external utilities
- From: jroth@xxxxxxxx (Joel Roth)
- Date: 1 May 95 12:33:28 JST (Mon)
chet.gottfried@xxxxxxxx wrote:
> JR-> We all know what a pain it is to write programs in XPL.
>
> Joel, I thought XPL was fun.
Sorry for the overgeneralization.
I find it easier to use other programs for text processing,
simply because they provide more sophisticated functions for text
manipulation and flow control. So instead of suffering writing
text processing routines in XPL, I now suffer writing them in
perl. :-) But of course I use XPL macros whenever I need them.
[I also said it would be a "nightmare" to use XPL to put double
spaces after sentences but not after abbreviations.]
> Why should it be a nightmare? Carl D. has probably
> already included such a program in his smart set. If not, all
> you'd have to do is define the letters/word preceding the
> period and compare it with a string of abbreviations.
You're correct, it isn't *that* difficult, and I'll definitly
have a look at Carl D.'s files. Are they on the listserv?
But since the point of the list is to educate. Let's just compare
these two:
Annie Fisher provided this soothing example.
BC ci _. _. _{LBcr1}XC {if@not({er})}{GLcr1}
{ei}BC ci _? _? _{LBcr2}XC {if@not({er})}{GLcr2}
{ei}BC ci _: _: _{LBcr3}XC {if@not({er})}{GLcr3}
{ei}BC ci _! _! _{LBcr4}XC {if@not({er})}{GLcr4}
{ei}BC ci _.) _.) _{LBcr5}XC {if@not({er})}{GLcr5}
{ei}BC ci _?) _?) _{LBcr6}XC {if@not({er})}{GLcr6}
{ei}BC ci _:) _:) _{LBcr7}XC {if@not({er})}{GLcr7}
{ei}BC ci _!) _!) _{LBcr8}XC {if@not({er})}{GLcr8}
{ei}BC ci _.] _.] _{LBcr5}XC {if@not({er})}{GLcr5}
{ei}BC ci _?] _?] _{LBcr6}XC {if@not({er})}{GLcr6}
{ei}BC ci _:] _:] _{LBcr7}XC {if@not({er})}{GLcr7}
{ei}BC ci _!] _!] _{LBcr8}XC {if@not({er})}{GLcr8}
{ei}BC ci _. _. _XC {lb
}BC ci _? _? _XC {lb
}BC ci _: _: _XC {lb
}BC ci _! _! _XC {lb
}BC ci _) _) _XC {lb
}BC ci _] _] _XC {lb exceptions list:
}BC cia _Dr. _Dr. _XC {lb
}BC cia _U.S. _U.S. _XC {lb <- end-of-sentence U.S.?
}BC cia _Aug. _Aug. _XC {ex}
SNR uses a table that looks something like this:
\ This table prepares doc files with two spaces after a full stop
\ 12/15/94 Isolated LFs have now been removed.
\\L8
\0D\0A=\0D\0A \ keep CRs as is
\0A= \ delete linefeeds
\. =.\20\20 \ 2 spaces = 2 spaces
\. =.\20\20 \ 1 space = 2 spaces
\
\ The following lines end with a space and CR
Mr. =Mr.
Mrs. =Mrs.
Prof. =Prof.
Dr. =Dr.
U.S. =U.S.
U.K. =U.K.
N.B. =N.B. mil. =mil. bil. =bil. min. =min. max. =max. typ. =typ.
\\E
SNR does all the substitutions in one pass. I didn't even think
about question marks and exclamations! Shows you how boringly
sober and unreflective my work is!! :-)
> JR-> My conclusion here is that life will be much easier if you
don't
> -> try to use XPL in ways it's not really suited, and
encourage
> -> people to find other ways.
> It's more a matter of approaching a problem. If you can provoke
> a situation with yes-and-no alternatives, you have a program.
I think that can be said for all problems to which computers are
applied. :-)
> JR-> IMO, the much maligned *bloat* factor in WP programs comes
from
> -> trying to use one program for everything.
[comments on WP deleted]
> In XPL you get what you write.
Same applies in perl and many other languages. Even WP has a
decent macro language for many purposes.
> However, I agree with other parts of your messages, inasmuch as
> Xy becomes more complex, it entails more work to make the
> customization just right.
Yes, if there are other tools outside the Xy environment that
make the job easy, I say let's use them. For editing text, I
believe Xy is just *great*! And if some people find it soothing
to write in XPL, I can only say I feel sorry for you.
No, seriously, more power to you.
--
Joel Roth