🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.visual
Article #19

Re: metaphor and programming

#19
From: Dave Smith
Date: Fri, 17 Nov 1989 17:49
53 lines
2465 bytes
In article <1989Nov17.040858.22886@rpi.edu> mcintyre@turing.cs.rpi.edu (David McIntyre) writes:
>In article <7000@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
>>I think visual languages would be most closely related to the dataflow
>>metaphor. That is the most dimensionally ordered one. Think of building
>>UNIX shell programs by fitting together pipes to little tanks called
>>"awk" and "sed"...
>>
>
>I am not so sure about this.  Let's stay with the example of a Unix pipe
>"program".  This is always a one-dimensional flow of data.  I am not
>sure that a visual representation of this would add anything, although
>it might make building pipes more fun.

Unix pipe programs are one dimensional because they're limited by the shells
to be one dimensional.  There's no reason why they couldn't be two
dimensional and there's been more than one time when I'd have liked one
to be.  For example, you have a pipe that produces a stream of data that
you need to do two different transformations on, say get the first field
and get the second field.  Normally we do:

	producer_prog | sed | grep > /tmp/foo

	awk 'control string 1' < /tmp/foo > x1
	awk 'control string 2' < /tmp/foo > x2

I'd prefer to skip the temporary file and just do:

	
				    /-awk 'control string 1' > x1
	producer_prog | sed | grep <
				    \-awk 'control string 2' > x2

The other thing that would be quite nice would be to have more than one
input to a program be a pipe, so you wouldn't have to do:

	pipe1 > /tmp/foo
	pipe2 | diff /tmp/foo

	but instead:

	pipe1 -\
		> diff
	pipe2 -/

Once you've got this dataflow shell, scaling it up and adding features to it
to make it a full-fledged language wouldn't be too hard.  One of these days...


--
David L. Smith
FPS Computing, San Diego
ucsd!celerity!dave or dave@fps.com
"Repent, Harlequin!," said the TickTock Man
Technical Details
Message-ID: <3907@celit.fps.com>
Path: arc1-ca.pugleaf.net!utzoo!yunexus!ists!jarvis.csri.toronto.edu!rutgers!ucsd!ucbvax!hplabs!hp-sdd!ucsdhub!celit!dave
References: <13770@orstcs.CS.ORST.EDU> <7000@ficc.uu.net> <1989Nov17.040858.22886@rpi.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!yunexus!ists!jarvis.csri.toronto.edu!rutgers!ucsd!ucbvax!hplabs!hp-sdd!ucsdhub!celit!dave
From: dave@fps.com (Dave Smith)
Newsgroups: comp.lang.visual,comp.lang.misc
Subject: Re: metaphor and programming
Message-ID: <3907@celit.fps.com>
Date: 17 Nov 89 17:49:15 GMT
Article-I.D.: celit.3907
References: <13770@orstcs.CS.ORST.EDU> <7000@ficc.uu.net> <1989Nov17.040858.22886@rpi.edu>
Sender: daemon@fps.com
Reply-To: dave@fps.com (Dave Smith)
Followup-To: comp.lang.visual
Organization: FPS Computing Inc., San Diego CA
Lines: 53