PostScript is a prl/ForthLike language. That is, it is a prl/StackBased, prl/InterpretedThreaded language.

Simple drawing can be accomplished as follows:

100 100 moveto
100 200 lineto 
200 200 lineto 
200 100 lineto 
3.14 setlinewidth
closepath stroke

We can store a list of words for later recall as follows:

/mysquare {
0 0 moveto
0 1 lineto
1 1 lineto
1 0 lineto
} def

/makepink { 1 0.5 0.5 setrgbcolor fill }
/makepurple { 0.7 0 0.7 setrgbcolor fill }
/makeorange { 1 0.7 0 setrgbcolor fill }
/makeblue { 0 0 1 setrgbcolor fill }

31 31 scale
10 10 translate mysquare makepink
0 5 translate mysquare makepurple
5 0 translate mysquare makeorange
0 -5 translate mysquare makeblue

We can draw text as follows:

/Palatino findfont
18 scalefont
100 50 translate
(Hello World) show

PostScript has a full set of basic graphics operations, which can be used as above. At this level, it is delightfully simple.

Another Lament On Complexity

Alas, if you look at a typical machine generated .ps file, it has none of this elegant simplicity. A programming prl/BadHabit is to take a standard language which works and just use that. What then happens is that program source balloons, resulting in 100,000 line behemoths when a more appropriate language would have made things much simpler. When prl/DonaldKnuth wrote the prl/ArtOfComputerProgramming, he intended people to learn how to write language compilers. The ideal is that you write a correct program in an appropraite language, so that it may be mechanically transformed into working machine code, in such a way that the correctness of the original source is easy to verify by hand, and the correctness of the translator can be verified somehow (perhaps by some means of machine-checking, or using a similar approach of writing the translator in an appropriate high-level language and then translating that into a working binary, and testing things). Test cases are important, but often they are not enough. Design the language system so that testing guarantees correctness is what should be aimed for, not just lots of testing. But with prl/CeePlusPlus, and similar languages, what happens is that one language gets used for everything. The result is massive programs full of bugs, and a language which few programmers really know how to use properly.