并发编程后记

When printing, you might have come across the word “Postscript.” Ever wondered what the heck this means, and relevance it has to your printer? Take a minute, learn some computer history, and a little bit more about desktop printers work.

在打印时,您可能会遇到“ Postscript”一词。 有没有想过这意味着什么以及它与您的打印机的相关性? 花一分钟时间,学习一些计算机历史记录,然后更多地了解台式打印机的工作原理。

Unless you’re a computer scientist, it can be confusing to look up “Postscript” and learn that it’s a “concatenative programming language” only to find you have even more confusing words to look up. Today, we’ll make it easy, and put Postscript into context, explain what it is, why and how it does what it does, and how it pretty much turned the whole graphics world on its collective ear! Keep reading, there’s some good geeky fun stuff ahead.

除非您是计算机科学家,否则查找“ Postscript”并了解它是一种“ 连接编程语言 ”可能会令人困惑,只是发现您还有更多令人困惑的单词要查找。 今天,我们将使其变得容易,将Postscript置于上下文中,解释它的含义,原因以及如何完成其​​工作,以及它如何几乎使整个图形世界都为之震撼! 继续阅读,前面还有一些令人讨厌的有趣东西。

ASCII,点矩阵,绘图仪和更改打印的图形 (ASCII, Dot Matrix, Plotters, and Changing Printed Graphics)

Before we understand Postscript and more modern printing devices, we have to consider the humble roots of PC to print technology. Early computer printers were crude devices made only to reproduce text and ASCII characters—there was little to no application of graphics, and little to no use for them. These so called “dumb” printers could be programmed to produce text, although many would have had hardware limitations that would stop them from printing anything but the characters in the hardware—think “typewriter.”

在我们了解Postscript和更现代的打印设备之前,我们必须考虑PC到打印技术的卑微根源。 早期的计算机打印机是仅用于复制文本和ASCII字符的原始设备,几乎没有图形应用,也没有使用图形。 可以对这些所谓的“哑”打印机进行编程,以产生文本,尽管许多打印机本来会受到硬件的限制,从而使它们无法打印除硬件中的字符以外的任何内容,例如“打字机”。

Some of us at How-To Geek might date ourselves and say we remember an important next step in printer evolution—dot matrix printers. These were capable of printing some crude grayscale graphics with rows of pixels, as well as blocky, low pixel depth typography. Although they did have the advantage of creating digital images (although ASCII art sort of counts), the crude typography was a setback for early dot matrix printers. All dot matrix printers took directions on printing images and text in roughly the same way; break it into pixels, printing them in rows as the print head passes along the paper, feed the next bit of paper, and repeat.

《 How-To Geek》中的一些人可能会跟我们约会,并说我们记得打印机发展中的一个重要的下一步- 点矩阵打印机。 这些打印机能够打印一些带有像素行的粗灰度图形,以及块状,低像素深度的版式。 尽管它们确实具有创建数字图像的优势(尽管采用ASCII计数技术),但粗略的印刷术是早期点阵打印机的挫折。 所有的点阵打印机都以大致相同的方式指导打印图像和文本。 将其分解为像素,在打印头穿过纸张时,将它们成行打印,送入下一张纸,然后重复。

Unlike dot matrix printers, plotters are still fairly common, particularly in manufacturing. Plotters move papers, vinyl, or various other materials around on algebraic coordinates to draw, print, or cut smooth, mathematically pure vector shapes with a stylus or knife blade. As we’ve learned, because of the nature of typographic glyphs, vector shapes are vastly superior to pixels for defining abstract, mathematically pure shapes found in type. Because plotters are engineered to move around based on precise math, the instructions on how to create typography and other shapes are fairly easy for a PC to communicate to the device.

与点矩阵打印机不同, 绘图仪仍然相当普遍,特别是在制造业中。 绘图仪可在代数坐标上移动纸张,乙烯基或其他各种材料,以使用触笔或刀片在数学上纯净的矢量形状上绘制,打印或剪切。 如我们所知,由于印刷字形的性质,矢量形状在定义类型中发现的抽象的,数学上纯净的形状方面远远优于像素。 由于绘图仪经过精心设计,可以根据精确的数学运算来回移动,因此,有关如何创建字体和其他形状的说明对于PC而言,与PC进行通信非常容易。

The challenge was this: no existing model of PC to print technology could create vector-based, clean typography AND graphics at the same time. What were all the clever geeks supposed to do?

面临的挑战是:现有的PC打印技术无法同时创建基于矢量的,干净的字体和图形。 聪明的怪胎应该做什么?

Xerox PARC和第一台激光打印机的开发 (Xerox PARC, and Development Of The First Laser Printer)

