[net.lang.forth] Forth standards

ma168a@sdcc7.UUCP (John Wavrik) (03/17/86)

A good source for information about Forth is:
		  MOUNTAIN VIEW PRESS
		  PO BOX 4656
		  MOUNTAIN VIEW, CA  94040

They sell copies of the complete versions of the FORTH-79 and FORTH-83
standards for $15 each.
  
Good references for Forth programming practices are the books
Starting-FORTH and Thinking Forth by Leo Brodie (also available from
MVP). Techniques for foward references, co-routines, recursion, etc.
are covered.

Anyone can make his private version of Forth operate in any way he wishes.
The standards specify the actions of words and programming practices that
guarantee portability.

There are so many competently implemented versions of Forth on the market
at such low cost that it is hard to understand why someone inexperienced
with the language would want to write an implementation from scratch!

ugbowen@sunybcs.UUCP (Devon Bowen) (03/22/86)

> There are so many competently implemented versions of Forth on the market
> at such low cost that it is hard to understand why someone inexperienced
> with the language would want to write an implementation from scratch!

I've found that the best way to learn something is by doing it. I feel
if I were to write Forth, I would get a deeper understanding of the
operations of the langauge (which is my goal as a Computer Science
student). It also allows me to easily make any improvements or fix any
bugs, because I have and understand the source code.

Thanks for the standards info. It's appreciated.

                                 Devon E Bowen
                                 University of Buffalo

olson@batcomputer.TN.CORNELL.EDU (Todd Olson) (03/24/86)

In article <2963@sunybcs.UUCP> ugbowen@sunybcs.UUCP (Devon Bowen) writes:
(in response to a citation I've lost)
>> with the language would want to write an implementation from scratch!
>
>I've found that the best way to learn something is by doing it. I feel


Here here!


-- 
Todd Olson

ARPA: olson@lasspvax  -- or --  olson%lasspvax.tn.cornell.edu@cu-arpa
UUCP: {ihnp4,allegra,...}!cornell!lasspvax!olson
US Mail: Dept Physics, Clark Hall, Cornell University,
	 Ithaca, New York 14853-2501

tenney@well.UUCP (Glenn S. Tenney) (03/27/86)

The best way to learn FORTH is definitely NOT by implementing it.
Unless you have the good fortune to work with someone that really
knows what he/she is doing, you are likely to get caught up in your
own ignorance.  I once saw an implementation that did not include
CREATE ... DOES> because either the person didn't understand how to use
it, how to code it or didn't think it was worthwhile.    If you are
basing your implementation on an existing one, that can also be a problem.
I have seen many bad implementations which would only teach you how to
do it wrong.  But only if you knew enough to know it was wrong.

Now, if you have a good implementation and/or a guru to assist, then
this is an excellent way to learn the internals of FORTH (but still
not necessarily how to code an application in FORTH since the kernel
is a lot different from an application).

(( I've been using FORTH for something like 6 or 7 years and implemented
a few versions and am also a referee of the FORTH Standards Team, so I
have some reason to say what I said even if its wrong.))

-- Glenn Tenney 
UUCP: {hplabs,glacier,lll-crg,ihnp4!ptsfa}!well!tenney
ARPA: well!tenney@LLL-CRG.ARPA        Delphi and MCI Mail: TENNEY
As Alphonso Bodoya would say... (tnx boulton)
Disclaimers? DISCLAIMERS!? I don' gotta show you no stinking DISCLAIMERS!

jty@tut.UUCP (03/27/86)

I'll encourage you to write Forth yourself, but remember
two things:

a) Make it compatible either with fig-forth or better, F83
   (the Laxen/Perry/Harris implementation of Forth-83 standard)
   This makes your life a lot easier.

b) Do it in ASSEMBLER (and forth itself), everything else is
   asking for a big trouble.
   This is due to the tight integration of code and data in forth
   dictionary.
   It is possible to write a HUGE switch-statement (in C) to
   implement the virtual Forth machine, but this is VERY
   S L O W W w w ..
   Anyway, I heard Mitch Bradley (wmb@sun) is writing a portable UNIX forth
   in C, can somebody (wmb?) verify this?
   The question is, will it support "separate I and D space"?

jty@tut.UUCP				! I know all about FORTH.
Jyrki Yli-Nokari			! I saw a TV-program about it once
Tampere University of Technology	! (I also love Carl Barks)
Computer Systems Laboratory		!
N 61 26' E 23 50'			!
+358 31 162590, home +358 31 531999	!

PS.
I promised to send my 6809-forth-83 implementation to
somebody, but I lost the address (stupid me).
Can you (whoever you were) send your address again??

-- 
jty@tut.UUCP				! I know all about FORTH.
Jyrki Yli-Nokari			! I saw a TV-program about it once
Tampere University of Technology	! (I also love Carl Barks)
Computer Systems Laboratory		!
N 61 26' E 23 50'			!
+358 31 162590, home +358 31 531999	!

wmb@sun.uucp (Mitch Bradley) (04/02/86)

> jty@tut says:
>    Anyway, I heard Mitch Bradley (wmb@sun) is writing a portable UNIX forth
>    in C, can somebody (wmb?) verify this?

Well, yes, I have written a portable UNIX forth in C.  I guess I better
post it.  I have hesitated to do so because I don't have time to support it.

>    It is possible to write a HUGE switch-statement (in C) to
>    implement the virtual Forth machine, but this is VERY S L O W W w w ..

In fact that is the way it is implemented, but the good news is that
it is NOT slow.  On a Sun, it is only about 2.5 times slower than my
68000 assembly language Forth.  I don't think I would want to use it
on an 8080, but on most modern processors, it is quite acceptable.

>    The question is, will it support "separate I and D space"?

Well, sort of.  The basic Forth kernel is separate text and data, but
when you incrementally compile stuff on top of that and save the
executable image, the incrementally compiled stuff is all in the data
segment.

Mitch