[comp.lang.forth] TO ANSI TEAM

ir230@sdcc6.ucsd.edu (john wavrik) (08/24/90)

Mitch Bradley writes,

>>   Suggestion: The ANSI team make available a packet consisting of
>>   the printed BASIS document and a diskette with the document in
>>   machine-readible form (preferably including a plain ASCII text
>>   glossary file).  THIS SHOULD BE AVAILABLE IN A TIMELY FASHION SO
>>   THAT USERS HAVE AMPLE TIME TO PREPARE SUBMISSIONS TO THE ANSI
>>   TEAM.

> Agreed in principle.  In practice, it is a bit difficult.

> 1) The volunteer editor is already doing a heroic job in getting the
>    Basis out as soon as it is getting out.

> 2) As we have seen, everybody appears to want a different machine-readable
>    format.

The BASIS document serves to allow interested parties to examine the 
work of the Team and to make proposals. If it cannot be made available 
in a timely fashion, the purpose is subverted. Perhaps the job is too 
big for one person. [Suggesting that a job may be too big for one 
person should not be taken as reflecting on that person's heroism or 
dilligence.] 

Posting a document of this size on a BBS is not a good way to 
disseminate it. [I have never succeeded in downloading from GEnie a 
file >50k on one try -- I gave up on the BASIS document after 7 
tries and 40 mins!]

The proposal is to make the file being used to print the document 
available on diskette in addition to the printed document. This should 
not be a major burden. [The Team should also consider that volunteers 
may be willing to convert the file to another format -- but this is a 
side issue.] 

APPROACH I:  USING WORDS PROPOSED BUT NOT APPROVED:

>>          How would this be rewritten to comply with the proposed ANSI
>>          Standards?

>            : IF(  0  >R     \ count the number of IFs used
>                  BEGIN     ' DUP  ['] )IF  <>
>                  WHILE     COMPILE-TOKEN POSTPONE IF
>                          ' COMPILE-TOKEN POSTPONE ELSE
>                          R> 1+ >R
>                  REPEAT   DROP
>                  R> 0 DO  POSTPONE THEN  LOOP  ;  IMMEDIATE
 
> Unfortunately, this depends on the word COMPILE-TOKEN , which has been
> proposed but which has not passed.

In other words, at the moment it cannot be done in a Standard way.

(There is no Standard replacement for taking the cfa of a word
 and using , to compile it)

APPROACH II:  USING INTERPRETED RATHER THAN COMPILED CODE

