[comp.lang.forth] ANS TC Magnet for Vocabularies and :

ForthNet@willett.UUCP (ForthNet articles from GEnie) (04/09/90)

Category 10,  Topic 14
Message 16        Sat Apr 07, 1990
R.BERKEY [Robert]            at 19:33 PDT
 
 --------------------------------------------------------------------
 ANSI X3J14 Forth Technical Proposal                      Page 1 of 1
 --------------------------------------------------------------------
             Title: ACQUIRE
 Related Proposals:
        Keyword(s): vocabularies, wordlists              Proposal (X)
     Forth Word(s): FORTH WORDLIST                       Comment  ( )
 ------------------
 Abstract:
    Add ACQUIRE to the Wordlist wordset.

 ------------------
 Discussion:

   Without the ability to search individual wordlists, programs
   effectively can only use wordlists for being compiled.  This one
   element has a broad range of application, from implementing the
   standard from within the standard, to self-analyzing programs, to
   avoiding complications involving variables, to object oriented
   programming.  Without this one element, implementing a compiler or
   an interpreter must be done from scratch.

   By inference, any system with wordlists can implement this word.

   The flag input to ACQUIRE has this purpose: the output from FIND
   or an ACQUIRE can be passed into an ACQUIRE .  This avoids complex
   and relatively inefficient control structures for multiple
   wordlist searches.

   References: Berkey, "Four Vocabulary Tools", 1984 Rochester Forth
               Applications Conference Proceedings.

   The text below follows that in FIND .
 -------------------
 Proposal:

 Add to the WORDLIST word set:

   ACQUIRE   ( addr1 flag wl-token -- addr1 0 ) -or-
             ( addr1 flag wl-token -- w 1 ) -or-
             ( addr1 flag wl-token -- w -1 )
   wl-token is the execution token of a wordlist.  If flag is false,
   return addr1, and 0.  Otherwise, find the Forth word named in
   counted string at addr1.  If the word is not found, return addr1,
   and 0.  If the word is found, return the execution token w; if the
   word is immediate, return 1, otherwise return -1.
 --------------------------------------------------------------------
 Submitted by:  Robert Berkey                          Date: 90-04-07
 Address:       47000 Warm Springs Blvd. #253      Ph: (415) 659-1334
                Fremont, CA 94539               Msgs: GEnie, R.BERKEY

 ANSI X3J14 Forth Standards Committee
 111 N. Sepulveda Blvd., Suite 300, Manhattan Beach, CA 90266
 --------------------------------------------------------------------

-----
This message came from GEnie via willett through a semi-automated process.
Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'

ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (08/16/90)

 Date: 08-13-90 (16:55)              Number: 3646 (Echo)
   To: BRAD PEPERS                   Refer#: NONE
 From: CHRIS WATERS                    Read: NO
 Subj: LATEST                        Status: PUBLIC MESSAGE

 Ah, we seem to be having troubles somewhere in the net with at-signs.
 This problem is related, I think, to a particular brand of BBS, PCBoard,
 used by many nodes on at least two of the networks here.

 Note to all Forth users.  PCBoard has real problems with this character,
 and cannot be recommended to Forthers.  For this message, I'll use ...
 er, '&' to represent the at-sign.  Sorry if this is confusing.  I'm
 currently in the middle of a discussion (read: fight) with the network
 administration about this issue.

 BP:What is the 'proper' defn of LATEST?
  3
  3    1)  : LATEST CONTEXT & & ;
  3 or 2)  : LATEST CURRENT & & ;
  TMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

 Brad, I'm glad you put 'proper' in quotes.  There are good reasons for
 the fact that LATEST has not been part of any standard since figForth.
 Consider this definition:

 VOCABULARY USELESS
 USELESS DEFINITIONS
 : WASTE ... ;
 FORTH DEFINITIONS IMMEDIATE

 Depending on how your Forth is implemented, this will either make WASTE
 an IMMEDIATE word, or will make most recent definition in FORTH
 immediate.  A strict reading of the 79- or 83-standards allows only the
 former, but if IMMEDIATE uses LATEST, a common method of implementation,
 and LATEST is defined by either of your methods above, the latter will
 take place.  For this reason, many systems, including all I have
 implemented, use a user variable, LAST, to point to the most recently
 defined word in any vocabulary.  I don't even include LATEST in my
 Forths, as LAST & (at) suffices.

 In figForth, CURRENT & & (at at) was used in enough different places to
 justify making it a separate word.  In the 79- and 83-standards, some
 words must refer to CURRENT & & (at at), while others must refer to
 LAST & (at) or some equivalent, in order to avoid the bug above.

 So, the real answer to your question is:  CURRENT & & (at at) is the
 commonest definition for LATEST, but any definition is acceptable for
 this non-standard word.

 Hope this clears things up.  Happy Forth-ing,

 Chris

 PCRelay:SNAKEPIT -> #150 MetroLink (tm) International Network
 4.10                Snake Pit*408-287-2353*San Jose, CA*HST/v32

 NET/Mail : DC Information Exchange, MetroLink Int'l Hub.  (202)433-6639
