[comp.lang.forth] More on system commands from Forth

wmb@MITCH.ENG.SUN.COM (09/27/90)

The way I handle Unix (substitute your favorite OS) commands from inside
Forth right now is:

    I have Forth words for the most commonly used system commands, such as
    ls, rm, dir, cd, etc.  These are either implemented directly in
    Forth, or by calling a command interpreter as a subprocess, whichever
    is convenient for the particular OS.

    For other system commands, I have a "shell escape".  The command
    "sh" means "take the rest of the line and send it to a system
    command interpreter executed as a subprocess.

Mitch

shri@ncst.ernet.in (H.Shrikumar) (10/16/90)

In article <9009262119.AA20487@ucbvax.Berkeley.EDU> 
     wmb%MITCH.ENG.SUN.COM@SCFVM.GSFC.NASA.GOV writes:

wmb>The way I handle Unix (substitute your favorite OS) commands from inside
wmb>Forth right now is:
wmb>
wmb>    I have Forth words for the most commonly used system commands, such as
wmb>    ls, rm, dir, cd, etc. ... implemented directly in Forth,...
wmb>
wmb>    For other system commands, I have a "shell escape".  The command ...
wmb>
wmb>Mitch

   I'd vote for this too.

   Passing stuff from one environment to another, when the two are
driven by different standards (de-facto or otherwise) processes, and
different evolution is a bad idea.

   Forth should know what it is doing - precisely. (even if what it does
know is that it does not know the command which has been shell escaped :-)

-- shrikumar ( shri@ncst.in )