Slashdot Mirror


Game of Life in Postscript

smashr writes "It never really occured to me that postscript could be used for something other than printing, until I came across this page. Evidently someone has written the classic 'Game of life' entirely in postscript. You can even send it to the printer and have it output every single iteration.. now that would be a fun prank."

265 comments

  1. Echo... echo... echo... by Anonymous Coward · · Score: 0

    But can it play MP3's?

  2. wow by Kipper+the+Llama · · Score: 5, Funny

    Sad memories of being a nine year old loser are flooding my brain at the mere mention of "The Game of Life".

    1. Re:wow by Anonymous Coward · · Score: 0

      *sigh* ...the same goes for me and the mandelbrot set.

      - a.c.

    2. Re:wow by Anonymous Coward · · Score: 0

      madelbrot, lem, copernicus

      -- Polish Genius'

  3. Is it really a game? by Vietomatic · · Score: 1

    Is it really a game if there is no real winner?

    1. Re:Is it really a game? by Kipper+the+Llama · · Score: 1

      Certainly! A version called "Life Genesis" mesmerized me for hours when I was a dorky little kid. Try it sometime.

    2. Re:Is it really a game? by Anonymous Coward · · Score: 2, Interesting

      actually, there are versions off it were you can win. its the same as the normal game of life, but 2 players control 2 'species'. each turn they can either place or remove any field, and the one survives wins.

    3. Re:Is it really a game? by wo1verin3 · · Score: 2, Insightful

      do you know anyone who has "finished" Tetris? Yet it is still a game.

    4. Re:Is it really a game? by Anonymous Coward · · Score: 0

      Has anyone won everquest yet?

  4. Duh by Anonymous Coward · · Score: 1, Informative

    Postscript is a programming language - so you can 'program' in it... whatever you want. Even something like the game of life. Crazy huh? That's technology for you.

    1. Re:Duh by oohp · · Score: 1

      Well I even saw a webserver written in Postscript.

    2. Re:Duh by Captain+Lobotomy · · Score: 5, Interesting

      True. In fatc, it's a stack-oriented programming language (like Forth). When Apple released the original LaserWriter in the mid-80s, it was actually the most powerful *computer* they made at the time (next in line was the Mac Plus -- remember those?).

      --
      Time flies like an arrow. Fruit flies like a banana.
    3. Re:Duh by Cyberdyne · · Score: 4, Interesting
      Postscript is a programming language - so you can 'program' in it... whatever you want. Even something like the game of life. Crazy huh? That's technology for you.

      Since it's Turing-complete, technically you could port an x86 emulator to it, and boot Windows in Postscript. In practice, of course, it would be insanely slow, but on a fast enough machine you could play Doom or Quake. 60ppm printer -> 1 fps ;-)

      Postscript isn't just used for printers, either. NeXT used Display Postscript for the GUI, so applications were truly WYSIWG: the printer and the screen were rendering precisely the same source! Apparently this was one of the NeXT features which was inherited by Mac OS X, in modified form: parts of the GUI use Display PDF in much the same way.

    4. Re:Duh by arth1 · · Score: 1

      Of course it's a programming language. Not only was it designed as a programming language (thus the "script" in Postscript), but it easily passes the test of producing a quine, as can be witnessed here and here.

    5. Re:Duh by javiercero · · Score: 2, Interesting

      Well, I still do not know why you used Touring completness for your example... I assume you are just reading about it in school, eh? Anyhow, not only NeXT, but the old NEWS distributed windows systems proposed by SUN did infact used postscrip. I believe SGI also implemented a NEWS server... it was overshadowed by X. Although I believe both SGI and SUN did merge X and NEWS together in their display servers....

    6. Re:Duh by Jezza · · Score: 1

      Yeah, but Apple dropped it in Mac OS X v10.0 (and later). It only appeared in Mac OS X Server 1.0 - 1.2 (Crazy numbering there from Apple's marketing department!)

      On the NeXT running with "public windowserver" was considered a security risk (and rightly so) though I never saw an 'sploit that used this.

      Programming PostScript is a similar mind bending experience to programming Forth.

      The new Mac windowserver is much faster than the one on the NeXT but being PDF based has similar "look Ma, no extra code" printing abilities (which is cool). Apple took the view that the Mac needed high performance (for games - I know Mac & games in the same sentance... weird). I believe that the GNUstep project uses GhostScript in a similar way to the way NeXTSTEP used Display PostScript (see www.gnustep.org for more).

    7. Re:Duh by Cyberdyne · · Score: 2, Interesting
      Well, I still do not know why you used Touring completness for your example...

      Example? Turing completeness is pretty significant.

      I assume you are just reading about it in school, eh?

      Then you assume wrongly.

      Anyhow, not only NeXT, but the old NEWS distributed windows systems proposed by SUN did infact used postscrip. I believe SGI also implemented a NEWS server... it was overshadowed by X. Although I believe both SGI and SUN did merge X and NEWS together in their display servers....

      NeXT is the nearest to a mainstream example; while NeWS was derived from Postscript (predating Display Postscript), it was never a compliant Postscript implementation, ruling out the big screen<->printer WYSIWYG advantage. Irix 4 introduced Display Postscript support, used by Impressario, but NeWS was dropped after Irix 3.

      The key difference is, IMO, NeWS was a dead-end, replaced entirely by X - NeXT's Display Postscript lives on, as Display PDF in Quartz.

    8. Re:Duh by grampy · · Score: 1

      As a matter of fact, before the "invention" of MFC (Microsoft Foundation Classes) my friend and I were looking for an easy way to build some sophisticated Windows software. We ended up building a PostScript interpreter and a relational database to accomplish the task. We never really got around to doing the app we started out doing. Instead, the PostScript along with a bunch of builtin "classes" turned out to have a life of its own. We used the PostScript as a server-side database language. Eventually, we dropped the PostScript and my friend developed an interpreted C++-like language with automatic memory mgmt and late binding -- all this coming from PostScript, originally, and before the invention of Java back in the '80's. The Java-like language and the database still survive in the form of a web application server.

    9. Re:Duh by Cyberdyne · · Score: 1
      Yeah, but Apple dropped it in Mac OS X v10.0 (and later). It only appeared in Mac OS X Server 1.0 - 1.2 (Crazy numbering there from Apple's marketing department!)

      Apple dropped Quartz?!

      Programming PostScript is a similar mind bending experience to programming Forth.

      Yes, programming it's a pretty tough job; bear in mind it's not really supposed to be used like that - when you use it as a printer control language, it seems a lot nicer. Genuinely programming it, like the Postscript webserver, is a neat hack, but not really the normal use ;-)

    10. Re:Duh by Knackered · · Score: 1

      NeWS was the betamax of window systems; technologically very neat and superior to X in many ways, but killed by poor marketing (and also a flaky PostScript interpreter from Sun). I seem to remember that the GoodNeWS toolkit was written by one Arthur van Hoff, who later turned up as one of the designers of Java...

      --
      a.
    11. Re:Duh by Anonymous Coward · · Score: 0

      Yes there were exploits for NeXT's window server, but they were all silly proof of concept things, like a keystroke that would kill the current window or making a stupid sound whenever someone types batman...

    12. Re:Duh by Anonymous Coward · · Score: 0

      I think the reason he mentioned Turing-completenes is pretty clear. Unlike, say, the reason you don't know how to spell the name of one of the greatest men in computing, which will no doubt forever remain a mystery.

    13. Re:Duh by kcarlile · · Score: 1

      http://www.apple.com/macosx/jaguar/quartzextreme.h tml

      Try again. It was not dropped. Display Postscript was dropped (due to licensing costs, I believe, and this may have happened before 10.0), but not Display PDF.

      Dammit, I can't figure out how to fix the link. So sue me... There goes my good karma.

    14. Re:Duh by Jezza · · Score: 1

      No, Quartz is what replaced "Display Postscript" in Mac OS X 10.0 and onwards.

      The NeXT often had programmers more familiar with Objective C (an OO version of C) bending their minds around PostScript to get the window server to display their new widget correctly.

    15. Re:Duh by Jezza · · Score: 1

      Sorry that's what I MEANT (and your second person to think I meant something else - so "my bad").

      Actually it was not just the high costs associated with Display PostScript but the poor performance too. Of course Display PostScript has some neat tricks too - but on balance I think Quartz is a solution more in tune with the Mac.

    16. Re:Duh by yalu · · Score: 1

      Ok, let's port Windows to Acrobat reader! :-)

    17. Re:Duh by Cyberdyne · · Score: 1
      No, Quartz is what replaced "Display Postscript" in Mac OS X 10.0 and onwards.

      It replaced Display Postscript with Display PDF. (To quote Apple about Quartz Extreme: "...Quartz, the revolutionary composited windowing system in Mac OS X that uses the Portable Document Format (PDF) as the basis of its imaging model.")

      The NeXT often had programmers more familiar with Objective C (an OO version of C) bending their minds around PostScript to get the window server to display their new widget correctly.

      The usage of Postscript did seem pretty weird; using vector rather than bitmap based widgets has advantages, but Postscript seems like overkill to me. I suppose decent caching (as done for vector fonts) should eliminate almost all the performance penalty, but still...

    18. Re:Duh by Jezza · · Score: 1

      It replaced Display Postscript with Display PDF. (To quote Apple about Quartz Extreme: "...Quartz, the revolutionary composited windowing system in Mac OS X that uses the Portable Document Format (PDF) as the basis of its imaging model.")

      Sure, actually Quartz is a mix of Display PDF, QuickTime, and OpenGL, though Apple's documentation sometimes shows Quartz AND QuickTime, OpenGL - Apple aren't very consistant with their use of terminology. It gives a lot of the advantages of Display PostScript without the performance overhead. Many of the ideas are being "borrowed" by the open source community.

      The usage of Postscript did seem pretty weird; using vector rather than bitmap based widgets has advantages, but Postscript seems like overkill to me. I suppose decent caching (as done for vector fonts) should eliminate almost all the performance penalty, but still...

      Actually performance tuning was a big issue, and choosing between the three methods was quite a problem. The performance was such an issue that NeXT provided a way around it for Insigna Solutions (makers of SoftPC) called "Interceptor" that basically blew a hole in the windowserver for the application to manipulate directly (but the docmentation was never released and it was always buggy {from what I'm told - I never used it myself}). Of course dragging the Print menu item into your menu to allow your application to print was very attractive! (Apple have that ability in Mac OS X by virtue of using PDF)

    19. Re:Duh by Anonymous Coward · · Score: 0

      Offtopic my ass. This was a very apt reply to a rude and ignorant post. Someone meta-moderate this bastard moderator back to hell.

  5. Wow. by JanusFury · · Score: 4, Insightful

    I find it impressive that a technology that's been around since 1985 is not only still usable, but it's used almost everywhere for printing and is also an extremely powerful language. If only more technology was created this way these days. Definitely a testament to the people who created postscript...

    --
    using namespace slashdot;
    troll::post();
    1. Re:Wow. by g4dget · · Score: 4, Interesting

      PostScript survived because of its imaging model, which was far better than anything else around at the time. The PostScript language only survived because of the imaging model; the language itself has required numerous workarounds, add-ons, and conventions to make its continued use in printing practical, making it a complicated mess that still doesn't really work all that well as a language.

      Adobe has pretty much admitted as much with their creation of PDF. Apple also dumped PostScript for PDF, for the same reasons.

      PostScript was an idea worth trying, but a few decades later, we really know that procedural languages do not make good page description languages. The future belongs to standards like PDF and SVG.

    2. Re:Wow. by mark-t · · Score: 5, Interesting
      Definitely a testament to the people who created postscript
      Person, actually. Postscript was invented by one man.

      Postscript has an interesting story, actually. The man who invented it had, previously, designed the "language" to be used by Xerox's new laser printers. This was not a real programming language, but was simply a control language. Xerox was nevertheless entirely delighted with it, and paid him a fair amount of money for it. After he had finished this task for Xerox, he then decided to start from scratch and try to build a printer language that was more suited to his vision of what one should be. When he finished, he decided to notify Xerox of his new development (hoping, perhaps, to get another large paycheque from them), but Xerox declined to use it, wanting to stick with his first printer language that they were already beginning to use. He teamed up with someone else and founded the company Adobe, and they called the language "Postscript".

    3. Re:Wow. by weston · · Score: 1

      The man in question, I beleive, is John Warnock. I'd heard he was working with Evans and Sutherland at the time, rather than Xerox, but that was word of mouth...

    4. Re:Wow. by Anonymous Coward · · Score: 0

      Is the pre-PostScript lang refered to called "DocuBlob"?

      For instance DocuTech 135s use this format.

      Any insight appreciated. It reminds me of the PDF format of today.

      As as side-note, it's nice to have a PostScript interpreter that does not cost $$$, thanks to GhostScript.

    5. Re:Wow. by mark-t · · Score: 1
      I'd heard he was working with Evans and Sutherland at the time, rather than Xerox
      This may be entirely true. To the best of my knowledge, he was not directly working for Xerox anyways, but was simply being paid to do the one, single job.
    6. Re:Wow. by Anonymous Coward · · Score: 0

      Wow. I find it really impressive that you could come up with an insightful post for this boring article =)

    7. Re:Wow. by farnerup · · Score: 1

      The advantage PS has over PDF is that it is a lot easier to use for a programmer that wants to add a print feature to his program. PDF is a binary format with strict rules. A PDF file is littered with references to byte indices, so you need a good library to take care of all this book-keeping. Writing such a library is not easy (I have tried) and Acrobat Reader doesn't help much help debugging it, with error messages like "document error [14]" Anyone know of a decent open source PDF library?

  6. Webserver by JohnFluxx · · Score: 4, Interesting

    Didn't someone write a webserver in postscript?

    Anyway, most people know script it turing complete - this is hardly the greatest hack ever :)

    But it's cool - i'm not being negative.

    1. Re:Webserver by Xonea · · Score: 5, Informative

      Yes, it can be found here

      It must be used with inetd though, because postscript doesn't support sockets...

    2. Re:Webserver by Jellybob · · Score: 1

      And the first paragraph of it's website (obviously hosted on said web server).

      "Do you think Apache is too easy to handle? And Roxen too powerful? Do you feel that your webserver is able to handle way too many requests per second? Then you may want to read further!"

      So there you have it :P

    3. Re:Webserver by Asprin · · Score: 1

      I dunno, but about 10 years ago or so, an urban ledgend went around the BBSs that someone had coded a PostScript document trojan that printed a pretty picture (of a tiger?) AND set the access password on your printer to a random string so you couldn't access the printer anymore.

      --
      "Lawyers are for sucks."
      - Doug McKenzie
  7. HP calculator games in Postscript by Anonymous Coward · · Score: 0

    Postscript is very compatible with HP calculator programs because they both use RPN (reverse Polish notation). Pretty much any HP calculator game could be ported to Postscript fairly easily.

    1. Re:HP calculator games in Postscript by Anonymous Coward · · Score: 0

      Almost any program for a particular instruction set architecture could be ported to any other instruction set architecture fairly easy, since they all work with registers and memory, and instructions over data in these registers and memory positions.

      (The Java Virtual Machine also uses a stack. Does it mean that now I can easily port Java bytecode to my HP? Cool!)

  8. It would be cooler if... by zutroy · · Score: 1, Funny

    ...it auto-generated ASCII porn.

  9. Turing Completeness by DataShark · · Score: 1

    it is well known that Post Script as a language can do this sort of tricks ... just not try this on a true printer, and if you try plz use recycled paper :-)

    1. Re: Turing Completeness by Black+Parrot · · Score: 1


      > just not try this on a true printer, and if you try plz use recycled paper :-)

      For your PostScript Turing Machine Simulator all you need is one infinitely long sheet of paper.

      And if you compress the output you only need a sheet that's a small fraction of infinitely long...

      --
      Sheesh, evil *and* a jerk. -- Jade
  10. OS by spikexyz · · Score: 4, Funny

    Ok, someone write an OS in it.

    1. Re:OS by Art+Tatum · · Score: 3, Informative

      That's meant as a joke but NeXTSTEP used PostScript to write their window server. Not quite an OS, but still low-level system software. They added some stuff for window management and event handling and so on. One of the nice features was that all NeXT software had perfect WYSIWYG.

    2. Re:OS by larry+bagina · · Score: 1
      For xfree86, display ghostscript is mostly written. Sun and some other Xservers have a full display postscript support.

      Quartz (diplay pdf) is quite similar (but without the license fees)

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    3. Re:OS by spun · · Score: 1

      As a previous poster mentions, PostScript is Turing-Complete. You can write any program in PostScript you could write in any other language.

      Not that it would necessarily be easy, but it could be done.

      --
      - None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
    4. Re:OS by spun · · Score: 3, Funny

      Hehe, I just read that Conway's Game of Life itself is Turing Complete: you can make a universal Turing Machine in Life. Therefore, you could write an OS that runs on Life, which could run on any machine that runs Life, including PostScript.

      --
      - None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
    5. Re:OS by Art+Tatum · · Score: 1

      Yep. GNUstep had a Display GhostScript graphical backend at one point but it couldn't really cut the mustard and nobody uses it anymore. The guy the FSF contracted to do the work couldn't finish it. It seems that the number of programmers competent to write the necessary code is extremely low.

    6. Re:OS by Anonymous Coward · · Score: 0

      I could port Win 95 to it but...

      Wouldn't it be easier and almost the same to write an infinite loop? :D

    7. Re:OS by Jonner · · Score: 1

      You can write any program in PostScript you could write in any other language, assuming all other languages are constrained to Turing machines. Probably most currently are.

      I read an article recently that pointed out that the Turing machine wasn't intended to be a universal computer, able to solve all computable problems. Turing described a couple of other machine models which were intended to be more general than the one which currently bears his name. He only described them in very general terms, so most people have forgotten about them.

      After Turing was dead, some computer scientists decided that the one model he had described in detail was sufficient for everything, though he and some of his contemporaries had been convinced otherwise.

  11. Much cooler PS hack by ocelotbob · · Score: 5, Informative

    PS-HTTPD - a webserver in PostScript.

    --

    Marxism is the opiate of dumbasses

  12. And I thought it meant... by Chicane-UK · · Score: 3, Funny

    ..THIS game of life.. I couldn't quite understand out how that was going to work as it got spewed out of a printer :)

    --
    "Hey! Unless this is a nude love-in, get the hell off my property!!"
  13. Making use of this... by Zrealm · · Score: 1

    I'm surprised noone has tried to make better use of this (Game of Life is nice and all, but not exactly useful...)

    Wouldn't it be possible to use this to allow a printer to directly process form information into something printable?

    1. Re:Making use of this... by jericho4.0 · · Score: 1

      Well, since this is PostScript we're talking about, lots of more usefull things have already been done, hence the need for something useless.

      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
  14. So why is this a good thing? by zutroy · · Score: 1

    I'm still a little unsure as to why we should use a scripting language to print. In my untrained, extremely naive opinion, printers should be sent the data that they are expected to print.

    Shouldn't the actual processing of data be solely handled by the computer? I mean, this article clearly says that it can tie up the printer for a long time if you actually try this.

    1. Re:So why is this a good thing? by moertle · · Score: 1

      i'm not the PS expert, but wouldn't that allow for some device independence? i wouldn't want web pages coming in as bitmaps (although i've seen some that do...)

      --
      I hold a patent on sigs...
    2. Re:So why is this a good thing? by WolfWithoutAClause · · Score: 4, Informative
      It's not exactly a scripting language. It's actually a very close cousin of 'forth'. It runs quite quickly, and doesn't particularly excel at text processing, which most scripting languages do.

      As other people have pointed out, it's useful to have a fairly powerful language in a printer since it allows the printer to adapt the printed stuff to the paper size and so forth (no pun intended).

      Another language that is very closely related is pdf; as I understand it, it's pretty much postscript with a few cludges on the side to make it run faster.

      --

      -WolfWithoutAClause

      "Gravity is only a theory, not a fact!"
    3. Re:So why is this a good thing? by vrassoc · · Score: 1

      Game of Life can tie up a computer for a long time too.

      PS is way of standardising printers. All PS printers understand and can process PS. That means you can write programs that will print to any PS printer which was a big thing before Windows and OS-level printer drivers came along.

      Before Windows each program had to have its own drivers for different printer makes and models ...but many if not most programs could print to a PS printer.

    4. Re:So why is this a good thing? by bcrowell · · Score: 1
      It isn't a good thing. Basically, it was a mistake to make it a Turing-complete language. That's why when Adobe created PDF, they made it Turing-incomplete. The real problem with a Turing-complete language is that it's extremely difficult to do any type of automatic manipulation on it.

      It's funny how many people in the Unix world seem to have this thing against PDF, and keep insisting that PS is better. PDF is better, because:

      • It's Turing-incomplete.
      • It's device-independent. (The P in PDF is for "portable.")
      • PDF is typically an order of magnitude more compact than PS.
      Many people are also under the impression that PDF is patent encumbered, or that you need proprietary software to make PDF, which just isn't true.
    5. Re:So why is this a good thing? by Matthias+Wiesmann · · Score: 4, Informative
      Shouldn't the actual processing of data be solely handled by the computer? I mean, this article clearly says that it can tie up the printer for a long time if you actually try this.
      The main advantage of postscript is that it is versatile. Of course coding games or fractals is extreme, but there are many other uses:
      • You can send the graphical data in a very compact form, vectors and compressed bitmaps (the Apple drivers could compress bitmaps in JPEG and would transmit a JPEG decompresser postscript program).
      • You can transmit your own data format. Instead of transforming your data into "real" postscript, you send a set of postscript procedures that reproduce the behaviour of your graphic language. This was actually one of the primary requirements of postscript, something that could handle quickdraw (Apple's graphic language pre OS-X) reasonably well. DVI2PS does a similar trick.
      • You can factorise out common data. For instance you could transmit a form once, and then only send the data to fill out multiple versions of the form.
      • Pre-loading - you can upload common fonts to the printer, this saves you the time of including them in all jobs. Some high-end postscript printer even have hard drives to store those fonts.
      • Precision handling - instead of calculating word justification on the computer, you send a procedure to calculate word positioning to the printer, this ensures that justification is done using the printer's font metrics and knowing the printer's resolution.
      • Special handling and configuration. Special printer configuraton can be handled using postscript. For instance on certain printers, the user has to enter a PIN to trigger output. This is very usefull for sending sensitive documents to shared printers.
      • On the fly reconfiguration - for instance you can reprogram the printer to do 2-up or 4-up printing quite easily.
      This design made a lot of sense when postscript printers started, bandwidth to the printer was bad (serial, parrallel or localtalk) and processing power on the machines was low - in fact it was common to have a laserwriter II (68020) attached to a classic 9' macintosh (68000).

      Even nowadays this design makes sense for network attached shared printers - this ensures that page composition is not tied to the client machines. Also you have to realise the bitmap of printing page is quite large: an uncompressed A4 page 300 DPI black/white bitmap is around 15MB. Today's laser printer support 2400 DPI, that means nearly a Gigabyte per page.

    6. Re:So why is this a good thing? by croddy · · Score: 1
      I really hated PDFs until I got off windows/acroread and started using xpdf. why is it 8.6MB?? xpdf source tarball is <500k. PDF addicts tend to forget that most people still do use modems to connect to the internet. 5000 word document? 1-2MB.

      PDF is useful for packaging a paginated series of scanned images. that's about it.

    7. Re:So why is this a good thing? by Jonathan · · Score: 1

      PDF is useful for packaging a paginated series of scanned images. that's about it.

      Well, it's more than that -- for example, practically every scientific journal these days distributes the papers as PDF files, not because they are scanned, but because HTML still has a long ways to go in representing equations and figures (including links to non-scalable bitmaps hardly counts).

    8. Re:So why is this a good thing? by rkww · · Score: 1

      The main good thing is that PostScript drawings/documents are scalable. The printer itself handles the rendering of vector graphics into a bitmap, taking into account the printer's resolution and colour capability. Of course there's no reason why the computer couldn't do the rendering itself (assuming it knows the properties of the target printer), but at higher resolutions the bitmaps can be pretty damned big, so it makes a lot more sense just to send the vectors. (300dpi counted as a high resolution in the early 80's when computers were slow and memory was expensive.) But once you've designed a document format which has 'moveto', 'lineto', 'scale' and 'transform' primitives it's only a small step on the slippery slope to include 'add' and 'sub'. Then some way of producing error messages would be nice, and on it goes. Soon it makes more sense just to make a general purpose language (with added graphics primitives.) The main strength of PostScript as a general purpose programming language is that there's no great distinction between programs and data; in writing a PostScript program you are effectively creating an executable data structure. This can be pretty powerful. It's main weaknesses are its poor string handling (which is a bit ironic) and the fact that it can be a bugger to debug.

    9. Re:So why is this a good thing? by bgspence · · Score: 1

      PostScript is not executed by the program creating the image. It is executed by the printer when a PostScript file is printed. A PostScript file may be created which can be printed many times on many different printers in many different contexts, all long after the creating program has quit.

      Many years ago, I used PostScript procedures embedded within Macintosh PICT images to perform experiments on the printer before drawing the image to test for various known printer bugs. The image would be smart enough to render itself correctly in spite of these problems. This could only be done at print time by the image which might have been pasted into a Word document or Excel spreadsheet. Try that with a static image!

    10. Re:So why is this a good thing? by bcrowell · · Score: 1
      PDF addicts tend to forget that most people still do use modems to connect to the internet. 5000 word document? 1-2MB.
      It's possible to make PDF very compact. It's just like HTML --- some web pages load fast, but others were designed without any consideration for us modem users. With PDF, most people embed their fonts, but if you want to make a compact PDF, you just have to pick your fonts from a certain standard set that's always guaranteed to be available on the client machine. As an example, here is some software I wrote. The documentation is a pdf file. It's only 88k, and I think it's quite a bit more than 5000 words.

      I really hated PDFs until I got off windows/acroread and started using xpdf. why is it 8.6MB?? xpdf source tarball is <500k.
      You're comparing a statically linked binary with one that uses shared libraries.

    11. Re:So why is this a good thing? by croddy · · Score: 1

      damn, caught me.

    12. Re:So why is this a good thing? by ncc74656 · · Score: 1
      You can transmit your own data format. Instead of transforming your data into "real" postscript, you send a set of postscript procedures that reproduce the behaviour of your graphic language. This was actually one of the primary requirements of postscript, something that could handle quickdraw (Apple's graphic language pre OS-X) reasonably well. DVI2PS does a similar trick.

      Apple also wrote an Imagewriter emulator in PostScript...the intended purpose was to enable 8-bit Apple II software to print to LaserWriters. Imagewriter support was fairly widespread, but PostScript support was nowhere near as common (only program I ever used that generated PostScript was PublishIt!). (The IIGS and its OS were new enough that a native PostScript driver was provided.) I would guess that you could code some PostScript to handle other types of dot-matrix output, but IWEM is the only one I know of that was put to any widespread use.

      Also you have to realise the bitmap of printing page is quite large: an uncompressed A4 page 300 DPI black/white bitmap is around 15MB

      A4 must be a huge page size if a 300-dpi bitmap takes 15 megs. A standard letter-size page (8.5x11") needs barely more than 1 meg at 300 dpi, 1 bpp.

      --
      20 January 2017: the End of an Error.
    13. Re:So why is this a good thing? by LinuxHam · · Score: 1

      I've started to enjoy PDFs recently for a couple of reasons..

      a) its better for handing off documentation to customers in an unmodifiable form, especially project plans

      b) its MUCH better for handing off documentation when you use document linking and dynamic charts since you don't have to hand over all of the linked documents, and the raw data behind the charts if you don't want to

      c) you can freeze-dry your dynamic documentation at various checkpoints

      d) I also use it to print web receipts to files (eBay payments, etc)

      --
      Intelligent Life on Earth
    14. Re:So why is this a good thing? by 42forty-two42 · · Score: 1

      I went and got the total size of my xpdf binary and all linked-in libraries: 6078804 bytes. Not much less, but it's shared, so most dosen't count as much.

    15. Re:So why is this a good thing? by Slack3r78 · · Score: 1

      Except I'm pretty sure you're going to be sending more than one bit per pixel. Last time I checked, you could print more than pure black and white with postscript - meaning to print even simple grayscale, you're gonna be be using at least 8bpp. When most people say B&W, they really mean grayscale, and I'm sure the bitmap would contain much more than pure grayscale information anyway.

    16. Re:So why is this a good thing? by Anonymous Coward · · Score: 2, Interesting

      The most valuable difference between PDF and Postcript is that page breaks are set in stone in PDF, which is not the case in PS. Thus, if you save your work in PS, it is possible sometimes to get a tiny amount of stuff hanging off onto the last page by itself due to subtle metrics differences between printer fonts and screen fonts, roundoff errors, etc. PDF prevents this.

    17. Re:So why is this a good thing? by Thurn+und+Taxis · · Score: 1

      When my graduate advisor was working on his PhD thesis, he was doing a lot of numerical simulations, and the best way to display the output was as a plot. Coincidentally, the fastest floating-point processor he had available at the time was in Apple's new LaserWriter (this was in the late '80s). So he did most of his simulations directly on the printer, often tying it up for days at a time processing his page. He was really pissed when one of the profs power-cycled it because his print job wasn't coming out fast enough!

      --
      On stereophonic equipment, the monaural sound obtained through multiple channels will enhance your listening pleasure.
    18. Re:So why is this a good thing? by ncc74656 · · Score: 1
      Except I'm pretty sure you're going to be sending more than one bit per pixel. Last time I checked, you could print more than pure black and white with postscript

      The printer can't do more than 1 bpp, though...for a given pixel, either it puts down ink/toner or it doesn't (unless you're talking about dye-sublimation printers). That's why you can get good results printing photos at 100-150 dpi. The rasterizer will convert continuous-tone images to halftone images...that's part of its job description. The chunk of memory that holds the printed pattern needs only 1 bpp for monochrome printing. Even if you're doing color printing, it'll need only 1 bpp for each of the 3, 4, or 6 colors that it can put on the paper.

      --
      20 January 2017: the End of an Error.
    19. Re:So why is this a good thing? by PaulBu · · Score: 1

      I've started to enjoy PDFs recently for a couple of reasons..

      a) its better for handing off documentation to customers in an unmodifiable form, especially project plans ...


      If you have customers who can edit a PostScript print-out of your project plan BY HAND ---

      LUCKY YOU!!! ;-)

      Paul B.

    20. Re:So why is this a good thing? by gunix · · Score: 1

      Well... PDF is only looking good on the screen, there is no corespondance between what you see and what you get on the printer!

      Yes, I've hade a pdf created by a mac user... looking good on the screen, but it was a total crap on paper....

      I like to program in postscript :-)

      --
      Evolution of Language Through The Ages: 6000 BC : ungh, grrf, booga 2000 AD : grep, awk, sed
    21. Re:So why is this a good thing? by Anonymous Coward · · Score: 0

      (only program I ever used that generated PostScript was PublishIt!)

      Nice try. You expect us to believe there was ever a program named PublishIt?

    22. Re:So why is this a good thing? by Matthias+Wiesmann · · Score: 1

      You are right, an A4 page is indeed smaller - this is what happens when you post after midnight :-). It is true that you theretically only need one bit per dot per color, but most laser printers have in fact a resolution enhancing mode, where the printer can not only control whenever a dot is present or absent, but also its size. This implies that you cannot store the dot size information with one bit.

    23. Re:So why is this a good thing? by pyrrho · · Score: 1

      as soon as you start embedding special codes in the text to tell the printer to change fonts, or accept bitmap data, etc. etc. you start on a road that takes you toward wanting something like postscript. You could say, why do that on the printer but I would say, (1) the printer knows more than you about itself, how it really wants to render fonts vs. bitmaps, it physical margins, etc. and will do better job rendering the document than, for example, if you render it on your computer and send a bitmap (2) you should distribute processing when you can.

      Plus it's fun.

      --

      -pyrrho

    24. Re:So why is this a good thing? by Jonner · · Score: 1

      So, how has PDF improved representing equations and figures over Postscript?

    25. Re:So why is this a good thing? by Ignominious+Cow+Herd · · Score: 1

      WRONG! PS has an explicit showpage operator. Nothing can hang off on the next page unless you program it that way. This is not PCL!

      --
      Lump lingered last in line for brains, and the ones she got were sorta rotten and insane.
    26. Re:So why is this a good thing? by Jonathan · · Score: 1

      So, how has PDF improved representing equations and figures over Postscript?

      It hasn't really. Postscript and even DVI would work as well -- my point was that HTML isn't much of a replacement, although some claim it is.

  15. Can't print every iteration by Anonymous Coward · · Score: 2, Informative

    That postscript document has just one page that is never finished -- what you see on the ghostview screen is the first page being drawn, forever. So if you go and send this to a printer, the job never finishes and the printer "hangs" until you cancel the print job on the printer.

    1. Re:Can't print every iteration by Karpe · · Score: 2, Insightful

      Well, imagine the waste of paper it would do if it *did* print every interaction.

      It's not a bug it's a feature!

    2. Re:Can't print every iteration by Anonymous Coward · · Score: 0

      that's because ghostview is horribly broken. it chokes on 70% of the files I give it. try another viewer.

    3. Re:Can't print every iteration by Avakado · · Score: 1

      Well, imagine the waste of paper it would do if it *did* print every interaction.

      It would be similar to printing all the points in a circle. Even if it was possible, it would still be only one paper, but you're right: even that's a waste.

      --
      The world will end in 5 minutes. Please log out.
    4. Re:Can't print every iteration by vadim_t · · Score: 1
      Well, I don't know PostScript, but I see this in the beginning of the source:
      /numgens 1000 def

      And at the end:
      numgens { disp DoGen } repeat

      I suppose this means it does 1000 iterations, so it does end. Although I imagine that means it prints 1000 pages, so it'd still be an awful waste of paper.
    5. Re:Can't print every iteration by 42forty-two42 · · Score: 1

      If you read the webpage, it says it'll only print one. You can replace 'disp' with 'disppage' to print them all.

    6. Re:Can't print every iteration by Anonymous Coward · · Score: 0

      Are you running an old version or something? My experience has been the opposite-- I've run into a few pdfs that Acrobat (on windows 2000) wouldn't read and ghostview displayed them just fine.

      Ghostview does seem to be pretty slow though.

    7. Re:Can't print every iteration by karlm · · Score: 1

      Haha.. nice sig! Is it original? Mind if I steal it?

      --
      Copyright Violation:"theft, piracy"::Anti-Trust Violation:"thermonuclear price terrorism"<-Overly dramatic language.
    8. Re:Can't print every iteration by Avakado · · Score: 1

      It's from Debian's fortune database.

      --
      The world will end in 5 minutes. Please log out.
  16. PostScript Fractals by e271828 · · Score: 4, Informative

    If you like this sort of thing, check out the PostScript Fractals page. You can print out very detailed images from tiny PostScript files.

    1. Re:PostScript Fractals by erl · · Score: 2, Funny

      I wrote a mandelbrot program in postscript once. Tiny, but it took hours for the printer to print it, to the dismay of everyone behind me in the printer queue.

    2. Re:PostScript Fractals by Anonymous Coward · · Score: 0

      I did too... about eight years ago. Unfortunately it's still printing. Infinite resolution pictures are a bitch.

    3. Re:PostScript Fractals by Repton · · Score: 1

      You can also see my page of fractals, which has a few more.

      For those of you who don't know, postscript is a stack-based language, like (apparently) Forth, or like HP RPM calculators. This makes it quite fun to program in :-)

      It is good for drawing fractals (especially ones like the Sierpinski gasket which involve doing the same thing on smaller scales in different places) because of the types of drawing commands it has:

      The basic command is to move the "current point" to some coordinate (x0,y0), and then draw a line (or curve) to another coordinate (x1, y1). But the interesting thing is that you can change the coordinate system: you can move the origin, or stretch the axes (not necessarily by the same amount in each direction), or rotate them.

      So, for instance, you can do Sierpinski by writing a funciton to draw a triangle of one unit side length, then change the scale, move the axes to the appropriate places, and make three recursive calls. Easy...

      --
      Repton.
      They say that only an experienced wizard can do the tengu shuffle.
    4. Re:PostScript Fractals by donweel · · Score: 1

      Forth is a meta language. You can use it to build another language of sorts, thus I am fairly shure that postscript was written in forth, or an extension of forth if you will. That is the joy of programming in forth you can build a new dictonary of words for the end user, the top word being a program. It is really difficult to hide the rpn aspect though.

      --
      Many a long talk since then I have had with the man in the moon; he had my confidence on the voyage. Joshua Slocum
    5. Re:PostScript Fractals by throughthewire · · Score: 1

      I wrote a PostScript program to generate Mandelbrot Set images back in '87, when I was learning the language.

      It was slower than hell (and I'm not a very good coder anyway, so I'm sure it wasn't very efficient) but it was cool, and the software engineers writing the PostScript clone for our company started using it as a speed test for new revisions of code.

      I just thought it was a more interesting project than "Hello World."

      Still have the code around here, somewhere.

  17. Life Shmife... by Anonymous Coward · · Score: 1, Funny

    I'll wait for the Quake port.

    1. Re:Life Shmife... by kurosawdust · · Score: 1

      hmm... 60 frames per second, 22 pages per minute, 500 sheets per ream, 144 pounds per square inch...*calculates* Yep. That would be the most annoying thing known to man.

  18. Go Game in 5 lines of PostScript by _dl_ · · Score: 5, Interesting

    %!PS-Adobe-1.0 EPSF-10. % PS GoBan (c) 1996 by Laurent Demailly
    %%BoundingBox: 0 0 150 150 % *** http://www.demailly.com/~dl/go/ ***
    /D{def} def/d{dup}D/e{exch}D/s{stroke}D/l{lineto}D/M{mul}D /f{fill}D/S{setgray}D
    /R{grestore}D/m{moveto}D/z 9 D/c 15 D/x z c M D/p{42 sub d z mod 1 add e z idiv
    1 add gsave 1 index c M 1 index c M c .5 M 1 0 arc gsave f R .5 S s c M e c M e
    c .3 M 270 360 arc s R}D 0 0 x 2 M 1 0 arc .9 .7 .5 setrgbcolor f s 0 S c c x{d
    c m d x l d c e m x e l}for s(BeJR\\IHP>=6U){p}forall 1 S(?TS[QcGZFOC){p}forall

    1. Re:Go Game in 5 lines of PostScript by Billly+Gates · · Score: 3, Funny
      ????

      Is that a postscript or perl program?

      That is the most obfuscated program I think I have ever seen.

    2. Re:Go Game in 5 lines of PostScript by _dl_ · · Score: 3, Interesting
      That is the most obfuscated program I think I have ever seen.
      Thanks ! I'll take this as a compliment because that was the point then: I created this about 7 years ago for a .signature, it shows that PS is a pretty neat programing language and you can express things very compactly. This progam basically can draw any goban and encodes positions of black and white stones on a single character... (See my outdated Go page for other versions)
    3. Re:Go Game in 5 lines of PostScript by Billly+Gates · · Score: 1
      Sorry dude. I did not know you wrote it. Otherwise I would not of said anything. :-)

      But hey it requires talent and patiences to learn alot of one liners. Something I do not have and probably would of given up on. I am sure its possible to write it with 5x the code but I am sure that was not the point of your program. Actually I did see something more obfuscated. It was an equilivant of decss in perl. It was about 5 lines that looked like random ascii characters.

    4. Re:Go Game in 5 lines of PostScript by Maimun · · Score: 1

      and it is sensitive to whitespaces!
      I downloaded it and ran gv on it -- the image
      was OK. Afterwards I edited the source,
      adding *nothing* but newlines, to make it
      "more readable". gv produced a somewhat
      different picture then. hmm

    5. Re:Go Game in 5 lines of PostScript by Mostly+a+lurker · · Score: 1

      Time was when I would have loved playing with programs like this. I must be getting old, but I guess I'll wait for Microsoft Visual PostScript before getting stuck in!

    6. Re:Go Game in 5 lines of PostScript by Jonner · · Score: 1

      It is supposed to be static right? You can't actually play Go in gv, can you?

    7. Re:Go Game in 5 lines of PostScript by sd1248 · · Score: 1

      Is that a postscript or perl program?

      Here is a program that is both postscript and perl.

  19. PS-HTTPD by SweetAndSourJesus · · Score: 4, Informative

    I've never used it, but you're talking about PS-HTTPD.

    Pretty cool, eh?

    --

    --
    the strongest word is still the word "free"
    1. Re:PS-HTTPD by Anonymous Coward · · Score: 0

      Yes, that is cool. A webserver written in Postscript. When I first saw this link, I didn't notice the trailing "D" so I thought it was an extension to HTTP where you could send a query and get back postscript instead of HTML:

      Client: GET /

      Server: #!ps ...

      I guess that's how PDF already works.

  20. Kolmogorov encoding by __aadkms7016 · · Score: 2, Insightful

    In some contexts, the size of the file sent
    to the printer is an important consideration.
    Coding a page as the shortest computer
    program that can generate the page is "the
    best you can do". Of course, whether or not
    dvips is generating the optimal program is
    another issue entirely.

    1. Re:Kolmogorov encoding by interiot · · Score: 1

      If they were worried about size, why can't you send .ps files to the printer in gzipped form?

    2. Re:Kolmogorov encoding by Anonymous Coward · · Score: 0

      What's cool about postscript is that it's both compact *and* human readable.

    3. Re:Kolmogorov encoding by GiMP · · Score: 1

      Please remember the era of whence postscript originates.

    4. Re:Kolmogorov encoding by interiot · · Score: 1

      Agreed, most definitely. But supporting gzip as a transport mechanism doesn't make it not readable.

    5. Re:Kolmogorov encoding by blakestah · · Score: 1

      If you were around coding postscript about 15 years ago, you would have a good idea that the time to print a file was almost completely dependent on the file size (and size of stack used). The processor in the printers of that time were not so powerful, supporting gzip would probably have taken all their RAM.

      It is for this reason that postscript prologs quite often redefine all common postscript commands into one or two letter equivalents (which also renders the postscript practically illegible).

      We used to spend a lot of time figuring out how to code a figure to make it print fastest. Kinda like we used to spend a lot of time figuring out how to write complex programs that ran in 16K of RAM. Such things are less relevant today. People call you a dinosaur and yell insults at you, like "RAM is cheap - just write it quickly so that it runs."

    6. Re:Kolmogorov encoding by yerricde · · Score: 1

      (context: compressing PostScript to fit in a printer's RAM so that it prints faster)

      [Optimizing a program to run in a tiny memory space is] less relevant today. People call you a dinosaur and yell insults at you, like "RAM is cheap - just write it quickly so that it runs."

      Unless, of course, you're targeting an embedded system such as a handheld game console or PDA, which has no rotating storage. Do PostScript printers have hard drives?

      --
      Will I retire or break 10K?
    7. Re:Kolmogorov encoding by mosch · · Score: 1

      most high-end postscript printers have hard-drives, yes.

    8. Re:Kolmogorov encoding by ncc74656 · · Score: 1
      Unless, of course, you're targeting an embedded system such as a handheld game console or PDA, which has no rotating storage. Do PostScript printers have hard drives?

      You could plug a SCSI hard drive into a LaserWriter; it was used (IIRC) mainly for font storage. Instead of having to send all of the fonts across the network (which at LocalTalk's 230.4 kbps could be slow), all of the fonts an office used regularly could be dumped onto the hard drive and retrieved by the printer as needed.

      --
      20 January 2017: the End of an Error.
    9. Re:Kolmogorov encoding by yerricde · · Score: 1

      I understand that many printers, especially at the high end, have hard drives to store fonts. But do their operating systems allow for using the HD as swap space? If not, then optimizing documents to fit in RAM is still valid.

      --
      Will I retire or break 10K?
  21. Ray Tracer by CaseyB · · Score: 4, Interesting

    How about a PostScript ray tracer?

  22. PDF non-programmable? by nuttyprofessor · · Score: 1

    I have in a few cases wrote small PS programs
    so my "program generated" figures would look
    good in a paper. I have not been able to determine
    I am can duplicate this task in PDF (w/out first
    creating a PS file). Is it possible?

    1. Re:PDF non-programmable? by Mooncaller · · Score: 1

      If I remember correctly, PDF is compressed EPS. EPS is Encapsulated Postscript.

    2. Re:PDF non-programmable? by Anonymous Coward · · Score: 0

      PDF is entirely different from postscript. It is not compressed EPS.

    3. Re:PDF non-programmable? by Anonymous Coward · · Score: 0

      So, does anyone know what PDF is?

    4. Re:PDF non-programmable? by nuttyprofessor · · Score: 1

      It's certainly not a text file.
      Is the PDF format proprietary?
      --w

  23. Raytracing in Postscript by Xonea · · Score: 3, Interesting

    Another nice little postscript program can be found here

    It's only about 10 lines long and creates a image with 2 bubbles and even reflections.

    And if someone wants to learn Postscript:
    A first Guide to Postscript

    1. Re:Raytracing in Postscript by mnemonic_ · · Score: 1

      I just checked that out with GhostScript and GSview. That is damned impressive.

    2. Re:Raytracing in Postscript by jbarlow · · Score: 1

      Like mnemonic said, that is damned impressive.

      I've kind of gotten used to having the time needed to Distill PostScript files be a fairly standard relation to the size of said PostScript file, and then the PDF is smaller by an amount depending on the amount of text vs. images.

      This file totally blows that thoery out of the water. Of course, there are other fractal ps files somewhere in this thread that get bigger, but this file was so small for the end result that I just had to comment...

    3. Re:Raytracing in Postscript by Anonymous Coward · · Score: 0

      That earned the 1st prize for 'Best Obfuscated Artwork' in Obfuscated PostScript Contest 1993. Shorter version is here.

  24. Almost - was called "DisplayPostScript" by DrSkwid · · Score: 1

    and client workstations booted from a CD ROM & had no hard disk

    those guys knew their eggs but Windows had the muscle

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  25. stupid postscript tricks by Anonymous Coward · · Score: 5, Funny
    My own personal contribution to the world of stupid postscript tricks wasn't nearly as productive as this one. But I promise you it was funnier!

    I wrote a program that substitutes occurances of one string with another one. You send it to the printer than laugh as everyone else's pages mysteriously have the word "this" replaced with "that". One time I loaded it on just before a friend printed his source code. He couldn't figure out for the life of him where his semicolons had gone! Ah... youth.

    The best part is, the code stays resident until the printer is power cycled. This enables slightly more sinster uses for this sort of thing. One of my professors used to joke about using as program like this to change the numbers on his paycheck when it was being printed!

    The code is still on my website near the bottom. It's called PSReplace.

    1. Re:stupid postscript tricks by unborn · · Score: 2, Funny

      This is interesting.

      Now, however, everybody will know Duane Bailey has forged his/her own paychecks.

    2. Re:stupid postscript tricks by Anonymous Coward · · Score: 0

      so that was the virus the USA sent to iraq in a printer!

    3. Re:stupid postscript tricks by Unregistered · · Score: 1

      Sweet. How do you send a postscript program to a printer under win32. I want to use this at school.

    4. Re:stupid postscript tricks by MattCohn.com · · Score: 2, Funny

      Ditto. I'm replacing 'Sincerely,' with 'Sexyfully Yours,'

    5. Re:stupid postscript tricks by BigDish · · Score: 2, Informative

      This is made for Xerox printers, but I've used it with other brands:
      ftp://ftp.tekcolor.com/ftp_dir/ALL/W9NT2000/NA/Fil e Downloader Utility.exe

    6. Re:stupid postscript tricks by Anonymous Coward · · Score: 0

      Please for the love of god, make it say:

      "Sexually yours,

      Woodrow"

    7. Re:stupid postscript tricks by Kuutti · · Score: 1

      I'm not sure about this. You should be able to use lpr, at least I have it in my Win2000 machine at work. Syntax is something like
      lpr -S printer_name -P virtual_printer file
      But the printer is xerox ps printer, no idea about PLCs..

    8. Re:stupid postscript tricks by Anonymous Coward · · Score: 0

      I would think that any printer that's not a PS printer, he wouldn't be wanting to send PS files to anyways ;)

    9. Re:stupid postscript tricks by Jonner · · Score: 1

      Why? Sexyfully is funnier.

    10. Re:stupid postscript tricks by Jonner · · Score: 0, Flamebait

      It might work to simply put it in notepad, then print. Of course, notepad or windows might add junk and break the syntax.

    11. Re:stupid postscript tricks by Zaiff+Urgulbunger · · Score: 1

      That might explain this... there used to be a monthly magazine for programmers called EXE (might've been UK only?) and one month the entire magazine was printed wihtout any punctuation. The best bit was the covering letter than came with it explaining that this happened, but they didn't know what caused it and that by the time they'd reaslised it had been printed that therefore tough shit (not those exact words you understand, but a rough translation). Funny as hell!

    12. Re:stupid postscript tricks by Ignominious+Cow+Herd · · Score: 1

      Actually that is
      lpr -Shostname (or address) -Pport file

      Typically port is something like lp, PORT1, ANY, TEXT, Print, ... it depends on the printer.

      Also, How lpr works on a printer has nothing to do with the language it prints with.

      --
      Lump lingered last in line for brains, and the ones she got were sorta rotten and insane.
    13. Re:stupid postscript tricks by avij · · Score: 1

      Hmm.. I'm no expert on PS, but could this concept be used for more malicious purposes? How about a program that stays resident like yours, and when an interesting page is printed (say, the word "password" occurs on the page), it'd store the page or the interesting parts of it in memory for later reprinting. The reprinting would be done by printing a special "flush" page at a convenient time. Could someone fluent in PostScript please enlighten us?

      --

      Follow your Euro bills at EBT
  26. don't exaggerate by Baki · · Score: 3, Informative

    It is a programming language (stack based, like forth), which is amazing for its primary purpose: printing.

    But to call the language itself "extremely powerful" is an exaggeration. As a programming language it is quite primitive and incomprehensible, compared to more powerful languages such as C++, java, ML, yes even forth.

    1. Re:don't exaggerate by dysprosia · · Score: 2, Insightful

      That's your opinion of it. Any new programming language looks "incomprehensible" once you begin to learn it, and once you've got the hang of the nuances of the language it becomes clearer.
      Calling PostScript "primitive" is a joke as well. Learn about the language. Read the PS Language Reference. Look at some of its more complex features.

    2. Re:don't exaggerate by ncc74656 · · Score: 1
      As a programming language [PostScript] is quite primitive and incomprehensible

      Really? It's fairly easy to test a printer by banging out a line or two...

      echo '/Times-Roman findfont 72 scalefont setfont 1 72 mul 9 72 mul moveto (This is a test) show showpage' >/dev/lp0

      I wouldn't call that incomprehensible. It loads 72-point Times Roman, moves to a point 1" to the right and 9" from the bottom, renders "This is a test", and tells the rendering device to print (or otherwise finalize) the page.

      PostScript as a general-purpose language isn't even all that new a concept...Don Lancaster has been doing that for years, starting with an Apple IIe connected to a LaserWriter and moving up from there.

      --
      20 January 2017: the End of an Error.
    3. Re:don't exaggerate by Anonymous Coward · · Score: 0

      Get on with the times. Humankind has progressed (or rather, regressed) to the point where a programming language is comprehensible exactly when its syntax is a variation of C. Remember: C++ is straightforward and Ada is a horrible mess.

    4. Re:don't exaggerate by dysprosia · · Score: 1

      The sad thing is, I don't know if you're being sarcastic or not.

    5. Re:don't exaggerate by Anonymous Coward · · Score: 0

      even forth!

      you villian... especially... ESPECIALLY FORTH

      - Forth Troll

  27. Re: Easy by Billly+Gates · · Score: 1, Funny
    First designate 3 or more variables will we call buffers to represent poles to hold stacks of data. Then declare some double scripted arrays we will call discs. The number in the array will determine the size of the disc.

    Now write a towers of hanio program utilizing the n-1 algorithm.

    Using the 3 or more poles you created to move all the discs from smallest to largest from pole1 to polex (x being the greatest number or the opposite pole). Use the second pole as a temporary holding area.

  28. Please forgive me by mabu · · Score: 3, Funny

    Ok, I am finally prompted to write this... please forgive me but I feel compelled to comment.

    There are two other times when I came to the realization that the tech community was sometimes way lost beyond the boundaries of practicality in addition to this latest thing. Once upon touring MIT and seeing the amazing amount of intellect dedicated towards uber mundane pursuits such as remotely identifying the inventory of a coke machine, and another situation at Siggraph seeing tens of millions of dollars wasted on research projects that had a snowball's chance in hell of developing practical applications for the findings.

    Now I can appreciate the pursuit of a tech solution to something that's of interest, and I understand that things like Star Wars in ASCII are projects borne of love, but at the same time, I wonder, do tech people every try to achieve both in the same breath? Yes, you can add an ant farm to your PC case. But if you ever wonder why the mainstream looks at tech types as total weirdos, it's because they love to use as an example, these weird manifestations of our ability, when we all know, these are more the exception than the rule. Or are they?

    So my question is, aside from the arguments where someone draws a reasoned path explaining how a tennis shoe with voice recognition will change society, is anyone concerned about the image of the tech community and finding more realistic ways to demonstrate the creativity and resourcefulness of nerds?

    1. Re:Please forgive me by JoeBuck · · Score: 1

      Who gives a shit what people will think? If something turns you on and it doesn't hurt anyone, by all means do it. If it's a time-waster, so is watching TV.

      On the other hand, as someone already pointed out, this is really old news. When Postscript was new, people were doing tons of these things (cute Postscript hacks).

    2. Re:Please forgive me by timmyf2371 · · Score: 1
      OT, but bear with me.

      is anyone concerned about the image of the tech community and finding more realistic ways to demonstrate the creativity and resourcefulness of nerds?

      I can only speak for myself in this respect, but no. Why would I be bothered about how the mainstream view the "tech community" - if we all started worrying about how others see us, would the world be a better place? Would it be fun, being drones dedicated to furthering what you, or some other person, see as worthwhile projects?

      explaining how a tennis shoe with voice recognition will change society

      I personally don't see a tennis shoe with voice recognition changing society, however, what nerds/geeks/whatever you want to call them do is create something/code something which they like, which amuses them, with pleases them.

      My question to you is, why should we care about how the "mainstream" views us?

      Tim

      --

      Backup not found: (A)bort (R)etry (P)anic
    3. Re:Please forgive me by pohl · · Score: 4, Insightful

      ...is anyone concerned about the image of the tech community and finding more realistic ways to demonstrate the creativity and resourcefulness of nerds?

      I once spent a day with a guitarist of immense talent. He spent countless hours with his instrument, but not making music...it was all just pointless scales, arpeggios, chord progressions around the cycle of fifths...not one bit of actual music did he perform. Sure, it was amazing to watch, but I couldn't understand why he was wasting his immense muscial intellect with such mundane exercises.

      I wonder where he got the talent. Must have been a gift from god. It surely couldn't be that tireless practice of one's art leads to mastery, and that anything that helps one make practice fun aids in one's journey towards eminence in one's field...nope, no way.

      --

      The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...

    4. Re:Please forgive me by mabu · · Score: 1

      My question to you is, why should we care about how the "mainstream" views us?

      That's a good question. Normally I'd be right with you and say screw the mainstream.

      But who here really feels that the mainstream's idea of innovation and efficiency is even remotely accurate? How many people get frustrated when they see some marketing guy take a great idea and pervert it into something that is sad? Hasn't the tech community's indifference contributed to this problem? Yea, playing the game is demoralizing, but would it be that bad to play along more often in order to get the power to promote more superior ideals in this industry?

      This probably touches upon a larger philosophical issue over whether there is some responsibility to develop and deploy technology in a productive manner, but do we really want to hold up as icons in our community, a guy who can light a barbecue pit with LOX, or turn a Macintosh into a bong?

    5. Re:Please forgive me by Openadvocate · · Score: 1

      Oh it's just what makes it fun to do what you do. I prefer to work in a place where people like what they are doing and show great interest in their profession. And it is the little fun projects that takes you in places the "real" projects does not, that you learn even more and can afford to fail. Even if the little spare time project failed you will have gained knowledge in the process that can be used in the real projects. I have worked in different places and I will always prefer to work in a place where people show a real interest in the things they do. The working day is more fun, rewarding interresting and again you learn a lot.

      --
      my sig
    6. Re:Please forgive me by Anonymous Coward · · Score: 0

      I am told this is why we have project managers.

    7. Re:Please forgive me by feepness · · Score: 1

      Yes, you can add an ant farm to your PC case.

      Oooo! An ant farm! What a great idea! Hmmm, I'll need ants, a bigger case, it's gotta be backlit of course. Now... what were you saying? Oh never mind.

    8. Re:Please forgive me by Anonymous Coward · · Score: 0

      Don't worry too much about it. We have the spare cycles.

    9. Re:Please forgive me by Anonymous Coward · · Score: 0

      ...because, often the boundaries of knowledge are defined as much by what is known as by what is definitely wrong.

      And don't forget, some of the bizarre stuff you talk about is as much marketroid-driven (talking shoe) as it is technogeek masturba...ur, playing around.

      And, there are many things now that we take for granted that are either accidental discoveries (Lexan comes to my mind, but there are so many others) or new uses for thrown away "junk" or "frivolous" science (math rediscovered used to develop software to develop stealth fighters and bombers, Napier-Stokes equations, etc).

      Get over it. That's why it's called Research.

  29. Re: Easy by Anonymous Coward · · Score: 0

    AAARRGGG

    EVIL!

    Please your giving me nightmares.

  30. No why? by Anonymous Coward · · Score: 2, Interesting

    I can't believe that tons of people asked why someone would write an HTML browser in Java, but hardly anyone asked why someone would do this?

    Are you guys living in the real world? :)

    1. Re:No why? by Anonymous Coward · · Score: 1, Insightful

      I think it's just the nature of slashdot. Anything that might be of use to regular people is immediately maligned (and this includes companies trying to...GASP...make money by providing information), and anything that's completely useless gets praised.

    2. Re:No why? by Anonymous Coward · · Score: 0

      you'd need a beowulf cluster of ... something ... to run a web browser written in java. java is a worthless joke, a play-pretend half attempt at platform independence. there is no such thing as a java binary. java is not compiled. it is an interpreted language that runs specially compressed source code. there is no virtual machine. JRE is a glorified GWBASIC platform. java is the worst thing to happen to programming in ages.

    3. Re:No why? by Balise42 · · Score: 0

      Well...
      My dad used to tell he was playing Game of Life without a screen ('cos he had none)... printing each iteration.
      OK, it was > 20 years ago....

    4. Re:No why? by Anonymous Coward · · Score: 0

      Upgrade your 8088 and Java runs very well... It might not be as fast as tuned assembly language, but it is much easier to program.

      If you get a computer that is capable of running a newer operating system (unlike the DOS GWBASIC system you currently have), you'll see that Java is a very competitive. I bet it's even faster than postscript! :)

    5. Re:No why? by UserGoogol · · Score: 1
      A Java HTML browser looks like it was created for some sort of real application, whereas the PostScript Game of Life was just for ones own amusment. As an amusement, the Game of Life succeeded. However, the browser appears that it is written with a practical point in mind, and that is how it should be judged.

      If someone wanted to create a web browser as a Java Applet to amuse themselves, it would be cool. Hey, it's recursion! Heh. But if someone created a web browser as a Java Applet because they thought it would be useful, it would be severely retarded.

      (The applet example was chosen because I think it would be very very amusing. Running Mozilla in an applet in Mozilla in an applet in Mozilla in an applet in Mozilla in an applet in Mozilla in an applet in Mozilla in an applet in Mozilla in an applet in Mozilla in an applet in Mozilla in an applet in Mozilla in an applet in Mozilla in an applet in Mozilla... Ahh.)

      --
      "Never attribute to malice that which can be adequately explained by stupidity." -- Hanlon's Razor
  31. That's nothing .... by jreynold · · Score: 3, Interesting

    That's nothing! In college, my compiler writing course was changed (to help "discourage ``re-use'' of previous years students' code") to writing a C compiler which used *PostScript* as its target language instead of XYZ machine code for PDQ processor.

    We took the output of our compiler and "ran" it with ghostscript. It was actually quite fun. One of the harder parts was writing a suitable "libc" to "link" in for basic stdio.

    1. Re:That's nothing .... by C.+Mattix · · Score: 1

      Yep. Purdue compilers course when I was there used PS as the target platform and we used the Dragon book as our text.

  32. So why is this a good thing?-Wincentric. by Anonymous Coward · · Score: 0

    "Shouldn't the actual processing of data be solely handled by the computer? I mean, this article clearly says that it can tie up the printer for a long time if you actually try this."

    Isn't this the same kind of thinking that brought us the Winmodem and Winprinter? Hey! Anyone want to buy a WinGraphics card?

  33. Handcrafting PS by Koldefdder · · Score: 1

    I remember writing my thesis back in early 90's. To ensure top fidelity in graphs and drawing, I hand crafted all illustrations in postscript. I got to know ps in depth :-)

    1. Re:Handcrafting PS by spaceyhackerlady · · Score: 1
      I remember writing my thesis back in early 90's. To ensure top fidelity in graphs and drawing, I hand crafted all illustrations in postscript. I got to know ps in depth :-)

      I did much the same with a magazine article I wrote a while back, because I was too cheap to use a "real" drawing program.

      Speaking of stupid PostScript tricks, in a past life at a company that did prepress software and printing hardware (lots of PostScript - 500 MB was nothing) I amused myself by coding the Towers of Hanoi in PostScript, as a demonstration of what PostScipt could do. Even if I had to draw pictures of the stack by hand to get the parameters to the roll operator right at each new recursion.

      ...laura

    2. Re:Handcrafting PS by Anonymous Coward · · Score: 0
      AAARRGGG!

      Evil! No.

      Please do not give me nightmares. (mumbles to myself its ok I am not a cs major anymore) (shudder ).

  34. guy is in high school.. by intelligent+poster · · Score: 1

    not bad for a 16? 17? year old sophmore at high school. Quite impressive.

  35. Re: Sending each iteration to the printer by matt_beall · · Score: 3, Funny

    Woohoo! Now I can have that flip book story of evolution I've always wanted!

  36. Other way around by Ed+Avis · · Score: 1

    Most people know that Postscript is Turing-complete, but I think the game of Life is too. So for a _real_ challenge you could implement a Postscript interpreter in Life (provided you find some way to encode the input and some way to do 'showpage').

    Actually, I don't know of any working Turing machine or lambda-calculus implementations in Life, but I believe it is thought possible.

    --
    -- Ed Avis ed@membled.com
    1. Re:Other way around by Anonymous Coward · · Score: 1, Informative

      Here is a Turing Machine implemented in the game of life.

    2. Re:Other way around by Ed+Avis · · Score: 1

      Neat. Although the picture is apparently of one particular TM and not a universal TM (though the site claims this is possible).

      --
      -- Ed Avis ed@membled.com
  37. Easy to view postscript files by mnemonic_ · · Score: 4, Informative

    Install Ghostscript first, then use GSView to open the .ps files.

    1. Re:Easy to view postscript files by rkww · · Score: 1

      Or take a look at http://www.rops.org -- Roger

  38. Xerox, Copiers with SmallTalk via GhostScript by jerryasher · · Score: 4, Interesting


    By the mid-90s, Xerox had written what was basically a SmallTalk interpreter using GhostScript. It was called DocuScript.

    With that, Xerox wrote all sorts of applications for hallway copiers, including web browsers, hang-man games, and image processing/manipulation applications.

    Take a piece of paper with an image you want to copy. Circle the image. Scan it. Take a piece of paper that you want the image on. Mark where the image goes. Scan the paper. Output: new piece of paper with the image from the first on it and the other elements from the second piece.

    Ooops, you dropped 200 pages of a paper on the floor, and you have gathered it up in the wrong order. Circle the page number on the first page of the paper. Scan the entire paper in. Output: your paper now resorted according page number.

    Go to a hospital and triage yourself by taking a printed image of the human body and circling on the image where you hurt and scanning it in to the hallway copier.

    Take your 100 page paper and scan it into the hallway copier. Get a one page token in return (containing, basically, an encoded URL) Fly across country to a conference holding only that one page token. At the conference scan in your token. Output your 100 page paper.

    And then, being Xerox, they found they couldn't/wouldn't/didn't want to sell it. Talk about the Game of Life!

    1. Re:Xerox, Copiers with SmallTalk via GhostScript by listen · · Score: 1

      Erm, the URL isn't really about what you describe, is it?

    2. Re:Xerox, Copiers with SmallTalk via GhostScript by jerryasher · · Score: 2, Interesting

      Yes and no. I was a bit lazy with that. The URL is apparently the only piece of it easily available through google these days.

      DataGlyphs were the key behind the implementation of many of the features I described.

      For instance if you scanned your 100 page paper in, and got a token back, but what that token was was the URL printed out in nice easily read text as well as easily machine read dataglyphs.

      The hangman game printed out looking like a hangman game complete with head, noose, whatever, but there were also identifying dataglyphs to help the machine recognize this was a hangman game, and which particular hangman game it was.

      There used to be more, including a FLASH presentation, but I can't easily find that through google now.

    3. Re:Xerox, Copiers with SmallTalk via GhostScript by leighklotz · · Score: 4, Interesting

      >And then, being Xerox, they found they couldn't/wouldn't/didn't want to sell it.

      Actually, Xerox did sell it, in Japan, as the DocuStation IM 200. When Java came out, we and otehrs worked with Sun to add the image processing features that were necessary (which became java2d) it was re-written in Java and sold again as FlowPort, and is still sold.

      At the time the choice was made, we were examining Scheme, but felt a lot of resistance from the industrial engineering community we were targeting. So, although I helped develop 6.001 and the book "Structure and Interpretation of Computer Programs" that introduced Scheme, we abandoned that approach and looked for a language that would be more palatable to the printer and copier engineers. The system was written in PostScript because it was an interpreted language that was capable of running inside hardware such as copies, scanners, and printers. There were hired industry pundits who had suggested that we use Visual Basic, but that was even harder to fit into a copier in 1991, so PostScript it was.

      Just as we were making the decision, I saw on alt.sources a new small object-oriented language announced and tried it out, but it had absolutely no class libraries, and no tools, and nobody had hever heard about it before (some guy named Guido) so we passed up on Python...

      The goal was to make paper be the universal access portal to information, and to piggyback on images as the universal information transfer medium. We did hyperlinks on paper, used dialup modems for transferring information, etc. Basically it was the web and web forms on paper. Now the focus is on capturing paper documents and their metadata and making them first-class citizens in the office network.

      The DocuScript language was actually much more like Java than like Smalltalk. It did have an object-oriented database, which Java lacks, but consider the following:

      • Much of the PostScript code was written in PdB, a C++-like language compiled to PostScript. PdB was written at The Turing Institute by Arthur van Hoff, who later went on to write the first Java compiler, with a remarkably similar syntax. So, the system was written in a precursor to Java with GS as the virtual machine.
      • Herb Jellinek worked on the "configurable desktop universal browser" part of the project at PARC. He left and went to Sun to work on Oak and in the meantime, WWW happened and became the protocol for the "universal browser", and he wrote HotJava, which was the web browser that kicked off the Java revolution.
      • The Paper User Interface forms were all done as small PostScript programs that, depending on which set of definitions was loaded into the environment, either rendered a printable image to the image buffer, or read the scanned image from the image buffer and read the checkboxes. The layout decisions were all done with PostScript routines.

        So, in that sense, the layout was like LaTex, where the formatting commands are actually short programs or macros that bottom out into an implementation of primitive operations. After the product was launched, Larry Masinter of PARC convinced me that the LaTex-programmmatic approach was wrong, and that we needed to use a static description language, a path I had resisted because there were no good ones. But in the interim, again WWW had hit, and HTML seemed good. We did a Paper User Interface version of the WWW (now going full circle from our original idea of paper access to information to paper being a proexy for access to information via the WWW) and we made a tool to print Paper UI on any web page.

        Initially we did this as well in PostScript, but found that we needed something faster for the HTML parsing and layout, so we got a company called Universal Access to do that for us. They had a tool they were developing, and they prototyped it for us, and their other customer was a company called Unwired Planet that wanted to make a transcoder to convert HT

    4. Re:Xerox, Copiers with SmallTalk via GhostScript by jerryasher · · Score: 1

      And now you know, the rest of the story. (jebus I usually hate that phrase.)

      Thanks Leigh, it's good to hear what happened to that.

    5. Re:Xerox, Copiers with SmallTalk via GhostScript by spitzak · · Score: 1

      I remember PdB at Sun to program NeWS. You wrote something vaguly resembling C and it would convert it into the shortest possible sequence of pop,exch,roll,dup commands so it was all executed on the PostScript stack. Without that it was impossible to write anything more complex than a+b without using named temporary variables. We were told not to use it (apparently some worry about the open-source license which was probably the phb's being confused and scared) and I ended up rewriting the output to disguise it as hand-written postscript.

  39. Pi in PostScript... by Anonymous Coward · · Score: 0

    Change the code for more digits... ;)

    http://www.wizards.de/~frank/pi.ps

  40. Uh-oh, I've got a scheme a brewin' by iamdrscience · · Score: 1

    I have a program for my Palm that lets me print from it via IR on IR enabled printers. Step 1: Download program Step 2: Find IR and Postscript enabled printer(s) Step 3: Annoy somebody beyond reason (NO PROFIT!!!!)

  41. yes, and... by pb · · Score: 4, Insightful

    Conway's Game of Life is also turing complete; therefore, you can regard this PostScript hack as proof that PostScript is turing complete as well, since you could implement a turing machine on top of Life, on top of PostScript..... :)

    --
    pb Reply or e-mail; don't vaguely moderate.
    1. Re:yes, and... by Urkki · · Score: 1

      Hmm mm, now that thought had never occured to me... That anything you can implement game of life on is turing complete.

  42. Haven't read much by Don Lancaster, have you? by jridley · · Score: 1

    Don Lancaster used to make a HUGE deal about writing stuff in Postscript. He used to have programs in _Byte_ magazine all the time that did number crunching, fractal calculations, etc, in Postscript on a printer and then printed out the results.

    1. Re:Haven't read much by Don Lancaster, have you? by Anonymous Coward · · Score: 0

      see http://www.tinaja.com/

  43. these things have been around for a long time... by akeep · · Score: 1

    there was also a grey scale raytracer written in postscript that would trace and render completely in the printer... took a while though.

  44. Oh Yes There Is! by Anonymous Coward · · Score: 0

    here:

    http://rendell.server.org.uk/gol/tm.htm

    a computer you can watch! /nerd power!

  45. Get a... by Pseudonymus+Bosch · · Score: 1

    I'd say that he should get a life, but he programmed himself one.

    --
    __
    Men with no respect for life must never be allowed to control the ultimate instruments of death.
    GW Bu
  46. apparently by falsification · · Score: 0, Offtopic

    Apparently, no matter how many boxes I check, I just cannot avoid seeing stories about games on Slashdot. A-n-n-o-y-i-n-g.

  47. Tetris ending by yerricde · · Score: 2, Informative

    (Context: debating an assertion that Conway's Game of Life has no end condition; therefore, it's not a game. wo1verin3 brings an analogy to Tetris brand games.)

    do you know anyone who has "finished" Tetris?

    Some falling tetramino games, including Tetris brand games, display fireworks and credits after the player has completed specific objectives. For example, in The New Tetris for N64, it's 500,000 lines summed over all games played.

    --
    Will I retire or break 10K?
  48. One page per generation of life? by haqim · · Score: 1

    Did anyone of you guys out there tried to print it out on a printer?

    What I am interested in is to find out if only one page would be printed with more and more pixels on it or is every generation of the life producing a new page?

    1. Re:One page per generation of life? by Ignominious+Cow+Herd · · Score: 1

      It prints one page, then as you stand there and look at it, more and more pixels appear (and disappear) over time. It is Really quite Fantastic!

      --
      Lump lingered last in line for brains, and the ones she got were sorta rotten and insane.
  49. Winprinters by yerricde · · Score: 1

    Isn't this the same kind of thinking that brought us the Winmodem and Winprinter?

    Winprinters are usually easy to get working on an alternative OS because it's straightforward to get the computer to produce a bitmap that gets sent over the wire, provided that the printer's escape codes to print a bitmap are known. For example, old impact printers were winprinters, and software such as Broderbund's Print Shop let the user copy codes for "set graphics mode at x dpi" and "new line of pixels" out of the printer's manual. The biggest problem with winprinters comes when a manufacturer will not publish the printer's escape codes.

    Winmodems, on the other hand, are covered by software patents.

    --
    Will I retire or break 10K?
    1. Re:Winprinters by Anonymous Coward · · Score: 0

      Huh? maybe some of the last cheap dot matrix printers were "winprinters", but most of them had their own drivers to install. "winprinter" implies the logic in most printers that controlled simple things like pins to fire, intelligent head control, etc., were pushed back into the printer driver on the computer (in Windows).

      I guess I still have a couple of Epson and Panasonic dotmatrix printers, and their manuals clearly state all their escape codes and effects. This was a bit before the lameity that was a "winprinter".

      If you want really fast dot matrix printing (that approaches old dot matrix line printing speeds with its dual-line head), you can still buy Epson DFX-8000's... they've been on the market for about 10 years or so...

  50. One word : by Vanieter · · Score: 1

    NeWS.

    1. Re:One word : by Anonymous Coward · · Score: 0

      More words: NeWS was the "Network Extensible Window System," developed by some guy named Gosling at Sun as the replacement for Suntools/Sunview.

      As the name implies, it was a client/server window system that could be extended by downloading PostScript into the window server. Extremely cool stuff, except that it really required way more compute power and (especially) memory than workstations had at the time. It also scared the heck out of Sun's competitors, who threw their support behind X, so here we are today.

  51. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  52. So... by DeKO · · Score: 1

    If you can do that much, imagine a cluster of printers, programmed in PS to do something else than... print.

  53. Was I the only one.... by stygar · · Score: 2, Funny

    who read the blurb and expected the printer to start printing out little cards reading "Teacher", "Doctor", "20,000", "100,000", etc? :)

  54. Sort of an object tree by typical+geek · · Score: 1

    You start with a document outline, then the first few objects number the pages, each one built with text and image objects.

    At the end you have a map of the various objects, it's a pain in the ass to read, but at least Adobe lets you download the reference manual for free.

    Some of the commands and concepts are similar to PostScript, and some of the commands are 2-3 character version of the 8 character PS commands.

  55. Thinking in PostScript by c · · Score: 4, Informative

    The best source about PostScript as a programming language is book "Thinking in PostScript" (http://www.rightbrain.com/pages/books.html).

    I read it originally to learn PostScript from a printing perspective, which was somewhat futile. Very little of the book actually talks about printing or page layout at all.

    Anyhow, a quick read of the table of contents would be enough to understand that the Game of Life in PostScript is neither difficult nor terribly interesting.

    c.

    --
    Log in or piss off.
  56. Right, now we can use printers to play Life... by RighteousFunby · · Score: 1

    I think we should all GET a life.

    1. Re:Right, now we can use printers to play Life... by Anonymous Coward · · Score: 0

      i think you should POST funnier comments.

      - a.c.

    2. Re:Right, now we can use printers to play Life... by Anonymous Coward · · Score: 0

      Maybe I should HEAD out of here before the puns get ugly.

    3. Re:Right, now we can use printers to play Life... by Anonymous Coward · · Score: 0

      Simply PUT, it is too late to escape.\n\n

      - a.c.

  57. 8514/A display adaptor by halftracks · · Score: 1

    Nothing to do with postscript, but regarding Life, the early Windoze/OS2 accellerators based on the IBM 8514/A (ATI and I think Paradise made one) had enough logic to also calculate life, and quite a bit faster than the 486/33 that was the standard CPU at the time. There were books available documenting how to program the 8514 at the hardware level from DOS, which was pretty cool. The 8514 used 8 bits per pixel, and had logic to compare a pixel against a reference value, which would determine whether or not the pixel should be written. (The weird and frustrating part of the 8514 was that it didn't compare the source, so it wasn't great at doing sprites with transparent colors. But it could compare against the destination.) The 8514 could also perform 8 bit additive blits. So just jitter some additive blits to get a neighbor count, use the pixel compare (both less than and greater than supported) to kill the starving and overfed cells, and finally convert the living ones back to 1 or 0 for the next screen. Of course you needed a couple of offscreen buffers, and the small (1 MB?) amount of video ram prevented really large simulations. Now a days, the OpenGL Redbook explains how to implement Life, and the nVidia SDK also has an implementation of Life (implemented as a pixel shader?)

  58. Printer DOS! by Anonymous Coward · · Score: 0

    Hey a new printer DOS?

    How hard would it be for someone to write a program/worm that scans a local subnet for Jetdirects or printers to connect to and send them this little .ps proggie once it determines that the printer can do postscript {there are simple ways to do so}.... port 9100 DOS anyone? many big campuses have LOTS of printers on them....

  59. This isn't NeWS to me. by oaklybonn · · Score: 1
    Heh.

    Those who do not learn from history are doomed to repeat it.

    NeWS was a peer of X-Windows, based on postscript; it was incredibly powerful and underpromoted. The only licensee that I recall was SGI: it was the basis of the IRIX window system in the early 90s. The language itself was an object oriented version of PostScript; the frameworks were entirely object oriented.

    NeWS was canned because it couldn't compete commercially with (free) X11. For a humorous slant, check out the Unix Haters Handbook or this link.

    Many of the language implementation ideas from NeWS went on to Java; James Gosling was a primary with both.

    As an aside, this is an example of how "free" software dealt a death blow to demonstrably superior commercial software.

  60. Maze builder in PostScript by sorotokin · · Score: 1

    Yeah, you can do this kind of stuff in PostScript. When I was learning it I have written this little Postscrpt file that prints a new maze every time you send it to the printer.

  61. Extraterrestial... by SharpFang · · Score: 1

    Somebody write a seti@home client in postscript to help seek extraterrestial life forms using your printer's spare CPU power? Ahhh.... A beowulf cluster of printers...A postscript-based AI... Printers will take over the world!

    --
    45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
  62. Launch a DOS attack from a Printer? by Kumkwat · · Score: 1


    Anyone know how someone could go about that easily?

  63. Postscript is and always has been... by borgheron · · Score: 1

    a fully functional programming language. Granted the syntax leaves something to be desired. In my NeXT days (I used to do OPENSTEP programming, I now am a major participant in GNUstep) it was well known that you could hack into a machine if the Display Postscript Server was set to "public" (meaning other machines can connect, like xhost + under X).

    I even heard that someone wrote a fully functional program to pull ANY file on a machine with DPS set to public.

    Scary.. and very cool. ;)

    Later, GJC

    --
    Gregory Casamento
    ## Chief Maintainer for GNUstep
  64. Would 36 gig do it? by typical+geek · · Score: 1

    and Solaris 8 on a SunFire 800? Now, that's a high end printer.

  65. viruses, factoring engines by Anonymous Coward · · Score: 0

    PS can do some amazing things. I've written
    a little bit in it, and in full ps, you can
    write printer viruses (which propagate from
    printer to printer over the net). At least,
    you used to. Some of the needed functionality
    has been disabled in newer printers. (I didn't
    write one, but realized you could).

    During the first major factoring challange
    back in the early 90's, some of the sieving
    step was done on postscript printers.

    Peter Trei

  66. This is new? by sglines · · Score: 1

    Way back in the dark age circa 1993 there was an IRC server written in postscript. It was at MIT and could handle about 5 connections ... if you typed really slow and all five of you were in the same room. I never net the author but I truely marveled at the concept.

  67. Lifewar by uberdave · · Score: 1

    Back in the deep mists of time, I rented a Commodore PET computer. It had a game called "Lifewar" that was exactly as you described. I wasn't aware of Conway's Life back then, so I didn't grasp the game's significance. Knowing how to make some of the things like gunships and puffers could make for an interesting game... Well, if not interesting, certainly a lot less boring.

  68. Re:these things have been around for a long time.. by stephenb · · Score: 1

    Yep there was, you can find a copy of it here. There's also another one that you could literally print out on a business card here.

    Cool stuff, I remember hearing about this in my raytracing class in college a while back.

  69. More fun by colk99 · · Score: 1

    Quote from orignal post: You can even send it to the printer and have it output every single iteration.. now that would be a fun prank." Send it to someone elses printer :) if you send it to your own you miss the point. Im going to try this at a office:)

  70. Mohammed Saeed al-Sahhaf on Java by MillionthMonkey · · Score: 3, Funny

    java is a worthless joke, a play-pretend half attempt at platform independence. there is no such thing as a java binary. java is not compiled. it is an interpreted language that runs specially compressed source code. there is no virtual machine. JRE is a glorified GWBASIC platform. java is the worst thing to happen to programming in ages.

    There is no such thing as bytecode. These "registers" are lies. There is no runtime stack. The javac executable is really a wrapper around gzip. This "JVM" is a fabrication concocted by the infidel authors of GWBASIC and does not exist. These cowards have no morals. I blame Al-Jazeera- they are marketing for Sun. God will roast their stomachs in hell. They are not in control of anything- they don't even control their own code! Be assured, our CPUs are safe and protected from compressed interpreted source code. We have placed their threads in a quagmire from which they can never emerge unless they throw an exception. Java is a snake and we will cut it in pieces!

  71. One word: Kinko's by gregwbrooks · · Score: 1
    Now then... I wouldn't advocate this, but how long until some script kiddie takes the ol' Game of Life Postscript file, changes the bit at the end to print out a zillion pages, and then e-mails it off to his friendly local Kinko's with fake contact information?

    Damn, I wish I were 14 and irresponsible again. Now I'm just irresponsible.

    --


    "It was a summer's tale: Just a boy, his Linux, and a head full of dreams..."
    1. Re:One word: Kinko's by yther · · Score: 1
      Speaking as a Kinkoid myself, we'd probably try to distill it into a PDF first. (The days of folks sending us raw PostScript files are pretty much past, though I see EPS fairly often.) Judging by the behavior of ps2pdf here, Distiller would take rather a long time, maybe pop out an error. I might try sending it to a RIP server that allows previews before producing actual paper. At that point I'd try to call the client, discover the faked info, and trash the file.

      Now you've got me curious, though; I'm going to take the file to work tomorrow and see what Distiller makes of it. :)

      --
      Operationalizing the paradigm shift!
    2. Re:One word: Kinko's by gregwbrooks · · Score: 1
      By all means, report back in on your findings!

      Been having great fun with this snippet of code around the office!

      --


      "It was a summer's tale: Just a boy, his Linux, and a head full of dreams..."
  72. Are you sure this is postscript? by Anonymous Coward · · Score: 0

    It looks like perl.

  73. stupid postscript tricks by Anonymous Coward · · Score: 0

    I used to love to play with Postscript. I also commutted on a chartered bus that went from the East Bay taking workers through Palo Alto and down to Nasa Ames research center. The Palo Alto stop was/is along research alley with PARC, SRI, etc. etc., near Stanford. One particularly brilliant passenger was from SRI. We compared Postscript tricks, he had my hex paper blown away (ok, almost any postscript trick had my hex paper blown away).

    He had a post script program that would break up any image you gave it onto the page in such a way that when you made an oragami globe out of it the image was allong the surface. He had not done it mathematically, but by brute force, folding the oragami, marking the facets, unfolding the paper, then encoding the coordinate transforms necessarry.

  74. More Postscript Art by illustir · · Score: 1

    Someone I know has built something to create genetic art via postscript. Here:

    http://odur.let.rug.nl/~kleiweg/genart/genart.html
    --
    -- Alper
  75. Sounds like Forth by Jonner · · Score: 1

    I haven't yet learned it myself, but I've talked to my roommate extensively about Forth. He uses it for embedded system development. Apparently, quite a bit is done in Forth using only the stack. He told me it took him a couple of years to completely assimilate the Forth way of thinking, but now he prefers it to the C way. He said he writes better C code now for having learned Forth. The trick seems to be writing very short, concise words and aggressively refactoring them whenever possible.

  76. Very cool by Jonner · · Score: 1

    Now that's a cool (and useful) hack. The only downside is that you can't get the results back from the printer except on hardcopy.

    1. Re:Very cool by Ignominious+Cow+Herd · · Score: 1

      Not true. You can use the back channel on most PS printers to output the data in text form. (typically with a serial port, AppleTalk, or Port 9100) You can also create a file if the printer has a HDD and upload it later. If that prof had saved incremental data on the printers HDD (assuming it had one) he could have recovered from the power-cycle and picked up where he left off :)

      --
      Lump lingered last in line for brains, and the ones she got were sorta rotten and insane.
  77. Are you really a nerd? by Jonner · · Score: 1

    If you're that concerned about what "society" thinks about cool, but useless hacks, I question how much of a nerd (or geek for that matter) you really are.

  78. Procedural by Jonner · · Score: 1

    Isn't it really a procedural language? Does it have functions as first class objects and higher-order functions? I guess some definitions of "functional" only involve having functions.

    1. Re:Procedural by Anonymous Coward · · Score: 0

      Maybe he meant it as "functional" in the sense of Turing-complete while actually being useful?

    2. Re:Procedural by SuiteSisterMary · · Score: 1

      I can only hope you're making a joke, but I think he meant 'functional' as in 'functions properly' rather than 'functional vs procedural vs imperative vs event driven.'

      --
      Vintage computer games and RPG books available. Email me if you're interested.
    3. Re:Procedural by Jonner · · Score: 1

      Yes, I guess it was a poor attempt at humor.

  79. Device independence by Jonner · · Score: 1

    How is PDF more device independent than PS?

    1. Re:Device independence by Ignominious+Cow+Herd · · Score: 1

      PS Can be made very device independant, but in practice people (and driver) tend to put in all sorts of device dependent things. PDF has the commands that let you do this removed (e.g. setpagedevice). I always thought it was more important that PDF was Page Independent - you can extract a page from any point in the PDF and print/view it. In PS you typically have to process everything up to the page you are interested in so that, for example, any embedded fonts have been seen and stored.

      --
      Lump lingered last in line for brains, and the ones she got were sorta rotten and insane.
  80. NeWS window system by vesamies · · Score: 1

    Anybody remember the NeWS window system, it also had postscript programs in it. I'd be interested to know if there are some online documents or books about it.

  81. NFib benchmark by Anonymous Coward · · Score: 0

    When I was a kid we used to run AI benchmarks
    in Apple LaserWriters. They were
    faster at the nfib (naive Fibonacci) benchmark
    than most computers at that time!

  82. Re: Do PostScript printers have hard drives? by jbarlow · · Score: 1

    Out of the 21 printers we have at work, only six have no hard drive. Of course, I'm counting a couple of pure copiers among that six. Two or three of the bigger/faster ones have their own web server, so we can check up on job status and such.

    My favorite is the one that has a storage server about the size of a G4 Cube and connects to the scanner and printer by IEEE 1394. Xerox Synergix 8850, iirc.

    Of course, working at Kinko's kinda makes me giggle every time I see a little inkjet cranking away at a single sheet.

  83. Even cooler by Jonner · · Score: 1

    I'd be trying this out right now, except my Postscript printer is the CUPS Ghostscript driver, so it'd be kinda silly.

  84. HTML insufficient by Jonner · · Score: 1

    Well, that's certainly true, at least until things like MathML and SVG are universally implemented. Hopefully, XHTML + MathML + SVG + CSS will enable all the stuff needed for those types of documents without resorting to a page description language, but PS or PDF will still probably be preferable for printing.

  85. Native Printer PDF? by Vagary · · Score: 1

    Does anyone know whether any printers exist that speak native PDF? Or if not, why such a thing does not exist?

    I'd love to see Linux integrate PDF as closely as OS/X does, but I know it's never going to happen until PDF is as useful as PS.

  86. Postscript, Java, NeWS Connections by billstewart · · Score: 1
    Postscript is surprisingly closely connected to Java. Back in the 80s at Sun, James Gosling (known for his Emacs version) and David Rosenthal wrote the Network Extensible Windowing System, NeWS, in Postscript. Don Hopkins describes it as "It's a multithreaded PostScript interpreter with extensions to draw on the screen, handle input events, with an object oriented programming facility." It's a cool, elegant window system, though a bit resource-hungry for its day, preferring to be on machines with at least 6-8MB of RAM. Sun spent a while pushing it instead of X Windows, and John Gilmore's Grasshopper Group (and a few other people like Wedge) ported it to things like Macs and Sun3/60s. Some of the cool things about NeWS were
    • You could make intelligent decisions about what services ran in the client vs. the server, unlike X.
    • You could download programs to the server, unlike X. This meant that if your application was very mouse-interactive, it didn't need to put up with the communications lag of getting back to the client, but could happen all on your screen, so mouse tracking tended to be rocking fast.
    • The drawing model was Postscript, so what you saw REALLY WAS what you'd get when you printed it, not some bad font approximation. This meant that fonts scaled CORRECTLY, and printing just worked, and you'd get pleasant surprises like the PSterm terminal emulator, which iconified itself by shrinking down to a little window with 1-pixel characters, live, not just a GIF, so you could see that your application was or wasn't doing things even though you obviously couldn't read anything except banner(1) output.
    • Because the programs were Postscript, not C, they were hard to debug, and an utter nightmare to do security for, because they tended to let programs leave bits of themselves installed in places they shouldn't be because there wasn't much in the way of memory protection. While this may not be any surprise to Windows programmers, and the only reason it might surprise Palm programmers is that nobody's deliberately malicious on Palms, it was pretty annoying to people used to Unix and X, which *were* cleaner.
    • The security and debugging issues were a major design influence on one of Gosling's later projects, a language called OAK, which you might know of as Java. The "do the work where you want it, whether that's client or server" capability was another important thing that Gosling kept.

    I did some Postscript programming back in the day, enough to print cool things on the printer and replace the NeWS splash screen with "Don't Panic" in nice friendly letters, and as other people have said, it's pretty much like Forth, a Reverse Polish sort of thing that lets you define functions that draw stuff. While Forth's inventors may have had an overblown estimate of his creation's validity (he basically reinvented the subroutine crudely and differently) it was a good language for very small environments, like toasters and embedded systems. It wasn't real clean, but it was very memory-efficient, and this made it tend to be pretty fast.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  87. Sun NeWS Window System by billstewart · · Score: 1

    Sun's NeWS Network Extensible Window System was more powerful and really cool, and as I've commented earlier in this thread, was an ancestor of Java. Both of them shared the Postscript property of getting printing to Just Work Correctly. Other people have commented that it had problems with the licensing being too proprietary, so it didn't catch on compared to X in spite of being better at some things and dangerously flaky at others and having one of the world's coolest debuggers. NexTStEp was somewhat limited by Sun's intellectual property, IIRC, but it's stuck around in various forms and its devotees really loved it.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
    1. Re:Sun NeWS Window System by Art+Tatum · · Score: 1
      NexTStEp was somewhat limited by Sun's intellectual property, IIRC,

      Hmmm. I remember hearing something about Apple dumping DPS in favor of Quartz because of licensing issues. I wonder if that was where the problem was?

      I've heard of NeWS before and I really should check it out sometime. It's kind of sad that GNUstep is pretty much abandoning the DPS stuff. It's all still emulated with raw X calls (or win32 calls in that backend). But I guess it's just too complicated and obscure to get anybody to work it up to a useful state.