-----
This message came from GEnie via willett through a semi-automated process.
Report problems to: uunet!willett!dwp or dwp@willett.pgh.pa.us

ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (09/03/90)

Category 10,  Topic 14
Message 18        Fri Aug 31, 1990
D.RUFFER [Dennis]            at 13:33 EDT
 
From Elizabeth Rather, Chair, ANS X3J14 Technical Committee:

This is addressed to those who have been commenting extensively on our work on
UseNet and related boards.

4. History of CREATE:  Historically (1971 and many years since), it's the
primitive for making the head part of definitions, using WORD to parse the
input stream to yield a counted string at HERE, where CREATE then appended a
link and code field.  With this model, other defining words use CREATE to make
the head, then substitute another code field, followed by data or execution
tokens.  ANS Forth doesn't assume this model, but doesn't preclude it.
-----
This message came from GEnie via willett through a semi-automated process.
Report problems to: uunet!willett!dwp or dwp@willett.pgh.pa.us

ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (11/04/90)

Category 10,  Topic 14
Message 21        Sat Nov 03, 1990
B.RODRIGUEZ2 [Brad]          at 18:39 EST
 
> The search rules for vocabularies thus created are different.

Quite so; and I said this when I brought the subject up.

> The semantic difference is sufficient to break code in ways that
 > cannot be fixed with a simple textual "global search and replace."

> The choice of a different name was intended to allow ... [users]
 > ...to migrate to an ANS-compliant system with a minimum of grief.
 > "Global search and replace" is considered an acceptable amount of
 > "grief".

You can't have it both ways.  If the semantic difference between VOCABULARYs
is sufficient to break code, then the semantic difference between WORDSET and
VOCABULARY is likewise sufficient, and you can't fix it with a global search
and replace.

Or was it your intention to have each transitional system implement two
different vocabulary mechanisms?

- Brad
-----
This message came from GEnie via willett through a semi-automated process.
Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp

ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (11/05/90)

Category 10,  Topic 14
Message 22        Sat Nov 03, 1990
D.RUFFER [Dennis]            at 21:40 EST
 
Re: B.RODRIGUEZ2 [Brad]

 > Or was it your intention to have each transitional system
 > implement two different vocabulary mechanisms?

That will certainly allow existing customers to make the transition to ANS
Forth gracefully.  I believe that is what the vendors have in mind Brad.

DaR
-----
This message came from GEnie via willett through a semi-automated process.
Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp

ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (11/05/90)

Category 10,  Topic 14
Message 25        Sun Nov 04, 1990
B.RODRIGUEZ2 [Brad]          at 15:02 EST
 
> I believe that [implementing two different vocabulary mechanisms]
 > is what the vendors have in mind Brad.

Thanks for the clarification, Dennis.  Not that I agree, mind you.

> The other consideration is the behavior of word lists defined by
 > vocabulary.

Agreed.  I noted this in an early message; but until Dennis' reply (above) I
didn't see how the TC expected WORDLIST to fix the problem.

