[comp.lang.forth] Forth in PostScript

wmb@SUN.COM (01/23/90)

I was playing with my new PostScript printer yesterday and last night
I decided to try to implement Forth in PostScript.  It turned out to
be relatively easy.  I'll try to post the code next week after I get back
from the ANSI meeting.

It's not particulary fast, but the code is very simple and rather
interesting.

Mitch

ForthNet@willett.UUCP (ForthNet articles from GEnie) (02/13/90)

Category 18,  Topic 36
Message 4         Mon Feb 12, 1990
GARY-S                       at 08:13 EST
 
 To: Doug Philips
 Subj: Why is PostScript not Forth ?

  Doug -
   As I pointed out in the FIGGY BAR conference on 9 Feb 1990 on GEnie,
 PostScript may fairly be referred to as a subset or superset (depending
 on your perspective) of Forth, but it is NOT Forth. If PostScript 
 qualifies as Forth by your definition then all other PostFix, stack
 oriented languages such as REPTL, Fifth, and STOIC do so as well. This
 is clearly not the case. If an analogy may be drawn it might be this:
  All Cactii are succulents, but all succulents are not cactii. All
  Forth are postfix stack machines, but not all postfix stack machines
  are Forth. Sharing mechanisms is only part of the definition. PostScript
 is no more Forth than a golfcart is an automobile, though both are
 motor driven and most have four pneumatic tires and propel people and
 their luggage from point-to-point.
  Gary   gars@glsrk
-----
This message came from GEnie via willett through a semi-automated process.
Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'

dwp@willett.UUCP (Doug Philips) (02/13/90)

In <456.UUL1.3#5129@willett.UUCP>, GARY-S writes:
>    As I pointed out in the FIGGY BAR conference on 9 Feb 1990 on GEnie,
>  PostScript may fairly be referred to as a subset or superset (depending
>  on your perspective) of Forth, but it is NOT Forth. If PostScript 
>  qualifies as Forth by your definition then all other PostFix, stack
>  oriented languages such as REPTL, Fifth, and STOIC do so as well. This
>  is clearly not the case. If an analogy may be drawn it might be this:
>   All Cactii are succulents, but all succulents are not cactii. All
>   Forth are postfix stack machines, but not all postfix stack machines
>   are Forth. Sharing mechanisms is only part of the definition. PostScript
>  is no more Forth than a golfcart is an automobile, though both are
>  motor driven and most have four pneumatic tires and propel people and
>  their luggage from point-to-point.

	I don't think I stated my point clearly.  What I'm trying to do
is to get at the 'essence' of Forth.  I know that Forth and PostScript
are not the same thing (species), but I know that they probably belong
to the same genus.  In trying to understand Forth, it is as helpful for
me to understand what Forth *isn't* as it is to understand what Forth
*is*.  PostScript is the candidate I chose because it is so similar to
Forth that the distinctions between the two seemed to me as if they
would be very informative as to the subtleties of Forth's essence.
One difference that has been pointed out as important is the typing of
PS's stack.  I'm curious to know what the other (if any) important
differences are.

		-Doug

---
Preferred: willett!dwp@gateway.sei.cmu.edu OR ...!sei!willett!dwp
Daily: ...!{uunet,nfsun}!willett!dwp   [in a pinch: dwp@vega.fac.cs.cmu.edu]

don@brillig.umd.edu (Don Hopkins) (02/16/90)

In article <459.UUL1.3#5129@willett.UUCP> dwp@willett.UUCP (Doug Philips) writes:
>	I don't think I stated my point clearly.  What I'm trying to do
>is to get at the 'essence' of Forth.  I know that Forth and PostScript
>are not the same thing (species), but I know that they probably belong
>to the same genus.  In trying to understand Forth, it is as helpful for
>me to understand what Forth *isn't* as it is to understand what Forth
>*is*.  PostScript is the candidate I chose because it is so similar to
>Forth that the distinctions between the two seemed to me as if they
>would be very informative as to the subtleties of Forth's essence.
>One difference that has been pointed out as important is the typing of
>PS's stack.  I'm curious to know what the other (if any) important
>differences are.
>
>		-Doug
>
>---
>Preferred: willett!dwp@gateway.sei.cmu.edu OR ...!sei!willett!dwp
>Daily: ...!{uunet,nfsun}!willett!dwp   [in a pinch: dwp@vega.fac.cs.cmu.edu]

Yes, PostScript and Forth are very different languages, but also very
similar, each quite good for different things. But comparing
programming languages is like comparing mind altering chemicals.
Metaphores can only go so far. After a certain point, you just have to
try them yourself or accept what experienced users tell you on faith.
Caffeine does different things to me than nicotine. The most I can
tell you in so many words is that one makes me stay up and one makes
me throw up. If you want to know more you're going to have to try them
yourself.

I think that after all the excellent explanations that have been
posted here describing the differences and similarities of PostScript
and Forth, the only way you're going to arrive at any deeper an
understanding of the two languages is by using both of them.  Learn
them both, by programming in them, or at least studying some heavy
duty code. By heavy duty PostScript code I don't mean a program that
prints out your typical company logo, troff2ps output, or a laserprep
header file. At least read the Green book from Adobe, or the NeWS Book
from Springer Verlag. It also helps to know Lisp to appreciate
PostScript.

Me, I get my rocks off by reading and writing PostScript and Forth.
Your mileage may vary. If you have access to anonymous ftp you can
grab lots and lots of free PostScript code for the NeWS window system
from tumtum.cs.umd.edu (it's also on the latest SUG tape). If you
don't but are really interested I can send some select pieces your
way, just ask. 

	-Don

peter@ficc.uu.net (Peter da Silva) (02/16/90)

Does anyone have a standalone PostScript interpreter... one not connected to
any graphics device. It sounds like a handy tool for many purposes...
-- 
 _--_|\  Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>.
/      \
\_.--._/ Xenix Support -- it's not just a job, it's an adventure!
      v  "Have you hugged your wolf today?" `-_-'

dwp@willett.UUCP (Doug Philips) (02/19/90)

In <22573@mimsy.umd.edu>, don@brillig.umd.edu (Don Hopkins) writes:
>                                                But comparing
> programming languages is like comparing mind altering chemicals.
> Metaphores can only go so far. After a certain point, you just have to
> try them yourself or accept what experienced users tell you on faith.
> Caffeine does different things to me than nicotine. The most I can
> tell you in so many words is that one makes me stay up and one makes
> me throw up. If you want to know more you're going to have to try them
> yourself.
Or I could hook you up and get EKG readings.  I dislike this tendency to
mysticize programming.  It is not a mystical thing.  And yes, I agree
that as far as getting a new point of view goes, there is nothing for it
but to do it.  But that doesn't make the results and/or benefits
indescribable.

		-Doug

---
Preferred: willett!dwp@gateway.sei.cmu.edu OR ...!sei!willett!dwp
Daily: ...!{uunet,nfsun}!willett!dwp   [in a pinch: dwp@vega.fac.cs.cmu.edu]