Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!zaphod.mps.ohio-state.edu!swrinde!ucsd!sdcc6!ir230 From: ir230@sdcc6.ucsd.edu (john wavrik) Newsgroups: comp.lang.forth Subject: TO ANSI TEAM Message-ID: <12395@sdcc6.ucsd.edu> Date: 24 Aug 90 05:54:09 GMT Organization: University of California, San Diego Lines: 133 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