Xerography, AKA photocopying, was the development printers were looking for. Although Xerography had been invented in the thirties and made commercially available as copy machines in the late fifties and sixties, it wasn’t used in PC printing until Xerox PARC engineer Gary Starkweather designed the first laser printer.

Xerography,又名影印,是打印机正在寻找的开发项目。 尽管Xerography于30年代发明,并在50年代后期和60年代作为复印机商用,但直到Xerox PARC工程师Gary Starkweather设计了第一台激光打印机后,它才被用于PC打印。

Here’s a graphic and a rough descriptions of how Xerography works: light hits electrically charged areas of the printing drum, the electrons react and those negatively charged areas lose that charge. Toner adheres to the static electricity, and is pressed onto the paper, creating artwork without the use of dot matrix style pixels. And because this printing process was fundamentally different from any of the comparatively crude methods listed above, Xerography was a logical way to print clean type and graphics at the same time. There was one simple engineering problem that had to be solved—how do you create instructions for a printer that can easily do both at once?

这是静电复印技术工作原理的图形和粗略描述:光线撞击到感光鼓的带电区域,电子发生React,带负电的区域失去电荷。 碳粉会附着在静电上,然后压在纸张上,从而在不使用点矩阵样式像素的情况下创建艺术品。 并且由于此打印过程与上面列出的任何相对较原始的方法根本不同,因此Xerography是同时打印纯净字体和图形的逻辑方法。 必须解决一个简单的工程问题-如何为可以同时轻松完成这两项任务的打印机创建说明?

两全其美:后记是印刷低语 (The Best of Both Worlds: Postscript is the Print Whisperer)

Enter Adobe engineers and co-founders John Warnock and Charles Geschke. The pair had worked together at Xerox and had created page description language (or PDL) called Interpress. Interpress solved this engineering problem—it was a system of translating images and complicated shapes into data the printer can use to turn out high quality printed artwork. Interpress was not necessarily the first PDL, and it wasn’t Warnock and Geschke’s last collaboration. Leaving Xerox PARC, the pair developed a flagship product in Postscript, which has remained, even to this day, a graphics industry standard.

输入Adobe工程师和联合创始人John Warnock和Charles Geschke。 他们俩在Xerox一起工作,并创建了称为Interpress的页面描述语言(或PDL)。 Interpress解决了这个工程问题,它是一个将图像和复杂形状转换成打印机可以用来生成高质量打印艺术品的数据的系统。 Interpress不一定是第一个PDL,也不是Warnock和Geschke的最后一次合作。 两人离开Xerox PARC之后,在Postscript中开发了一款旗舰产品,直到今天,它仍然是图形行业的标准。

Postscript, as the name sort of suggests, is actually a Turing-complete programming language. Directions are written out in a human-readable way, and communicated to the printer, which creates the high quality art from the instructions. Here’s a sample “Hello World” program from Inkguides.com.

顾名思义,后记实际上是一种图灵完备的编程语言。 指示以人类可读的方式写出,并传达给打印机,从而根据指示创建高质量的艺术品。 这是Inkguides.com提供的示例“ Hello World”程序 。

%!PS /inch {72 mul} def /Times-Roman findfont 50 scalefont setfont 2.5 inch 5 inch moveto (Hello, World!) show showpage

PS!/ inch {72 mul} def / Times-Roman findfont 50 scalefont setfont 2.5 inch 5 inch moveto(Hello,World!)显示页面

We start to see pretty quickly what kind of instructions Postscript is giving the printer, and just how simple the directions are. Fonts referenced in this program exist in vector form and are called up from separate files—and were a big part of Adobe’s contribution to the digital graphics industry. Here’s a second example, from Mikkel Meinike Nielsen’s page on Postscript:

我们很快就开始看到Postscript给打印机的指示是什么,以及指示的简单程度。 该程序中引用的字体以矢量形式存在,可以从单独的文件中调用,这是Adobe对数字图形行业的重要贡献。 这是第二个例子,来自Mikkel Meinike Nielsen在Postscript上的页面 :

%! /Times-Roman findfont 16 scalefont setfont gsave                   %save before using translate 105 210 translate %This cordinates places the images on %the page %————-The actual image begin——————— 76.8 86.4 scale 40 45 1 [ 40 0 0 -45 0 45 ] { < fffff5ffffffffdeffffffffeaffffffffdeffffffffffffffffffeeffff fffffefffffffffbffffffffffffffffffccffffffff77bffffffeffdfff fffdfff7fffffbfff7fffff77ffbffff5ebfbdfffafdbf7ebffbf3ff6fdf e9ef7ff7f3d6bfff7d55afff7efffafffffffffcffff7efffffffef7ffff fffdf77fffffffeffffffffdf7bffffffbd7bfffffffbffffffff7fbbfff ffef7bffffffeefbdfffffdef7bfffffffffbfffffbdefffffff7dff7fff ff7bdffffffff7ff7ffff977e57ffffa5ffbffffff7feebffffdbff4bfff ff7fffffffffffffffffffffffffff> } image %————-The actual image end ——————— grestore %restore the settings from before the translat 0 245 moveto (Text and image, ) show 0 229 moveto (side by side. ) show showpage

