[comp.lang.forth] BASIS ?? - Comments...

UNBCIC@BRFAPESP.BITNET (02/04/91)

> New control flow words:
>    AHEAD (unconditional forward branch), SO (ROLL for control flow tokens),
>    STILL (PICK for control flow tokens).  These words complete the set of
>    control flow primitives, allowing the creation of user-defined control
>    structures to implement *any* control flow graph.

I like this.

> Clarification of input stream mechanism:
>    The new variable BLOCK-FID contains the fileid of the file containing
>    the blocks accessible via BLOCK, BUFFER, and LOAD.  If BLOCK-FID is
>    zero, the blocks come from the system default block space (which may
>    or may not be a file).  This does not affect interpretation from text
>    files; that still depends on the SOURCE-FILE value (-1 for string input,
>    0 for keyboard input, otherwise it's the fileid of the input text file).

As long as it works...

> Conditional compilation:
>    A wordset for conditional compilation is going out for letter ballot.
>    It looks like it may pass.  The proposal calls for fully-nestable,
>    immediate words IFTRUE OTHERWISE IFEND (same names as in Forth 83).

Interesting...

> Multitasking:
>    All mention of multitasking has been moved to an appendix that describes
>    the "traditions" of Forth multitasking.

Interesting...

> Decompiler:
>    New word SEE (decompiler) added to the toolkit extension wordset.
>    The decompilation format is system-dependent.

I don't think it's necessary, although I wouldn't buy a Forth that didn't have
it...

> EMIT?:
>    EMIT? (check for output device ready) added to toolkit extension wordset.

Is there anyway to print to printer? This looks useful only if you can
re-direct to printer or serial port or whatever, and then it would be more
useful in another wordset. (at least, not in the same of SEE -- A subroutine
threaded Forth can have EMIT? but cannot have SEE.)

> Search order:
>    ADDITIONS changed back to DEFINITIONS , FORTH-WORDLIST added to search
FORTH-WORDLIST is the old FORTH vocabulary, isn't it? Just fine with me...

>    order wordset, ISOLATE removed.  The search order wordset now contains
No ISOLATE?

>    a precisely-defined "primitive" set of search order words, suitable for
>    use as tools to implement any search order scheme.  The search order
>    extension wordset now contains ONLY ALSO etc.

Yeah.

> AT-XY:
>    Popular sentiment suggests that the name >COLROW sucks, so the name was
>    changed to "AT-XY" (just AT was suggested, but that name has inconsistent
>    common usage).

Ok.

> GET-DATE:
>    (or maybe it's GET-TIME ??)  Returns the "wall clock" time as
>    ( -- sec min hrs day mon year )  sec:0-59 min:0-59 hrs:0-23 day:1-31
>    mon:1-12 year:e.g.1991  (in CORE EXT wordset).

GREAT!!! (Just more two words, GET-GWTIME and DAYLIGHT-TIME?, and we get a
complete time wordset!!! ;-)

> Mitch Bradley, wmb@Eng.Sun.COM

                              (8-DCS)
Daniel C. Sobral
UNBCIC@BRFAPESP.BITNET

wmb@MITCH.ENG.SUN.COM (02/05/91)

>> EMIT?:
>>  EMIT? (check for output device ready) added to toolkit extension wordset.
>
> Is there anyway to print to printer?

No standard way.  It would be nice to have a redirection mechanism.


> and then it would be more
> useful in another wordset. (at least, not in the same of SEE -- A subroutine
> threaded Forth can have EMIT? but cannot have SEE.)

Admittedly, the TOOLKIT EXT wordset is not the ideal place for it.

However, note that it is possible to "mix and match" words from the EXT
portion of wordsets.  The "base" parts of wordsets are supposed to come
as a bundle, but the words in the EXT parts can be supplied on an
individual basis.  Consequently, the fact that SEE and EMIT? are in the
same EXT wordset doesn't "couple" them.

As a matter of fact, ALL the words in the TOOLKIT wordset were moved to
the TOOLKIT EXT wordset to remove any coupling between them.


> FORTH-WORDLIST is the old FORTH vocabulary, isn't it? Just fine with me...

FORTH-WORDLIST is the "wordlist identifier" of the FORTH vocabulary.  It
leaves that identifier on the stack, where it can be used as an argument
to SET-ORDER , SET-CURRENT , or SEARCH-WORDLIST .

FORTH is still there, in SEARCH ORDER EXT.  FORTH does the usual thing
of putting itself in the search order.


Mitch Bradley, wmb@Eng.Sun.COM

rob@idacom.uucp (Rob Chapman) (02/06/91)

>useful in another wordset. (at least, not in the same of SEE -- A subroutine
>threaded Forth can have EMIT? but cannot have SEE.)
>Daniel C. Sobral

 All my implementations of Forth are subroutine threaded with inline
 optimization.  They all have SEE.  If you can write compilers, you
 can write decompilers.  If you can write optimizers, you can write
 deoptimizers.  Besides, SEE serves as a great test/debug tool when
 implementing new Forths.  I couldn't/wouldn't live without it.
 (I find it useful to have SEE accept an address on the stack if there
 is no word following it in the input stream.)

Rob