[comp.lang.forth] Mating Forth to C

Paktor@cup.portal.com (10/01/88)

In article  <1015.3.200.15   Re: Jack Woehr's amazing productivity!>
            <8/31/88 06:34   koopman@a.gp.cs.cmu.edu (Philip Koopman)> writes:

>   I don't think a preprocessor is the correct answer.  Forth works better
>   by building and using tool sets that form extensions to the language.
>   An idea I like better is mating an interactive C compiler into the
>   Forth environment.  Use C for those parts of the application that it
>   is appropriate for, and Forth when it is appropriate.

About five years ago, in '83, I think, I came across a product called
    Hyper-Forth, implemented on the Sage (does anyone remember the Sage?
    It was _the_ "hot" 68000-based micro-system at the time...), and the
    ubiquitious, iniquitous, ever-bluiferous (oh, all right:  flame off)
    IBM-PC.

I met the implementer at a Forth convention, here in Silicon Valley.  All I
    remember about him is that his first name was (and presumably still is)
    David, and that he operated out of Albuquerque, New Mexico.

What I remember about the system included the following:
  (1)  It interfaced C with Forth interchangeably:  that is to say, one
    could access functions written in C from the Forth outer interpreter,
    and, conversely, one could incorporate Forth words into C functions.
    Parameters were mapped between the two languages in a fairly straight-
    forward way, the order on the Forth stack corresponding to the order in
    the C parentheses.
  (2)  Its Forth could handle structures in its outer interpreter that
    "normally" needed to be placed inside definitions.  For instance, one
    could write:
                 BEGIN foo IF lum lom DO bar LOOP ELSE yuk THEN poo UNTIL 
    and have it execute properly, instead of the more usual:
        : glom   BEGIN foo IF lum lom DO bar LOOP ELSE yuk THEN poo UNTIL ;
	glom
	FORGET glom
  (3)  It had a viable text-file interface, i.e., it could write text files,
    and its Forth input was from free-form text files, rather than block-
    structured files.

I liked the idea at the time, and I like it even better now; unfortunately,
    I completely lost track of the chap and his product.  Furthermore, Sage
    seems to have vanished off the horizon, and is no help in locating him.

If anyone knows where he is, (or better still, Dave, if you are reading this),
    I would appreciate a response by E-Mail.  Maybe this good idea can be
    resurrected or re-incarnated, or otherwise brought back to life...

A posting would be nice, too, but, since I have been away on vacation, I have
    been swamped trying to catch up with my subscriptions, and will probably
    not be as quick to notice it as I would be to read my E-Mail.

Thanks,

David

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  === Mister Systems ===         |     "You know the times
      David L Paktor             |      you impress me the most
                                 |      are the times when you don't try;
  Paktor@cup.Portal.com          |      when you don't even try."  -- Joni M.
                                 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

jbn@glacier.STANFORD.EDU (John B. Nagle) (10/02/88)

     Sage is now called Stride Micro, and is still selling 68000-based boxes.

						John Nagle

jax@well.UUCP (Jack J. Woehr) (10/04/88)

	regards a few recent postings on this theme ( C + Forth)

	There are numberous examples in practice of combining Forth
	and C. Mitch Bradley's ( wmb.@sun.com) CForth is one example.
	Runs under Unix and can call C routines.

	JForth implements full C Structures, a complete object-oriented
	dialect, and all system calls to Amiga op system. Watch for
	version 2.0 out shortly, all Amiga fans!

	I worked on a project where we ran *two* forths and one C program
	in a round-robin dominated by the Forths on an AT!

	There is some discussion of this and some source examples on
	the GEnie Forth Interest Group RT. All you FIG members, sign up!

{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}
{}									  {}
{} jax@well	." Sysop, Realtime Control and Forth Board"		  {}
{} jax@chariot  ." (303) 278-0364 300/1200 8-n-1 24 hrs."                 {}
{} JAX on GEnie		." Tell them JAX sent you!"			  {}
{}									  {}
{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}