%! / Times-Roman findfont 16 scalefont setfont gsave使用翻译之前保存105210翻译%此坐标将图像放置在%页面上%——————实际图像开始———————— 76.8 86.4比例尺40 45 1 [40 0 0 -45 0 45] {<fffff5ffffffffdeffffffffeaffffffffdeffffffffffffffffffeeffff fffffefffffffffbffffffffffffffffffccffffffff77bffffffeffdfff fffdfff7fffffbfff7fffff77ffbffff5ebfbdfffafdbf7ebffbf3ff6fdf e9ef7ff7f3d6bfff7d55afff7efffafffffffffcffff7efffffffef7ffff fffdf77fffffffeffffffffdf7bffffffbd7bfffffffbffffffff7fbbfff ffef7bffffffeefbdfffffdef7bfffffffffbfffffbdefffffff7dff7fff ff7bdffffffff7ff7ffff977e57ffffa5ffbffffff7feebffffdbff4bfff ff7fffffffffffffffffffffffffff>}图像%-----实际影像端------- grestore%从translat之前恢复设置0 245 moveto(文本和图像,)显示0 229 moveto(并排。)显示页面

This large middle section of gobbledygook is actually hexadecimal code that defines an image. Most Postscript isn’t written by hand like this, but rather by programs. To get an idea of what this Postscript code actually looks like, take a look at this screencap from Mikkel’s page below of the image this code generated. Entire photographic mages can also be re-written as postscript this way—the filetype is called Encapsulated Post Script, or EPS.

gobbledygook的这个较大的中间部分实际上是定义图像的十六进制代码。 大多数Postscript并不是这样手写的,而是由程序编写的。 要了解此Postscript代码的实际外观,请查看此代码生成的图像下方Mikkel页面的屏幕截图。 整个照相法师也可以用这种方式重写为后记-文件类型称为“封装后记脚本”(EPS)。

现代印刷页和较新的印刷Craft.io (Modern Printed Pages and Newer Printing Processes)

Nowadays, not all printers use Postscript, but all of them have to have some kind of translation layer to turn text and image data into printed material. We usually call these programs printer drivers—and nowadays they come from the manufacturer, and are a proprietary software. In some form or fashion, this Is an crucial piece of what all printers need to communicate with PCs—even though the printers we use in our homes are solving very different problems than the first laser printers. Regardless, Postscript was Adobe’s first big success, and is part of what effectively the start of a worldwide popular explosion of graphics and design.

如今,并不是所有的打印机都使用Postscript,但是所有的打印机都必须具有某种翻译层才能将文本和图像数据转换为打印的材料。 我们通常将这些程序称为打印机驱动程序 -如今,它们来自制造商,并且是专有软件。 以某种形式或方式,这是所有打印机与PC进行通信所必需的关键部分-即使我们在家中使用的打印机解决的问题与首批激光打印机相比也大不相同。 无论如何,Postscript是Adobe的第一个重大成功,并且是有效启动全球流行的图形和设计爆炸的一部分



Image Credits: Brother Printer MFC-8370 by Jung-nam Nam, available under Creative Commons. Ancient Dot Matrix Printer by Andy Broomfield, available under Creative Commons. IBM 3800, photographer unknown, assumed fair use. Xerographic Photocopy process by Yzmo, available under GNU license. Adobe software by Seven Block, available under Creative Commons. The new printer by Erin Sparling, available under Creative Commons.

图片来源:Jung-nam Nam的Brother打印机MFC-8370,可在创用CC下获得。 安迪·布鲁姆菲尔德(Andy Broomfield)的古代点矩阵打印机,可在创用CC下获得。 IBM 3800,摄影师不详,被认为是合理使用。 Yzmo的Xerographic复印过程,可在GNU许可下获得。 Seven Block提供的Adobe软件,可在Creative Commons下获得。 Erin Sparling的新打印机,位于“知识共享”下。

翻译自: https://www.howtogeek.com/100016/printing-what-is-postscript/

并发编程后记

