PostScript: Perbezaan antara semakan

Daripada Wikipedia, ensiklopedia bebas.
Kandungan dihapus Kandungan ditambah
Baris 37: Baris 37:


== Sejarah ==
== Sejarah ==
Konsep untuk bahasa PostScript dilahirkan pada [[1976]] semasa [[John Warnock]] bekerja di [[Evans & Sutherland]], sebuah syarikat [[grafik komputer]] yang termasyhur. Pada waktu itu, beliau sedang membangunkan [[perisian]] [[pentafsir]] untuk [[pangkalan data]] [[Grafik komputer 3D|grafik tiga-dimensi]] [[pelabuhan]] [[New York]]. Warnock memikirkan bahasa [[Design System]] untuk memproses [[grafik]].
Konsep untuk bahasa PostScript dilahirkan pada [[1976]] semasa [[John Warnock]] bekerja di [[Evans & Sutherland]], sebuah syarikat [[grafik komputer]] yang termasyhur. Pada waktu itu, beliau sedang membangunkan [[perisian]] [[Pentafsir (perisian komputer)|pentafsir]] untuk [[pangkalan data]] [[Grafik komputer 3D|grafik tiga-dimensi]] [[pelabuhan]] [[New York]]. Warnock memikirkan bahasa [[Design System]] untuk memproses [[grafik]].


Pada waktu yang sama, para penyelidik di [[Xerox PARC]] telah berjaya membangunkan [[pencetak laser]] yang pertama dan menyedari keperluan untuk menggunakan cara yang standard untuk mentakrifkan imej halaman. Kemudian pada [[1975]]-[[1976|76]], sepasukan penyelidik yang diketuai oleh [[Bob Sproull]] membangunkan format Press yang kemudian digunakan dalam sistem [[Xerox Star]] untuk menjalankan pencetak laser. Bagaimanapun, Press merupakan [[format data]] dan bukan bahasa pengaturcaraan dan justera itu, tidak mempunyai kebolehubahan. Oleh itu, [[Xerox PARC|PARC]] memulakan usaha [[InterPress]] untuk mencipta penggantinya.
Pada waktu yang sama, para penyelidik di [[Xerox PARC]] telah berjaya membangunkan [[pencetak laser]] yang pertama dan menyedari keperluan untuk menggunakan cara yang standard untuk mentakrifkan imej halaman. Kemudian pada [[1975]]-[[1976|76]], sepasukan penyelidik yang diketuai oleh [[Bob Sproull]] membangunkan format Press yang kemudian digunakan dalam sistem [[Xerox Star]] untuk menjalankan pencetak laser. Bagaimanapun, Press merupakan [[format data]] dan bukan bahasa pengaturcaraan dan justera itu, tidak mempunyai kebolehubahan. Oleh itu, [[Xerox PARC|PARC]] memulakan usaha [[InterPress]] untuk mencipta penggantinya.
Baris 45: Baris 45:
Warnock kemudian meletakkan jawatan bersama-sama dengan [[Chuck Geschke]] untuk mengasaskan [[Adobe Systems]] pada Disember [[1982]]. Mereka mencipta PostScript, sebuah bahasa yang serupa dengan InterPress tetapi lebih mudah, dan memasarkannya pada [[1984]]. Pada waktu yang lebih kurang sama, [[Steve Jobs]] mengunjungi mereka dan menggalakkan mereka supaya menyesuaikan PostScript untuk digunakan sebagai bahasa bagi pencetak laser.
Warnock kemudian meletakkan jawatan bersama-sama dengan [[Chuck Geschke]] untuk mengasaskan [[Adobe Systems]] pada Disember [[1982]]. Mereka mencipta PostScript, sebuah bahasa yang serupa dengan InterPress tetapi lebih mudah, dan memasarkannya pada [[1984]]. Pada waktu yang lebih kurang sama, [[Steve Jobs]] mengunjungi mereka dan menggalakkan mereka supaya menyesuaikan PostScript untuk digunakan sebagai bahasa bagi pencetak laser.


In March 1985, the [[Apple Computer|Apple]] [[LaserWriter]] was the first printer to ship with PostScript, sparking the [[desktop publishing]] (DTP) revolution in the mid-1980s. The combination of technical merits and widespread availability made PostScript a language of choice for graphical output for printing applications. For a time an [[interpreter (computer software)|interpreter]] (sometimes referred to as a [[Raster Image Processor|RIP]] for Raster Image Processor) for the PostScript language was a common component of [[laser printer]]s, into the 1990s.
Pada Mac [[1985]], [[LaserWriter]] [[Apple Inc.|Apple]] menjadi pencetak yang pertama dijual dengan PostScript, dan mencetuskan revolusi [[penerbitan meja]] (DTP) pada pertengahan [[1980-an]]. Gabungan merit teknikal serta ketersediaan yang meluas menjadikan PostScript sebagai sebuah bahasa pilihan untuk output grafik bagi kegunaan pencetakan. Buat seberapa waktu, [[Pentafsir (perisian komputer)|pentafsir]] (kekadang dirujuk sebagai [[Pemproses Imej Raster|RIP]], singkatan untuk "Pemproses Imej Raster") untuk bahasa PostScript menjadi komponen yang biasa untuk pencetak laser sehingga [[1990-an]].