While we're on the subject, perhaps someone can comment on a statement I made
recently to my local FIG group, namely, that all vocabulary "architectures"
currently in use are subsets or special cases of a (FIG-style) tree structure,
provided that branches of the tree can be SEALed.  E.g.

    polyForth:  the trivial tree which has 8 branches from an
    empty root.

    F83 with ONLY/ALSO:  commonly, all vocabularies are branches
    from the ROOT vocabulary, although I believe branches may have
    sub-branches.  (I've never tried.)

Note that the architecture of vocabularies (how they appear to be organized)
does not say anything about the search order.  I'll now take a bigger risk and
posit that all search order mechanisms can be emulated with ONLY/ALSO.  E.g.

    polyForth:  each VOCABULARY name specifies a search order
    with one to four wordlists, emulated by
        : voc-name   ONLY list1 ALSO list2 ALSO list3 ALSO list4 ;

    fig-Forth:  each VOCABULARY name specifies its parent's search
    order to follow its own wordlist, as
        : voc-name   ONLY parent-voc-name ALSO this-word-list ;
    assuming that all vocabularies are sealed.  If branches of the
    tree are not sealed, fig-Forth is the trivial case.

I defer to the X3J14 team in this example's nomenclature, and refer to words
which set the search order "vocabularies," and words which refer to a single
list of words as "wordlists."  We really do need two terms here.

Does anyone know of a counterexample to these observations?

I realize that I'm making the TC's case for WORDLIST here.  Although I'm not
sure a word "VOCABULARY" can be defined for all emulations; I've defined
emulated vocabularies as colon definitions in these examples, and I think this
may be unavoidable for some emulations.

- Brad
-----
This message came from GEnie via willett through a semi-automated process.
Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp

ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (11/05/90)

Category 10,  Topic 14
Message 26        Sun Nov 04, 1990
D.RUFFER [Dennis]            at 20:58 EST
 
Re: wmb@MITCH.ENG.SUN.COM (Mitch Bradley)

 > polyFORTH:  I'm not sure of the exact details, but I know it's
 >             different from any of the above.

in polyFORTH, HEX nnnn VOCABULARY name will define a vocabulary whose search
order is based upon the nibbles of the nnnn parameter (least significant
nibble searched first).  Each vocabulary chain is assigned an odd number from
1 to 15.  Thus vocabulary names really only define search orders of 4
vocabularies of the 8 possible.

 > According to ANSI rules, major vendors cannot be so easily
 > dismissed.
 > ...
 > If someone at Forth, Inc. is listening (Dennis?), perhaps they
 > could ask Elizabeth to clarify this point.

You will see her before I do Mitch, at the meeting next week. However, my
understanding is that vendors are not really given any special consideration
among the TC members.  All TC members' opinions must be acknowledged and a nay
vote on the dpANS from any members puts a bad light on the standard.  The only
thing I have heard that specifically relates to vendors is that they don't
have many majors ones who are members anymore.  It is basically down to FORTH,
Inc. and Creative Solutions, Inc.  The comment that I heard from Elizabeth was
that if CSI pulls out, FORTH, Inc. will also have to leave.  There is no way
that Elizabeth wants FORTH, Inc. to be the only major vendor on the committee.
That only would doom the standard to failure.  However, that discussion was
moot since CSI is still participating.  I just wish we could get LMI and MMS
to join in also.

That's all I know.   DaR
-----
This message came from GEnie via willett through a semi-automated process.
Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp

ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (02/11/91)

 Date: 02-07-91 (20:40)              Number: 1067 of 1069
   To: JACK WOEHR                    Refer#: 1031
 From: CRAIG TRELEAVEN                 Read: NO
 Subj: ALSO/ONLY                     Status: PUBLIC MESSAGE
 Conf: FORTH (58)                 Read Type: GENERAL (+)

 -> Only if everyone implements *ALL* the extension word sets.  In our
 -> own case, I can definitely promise you that LMI will *NOT* implement
 -> the extension words that it considers brain-damaged, which definitely
 -> includes ALSO and ONLY.

 Um this is actually directed to Ray Duncan, the orignal poster...

    What's so wrong with ALSO/ONLY?  I always found it a useful way to
 organize a large system.  A Forth vocabulary with 1,500+ words is not my
 idea of easy to use.  I miss ALSO/ONLY on MacForth, now.

 Craig Treleaven

 PCRelay:CRS -> RelayNet (tm)
 4.10a14        Canada Remote Systems * Toronto, Ontario
 <<<>>>
-----
This message came from GEnie via willett.  You cannot Reply to the author
using email.  Please post a follow-up article, or use any instructions
the author may have included (USMail addresses, telephone #, whatever).
Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp

ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (02/13/91)

 Date: 02-08-91 (09:19)              Number: 1083 of 1110 (Echo)
   To: CRAIG TRELEAVEN               Refer#: 1067
 From: RAY DUNCAN                      Read: NO
 Subj: ALSO/ONLY                     Status: PUBLIC MESSAGE
 Conf: FORTH (58)                 Read Type: GENERAL (+)

    Craig Treleaven writes:

    >Whats wrong with ALSO/ONLY.  ...  A Forth vocabulary with 1500+
    >words is not my idea of easy to use.

 It's not my idea of easy to use either.  I have nothing against
 vocabularies, just the brain-damaged ALSO/ONLY scheme.

 NET/Mail : LMI Forth Board, Los Angeles, CA (213) 306-3530
 <<<>>>
-----
This message came from GEnie via willett.  You cannot Reply to the author
using email.  Please post a follow-up article, or use any instructions
the author may have included (USMail addresses, telephone #, whatever).
Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp

ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (02/13/91)

 Date: 02-10-91 (17:41)              Number: 1111 of 1116
   To: RAY DUNCAN                    Refer#: 1083
 From: CRAIG TRELEAVEN                 Read: NO
 Subj: ALSO/ONLY                     Status: PUBLIC MESSAGE
 Conf: FORTH (58)                 Read Type: GENERAL (+)

 Ray Duncan writes:
 -> [...]  I have nothing against
 -> vocabularies, just the brain-damaged ALSO/ONLY scheme.

   Sorry, I still don't understand what is wrong with ALSO/ONLY?  It
 seemed to me to be a nice way to control the search order.  Words could
 be grouped into as many vocabularies as necessary and the search order
 set to only search the relevant ones.

 Craig

 PCRelay:CRS -> RelayNet (tm)
 4.10a14        Canada Remote Systems * Toronto, Ontario
 <<<>>>
-----
This message came from GEnie via willett.  You cannot Reply to the author
using email.  Please post a follow-up article, or use any instructions
the author may have included (USMail addresses, telephone #, whatever).
Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp

ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (02/22/91)

 Date: 02-19-91 (09:20)              Number: 1248 of 1262 (Echo)
   To: GARY SMITH                    Refer#: 1205
 From: RAY DUNCAN                      Read: NO
 Subj: ANS TC MAGNET FOR VOCABUL     Status: PUBLIC MESSAGE
 Conf: FORTH (58)                 Read Type: GENERAL (+)

 Thank you, Mitch, for exactly summarizing my objections to ALSO/ONLY.

 In LMI Forth systems, FIND uses a three-level search order:
    CONTEXT->CURRENT->FORTH
 However, we also have a building block word (find) that is called by
 FIND and can search an arbitrary string of vocabulary threads - from one
 to many.  So it is very easy to implement other schemes for search order
 control in LMI Forths and in fact the ALSO/ONLY scheme can be layered on
 top of our systems in 1 or 2 screens of code.

 NET/Mail : LMI Forth Board, Los Angeles, CA (213) 306-3530
 <<<>>>
-----
This message came from GEnie via willett.  You *cannot* reply to the author
using e-mail.  Please post a follow-up article, or use any instructions
the author may have included (USMail addresses, telephone #, etc.).
Report problems to: dwp@willett.pgh.pa.us _or_ uunet!willett!dwp