并发编程后记_什么是后记? 它与我的打印机有什么关系?相关推荐

  1. python多线程并发编程技术_同步线程 - Python并发编程教程™

    线程同步可以定义为一种方法,借助这种方法,可以确信两个或更多的并发线程不会同时访问被称为临界区的程序段. 另一方面,正如我们所知道的那样,临界区是共享资源被访问的程序的一部分. 因此,同步是通过同时访 ...

  2. Java并发编程实战_一线大厂架构师整理:java并发编程实践教程

    并发编程是Java语言的重要特性之一, 在Java平台上提供了许多基本的并发功能来辅助开发多线程应用程序.然而,这些相对底层的并发功能与上层应用程序的并发语义之间并不存在一种简单而直观的映射关系.因此 ...

  3. java 并发编程视频教程_全面深入学习java并发编程,视频教程下载

    课程目标: * 颠覆一些你以为"正确"的认知,纠正其它同类视频的错误 * 100+ 张手绘图 & 流程图,帮助你形成正确的"多线程世界观" * 以知识点 ...

  4. Java并发编程实战_阿里P9整理分享的亿级流量Java高并发与网络编程实战PDF

    前言 为了帮助初级开发者快速掌握高并发.网络编程.微服务.海量数据的处理这些实用技术,本文以"理论+范例"的形式对各个知识点进行了详细的讲解,力争让读者在实践中快速掌握相关知识. ...

  5. java 并发编程多线程_多线程(一)java并发编程基础知识

    线程的应用 如何应用多线程 在 Java 中,有多种方式来实现多线程.继承 Thread 类.实现 Runnable 接口.使用 ExecutorService.Callable.Future 实现带 ...

  6. java并发编程入门_探讨一下!Java并发编程基础篇一

    Java并发编程想必大家都不陌生,它是实现高并发/高流量的基础,今天我们就来一起学习这方面的内容. 什么是线程?什么是进程?他们之间有什么联系? 简单来说,进程就是程序的一次执行过程,它是系统进行资源 ...

  7. Java并发编程实战_不愧是领军人物!这种等级的“Java并发编程宝典”谁能撰写?...

    前言 大家都知道并发编程技术就是在同一个处理器上同时的去处理多个任务,充分的利用到处理器的每个核心,最大化的发挥处理器的峰值性能,这样就可以避免我们因为性能而产生的一些问题. 大厂的核心负载肯定是非常 ...

  8. Java并发编程实战_真香!阿里P8耗时半年著作660页Java高并发与网络编程实战总结...

    随着软件行业的飞速发展,互联网公司对开发者的技能要求也越来越高.而高并发.网络编程.微服务.海量数据的处理等技能,是每一个开发者进阶时的必学知识.为了帮助初级开发者快速掌握这些实用技术,本书以&quo ...

  9. Java并发编程实战_[Java并发编程实战] 简介

    并发简史 在早期不包含操作系统的计算机中,程序都是单一的串行程序,从头至尾只能执行一个程序,并且这个程序访问这个计算机的所有资源.然而,随着技术的发展,操作系统出现了.它使得计算机程序有了进程,线程的 ...

最新文章

  1. 世界上最遥远的距离是计算机不懂人类的时间
  2. MikuMikuShaders
  3. .net core+Spring Cloud学习之路 一
  4. iis自带的ftp服务器权限设置方法,IIS ftp 权限控制
  5. Magento: 添加first name 和 last name到newsletter Add additional fields to your newsl
  6. WIN7下安装SVNserver端及client搭建协作环境
  7. 今天起支付宝还信用卡开始收费 每月2000免费额度
  8. Python适合初学者入门
  9. 【真的很先进】阿里云在2018-KVM Forum上分享的动态迁移实践
  10. Drools 规则引擎的使用
  11. 磁带非但没被淘汰,容量还比硬盘大了???
  12. 计算机的硬件地址在哪看,电脑的MAC地址在哪里查看
  13. 计算机视觉方向简介 | 驾驶员监控DMS
  14. 多重积分matlab
  15. windows10下openpose的安装和配置使用教程(C++),以及常见错误分析。
  16. opencv——感兴趣区域(ROI)的分析和选取[详细总结]
  17. pythonif语句怎么换行输入_李沁和李易峰演的电视剧叫什么名字
  18. 荐9个可以帮助你的公众号
  19. 蓝奏云第三方cmd客户端(LanZouCloud-CMD)Cookie内容设置方法
  20. 中国版ChatGPT在哪些方面具有快速发展的机会?

热门文章

  1. 2019.6.14 巴塞尔问题
  2. c语言用键盘弹钢琴,【游戏】用键盘弹钢琴(大家都来试试吧)
  3. uni-app的flex盒模型与布局进阶写法(高手勿进)
  4. Meta官方吐槽大会?Connect 2022卡马克演讲全文回顾
  5. 使用man命令,出现 ”No manual entry for” 的解决办法
  6. 计算机中的速率、带宽、时延、利用率解读
  7. Visualization领域研究以及会议分类
  8. jnz和djnz_单片机指令
  9. 键盘连接在计算机的,技巧:如何在计算机键盘上输入连字符和破折号?
  10. k8s集群reset恢复重置