Bagaimanapun, kos pelaksanaan PostScript sangat tinggi. Komputer mengoutput kod PostScript yang kemudian ditafsirkan oleh pencetak menjadi imej raster pada [[Peleraian imej|peleraian]] tabii pencetak. Ini memerlukan [[mikropemproses]] yang berprestasi tinggi serta [[ingatan komputer]] yang mencukupi. LaserWriter menggunakan [[Motorola 68000]] 12 MHz yang menyebabkannya lebih cepat berbanding dengan mana-mana komputer [[Macintosh]] yang dipasangnya. Sewaktu enjin pencetak laser berharga melebihi seribu [[dolar Amerika Syarikat]], kos tambahan untuk menyediakan PostScript kelihatan memadai, akan tetapi apabila harga mekanisme pencetak turun, kos melaksanakan PostScript menjadi semakin mahal secara perbandingan.
However, the cost of implementation was high; computers output raw PS code that would be interpreted by the printer into a raster image at the printer's natural resolution. This required high performance [[microprocessor]]s and ample [[computer memory|memory]]. The LaserWriter used a 12 MHz [[Motorola 68000]], making it faster than any of the Macintosh computers it attached to. When the laser printer engines themselves cost over a thousand dollars the added cost of PS was worthwhile, but as printer mechanisms fell in price, the cost of implementing PS became increasingly expensive.


Once the ''[[de facto]]'' standard for electronic distribution of final documents meant for publication, PostScript is steadily being supplanted in this area by one of its own descendants, the Portable Document Format or [[Portable Document Format|PDF]]. By 2001 there were fewer printer models which came with support for PostScript, largely due to the growing competition from much cheaper non-PostScript ink jet printers, and new software-based methods to render PostScript images on the computer, making them suitable for any printer (PDF provided one such method). The use of a PostScript laser printer still can, however, significantly reduce the CPU workload involved in printing documents, transferring the work of rendering PostScript images from the computer to the printer. PS is still an option on most "high end" models.
Once the ''[[de facto]]'' standard for electronic distribution of final documents meant for publication, PostScript is steadily being supplanted in this area by one of its own descendants, the Portable Document Format or [[Portable Document Format|PDF]]. By 2001 there were fewer printer models which came with support for PostScript, largely due to the growing competition from much cheaper non-PostScript ink jet printers, and new software-based methods to render PostScript images on the computer, making them suitable for any printer (PDF provided one such method). The use of a PostScript laser printer still can, however, significantly reduce the CPU workload involved in printing documents, transferring the work of rendering PostScript images from the computer to the printer. PS is still an option on most "high end" models.

Semakan pada 12:46, 25 September 2009

PostScript
Fail:PostScript 3.png
ParadigmaBerbilang paradigma: berasaskan tindanan, tatacara
Muncul pada1982
Direka olehJohn Warnock & Chuck Geschke
PembangunAdobe Systems
Lepasan stabilPostScript 3 (1997)
Disiplin penjenisanDinamik, kuat
Pelaksanaan utamaAdobe PostScript, TrueImage, Ghostscript, InterPress
DipengaruhiLisp
MempengaruhiPDF
PostScript
Sambungan fail:.ps
Jenis media Internet:application/postscript
Pengecam Jenis Seragam:com.adobe.postscript
Magik:%!
Dibangunkan oleh:Adobe Systems
Jenis format:Format fail pencetakan
Diperluas kepada:PostScript Berkapsul

PostScript (PS) ialah bahasa pengaturcaraan perangkaian jenis dinamik yang dicipta oleh John Warnock dan Charles Geschke pada 1982. Ia paling terkenal kerana penggunaannya sebagai bahasa perihal halaman dalam bidang elektronik dan penerbitan meja.

Sejarah

Konsep untuk bahasa PostScript dilahirkan pada 1976 semasa John Warnock bekerja di Evans & Sutherland, sebuah syarikat grafik komputer yang termasyhur. Pada waktu itu, beliau sedang membangunkan perisian pentafsir untuk pangkalan data grafik tiga-dimensi pelabuhan New York. Warnock memikirkan bahasa Design System untuk memproses grafik.

Pada waktu yang sama, para penyelidik di Xerox PARC telah berjaya membangunkan pencetak laser yang pertama dan menyedari keperluan untuk menggunakan cara yang standard untuk mentakrifkan imej halaman. Kemudian pada 1975-76, sepasukan penyelidik yang diketuai oleh Bob Sproull membangunkan format Press yang kemudian digunakan dalam sistem Xerox Star untuk menjalankan pencetak laser. Bagaimanapun, Press merupakan format data dan bukan bahasa pengaturcaraan dan justera itu, tidak mempunyai kebolehubahan. Oleh itu, PARC memulakan usaha InterPress untuk mencipta penggantinya.

