[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Possible activity heading towards XyWrite replacement
- Subject: Re: Possible activity heading towards XyWrite replacement
- From: Harry Binswanger hb@xxxxxxxx
- Date: Tue, 26 Aug 2008 23:58:42 -0400
In the replacement text of a regex replace
Well, I'm willing to conceded that nothing can match RE coding.
I think you missed the point. The issue is not how the character is
displayed -- it's that the color attribute is information that can be
attached individually to each character in a buffer, without changing the
text itself in the buffer, and the attribute can later be examined by
macros, for whatever purpose. For example, in a file of 100000 characters,
I could mark (as the result of a search, for example) 5 or 50 or 500 or
5000 different words (or whatever) that I wanted to "come back to" for
some reason, by setting a particular color attribute for the individual
characters in the 5/50/500/5000 words, and later find these "marked" words
with a macro, but without having modified the actual text of the file one
iota.
Cool.
As I "come back to" the 5/50/500/5000 "marked words," I could then
inspect and process them -- in any order -- one at time, "unmarking" each
such word (by reseting it's color attribute) as I inspected it -- and
still instantly be able to locate those "originally marked" words that I
have not yet processed.
So, "color" is just a metaphor, if I understand you. You're saying there
are a lot of flags, or bits, that can be on or off, for each character.
Lots of different useful functionality scenarios
are possible, I think, both for direct exposure to a user, or possibly
just for use inside the logic of some larger functionality of some macro
that one is writing.
Yes, it sounds like a very good idea.
>I have some *very* long XPL programs that do heavy processing, and
>the longest one takes about four seconds to run. User commands
>in XPL have no noticeable delay.
I think you're looking at the wrong level, or something. Assume, for
example, that you didn't like XPL, and wanted to change it slightly, into
a new language called XPL2,
Hey, I did that already. I wrote "XyBasic," which translates BASIC-like
statements into XPL.
which is very similar. Starting with XY IV, it
would be possible (I think) to write such an interpreter for XPL2 in XPL,
I wasn't that self-referential, I wrote the interpreter in CBasic and
compiled it to an .EXE file.
and then execute an XPL2 program using the XPL2 interpreter that was
written in XPL. The interpreter would, of course, have to process an XPL2
program by examining it byte by byte, decoding it, doing the requested
function for whatever was decoded, and so on.
However, if you did so, my guess is that XPL2 would be interpreted (by the
interpreter, written in XPL) at least 5000 times slower than an XPL
program would be, and you would more than just notice the difference. But
I could write an XPL2 interpreter in EEL, and I would expect it to run no
slower than about 10 times slower than XyWrite's XPL interpreter.
XyBasic code gets first "compiled" (translated) into XPL, and then the XPL
version of it is RUN, so it doesn't arise for me, but I get your point.
to use. (The functionality of being able to quickly insert or delete bytes
in the *middle* of what is essentially a million byte string (for a 1MB
file), and provide the *appearance* of continued continuity of the
resulting "string" for search and other purposes, but doing so without
having to move 500000 bytes each insert/delete to "make room" (for insert)
or "close ranks" (for delete), is a pretty significant piece of
functionality.)
How is it done?
Harry Binswanger
hb@xxxxxxxx