[comp.lang.forth] ANS Forth - summary of last week's meeting

wmb@MITCH.ENG.SUN.COM (Mitch Bradley) (06/02/90)

The most recent ANS Forth meeting was held last week in Melbourne, FL.
Although the event was held at a Holiday Inn right on the beach, I don't
know of any committee member who actually even walked on the beach.  We
were that busy!

Technical changes:

	New words INCLUDE-FILE and INCLUDE for loading from text files.
	INCLUDE takes filename from input stream, INCLUDE-FILE takes
	file descriptor from stack. (Actually, these were voted in at the
	last meeting, but failed to make it into Basis11 due to an editing
	oversight).

	"(" handles multi-line comments when loading from text files.

	QUERY is extended to work also when loading from text input files
	or from blocks. (It used to work only for keyboard input.)

	Use of "/" is only portable when the arguments are positive.
	New words "FM/MOD" and "SM/MOD" (analogous to the existing
	"UM/MOD") allow the construction of portable programs which
	need any (or even more than one in the same program) of the
	common division semantics.  An application is free to redefine
	"/" in terms of "FM/MOD" or "SM/MOD" if it wishes.

	New words "(E.)" and "(F.)" for conversion of floating point
	numbers to strings, in either exponential or conventional notation.

	New error handling wordset containing the words "CATCH" and
	"THROW" for "non-local exits".  Similar in purpose to C's
	"setjmp(),longjmp()", but better ("CATCH" and "THROW" don't
 	require the allocation of global memory as do setjmp()/longjmp(),
	and thus are nestable).

	"KEY" now returns a character in the system's standard character
	set, without any attribute bits or funny codes (e.g. function
	keys).  Thus, a standard program may use KEY and have some idea
	what is likely to come back.  Ditto for "?KEY".

	New word "EKEY" (in Non-Portable Wordset) is provided for
	applications which need to get attribute bits or funny codes.
	Ditto for "?EKEY".

	New word "SHIFT" performs logical shifts, left or right according
	to the sign of the shift count.

	New word "ENVIRONMENT?" for asking the system about system-dependent
	parameters (e.g. presence of optional wordsets, size of data types
	such as bits/cell, size of memory areas like the stack, etc).  This
	allows portable programs to configure themselves accordingly.

	"  (string literal) is allowed to work in interpret state, although
	such usage is non-portable (because of concerns about the allocation
	of a buffer to hold the string, and how long the string lasts before
	the buffer gets overwritten by another string).

	New word "LEX" (String wordset) for string parsing.  Splits a string
	around a delimiter character.  The set of delimiter characters is
	given by another string.

	New word "PARSE" for input stream parsing.  Similar to WORD except
	that it does NOT skip leading delimiters, and the return value is
	an "adr len" string instead of a counted string.

I may have forgotten something; hopefully the other committee members
on the net will fill in any gaps I have left.

Mitch Bradley

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

wmb@MITCH.ENG.SUN.COM (Mitch Bradley) writes:

>The most recent ANS Forth meeting was held last week in Melbourne, FL.
>Although the event was held at a Holiday Inn right on the beach, I don't
>know of any committee member who actually even walked on the beach.  We
>were that busy!

	Gary Betts and his wife went out at night with a flashlight and
got to watch a sea turtle lay her eggs!

>I may have forgotten something; hopefully the other committee members
>on the net will fill in any gaps I have left.

	We'd love to, Mitch, only there is no room in the CORE wordset
now that you have filled it up with your pet proposals! :-)

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

peter@ficc.ferranti.com (Peter da Silva) (06/03/90)

In article <9006012336.AA21662@ucbvax.Berkeley.EDU> Mitch Bradley <wmb%MITCH.ENG.SUN.COM@SCFVM.GSFC.NASA.GOV> writes:
> 	"(" handles multi-line comments when loading from text files.

Ick. Multi-line comments are a botch anyway, and this prevents some
interesting (in terms of hacking the implementation) uses.

> 	New error handling wordset containing the words "CATCH" and
> 	"THROW" for "non-local exits".  Similar in purpose to C's
> 	"setjmp(),longjmp()", but better ("CATCH" and "THROW" don't
>  	require the allocation of global memory as do setjmp()/longjmp(),
> 	and thus are nestable).

Setjmp and longjmp do not require the allocation of global memory. What
makes you think they do?
-- 
`-_-' Peter da Silva. +1 713 274 5180.  <peter@ficc.ferranti.com>
 'U`  Have you hugged your wolf today?  <peter@sugar.hackercorp.com>
@FIN  Dirty words: Zhghnyyl erphefvir vayvar shapgvbaf.

wmb@MITCH.ENG.SUN.COM (Mitch Bradley) (06/04/90)

> We'd love to, Mitch, only there is no room in the CORE wordset
> now that you have filled it up with your pet proposals! :-)

I know that this has a smiley on it, and was thus said at least partially
in jest, but I feel compelled to respond to it anyway, as things said in
jest are often important points stated politely.

I just want to point out that none of my pet proposals has added any
words to the CORE wordset.  Most of my activity has been confined to
optional wordsets (files, memory allocation, far memory, error handling).
Where I have been involved in the CORE wordset, it has been to improve
the wording or behavior of words that were already there.

This is an important point; it is salient to the "minimalism" vs.
"kitchen-sinkism" discussion.  The minimalists have a good argument that
a small core makes for compact implementations in resource-limited
environments.  I fully appreciate this, and that is why I have tried
to confine my extensions to *optional* wordsets, which can be omitted
in environments where they are inappropriate.

Let's keep the core of Forth small, but let's also proceed to standardize
some extensions.  Those of us who need them can then all "pull in the same
direction".

Mitch Bradley