Autocoding project proposal.

Timothy Rue threeseas at earthlink.net
Mon Jan 28 00:13:16 EST 2002


On 27-Jan-02 11:52:33 Kragen Sitaker <kragen at pobox.com> wrote:
>"Timothy Rue" <threeseas at earthlink.net> writes:

[snip]

>> As KNMVIC.iq is a document that simple contains near hidden markers
>> for what is a word, a sub-definition and a file. Which are : :: :::
>> as mentioned in the documentation itself.

>Yeah, I could actually figure out that much; I just couldn't figure
>out what words, sub-definitions and files were.

they are what directly follows those markers

There may also be a "filekey" in the first line of the input file which is
used to define what these markers are. Where the first non-white space
character string following "filekey " is the market for the word, the next
non-white space character string is the sub-definition marker and the
third for file. You can consider this like a blueprint ledgend, that tells
IQ how to read the file. If this line doesn't exist then the last filekey
used will be used or the default if there wasn't a last.


>> >Could you post an example consisting of some input, some output, how
>> >you get the output with IQ, and why that output is useful?
>>
>> If you have python installed on your system and in your path assignment:
>>
>> get and put IQ verion 0.351 in a directory along with KNMVIC.iq
>>
>> cd to that directory and from a shell
>>
>> ->python
>>
>> This will give you help of command line options
>>
>> ->python -k KNMVIC.iq * *
>>
>> this will list all keys in the file KNMVIC.iq and it may even look like
>> a table of content.

>python IQ.351.py -k KNMVIC.iq '*' '*' actually does that for me.
>Playing with it a bit and reading your web pages suggests the
>following bits:

>- its output is in the same format as its input file and consists of portions
>  of its input file (with transclusions, see below)
>- the input is structured as a two-level outline (?)
>- -k lists only the headings instead of also listing the contents
>- the first argument after the name of the file is a pattern for the
>top-level
>  headings ("words") to pick out; '*' means everything, but otherwise
>  it looks like it might be a regex that's matched against the beginning of
>  the heading
>- the second argument after the name of the file is a pattern for the
>  second-level headings ('sub-definitions') to pick out; '' or '*' means
>  everything, omitting the argument entirely means nothing
>- :: on a line by itself effectively ends sub-definitions and brings you back
>  up to the "word" level
>- ::: is a link to another file that is transcluded (which can be named by
>URL)
>  although unfortunately the file that is transcluded in KNMVIC.iq is in HTML
>  and is therefore in the wrong format

>So this is sort of marginally useful, but it's a long way between this
>reality and the level of hype you're generating.  What am I missing?


There is a logic to how the markers are read. There is no "end" marker for
any of the markers but rather a logic to determine when a marker section
ends. Simply put, a marked section ends when another Marker is found. And
there is "levels" to this logic such that to reach a sub-definition you
must get thru the word level marker of which the sub-definition is within.
And file markers can be anywhere but to reach them you must be able to get
to them. i.e. a filemarker in a sub-definition requires you to get thru
the word and the sub-definition of which it is in. But a file marker also
doesn't end the previous marker, but as it goes into another file, it
keeps track of where it was so that it can pick right back up in the
previous file, where it left off. If a filemarker is within a word
definition, then to get to it you only need to get past the word. If the
file marker is outside any word, then it will be entered.

Of course the markers are not what you are pattern matching to in the case
of word and sub-definitions but only marking in the file what are words
and sub-definitions to match. There is also the blank word and blank
sub-definition (just markers without a word to match) and the usefullness
of them.


As to what you think you are to expect from this. You have to remenber
that this is only one of the nine commands and containing only enough of
some of the other ones (in an integrated manner) to make this command
useful in a stand alone manner. IE, there is no use of the OI command or
it's use of user defined variables for the passing data value of such
variables. There is also no real use of SF either but by creating the
lnswitch.on named file you can get an idea of the IQ stack in action,
which in the VIC you have direct control over, such that you can do things
like create loops. The sub-word (sub-definition pattern match) is actually
an element of KE.

The purpose of the stand alone IQ command was to help people undr stand
some of the basic concepts of the VIC and Basic marking of IQ files.




---
*3 S.E.A.S - Virtual Interaction Configuration (VIC) - VISION OF VISIONS!*
   *~ ~ ~      Advancing How we Perceive and Use the Tool of Computers!*
Timothy Rue      What's *DONE* in all we do?  *AI PK OI IP OP SF IQ ID KE*
Email @ mailto:timrue at mindspring.com      >INPUT->(Processing)->OUTPUT>v
Web @ http://www.mindspring.com/~timrue/  ^<--------<----9----<--------<




More information about the Python-list mailing list