Pada 1978, Evans dan Sutherland meminta Warnock berpindah dari San Francisco Bay Area ke ibu pejabat utama di Utah, akan tetapi Warnock tidak berminat. Namun beliau menyertai Xerox PARC untuk bekerja dengan Martin Newell. Bersama-sama, mereka menulis semula Design System untuk mencipta JaM (singkatan untuk "John and Martin") yang kemudian digunakan untuk reka bentuk VLSI serta penyelidikan pencetakan taip dan grafik. Karya mereka itu kemudian berkembang menjadi bahasa InterPress.

Warnock kemudian meletakkan jawatan bersama-sama dengan Chuck Geschke untuk mengasaskan Adobe Systems pada Disember 1982. Mereka mencipta PostScript, sebuah bahasa yang serupa dengan InterPress tetapi lebih mudah, dan memasarkannya pada 1984. Pada waktu yang lebih kurang sama, Steve Jobs mengunjungi mereka dan menggalakkan mereka supaya menyesuaikan PostScript untuk digunakan sebagai bahasa bagi pencetak laser.

Pada Mac 1985, LaserWriter Apple menjadi pencetak yang pertama dijual dengan PostScript, dan mencetuskan revolusi penerbitan meja (DTP) pada pertengahan 1980-an. Gabungan merit teknikal serta ketersediaan yang meluas menjadikan PostScript sebagai sebuah bahasa pilihan untuk output grafik bagi kegunaan pencetakan. Buat seberapa waktu, pentafsir (kekadang dirujuk sebagai RIP, singkatan untuk "Pemproses Imej Raster") untuk bahasa PostScript menjadi komponen yang biasa untuk pencetak laser sehingga 1990-an.

Bagaimanapun, kos pelaksanaan PostScript sangat tinggi. Komputer mengoutput kod PostScript yang kemudian ditafsirkan oleh pencetak menjadi imej raster pada peleraian tabii pencetak. Ini memerlukan mikropemproses yang berprestasi tinggi serta ingatan komputer yang mencukupi. LaserWriter menggunakan Motorola 68000 12 MHz yang menyebabkannya lebih cepat berbanding dengan mana-mana komputer Macintosh yang dipasangnya. Sewaktu enjin pencetak laser berharga melebihi seribu dolar Amerika Syarikat, kos tambahan untuk menyediakan PostScript kelihatan memadai, akan tetapi apabila harga mekanisme pencetak turun, kos melaksanakan PostScript menjadi semakin mahal secara perbandingan.

Once the de facto standard for electronic distribution of final documents meant for publication, PostScript is steadily being supplanted in this area by one of its own descendants, the Portable Document Format or PDF. By 2001 there were fewer printer models which came with support for PostScript, largely due to the growing competition from much cheaper non-PostScript ink jet printers, and new software-based methods to render PostScript images on the computer, making them suitable for any printer (PDF provided one such method). The use of a PostScript laser printer still can, however, significantly reduce the CPU workload involved in printing documents, transferring the work of rendering PostScript images from the computer to the printer. PS is still an option on most "high end" models.

Bahasa

PostScript is a Turing-complete programming language, belonging to the concatenative group. Typically, PostScript programs are not produced by humans, but by other programs. However, it is possible to write computer programs in PostScript just like any other programming language.

PostScript is an interpreted, stack-based language similar to Forth but with strong dynamic typing, data structures inspired by those found in Lisp, scoped memory and, since language level 2, garbage collection. The language syntax uses reverse Polish notation, which makes the order of operations unambiguous, but reading a program requires some practice, because one has to keep the layout of the stack in mind. Most operators (what other languages term functions) take their arguments from the stack, and place their results onto the stack. Literals (for example numbers) have the effect of placing a copy of themselves on the stack. Sophisticated data structures can be built on the array and dictionary types, but cannot be declared to the type system, which sees them all only as arrays and dictionaries, so any further typing discipline to be applied to such user-defined "types" is left to the code that implements them.

The character "%" is used to introduce comments in PostScript programs. As a general convention, every PostScript program should start with the characters "%!" so that all devices will properly interpret it as PostScript.

"Hello world"

A Hello World program, the customary way to show a small example of a complete program in a given language, might look like this in Postscript:

%!PS
/Courier findfont
20 scalefont
setfont
72 500 moveto
(Hello world!) show
showpage

or if the output device has a console

%!PS
(Hello world!) =

Unit ukuran

Postscript uses the point as its unit of length. However, unlike some other versions of the point, PostScript uses exactly 72 points to the inch. Thus:

For example, in order to draw horizontal line of 4cm length, it is sufficient to type:

0 0 moveto 
0 113.385827 lineto stroke

PostScript uses single-precision reals (24-bit mantissa), so it is not meaningful to use more than 9 decimal digits to specify a real number. For draft graphics, the number of significant digits may be reduced.

Lihat juga

Rujukan

Rencana ini pada asalnya berdasarkan bahan daripada Free On-line Dictionary of Computing yang dilesenkan di bawah GFDL.

Pautan luar