>   However, you could do it as follows:
> 
>            : IF(  0  >R     \ count the number of IFs used
>                  BEGIN     BL WORD DUP COUNT  " )IF"  $=  <>
>                  WHILE     COUNT EVALUATE        POSTPONE IF
>                          BL WORD COUNT EVALUATE  POSTPONE ELSE
>                          R> 1+ >R
>                  REPEAT   DROP
>                  R> 0 DO  POSTPONE THEN  LOOP  ;  IMMEDIATE

This approach does not compile the component words into the dictionary 
but stores them as strings -- which are looked up in the dictionary 
each time the word executes.

The essence of a control structure is that it influences the process 
of compilation. This example was intended to determine the extent to 
which the proposed ANSI Standard provides analogs to the traditional
Forth tools for controlling compilation. Apparently the tools have not 
(yet?) been included in the proposed Standard. 

>>    Far more significant than the controversy over certain proposed
>>    words are the circulating rumors that some members of the ANSI
>>    Team do not expect it to be possible to write significant programs
>>    using only proposed words and programming practices.

> As a member of the team, I do not share this belief.

>>    Is the ANSI team willing to provide clarification, at this point,
>>    as to whether or not a purpose of the proposed Standard is to
>>    allow users to write significant programs portably?

> I believe that this is indeed an important goal.  It certainly is for me.

Mitch Bradley and I are in strong agreement on the importance of 
portability -- but his personal views do not answer the question.

It would be helpful if the ANSI Team were willing to state this as an 
official goal (even the major goal) of the standardization effort. The 
TC statement posted by Jack Brown does not make such a statement. 
 
As for the meaning of "significant":

>   Of course, it depends
> upon your definition of "significant".  There are some classes of programs
> that it may not be possible to write using only standard words, but I would
> claim that those classes do not represent a large fraction of "all significant
> programs".

It might be a good idea to have a panel of users submit samples of the 
kind of work they expect Forth to do. Failing that, one could look at 
the literature of Forth (Forth Dimensions, JFAR, Forml, etc.) for 
examples of error handling mechanisms, control structures, data 
structuring words, storage management mechanisms, etc that Forth has 
been used to write.

Particular attention should be paid to applications which draw upon 
the unique features of Forth -- stronghold applications -- 
applications that would lead people to select Forth rather than other 
languages. Applications that add language features, for example, may 
not be a "large fraction of all significant programs" -- but they are 
in the category of applications which exploit the unique characterist-
ics of Forth. 

I think that it is quite legitimate for users of Forth to have as 
their "burning issue":
   
      Will I be able to write significant programs portably
      in the new Standard?


                                                  John J Wavrik 
             jjwavrik@ucsd.edu                    Dept of Math  C-012 
                                                  Univ of Calif - San Diego 
                                                  La Jolla, CA  92093 

ZMLEB@SCFVM.GSFC.NASA.GOV (Lee Brotzman) (08/25/90)

John Wavrik <jjwavrik@ucsd.edu> writes:
>
>I think that it is quite legitimate for users of Forth to have as
>their "burning issue":
>
>      Will I be able to write significant programs portably
>      in the new Standard?
>
   If you are using a PC, you should be able to at least get a feel for
ANS Forth by using Martin Tracy's Zen Forth.  The last I heard, Martin
was keeping Zen in step with each BASIS to provide a testbed like you
suggest.  (I have not been keeping up with Zen for the last year or so,
so I can't say whether it is still "pre-ANSI-compliant").
   Of course, you can't directly test portability by implementing on only
one system, but, if your Forth-83 code runs in Zen with little or no
change, it's a fair bet that porting between ANS systems will work.

-- Lee Brotzman (FIGI-L Moderator)
-- BITNET:   ZMLEB@SCFVM          Internet: zmleb@scfvm.gsfc.nasa.gov
-- I'm only a contractor, don't blame me for the tax rates and don't blame
-- the government for my statements.

dwp@willett.pgh.pa.us (Doug Philips) (08/29/90)

In <12395@sdcc6.ucsd.edu>, ir230@sdcc6.ucsd.edu (john wavrik) writes:
> 
> The BASIS document serves to allow interested parties to examine the 
> work of the Team and to make proposals. If it cannot be made available 
> in a timely fashion, the purpose is subverted. Perhaps the job is too 
> big for one person. [Suggesting that a job may be too big for one 
> person should not be taken as reflecting on that person's heroism or 
> dilligence.] 

As I mentioned in another message, X3J14 is the FIRST TC to get an
electronic version of the BASIS/dpANS out at all.  You may rail against
ANS about that, but I think one should keep perspective here.  The
cheap cost of a paper copy should not prevent anyone in the "States"
who wants a copy from getting one.  The issue here is really one of
medium of dispersion, not of availability.

> Posting a document of this size on a BBS is not a good way to 
> disseminate it.

And has never been done before.  Maybe FIG could sell floppies (at cost
if necessary?)

> The proposal is to make the file being used to print the document 
> available on diskette in addition to the printed document. This should 
> not be a major burden. [The Team should also consider that volunteers 
> may be willing to convert the file to another format -- but this is a 
> side issue.] 

Even if volunteers do the work, someone has to check it and has to be
able to check it.

> I think that it is quite legitimate for users of Forth to have as 
> their "burning issue":
>    
>       Will I be able to write significant programs portably
>       in the new Standard?

Without intending to flame John in particular or in general, I do not think
it is the job of the TC to go out and prove to everyone that their favorite
code can be written in the current BASIS/dpANS.

-Doug

---
Preferred: ( dwp@willett.pgh.pa.us  OR  ...!{sei,pitt}!willett!dwp )
Daily: ...!{uunet,nfsun}!willett!dwp  [last resort: dwp@vega.fac.cs.cmu.edu]

jax@well.sf.ca.us (Jack J. Woehr) (09/03/90)

dwp@willett.pgh.pa.us (Doug Philips) writes:

>> I think that it is quite legitimate for users of Forth to have as 
>> their "burning issue":
>>    
>>       Will I be able to write significant programs portably
>>       in the new Standard?

>Without intending to flame John in particular or in general, I do not think
>it is the job of the TC to go out and prove to everyone that their favorite
>code can be written in the current BASIS/dpANS.

	Hey hey hey! Wait a sec!

	YES YOU WILL BE ABLE TO WRITE SIGNIFICANT PROGRAMS PORTABLY
	IN THE NEW STANDARD!

		That's the whole point of all this other BS that
has everyone bent out of shape. It's the work we have done to make
Forth portable.

	In other words, we're rewriting the language. There. I said it
so shoot me.

	My opinions don't necessarily reflect the rest of X3J14 TC.
As a matter of fact, rarely.

 <jax@well.{UUCP,sf.ca.us} ><  Member, >        /// ///\\\    \\\  ///
 <well!jax@lll-winken.arpa >< X3J14 TC >       /// ///  \\\    \\\/// 
 <JAX on GEnie             >< for ANS  > \\\  /// ///====\\\   ///\\\ 
 <SYSOP RCFB (303) 278-0364><  Forth   >  \\\/// ///      \\\ ///  \\\