text:
Stardew Valley/Foraging

Foraging is an important activity in Stardew Valley, and is one of the few activities that doesn't rely much on tools or player stamina. Particularly in the early game, Foraging is a great way to earn an income, giftable items, and stamina recovery items. Foraging is a good activity for players interested in exploring the game world, or for players low on stamina but with lots of time remaining in a day.

The mechanics of foraging it pretty simple; just spot something unusual on the ground and go pick it up. The items you can collect this way vary by season, and some items appear more frequently than others. Also, some items appear in some areas but not others. If you don't pick up an item, it will usually persist a few days, but no longer. Clearing rocks and weeks allows more area for items to appear, to it pays to clean up debris.

Seasonal Items
Most common forage items are seasonal, meaning you can only find them one season of the year.

Spring items

 * Daffodil - Bus Stop, Pelican Town, Railroad
 * Dandelion - Bus Stop, W. Pelican Town, Railroad
 * Leek - Bus Stop, Mountains, Backwoods, Railroad
 * Wild Horseradish - W. Pelican Town, Mountains, Backwoods

Summer items

 * Spice Berry - Bus Stop, W. Pelican Town, Mountains, Backwoods, Railroad
 * Grape - Bus Stop, Mountains, Backwoods, Railroad
 * You can also grow Grapes as a crop.

 * Sweet Pea - Bus Stop, W. Pelican Town, Pelican Town, Railroad
 * Wild Plum - Bus Stop, Mountains, Backwoods, Railroad

Fall items

 * Common Mushroom - W. Pelican Town, Mountains, Backwoods
 * Wild Plum - Bus Stop, Mountains, Backwoods, Railroad
 * Hazelnut - Bus Stop, Mountains, Backwoods, Railroad
 * Blackberry - W. Pelican Town, Pelican Town, Railroad

Winter items
In addition, you can dig up Snow Yam and Winter Root by digging at roots.
 * Holly - Bus Stop, W. Pelican Town, Pelican Town, Mountains, Backwoods
 * Crystal Fruit - Bus Stop, W. Pelican Town, Pelican Town, Mountains, Backwoods, Railroad
 * Crocus - Bus Stop, W. Pelican Town, Pelican Town, Mountains, Backwoods, Railroad

Seasonal Seeds
There are four types of seeds from which you can grow most of these items, one type for each season. You can craft a set of 10 by combining four different items, and you can obtains larger sets as rewards for completing Community Center bundles. Plant and grow them as with regular seeds, the result will be a random assortment of Forage items.

Pelican Beach
Pelican Beach has its own set of items, various shellfish which wash up on shore.
 * Clam
 * Cockle
 * Mussel
 * Oyster
 * Rainbow Shell (Summer only)
 * Nautilus Shell (Winter only)

The tidal pool
There is a broken bridge connecting the main Pelican Beach area to a tidal pool to the east. Repairing the bridge is relatively easy, you need 300 Wood. (This may seem like a lot at the beginning of the game, but later on it should be no problem. You can find Coral and Sea Urchins there; these are difficult to obtain otherwise.

Wild berry seasons
In mid-spring you may notice that many of bushes have berries growing on then. Click on a bush to shake the berries off and collect them. They are Salmonberries, a convenient source of energy. Similarly in early fall, you can find wild Blackberries the same way. You can also grow Blackberries as a crop. Unlike farm crops, wild berries only appear in normal quality. The in game television show Livin' Off The Land mentions these seasons when they arrive.

Wild Onions
In spring, Wild Onions grow in W. Pelican Town. To find them, cross the bridge southwest of Marnie's house to a small island in the middle of the river. Then cross another bridge south to a large section of land east of the river. There are four sandy area here where you can find the onions. Unlike regular forage items, you have to pull these out of the ground instead of just picking them up. Later in the game, you can learn how to clean the onions better to get more value from them.

Mines
You can find Forage items in the mines, sometimes lying on the ground and sometimes by digging at soft ground. These include:
 * Red Mushrooms
 * Purple Mushrooms
 * Cave Carrots

The Secret Woods
When you've upgraded you axe to the point that it can chop through fallen trees, you can clear the path in the northwest corner of W. Pelican Town. The path leads to the Secret Woods. There are several Forage items you can find there, some of which are difficult to obtain any other way.
 * Wild Horseradish
 * Morel (spring only)
 * Fiddlehead Fern (summer only)
 * Chanterelle (fall only)
 * Holly (winter only)
 * Common Mushroom (spring and fall)
 * Red Mushroom (summer and fall)

The Farm Cave
At a certain point in the game, Demetrius offers to set up some specimens in the cave next to your farmhouse. You can choose either a mushroom box, in which case you can harvest six mushrooms from the cave every day, or fruit bats, in which case you can harvest various pieces of fruit which occasionally appear. Both options give the product every other day. There are more reliable ways of obtaining fruit in the game, but this seems to be the easiest way to obtain certain rare mushrooms, so the mushroom box will be the better choice for most people.

Sap
Sap is listed as a Forage item, but instead of picking it up off the ground it's a by-product of chopping trees. It may also be obtained by using a Tapper on a Mahogany Tree or killing any slime besides Big Slimes.

title: Stardew Valley/Foraging


text:
PostScript FAQ/General

General
The best way to learn any language is to use it. Pick an interesting problem (for instance quine) and try to code it in the new language. Download Ghostscript to test your work.

PostScript resources
There are several texts and resources on PostScript available free online. Some of these are.

Blue Book (PDF 0.9M), PostScript Language Tutorial and Cookbook, Adobe Systems, Addison-Wesley 1985, ISBN 0201101793 is the best introduction to PostScript language. PostScript operators are introduced in easy and well-paced way. Sample programs are easy to read and print beautiful pictures. The book describes only a fraction of level 1 PostScript. By itself it is not sufficient for professional work.

Green Book, (PDF 0.9M) PostScript Language Program Design, Adobe Systems, Addison-Wesley, 1988; ISBN 0201143968; shows how to use PostScript in real world situations. Among other things, it explains how to re-encode the font. This question is asked almost every month on comp.lang.PostScript. Although the book is based on level 1 PostScript, the good programming practices have not changed so much as the language itself.

White Book (PDF 0.5M) Adobe Type 1 Font Format, version 1.1, Addison-Wesley, 1990, ISBN 0201570440 describes the format of Type 1 font. The hinting rules description might have been accurate at the time of writing, but modern interpreters seem to use different algorithms. For instance, Adobe interpreters appear to auto-hint diagonal stems.

Red Book (PDF 7.6M) PostScript Language Reference Manual, Adobe Systems Addison-Wesley, 1999; ISBN 0201379228 912 pages, is the official description of PostScript language. Everything in the book is important; everything is explained only once. The Red Book is also available on paper for those who prefer to read in bed. An older version (dated 1999), without the necessity of registration in one of Adobe's partner programs, is available here.

Thinking in PostScript (PDF 0.8M) Glenn C. Reid, Addison-Wesley 1990; ISBN 0201523728 is a good introduction to PostScript. Many programmers prefer to think in terms of objects and methods but the book is available for free. Why not give it a try?

Adobe technical notes for developers cover many topics not included in the Red Book.

news://comp.lang.PostScript usenet group is the best place to discuss PostScript and Ghostscript issues.

freenode.net has a "##postscript" IRC channel to discuss PostScript.

Illustrations - A manual of geometry and PostScript", a book by Bill Casserman, contains many PostScript examples of all kinds.

Jim Land's Collection of PostScript and Ghostscript resources contains many links to PostScript resources available on the net.

Don Lancaster's PostScript Library contains dozens of original articles, utilities, and carefully selected links.

Ghostscript community site among other things hosts mailing lists, documentation archive, and Subversion repository with a handy web interface.

Ghostscript home page is an alternative distribution site for Ghostscript and related programs.

SourceForge is a primary Ghostscript distribution site. The bug tracker and CVS repository are no longer hosted there.

Ghostgum Software is a small software company located in Melbourne, Australia that is developing GSview GUI interface to Ghostscript, and RedMon Windows port redirector. The products and documentation are available for free download. The company also distributes Ghostscript on CD-ROM.

Artifex Software is the main developer and copyright holder of Artifex Ghostscript PostScript, PDF and PCL interpreter technologies. You need an Artifex license if you intend to redistribute Ghostscript technology with your proprietary products, or if you intend to use any source code from Ghostscript technologies within your proprietary products. Please contact them for details.

Unfortunately, many aspects of PostScript language are not documented at all. Ghostscript source code is the best reference to undocumented PostScript. For instance, do you know that Adobe implementations skip,  ,  , and   after   but don't skip   or. So the binary stream cannot start with some white space characters.

How to report a PostScript error?
A strange error happened... It crashed... I've done nothing... Help...

Unfortunately little can be done without the sample file and detailed description of the problem. Please generate and submit the PostScript file — that's what PostScript programmers know the best. If possible, create a small file: delete insignificant objects in your graphic application and choose small images.

Don't submit native application files. Most likely PostScript programmers don't have your applications. Quark alone has several mutually incompatible versions of QuarkXPress which cost from $500 to $2000 each. Some parts of the PS files come from a PostScript driver or PPD. It is very difficult to reproduce the user's environment exactly on the developer's computer.

Never send the file to discussion groups, unless the file is hand-made, ASCII only, and fits on the screen. Most readers don't need your file, many have slow modem connection, some even pay for the Internet traffic. Put the file on FTP or HTTP server and post the URL. If you don't have a site, you can get a free one from many free ISPs.

With a prior agreement, you can send small files ( < 7M ) by email. Normally ISP limits the size of a single message to 10M but base 64 encoding expands files 1.25 times. If you absolutely need to submit a big file (>300M), mail it on CD or DVD.

Bugs in Ghostscript should be entered directly into Ghostscript Bugzilla.

Who can help me?
This is a list of people and companies that are willing to answer user's questions about PostScript and related technologies and do custom software development.

GNU service directory is a list of people and companies who offer support services for GNU software, for a fee or in some cases at no charge. Many of them also offer support for non-GNU free software and general consulting.

Software Contractors' Guild is a resume database run by software contractors/consultants who want to expand the range of choices available to them and to their clients. About 50 people offer PostScript services.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: PostScript FAQ/General


text:
PostScript FAQ/Using PostScript

Do I need a PostScript printer?
There are several situations when PostScript printer is desirable:

 * you need to print documents with placed EPS files
 * you receive print jobs from 3rd parties and need a portable page description language
 * you expect to print variable content documents
 * desktop printer serves as a cheap proofer for a more expensive printer or imagesetter
 * vector page description is much shorter than the raster image of the page
 * you run Unix-like system where PostScript language serves as a printer API.

Software RIP with a non-PostScript printer is becoming a good alternative to a PostScript printer. Unlike built-in RIP the software and hardware can be easily upgraded. The host OS also provides a better debugging environment.

How to create a PS file?
PostScript is a low level page description language. The PostScript graphic model is based on presentation elements: lines, curves, characters, images. There is no notion of words, paragraphs, justification, footnotes, etc. Most authors prefer to work on the higher level and generate presentation formats (PostScript, PDF, PCL, etc.) from the high level page description.

TeX is a typesetting program designed for high-quality composition of material that contains a lot of mathematical and technical expressions. It has been adopted by many authors and publishers who generate technical books and papers. It was created by Professor Donald Knuth of Stanford University, originally for preparation of his book series The Art of Computer Programming.

groff (GNU troff) software is a typesetting package which reads plain text mixed with formatting commands and produces formatted output.

PostScript printer drivers on Mac OS and Microsoft Windows can generate PostScript file from the incoming GDI calls. So every application that prints can also generate PostScript. However the set of graphic primitives in the file will be limited by the GDI graphic model. Most graphic editors and DTP applications bypass GDI and generate PostScript directly. This helps to generate better PostScript and provides more flexible graphic model to the application.

Sometimes it is necessarily to create or modify PS files by hand. PostScript files can be big and contain binary data. The text editor should not expand tabs or normalize line ending. emacs is a good choice because it is extensible and includes a PostScript major mode.

How to send a PS file to a printer?
On a Unix-like system you can use :

On Microsoft Windows you can send the file to a printer as: or Some of the printers also support lpr protocol.

PrintFile is a freeware GUI Windows program that copies files the system print queue. It can also pick pages from the DSC-conforming PostScript file.

On, you can drop the file on the printer icon.

What is the best way to view a PS file on the screen?
PostScript file is designed for sequential printing - images are often stored as inline streams, page size and resolution is a part of page description.

The viewer is expected to browse the document in random order and magnification. This can be achieved by converting the PostScript to an internal form that enables direct access to page elements and fast clipping of invisible objects. None of the PostScript viewers work this way.

GSview is a free graphical interface for Ghostscript developed by Russel Lang at Ghostgum Software. The page selection is implemented through DSC processing; zoom is implemented by re-interpretation of the page. GSview is available for Win32, Win32s, OS/2 and GNU/Linux. Older versions are available for Win16. There are other graphical X-Window front ends for Ghostscript - examples are mgv, Moonshiner and Okular.

PostScript can be easily converted to PDF using Ghostscript, ps2pdf online, Distiller, PDFCreator and a few of other programs. There are many more PDF viewers than PS viewers. Furthermore PDF viewers often are more user friendly than most PS viewers, the most convenient way to view a PS file is to convert it first into a PDF file. The most popular free PDF viewers are Adobe Reader, Evince, Foxit Reader, MuPDF, Okular, PDF-XChange Viewer, Sumatra PDF and Xpdf.

How to send a binary PostScript file to an ASCII-only printer?
Many network printers don't accept PS files containing binary data.

Sometimes it is impossible to re-create the file as 7-bit ASCII but any file is easy to convert to ASCII stream and execute it through the corresponding decoding filter. The following script converts standard input to hexadecimal stream and adds the decoding code. All DSC comments will be hidden but most printers ignore them anyway. The script was tested on bash and GNU/Linux systems.

The version of the script for MS-DOS and Windows has to read character from itself because  prints (with the quotes).

(octal dump) comes from the GNU Textutils package. It is available on all stock Unix-like systems (including macOS) and can be installed on Windows with Cygwin or MinGW packages.

PostScript utilities can be easily programmed using the PostScript language. The following program reads the input file or standard input, compresses it, optionally converts it using encoding, and writes to output file or standard output. The program is run by Ghostscript using:

gs -q [-dASCII] [-dLEVEL3] -- encode.ps [INFILE [OUTFILE]]

Where:
 * suppresses writing of copyright information to stdout
 * selects encoding
 * selects encoding introduced in level 3
 * is the program
 * is input file, defaults to stdin
 * is output file, defaults to stdout

If needed, DSC processing can be done before downloading the file to the printer. Development of a DSC-aware ASCII85-based converter is left for the exercise of the reader.

How to print an EPS file?
Encapsulated PostScript, or EPS, files are usually meant for inclusion in printable PostScript or other EPS files.

Unlike the printable PostScript they can have:
 * operator not included
 * image shifted outside of the printable area
 * image size too big or too small
 * PC-style header and preview

Thus, sending EPS files to a PostScript printer directly may cause a PostScript error or only page to be printed.

The standard way is to place EPS in the page in a graphic design application and print.

In order to directly print an EPS file, you need to add a PS header that does all the necessary adjustments.

A suitable header is given as an example on the net.anastigmatix.Import resource page.

How to check whether a PostScript file is valid ?
Send the file to a PostScript interpreter. If you like the results the file is valid. PostScript interpreters include:

 * Any PostScript printer

There are others of course, but these are the simplest/cheapest to get hold of.

In fact this will check correctness of the PostScript program only on the interpreter where it has been tested. Different interpreters provide very different execution environment that can make PS program take a different branch.

PostScript program can produce unexpected output without reporting any PostScript errors. In the mission-critical situation a proof page printed on the laser printer and signed by the designer is mandatory.

How to count pages in a PS file?
Interpret the file using bbox device and count HiResBoundingBox lines. Somewhat faster is also the command Assuming the document is DSC-conforming one can count %%Page comments directly in the document.

How to determine which pages are color and which are monochrome?
First, you need to decide what makes the page a color page. Probably, monochrome page has zero density of CMY components. To check this using Ghostscript you need to select a true color CMYK device, install correct CRD and rasterize the file.

The page is a color page if any pixel has non-zero components in CMY planes.

How to print only some pages from a PS file?
DSC (Document Structure Convention) was intended to provide an easy way to parse the PostScript document, rearrange pages, add missing fonts, substitute images, etc. Although most programs generate DSC comments few programs use them. It appears that correctness of DSC comments has been never tested even by major vendors.

Sometimes the document claiming DSC conformance fails with PostScript errors after modification. Even worse the pages can be spoiled in some subtle way. For instance, some characters of the incrementally downloadable font may be silently replaced with a default character.

Page selection based on DSC comments is used by PrintFile and GSview.

PDF can serve as a convenient intermediate format esp. when page extraction is performed more than once. You can use Ghostscript to convert the file to PDF and extract a range of pages as following: Occasionally, other graphic formats can work better than PDF. The author once wrote  to place two A5 pages on a single A4 page and rearrange pages into signatures for some old PCL printer.

How to rearrange pages of a PS file for printing a brochure?
There are several ways to solve this problem. Every approach has its advantages.

Direct manipulation preserves most of PS structure and takes least processor time. Unfortunately, it is only applicable for DSC-conforming PostScript files. Although most DSC files generated by mainstream applications claim DSC conformance few have been tested as such. For instance, Microsoft PS driver generates non-conforming files by default.

from psutils can select and reorder pages in the DSC-conforming PS file.

Conversion to raster image is a simple and reliable approach. For instance extracts pages from the PCL file, reorders pages into signatures, and places them 2-up. Ghostscript can be used for PostScript to PCL conversion.

Conversion to PDF greatly simplifies further document processing. Pages in PDF file can be extracted and printed in any size or order. The PostScript file can be converted to PDF using several applications. For instance, Ghostscript To extract a range of pages from a PDF file into another PDF file use To extract a range of pages from a PDF file and convert to PS file use: It is always safe to concatenate PDF files as following The methods above are sufficient to rearrange pages in any order but complex jobs can be done more efficiently. The PDF file can be convertrd to a simple DSC-conforming PS file. The output file will be very simple, because all the complexity is hidden inside Ghostscript libraries. The format is trivial to modify using any DSC utility, text editor, or script. Updated file can be converted back to PDF. The DSC file uses GS libraries, which is fine if the DSC file is fed to Ghostscript only. To generate a portable PS file convert it back to PS.

Why does my PS driver generate color drawings but grayscale images?
When the driver generates PostScript stream for monochrome printer it often converts color images to grayscale for better transmission time, faster rendering, and lower resource usage. Conversion of vector objects to grayscale doesn't save much space or time. So the driver leaves it to the PostScript interpreter.

This problem often happens when the job is printed to Generic PostScript printer driver. Generic driver is not the best one. It is limited to the common subset of PostScript language available on most printers. It is monochrome, has small choice of media, fonts, no special features.The PostScript file from Generic driver will print on wide variety of printers but many features will be missing.

Although it appears like every printer uses a special driver it is the same driver configured for different printers. The driver takes configuration parameters from PPD file. When possible the native PPD file should be used. The Acrobat Distiller PPD is a good choice to generate a color PostScript file free of vendor-specific features.

How to recombine plates in preseparated PostScript file?
It is very simple to rasterize the pages and recombine the pages into the composite file. Rasterization can be done at 8 bit per plane or 1 bit per plane depending whether any color correction is desired for the composite image.

Merging the planes on vector level is much more difficult. The only known tool for this job is the Seps2Comp Acrobat plug-in from Creo (now discontinued and unsupported). The PostScript file can be converted to PDF using a number of programs including Ghostscript and Acrobat Distiller.

How to remove black frames around n-up pages?
Windows driver generates black frames around virtual pages when it does n-up printing. The frames are drawn in  procedure. To remove the frames this procedure must be modified. On level 3 interpreters can identify and replace this procedure when the job file is loaded by the interpreter. No modification of the job file is needed. To activate the replacement you need to copy the idiom file to  directory on the printer or host-based interpreter. The PostScript root directory on a host-based interpreter likely to be different from the system root. For one-time replacement you can also prepend the  file to the job file.

For level 1 and 2 interpreters one has to remove  fragment from the job file itself using any text editor.

How to print A4 on US Letter or vice versa?
To be written.

The document can be scaled or just shifted. Fix pagedevice, policy 3,

How to extract figures from PostScript files?
Figures in PostScript document are often included as EPS files and can be easily extracted with a text editor. In the DSC-conforming document the EPS file is framed by using a text editor. Don't forget that EPS files can be nested.

EPS files extracted from the PostScript file don't have a preview, which can be re-generated with Ghostscript.

How to change color PostScript to black-and-white?*
If you can run, look for , a tiny perl script that will change every RGB color declaration in a PostScript file to a black or grey value. Simply enough, it replaces "setrgbcolor" with "pop pop pop 0 setgray". The script can be found at bw_convert. The script author is not documented on that site. However, this script is really an excellent example of how not to do things; the author has not really grasped that PostScript is a programming language, and that simple lexical changes will often fail, while adding an extra line of code at the start would be more effective. The script also does not touch images, CMYK data, or level 2 color operators.

A similar thing can be done by adding the following line at the beginning of a PostScript file: It will overwrite  with   and calculate a grayscale color. Still this will not affect images and might not change everything that you wanted to change. There also could be other problems so no warranty on that.

How to tweak RGB to CMYK conversion but leave other objects intact?
Level 3 PostScript has a powerful method for tweaking correction of device-dependent colors to device-independent colors:  page device key and color spaces.

When  flag is on, grayscale, RGB, and CMYK colors are interpreted as the colors in ,  , and   color spaces. It is little known that an array form of device color spaces ( e.g. ) can be defined as a  resource effectively disabling the corresponding conversion.

Conversion of CMYK to device-independent colors is often undesirable because of the loss of black generation information.

How to get date and time?
Built-in access to the date and time is with and  on the   device, which appeared in the PostScript Language Reference Manual version 2012 supplement for PostScript LanguageLevel 2. The following code will write the date and time to standard output:

The standard does not provide for timezone information and the clock is generally set for local time. Its range extends to 2079. If the interpreter is running on a host operating system, the OS is likely to determine whether  can actually set the clock.

A host-based PostScript interpreter can access the file system, including named pipes and devices, so possibilities are endless. This example was tested on GNU+Linux using the specific interpreter Ghostscript.

Type the following on one terminal:

Run  on another terminal in the same directory, then type

Now, typing  at the Ghostscript prompt shows the current time, using the host OS   command instead of the   device.

PostScript has been used to implement an HTTP server.

title: PostScript FAQ/Using PostScript


text:
PostScript FAQ/Programming PostScript

How to edit a PS file?
Few people want to edit HPGL or PCL. PostScript is yet another control language used by some laser printers. In most cases PostScript file is algorithmically derived from some human-readable document. Get the original document, if possible.

Visual editing requires interpretation of the PS file, editing of the objects, and generation of a new PostScript file. Few applications support all features of PostScript graphic model. Unsupported features will be lost or approximated. Being a programming language PostScript can take different branches depending on the execution environment. Untaken branches will be discarded by the interpreter leaving no trace in the editor. When the printer driver generates PS file it doesn't care about preserving high-level structure. It can be very difficult to do something beyond fixing a spelling error or changing a page number.

Many mainstream graphic editors can import PS files. The quality of the built-in interpreters varies and is often limited to level 1. PDF import filter tend to work better; try to convert the PS file to PDF first.

If the PS file has too many primitives unsupported by the visual editor,  utility from Ghostscript can be used to reduce PostScript file to a sequence of path operations.

Tailor, from EnFocus Software, seems to be the only proprietary PostScript editor available. (It was discontinued long ago). There is also a software from CGS called PDF Tuner that can edit both PostScript and PDF files. This Software is constantly developed.

Manual editing requires good knowledge of PostScript language and a robust text editor. Occasionaly users make PS files over 100M long. The files often contain binary data; sometimes they depend on the exact size of data.. The text editor shouldn't expand tabs or normalize line ends. Hexadecimal view of the file can be handy.

Redefinition of operators and procedures is a powerful technique to alter the behaviour of a PS file. New code can be included into the RIP startup script, copied by the driver from PPD, or added directly into the file by an input filter. token operator helps to take away the control from the PostScript interpreter when operator redefinition doesn't work.

Idiom recognition is an automated technique to patch a PS procedure when it is bound. Although it was designed to add smooth shading to legacy PostScript programs it can be also used to fix bugs.

How to create a PS form and populate it from a database?
Fixed format forms can be created in any graphic editor and contain any presentation graphics. The variable content fields can be reserved using placeholder EPS files.

The placeholder EPS files can be replaced with variable content using standard Unix text tools. For many years a similar technique has been used in OPI workflow.

Alternatively, the placeholder EPS files can be made smart and print themselves. Variable content can be retrieved from PostScript VM or external files.

Variable format documents need text reflow and re-pagination. You have the option of using available resources for direct PostScript text formatting, or creating the report in a higher level page layout language (TeX, groff) and converting it to PostScript or PDF.

In most cases it is impossible to replace words in a PostScript document harvested from a standard PostScript driver. Drivers can fragment the word for kerning without, use hexadecimal strings, or convert the line of text to a sampled image. The latter is a common way to print Asian fonts on Roman printers.

How to concatenate several PS files?
Contrary to the popular belief PostScript files cannot be concatenated to get the combined result. # won't work cat page1.ps page2.ps page3.ps > threepages.ps Entering the files as a separate Ghostscript arguments won't help either. # won't work gs -sDEVICE=pswrite -sOutputFile=threepages.ps page1.ps page2.ps page3.ps PostScript programs change the state of the PostScript interpreter and these changes must be undone before the next program runs. First, write the following header. %! /begin_file { /save_state save def % save state of PS interpreter currentfile 0 (% $$$ EOF Mark $$$) /SubFileDecode filter cvx exec % safequard against flushfile, etc.  } bind def /end_file { clear cleardictstack % clear after the file save_state restore   % restore the state } bind def Include every PostScript file in the following wrapper and append them to the header. begin_file % Include your file here. % $$$ EOF Mark $$$      % don't delete this line end_file The result won't be DSC-conforming even if the original files are.

Composition of EPS files is done by placement of the files into a container EPS file.

PostScript interpreters that work in a job server mode (most printers, Ghostscript 8.50 or higher with ) treat multiple jobs delimited with   character and piped to the input stream as independent jobs.

In general it is impossible to concatenate several PS programs to get the combined result. The following program will defeat all attempts to append something to it. Most commonly such techniques can be found in OCF font installers.

systemdict begin (%stdin) (r) file flushfile

How to print accented characters?
Single byte PS fonts can include many glyphs, but only 256 of them can be accessed at the same time. The 256 element array mapping a character code to the glyph name is known as an encoding vector. The PostScript language has several built-in encoding vectors. You can (and should always) re-encode your fonts. The ISOLatin1Encoding is probably a good start. To re-encode the font, what you need to do is:

/Courier findfont              % load the font, for instance, Courier 0 dict copy begin              % copy it to a new dictionary /Encoding ISOLatin1Encoding def % replace encoding vector /MyCourier /FontName def       % replace font name currentdict end dup /FID undef                 % remove internal data /MyCourier exch definefont pop % define the new font

Re-encoded fonts can be used in the same way as any other fonts.

There are several ways to print more than 256 glyphs at a time.
 * Create a few re-encoded fonts and select them when needed.
 * Use glyphshow for rare characters
 * Make OCF fonts from several re-encoded fonts. OCF supports every imaginable encoding scheme.
 * Make a composite font from CMap and Font or CIDFont resources.

How to justify text in PostScript?
The common approach is to do text formatting in an application. The application emits PostScript code reflecting the final format - now a simple question of dumping things at x, y coordinates. If an application overrides the default interword/interletter spacing (say, for justification or kerning), it should use PostScript's ashow, widthshow, awidthshow, kshow, xshow, yshow, or xyshow operators, which take an intact text string and a separate specification for positioning the elements. The sloppy alternative, just using show on individual letters and small word fragments with movetos in between, is a hindrance for text extraction programs and distillers.

To perform common functions of text formatters, such as hyphenation, multi-column text, footnotes, bibliography, glossary, etc., in PostScript itself requires implementing suitable algorithms in PostScript and supplying them along with the file to be rendered, either included in the file or downloaded in advance. Existing implementations include David Byram-Wigfield's TinyDict, Graham Freeman's Quikscript, and Don Lancaster's Gonzo Utilities. All three are quite full-featured, with justification, columns, pagination, and many other features. Simpler building blocks include Chapman Flack's Markup, which can be used as a front end to those, or to do simple left/center/right unfilled/unjustified text setting on its own, and Hyphenate, an implementation of the TeX hyphenation algorithm, for which many language-specific patterns have been compiled. Collectively, these approaches that do the bulk of the computation in PostScript itself can be called (Byram-Wigfield's term) direct PostScript, and the Anastigmatix direct PostScript page further describes and compares them.

Automatic kerning requires information that is in the Adobe Font Metrics (AFM) files that come with most fonts, so to do it in PostScript would require downloading also the appropriate AFM files and some PostScript code to parse them (the syntax is simple). No direct PostScript resource that does this seems currently available. All of the existing systems do permit manual kerning, which is usually adequate as kerning is most important for large display type, accounting for a small fraction of a typical document.

Designs are not limited to two approaches, all formatting in the application emitting pure PostScript only or full-fledged direct PostScript. The first approach tends to save compute time on the printer at the expense of emitting large, uneditable PostScript files and longer transmission times to the printer, and direct approaches can have compact, editable files (with fixed prologs of implementation code that can be downloaded once in advance) and do more computation on the printer. Most applications choose a compromise, doing some of the work in the application and including prologs in the emitted PostScript that provide procedures to finish the work on the printer itself. It would even be possible to design an application that used one of the existing direct PostScript resources as its prolog, and emitted the document in that form.

How to place several copies of a picture?
The picture can be a sampled image or EPS file.

PostScript always reads the standard input stream forward. There is no way to reposition the file or push characters back. Next picture need a new copy of data. To reuse the picture we need to copy the data from the input stream to the reusable object.

Short data can be stored in a PostScript string, but the string length is limited to 64K-1. More data can be stored as an array of strings. The length of array is also limited to 64K-1 but this is enough to exhaust the memory on most printers. In fact low end printers can have as little as 256K of free memory.

Encoding filters can be used to compress picture data. In level 3 PostScript most encoding filters are optional.

PostScript level 3 introduces reusable streams. They cache the input data and can be repositioned after reading to the end of the file. On disk-less printers reusable streams are implemented in memory file system.

Some printers and most host-based RIP's have writeable file systems.

To avoid multiple rendering PostScript level 2 introduced forms. It is a wrapper around a procedure that hints PostScript interpreter how to cache rendering results. The form procedure can be executed many times and need reusable data source. Forms are rarely used and many Adobe OEM choose very small default size for the form cache.

How to redefine an operator?
The simpliest approach is to use  operator. /foo { bar } bind def This approach is not recommended in production environment where  can be already redefined as a procedure. The following approach works in all cases. /baz /foo load def /foo { baz bar } bind def Ghostscript also provides implementation-specific ways of operator redefinition. See the comments to  operator in Ghostscript sources.

Good redefinition should preserve as many features of the original operator as possible. The following simple redefinition of halftone operators can cause several unexpected problems. /sethalftone { pop } bind def /setscreen { pop pop pop } bind def /setcolorscreen { 12 { pop } repeat } bind def First, halftone can read data from the current file. Second, differences in error processing may be significant. The stock installation of an early version of Mac OS X generated the following code: featurebegin { 30 60 setscreen % no function! } featurecleanup The redefinitions above would smash the stack and cause a PostScript error regardless of. Here are better redefinitions /sethalftone_orig /sethalftone load def /setscreen_orig /setscreen load def /setcolorscreen_orig /setcolorscreen load def /sethalftone { gsave sethalftone_orig grestore } bind def /setscreen { gsave setscreen_orig grestore } bind def /setcolorscreen { gsave setcolorscreen_orig grestore } bind def

How to concatenate strings?
PostScript doesn't have a build-in string concatenation operator. The following procedure, copied from GNU Ghostscript, seems to be the shortest. /concatstrings % (a) (b) -> (ab) { exch dup length 2 index length add string dup dup 4 2 roll copy length 4 -1 roll putinterval } bind def Concatenation of multiple strings can be done more efficiently than calling  repeatedly. The strings are stored in array for the convenience of iteration. /concatstringarray %  [(a) (b) ... (z)] --> (ab...z)      { 0 1 index { length add } forall string 0 3 2 roll { 3 copy putinterval length add }      forall pop } bind def

Where are min and max functions?
PostScript doesn't have built-in  and   operators but they can be easily coded as procedures. /min { 2 copy gt { exch } if pop } bind def /max { 2 copy lt { exch } if pop } bind def Ghostscript has  and   operators in. For the backward compatibility Ghostscript also provides  and procedures defined as: /max { .max } bind def /min { .min } bind def

How to sort an array?
Ghostscript has a bubble sort procedure in. %  .sort /.sort { 1 index length 1 sub -1 1 { 2 index exch 2 copy get 3 copy	% arr proc arr i arr[i] arr i arr[i] 0 1 3 index 1 sub { 3 index 1 index get	       % arr proc arr i arr[i] arr imax amax j arr[j] 2 index 1 index 10 index exec {                              % ... amax < arr[j] 4 2 roll }              if pop pop }          for             			% arr proc arr i arr[i] arr imax amax 4 -1 roll exch 4 1 roll put put }      for pop } bind def

net.anastigmatix.Order provides insertion sort, quicksort, heapsort, array min, max, and simultaneous minmax, and arbitrary order statistics:

/net.anastigmatix.Order /ProcSet findresource begin [7 49 73 58 30 72 44 78 23 9 40 65 92 42 87] //PolyCmp QuickSort

This Shell sort procedure sorts anything whose elements can be compared and exchanged by a procedure.

%! % Shell sort in PostScript % Copyright (c) 2002 by Alex Cherepanov. All rights reserved. % Distributed under GPL, http://www.gnu.org/licenses/gpl.txt % % Shell sort procedure based on compare and exchange operation % < i > < j > exch_less compares keys at positions i and j %                          exchange if not in order, retutn *i<*j % is the number of elements % /shellsort                       % {} len -> - { dup dup 2 idiv              % {} len m p        { dup 0 eq { exit } if          exch                     % {} len p m          15 le { dup 2 idiv } { dup } ifelse 16#fffffffe and 1 add   % {} len p m'          1 1 4 index 3 index sub  % {} len p m' 1 1 len-_m { 1 index neg 1       % {} len p m' is -m 1 { 1 sub           % {} len p m' ii-1 2 copy add      % {} len p m' ii-1 m+ii-1 5 index exec { exit }                 if                } for }         for exch 2 idiv             % {} len m' p'        } loop pop pop pop pop             % - } bind def % % Sample unsorted array % /sample_array [ 1 8 76 3 7 0 7 8 55 86 5 58 57 55 3 6 9 6 66 4 3 4 8 65 8 8 55 4 5 88 55 3 6 7 44 5 7 4 7 43 3 ] def

% % Sample array compare and exchange % The elements at positions i and j are compared and exchanged % % if (*i<*j) %  return true % (*i,*j) = (*j,*i) % return false % /array_exch_less        % i j -> bool { 6 index 3 1 roll   % [] i j  % get the element just below {exch} 2 index exch       % [] i [] j      4 copy              % [] i [] j [] i [] j      get                 % [] i [] j [] i *j 3 1 roll get       % [] i [] j *j *i 2 copy ge          % [] i [] j *j *i *i<*j { pop pop pop pop pop pop //true }       { exch            % [] i [] j *i *j 4 1 roll       % [] i *j [] j *i put put //false }     ifelse } bind def % % Sort the array % /array_sort  % [unsorted] -> [sorted] { //array_exch_less 1 index length shellsort } bind def % % Print the sorted array % sample_array array_sort ==

How can I display Copyright and other symbols?
From Level 2 on, the glyphshow operator has allowed a named glyph to be displayed:

% display a "registered trademark" symbol /registered glyphshow

Where can I get more examples of PostScript code?
Books about PostScript include many simple PS programs.

The Ghostscript distribution has a few sample PostScript files in the examples directory. A large part of Ghostscript is implemented in PostScript language including a PDF 1.4 interpreter.

Adobe has published a few sample programs for Level 3 features.

Free sample library contains many good (and bad) PostScript files. The library collects interesting examples of PostScript, PDF, PCL, and TIFF files coded manually or harvested from applications.

For an understanding of typesetting procedures see 'Practical PostScript' A Beginner's Guide to Digital Typesetting, 90 pages (E-book 416k PDF). []

 * printing rulers from PostScript

How to debug a PostScript program?
The first skill you should learn as soon as you can is how to interpret PostScript error messages. They are not always easy. Error reporting varies by product. Some products will not give PostScript error details (e.g. EPS import to Photoshop), and are best avoided for any learning purposes.

The standard PostScript error format is something like this

PS>0 1 2 3 4 5 put %%[ Error: typecheck; OffendingCommand: put ]%% PS><< >> image %%[ Error: undefined; OffendingCommand: image ]%%

You will see this includes the error name, and a command causing the error. Please do not describe this as an "offending command" error, since all messages say that, and remember that both error name and offending command are important. The latter message means that a required key was not found in the image dictionary.

If you happen to be using Ghostscript, you may get more details. Observe that the error message includes the stacks, and the operator name.

GS>0 1 2 3 4 5 put Error: /typecheck in --put-- Operand stack:  0   1   2   3   4   5 Execution stack:   %interp_exit   .runexec2   --nostringval-- --nostringval--  --nostringval--   2   %stopped_push   --nostringval-- --nostringval--  %loop_continue   2   3   %oparray_pop   --nostringval-- --nostringval--  false   1   %stopped_push   .runexec2   --nostringval-- --nostringval--  --nostringval--   2   %stopped_push   --nostringval-- --nostringval--  --nostringval-- Dictionary stack: --dict:1044/1123(ro)(G)--  --dict:0/20(G)--   --dict:69/200(L)-- Current allocation mode is local Current file position is 16 You can look at the description of the operator, and the stack to see your operands, and often see why it is complaining. Then you can (sometimes) work out where in your original code the problem lies. Remember that a failed PostScript operator doesn't change the operand stack.

Ghostscript exits when an error happens in a file passed as a command line parameter. Use operator run to keep the session and examine operand stack interactively.

$ gs GS> (foo.ps) run

Use the = and == commands to print out information about objects on the operand stack. To see the contents of a dictionary, push the dictionary on the stack and then use {== ==} forall. For example, to see the contents of the user dictionary, use userdict {== ==} forall.

Try to run the program on different interpreters. Different error messages may reveral more information about the problem. Ghostscript can print detailed dumps of operand and execution stacks when it runs with -dOSTACKPRINT and -dESTACKPRINT options respectively. The top element of the stack is printed last.

Error handler is a PostScript procedure that runs when PostScript interpreter encounters an error. It is initially installed by the PS interpreter but can be replaced by the job. The error handler provided by the PostScript driver is very basic - delete it. On Ghostscript you will get better error messages with the default error handler. On other interpreters you can use  provided by Adobe.

If the problem is not yet apparent try to make the smallest possible program that still has the problem by removing or commenting out pieces of code. Using  construct is a convenient way to disable parts of PostScript code. Save every version of the file under a different name to have multi-level undo. When the file is reduced to a single procedure, try to replace it with inline code. When the procedure is buried in other code or redefined several times, try to load it at the execution spot and print. For instance:.

You can trace a PostScript program by adding print operators into procedures or redefining operators. The Ghostscript package includes a script traceop.ps which can help in putting a trace on operators. After including the script near the front of your postscript program, you put  at the point where you want to start tracing all calls to operator foo. You then modify procedures  and   to print some relevant diagnostics. For example,  would print the whole stack just before entry into /foo. ( basically does a   as described above.) Operator /foo is then executed as normal. If a program doesn't render correctly on a raster device, chances are the same problem will occur during PS to PDF conversion. The PDF document preserves more information and can be interpreted as a trace of graphic operations.

LaserTalk was once part of the Adobe developer's kit. It was a visual front end to the PostScript printer. LaserTalk only traced the top level of execution.

PSAlter from Quite Software is the only visual PostScript debugger on the market.

How to include an EPS file?
EPS format is documented in Adobe technical note 5002, Encapsulated PostScript File Format Specification (PDF 0.2M) and 2nd edition of PostScript Language Reference Manual. The specification includes guidelines for creating EPS files (they are simply PostScript programs that contain a couple of required header comments and promise not to do certain things), and for importing EPS files. The EPS file text can simply be pasted into the enclosing PostScript program between a  and an   comment. (The  keyword can be followed by descriptive text such as the EPS file name.) It is the enclosing program's responsibility to establish a suitable state just before the inserted EPS and restore the prior state afterward. The program should:

 * take a state snapshot with
 * redefine  as no-op
 * set the color space, color, line cap, line width, line join, miter limit, dash pattern, current path, overprint, and stroke adjust modes to specified defaults
 * present an empty operand stack and the default dictionary stack (but containing the no-op )
 * compute and set a coordinate transformation that puts the EPS figure where it is wanted
 * set a clipping path matching the figure's bounding box

After the inserted EPS code, the enclosing program should discard anything the EPS code may have left on the operand and dictionary stacks, restore the prior contents, and then execute  on the earlier   object, which will undo all of the other preparations.

Applications that output PostScript typically omit the code to do all of that at every place an EPS figure is inserted, and they often cut corners and omit code that makes simplifying assumptions. Especially when writing PostScript by hand, it can be more convenient to use, for example, the Anastigmatix StatEPSF, ReadyEPSF, ExecEPSF procedures, which automate the necessary steps. The following code is then all that's needed to place an EPS at (100,550), rotated 0 degrees and scaled by 1 in both axes:

% in the document setup: /net.anastigmatix.Import /ProcSet findresource begin % at the point of import: { StatEPSF 100 550 0  1 1 ReadyEPSF ExecEPSF } currentfile exch exec %%BeginDocument: helloworld.eps ... the EPS file contents go here %%EndDocument

Of course, nothing stops an application from generating PostScript that way too.

Some EPS files contain preview images. In the DOS/Windows format, they are binary data that must be stripped out when pasting the EPS text into another program. The EPSI preview format is in the form of PostScript comments and can be removed to save space, but will not cause problems if left in place.

Does PostScript support unicode for CJK fonts?
PostScript does not specifically support Unicode. It includes general support (from level 2) for multi-byte (2, 3 or 4 byte) fonts. Unicode is just a special case of multi-byte encoding. There is no Unicode font as such, but you can use multi-byte CID fonts that provide support for ranges of Unicode.

There are no freely redistributable Unicode CMaps. They can be derived from MS Windows code pages and corresponding Adobe CMaps.

Developers often look for a "simple" way to just include Unicode strings with no checking for ranges, language etc. but this is a pipe dream.

Some PostScript engines also provide support for TrueType fonts that have no CID-mapping internally. In that case, no CID map is needed for these fonts, but only a read filter for decoding a Unicode-encoded stream for the string storing the byte sequences ; several decoding filters are possible, including those supporting UTF-8 and UTF-16, because the PostScript's "read" operator just expects the filter to return any convenient integer that is used as an index to the glyph in the font's dictionary.

Filters, that can be chained and used like other file objects by the  operator, are supported in PostScript Level 2. Note that most PostScript applications expect that  is the number of integers that   can return without waiting or encountering an end-of-file (or end-of-string) condition.

The  operator is then not limited to returning integers in the range 0..255, so the actual return value from   is a code unit (or code points or glyph ID) in any convenient encoding that is supported as glyph indexes for the selected font, and the   operator will actually read as many bytes from its source (file, string or procedure) as needed by the decoding filter. Other standard filters support data decompression, or decoding hex or ASCII85 sequences from any source.

So instead of enumerating characters in a string using the  operator, pass the string to a Unicode decoding filter, and use a   loop to enumerate characters (or glyph indexes) from the filter object, then render the characters using the returned integer index to lookup for glyphs in a composite font. If the PostScript engine does not handle a native support for Unicode or TrueType, you'll have to convert the TrueType font into a CID-mapped font and use a filter that will return CID values usable with the CID-mapped font loaded into the document preamble or transfered as a resource before your printed document.

You'll probably also need a layout engine (like ) to process the Unicode codepoints into series of glyph ids and precompute their position within the PostScript-rendered document where these will be encoded and decoded by the PostScript engine using the associated filter. Such text layout engine is needed anyway to support the BiDi alghorithm, as well as to render complex scripts, ligatures, contextual forms, or variants described in the font used in your document design...

title: PostScript FAQ/Programming PostScript


text:
PostScript FAQ/Known errors

Known errors
This is a list of work-arounds for PostScript errors in proprietary software. Bugs in free software should be reported to the program maintainer and fixed. The fixes posted here try go to the root of the problem. This database of PostScript errors gives an insight into the user's perception of PostScript errors.

undefined in /RD
This problem can be caused by incorrect embedded Type 1 fonts in PDF files or PostScript files generated from PDF. Adobe Acrobat doesn't use procedures defined in Type 1 font and the problem may be left unnoticed.

Define the following procedures in userdict to work around the problem.

/RD { string currentfile exch readstring pop } executeonly def /ND { noaccess def } executeonly def /NP { noaccess put } executeonly def

PageMaker 7.0 page information fails in level 1 mode
PageMaker 7.0 with Page Information printer's mark set ON generates incorrect PostScript file in level 1 mode. The file fails with  or  on any interpreter, regardless of the level.

The problem is caused by interaction between PageMaker code and Windows driver code. To print separations Adobe redefines a few operators, including  and uses them even in level 1 mode. PostScript driver assumes that  has no place in Level 1 PostScript and redefines it as  as a precaution, erasing the earlier definition. /setcolorspace{!}b To fix the file this definition should be removed or commented out.

title: PostScript FAQ/Known errors


text:
PostScript FAQ/Using Ghostscript

What is Ghostscript and where can I get it?
Ghostscript is a common open source software suite, which is based on an interpreter for Adobe Systems' page description language PostScript and their Portable Document Format (PDF). The suite is developed by Artifex Software and the worldwide community, it is mainly used for the rasterization and rendering of document pages to display or print them, and for the conversion between PostScript and PDF. It includes sets of free PostScript fonts and is used in many third party applications and GUIs.

Details and software downloads see Ghostscript.

How to create compressed CMYK TIFF?
Ghostscript have five TIFF devices for color management. And five TIFF compression devices, which produce only b/w images.

gs -sDEVICE=tif32nc -sOutputFile=tiger.tiff -dEPSCrop examples/tiger.eps

What CJK fonts work on Ghostscript?
Unprotected CJK fonts work on Ghostscript just fine. It is not possible to install CSL (Adobe's CID Support Library) but most PostScript programs don't need it. CSL simulates OCF structures for the jobs that assume OCF fonts on the interpreter and manipulate them directly.

Heisei and KozMin CIDFonts are unprotected proprietary fonts developed by Adobe Systems. The installer that comes with the fonts runs on Mac and installs the fonts to a network printer using PAP protocol. To install the fonts on Ghostscript you need to copy CIDFont files to Resource/CIDFont/ directory.

The CIDFont resources are hidden in resource forks of invisible files in Mac file system. get-mac-cidfont extracts all CIDFont resources from the input file (normally ) to a directory. The program also works on Windows NT.

How to avoid JPEG compression in PDF?
Ghostscript has overly aggressive heuristic identifying the images for JPEG compression. Using  operator one can manually select compression algorithm. Ghostscript accepts most distiller parameters (PDF 0.6M) as command line arguments in addition to  operator.

ps2pdf -dAutoFilterColorImages#false -dColorImageFilter#/FlateEncode \ -dAutoFilterGrayImages#false -dGrayImageFilter#/FlateEncode foo.ps foo.pdf

Ghostscript developers recognize this as a problem. The fix is expected real soon now.

Ghostscript fails with /invalidfont in findfont?
Most likely Ghostscript cannot access any fonts at all. To check what directories are searched for fonts, use gs -h or gswin32c -h

How to create a semi-transparent object?
Adobe introduced semi-transparent objects in PDF 1.4. Many new RIP's (including Ghostscript) accept PDF 1.4 directly. So there is no need for the transparency features in PostScript.

 * Ghostscript supports PDF 1.4 in v. 8.00 and up
 * Adobe CPSI supports PDF 1.4 in v. 3015 and up

Standard PostScript has opaque color model. Newer objects completely obscure the objects underneath but parts of the new object can be excluded from painting by clipping path. On level 3 PostScript a sampled image can be used for clipping another sampled image. On level 2 a similar effect can be achieved by painting pattern color through the image mask.

Very limited transparency effects can be also achieved by overprinting spot colors and pure process colors.

PDF 1.4 interpreter in Ghostscript is implemented in extended PostScript language. The extensions are visible to the regular PostScript files and can be used to the same effect. The interface is partly documented in doc/language.htm. Read the source code for details.

PostScript output interferes with redirected device output.
PostScript files that write to stdout will interfere with device output to stdout. That is why since v.7.04 Ghostscript can assign the PostScript %stdout output to a file, leaving the actual stdout 'clean' for use as device output such as with  or

For instance, to discard PS %stdout output, such as from the '=' operator, when Ghostscript is being used as a filter the correct command line is:

gs -q -sstdout=/dev/null -sOutputFile=- - | ...

With a little help from bash, named pipes can be used in place of regular files, avoiding all stdout-stderr problems.

gs -sDEVICE=pswrite -o >(wc) -c showpage

How to fix a file generated by a pswrite device
Adobe PostScript interpreters and Ghostscript v. 8.55 and higher fail with  on files with non-standard page sizes generated by old versions of Ghostscript with Subversion revisions 1225 to 2334. The affected code executes, which is not allowed by PostScript language.

The following  resource can be installed on the PostScript interpreter to work around the problem. To activate the  you need to copy it to  directory on the printer or host-based interpreter. The PostScript root directory on a host-based interpreter likely to be different from the system root. The file name doesn't matter but  is suggested. For a one-time replacement you can also prepend the file to your job file.

Ghostscript can not run my files
You try to learn postscript but you can not do: $ gs GS>(test.ps)run stack dump from gs here .... Current allocation mode is local Last OS error: Permission denied ... GS> Since version 9.50 additional safety features are active. Now you need: $ gs -dNOSAFER

title: PostScript FAQ/Using Ghostscript


text: PostScript FAQ/Printable version

title: PostScript FAQ/Printable version


text:
Somali/Alphabet

A a [aa] like ask B b [bee] like bird C c [ae] like hair D d [dee] like day E e [ee] like eat F f [ef] like fly G g [gee] like gold H h [haa] like help I i [ie] like India J j [jot] like yes K k [kaa] like kiss L l [el] like life M m [em] like man N n [en] like nice O o [oo] like old P p [pee] like play Q q [kuu] like quit R r [er] like rice S s [es] like sea T t [tee] like time U u [uu] like urge V v [vau] like very W w [wee] like west X x [ex] like ox Y y [y] like day Z z [set] like zoo

title: Somali/Alphabet


text:
Somali/Gender

Gender

 * man nin
 * woman haweeney/mareey/dumar/naag/xaawoleey
 * husband nin
 * wife xaas/oori/afo
 * boy wiil
 * girl gabar/gabadh
 * father aabe
 * mother hooyo

title: Somali/Gender


text:
User talk:Full Length Books

Do not copy material from the Internet - the "book" you have created belongs to someone else and is copyright and not acceptable here. QuiteUnusual (discuss • contribs) 17:10, 16 August 2021 (UTC)

title: User talk:Full Length Books


text: Ethical Debates in Connected Culture 2019/Printable version


text: Levantine Arabic/Adverbs

title: Levantine Arabic/Adverbs


text:
NETSquirrel - guidelines/Introduction

NETSquirrel - what's that?
NETSquirrel - it is the library for NET and NETCore which simplifies code writing on NET languages. The idea of creating this library has been come from PABCSystem unit that provides some subroutings for causing some usual operations such as arrays and matrices generation.

Why NETSquirrel?
NETSquirrel generalizes PABCSystem functionality and adds some itself all over NET. This means that you can safely transfer from PascalABC.NET language to another (ex. C#) and backward.

title: NETSquirrel - guidelines/Introduction


text:
NETSquirrel - guidelines/Namespaces structure

= Namespaces structure = There are the following namespaces to provide different functionality:

 * 1) DataStructures - provides non-generic data structures interfaces. Example: IStack interface.
 * 2) Immutable - provides non-generic immutable data structures interfaces. Example: IImmutableStack interface.
 * 3) Generic - provides generic data structures interfaces. Example: IStack interface.
 * 4) Immutable - provides generic immutable data structures interfaces. Example: IImmutableStack interface.
 * 5) Debug - provides non-generic proxy types for IDE's (such as Visual Studio and Rider) debuggers. Example: CollectionProxyType proxy type.
 * 6) Generic - provides generic proxy types for IDE's (such as Visual Studio and Rider) debuggers. Example: CollectionProxyType proxy type.
 * 7) Extensions - provides several extensions for different types. Example: Print extension.
 * 8) ConsoleSpecific - provides console specific extensions for different types. Example: DebugPrint extension.
 * 9) Utils - provides several utils for different types. Example: GenerateArray util.


text: Category:Book:NETSquirrel - guidelines

title: Category:Book:NETSquirrel - guidelines


text:
NETSquirrel - guidelines/Low complexity

Working with base types
You are capable to read values of all over base types and accomplish some extra useful operations with them via NETSquirrel.Utils.BaseTypesUtils and NETSquirrel.Extensions.BaseTypesExtensions classes. Let's consider the provided functionality.

Reading base types values from the keyboard
The general idea used in methods names is: ReadTypeName, where TypeName - is the base type's name.

ReadBool usage example:

Values swapping
Swap usage example:

Sequences generation from particular ranges
To, DownTo and ToThis usage example:

Working with arrays
You are capable to read arrays of all over base types and accomplish some extra useful operations with them via NETSquirrel.Utils.ArrayUtils class. Let's consider the provided functionality.

Arrays generators
GenerateArray usage example: GenerateArray usage example 2:

Arrays reading from the keyboard
ReadBoolArray usage example: ReadBoolArray usage example 2:

title: NETSquirrel - guidelines/Low complexity


text: NETSquirrel - guidelines/Medium complexity


text: NETSquirrel - guidelines/High complexity


text:
NETSquirrel - guidelines/Remarks

Compatibility
There is no full compatibility between NETSquirrel and PascalABC.NET due to named tuples usage. It means that the following code will not compile:

title: NETSquirrel - guidelines/Remarks


text:
NETSquirrel - guidelines/Links

These links are relevant for NETSquirrel.

 * 1) GitHub
 * 2) Official site
 * 3) Support on the Russian VK social media site
 * 4) Google Docs - Documentation
 * 5) Cyberforum - theme
 * 6) Forum of mechanics and mathematics SFU - theme
 * 7) C# - GeekforGeeks

title: NETSquirrel - guidelines/Links


text: NETSquirrel - guidelines/Printable version


text: Raku Programming/Printable version

title: Raku Programming/Printable version


text:
Dictionary of Laboratory Terms/pH

pH is a scale used to describe how acidic or basic a substance is.

title: Dictionary of Laboratory Terms/pH


text:
Scriptol/The Scriptol Programming Language

A clean syntax
C++ syntax:

for(int x = 0; x < 10; x++) { printf("%d\n", x); }

Scriptol syntax:

for int x in 0 .. 9 print x

Scriptol doesn't need for semi-colon et end of statements. The end of line is also the end of statement unless several statements fits on a same line, in this case they are separated by semi-colons. If an instruction fits on two lines, the compiler recognizes the instruction.

Objective design
Unlike C that was designed with limited hardware in mind, Perl that has added features day after day, and other languages that depends upon the fantasy of the author, Scriptol apply objectives rules, and it near the more used syntax in computer world, the xml one... Xml is tagged and has as C one-line syntax. Scriptol has one-line syntax, (see above) and is tagged:

for ... /for

Universal operators
Some programming languages use the same operator for unrelated things. For example, The C programming language uses the "*" operator for both "deferencing" and "multiply". The C programming language uses the "&" for both "address-of" and "binary and".

Scriptol tries to avoid such confusion by making each operator mean something very similar in all the different ways it is used.

For example, the range operator " .. " is used:
 * as the range in the "for" loop (see above).
 * as an interval of an array or a dictionary (see array).
 * as a range in an expression:

if x in 0 .. 9   print "x inside range" /if

Types from the real word
In the 1970s, C and Pascal invented types that were related to hardware: char, long, short, char *, float, etc...

Scriptol uses types related to the real word: text, number, integer, natural, real, array, dict, dir, etc...

Readability
A complicated and unreadable part of C++ code...

int x[] = { 1, 2, 3, 4 }; int i; for(i = 0; i < 4; i++) {  if(x[i] == test) std::cout << test << " found" << std::endl; }

may be replaced by a single and clear Scriptol statement.

if test in { 1, 2, 3, 4 } print test, "found"


text:
Scriptol/If Control Structure

Common syntax
For a conditional process, the statement is a "if" keyword, followed by a boolean expression, a list of statements to execute or no, depending of the condition, and the "/if" keyword.

If x = 5 print "equal" /if

Introducing an alternative by the "else" keyword: when the condition is false, another list of statements may be processed.

If x = 5 print "equal" else print "not equal" /if

One-line structure
When the body of the structure is just one statement, and not another structure, the syntax may be shortened to only a single line.

If x = 5 print x

If the statement is not a command as "print", "break", "continue" etc..., the "let" keyword is required.

If x = 5 let y + 1

Composite if
The structure may be extended into a more powerful construct that is both an "if" and a "switch case" structure, even more advanced than the C counterpart since you can test any type of variable.

if x   = 5: print "equal" > 5: print "more" else print "less" /if

title: Scriptol/If Control Structure


text:
Scriptol/For In

Common syntax
The standard syntax assigns a variable with the elements of a range, and Scriptol writes a range as it is commonly written, with a double dot between two values (or variables).

for int x in 0 .. 10  print x /for

One-line syntax
If the body of the structure is only one statement, a simplified syntax is used.

for int x in 0 .. 10 print x

For in list
The for control structure may scan an interal as above, but also a text or an array.

text hello = "hello" for text t in hello print t

array a = { 1, 2, 3 } for dyn x in a print x

title: Scriptol/For In


text:
Scriptol/While Let

Common syntax
while x < 5 print x x + 1 /while

To increment a variable, Scriptol uses x + 1. This could not work in C and other languages.

Infinite loop in C
The C and C-like languages (C++, Java, C#) leads easily into infinite loop. Here hare two simple examples.

while(x < 5); {  printf("%d\n", x); x += 1: }

Perhaps you have instantaneously noticed it (and perhaps no), but the construct is bad, due to the semi-colon after the condition!

Another example without the misplaced semi-colon:

while(x < 10) {  printf("%d\n", x); if(x = 5) continue; ... some statements ... x += 1; }

title: Scriptol/While Let


text:
Scriptol/Scan By

Common syntax
The scan control structure allows to parse one or several arrays, and to apply a process onto each element of the array(s).

scan a a[] * a[] print a[] /scan

The current element is denoted by an empty indice.

Example with two arrays:

scan a, b print a[] + b[] /scan

Scan with a function
You can apply instead a predefined function. The argument of the function is an element of the array.

array a = {1,2,3,4 }

void fun(number x)  print x * x return

scan a by fun

If you use several arrays, the number of argument of the function must be the number of array.

title: Scriptol/Scan By


text:
Scriptol/Xml or class

Common class
Scriptol is object-oriented and has classes and inheritance. Defining a class is easy. Example of a very simple class.

class car int speed void getSpeed ... some statements ... return speed /class

Xml
But Scriptol has also xml. Defining a xml document is simple also.

xml Car speed value = "10" / wheels number = "4" passengers number = "5" Clara, Charly, Corinna, Cyril, Cecilia /passengers /xml

Using Xml
Classes are used directly or by creating an instance, and making reference to attributes or calls to methods.

Using Xml is not different. You can define how many instances of xml documents you want, and modify the content of each of them. The content of elements or attributes may be assigned, and elements and attributes may be added of removed.

Car myCar ` myCar is an instance of the Car Xml document. print myCar.speed ` displaying the value of the "speed" attribute. print myCar.passengers ` displaying the content of the "passengers" tag.

Importing xml document
Xml is mainly useful for performing processes on documents produced by various tools, word processors, spreadsheets, etc....

To load such documents, Scriptol integrates a sax parser. You have just to declare a xml document, load le xml file, and you can use the document as a class declared in the source.

xml Car ` declaring an empty xml document. /xml

Car myCar` defining an instance (not required). myCar.load("document.xml") ` loading an external xml document

Car.load("document.xml") ` you can use directly the xml class itself

Iterator
Iterator on xml document is as iterator on array, plus the down and up methods. Iterator allows to parse an entire xml document or just sub-elements of of an element.

demo.begin while demo.isFound print demo.getData let demo.inc

title: Scriptol/Xml or class


text:
Semantic Web/Introduction

The semantic web is an exciting evolution of the World Wide Web (WWW) providing machine-readable and machine-comprehensible information far beyond current capabilities. In an age of information deluge, governments, individuals and businesses will come to rely more and more on automated services, which will improve in their capacity to assist humans by “understanding” more of the content on the web. This has potentially far-reaching consequences for all businesses today.

More information on the web needs to be structured in a form that machines can ‘understand’ and process rather than merely display. It relies solely on a machine’s ability to solve complex problems by performing well-defined operations on well-defined data. Sir Tim Berners-Lee, inventor of the World Wide Web, has coined the term “Semantic Web” to describe this approach. Berners-Lee, Hendler and Lassila provide the following definition:

The Semantic Web is not a separate Web but an extension of the current one, in which information is given well-defined meaning, better enabling computers and people to work in cooperation.

What Is The Semantic Web?
The Semantic Web is a mesh of information linked up in such a way as to be easily processable by machines, on a global scale. You can think of it as being an efficient way of representing data on the World Wide Web, or as a globally linked database.

The Semantic Web was thought up by Tim Berners-Lee, inventor of the WWW, URIs, HTTP, and HTML. There is a dedicated team of people at the World Wide Web consortium (W3C) working to improve, extend and standardize the system, and many languages, publications, tools and so on have already been developed. However, Semantic Web technologies are still very much in their infancies, and although the future of the project in general appears to be bright, there seems to be little consensus about the likely direction and characteristics of the early Semantic Web.

What's the rationale for such a system? Data that is generally hidden away in HTML files is often useful in some contexts, but not in others. The problem with the majority of data on the Web that is in this form at the moment is that it is difficult to use on a large scale, because there is no global system for publishing data in such a way as it can be easily processed by anyone. For example, just think of information about local sports events, weather information, plane times, Major League Baseball statistics, and television guides... all of this information is presented by numerous sites, but all in HTML. The problem with that is that, is some contexts, it is difficult to use this data in the ways that one might want to do so.

So the Semantic Web can be seen as a huge engineering solution... but it is more than that. We will find that as it becomes easier to publish data in a repurposable form, so more people will want to publish data, and there will be a knock-on or domino effect. We may find that a large number of Semantic Web applications can be used for a variety of different tasks, increasing the modularity of applications on the Web. But enough subjective reasoning... onto how this will be accomplished.

The Semantic Web is generally built on syntaxes which use URIs to represent data, usually in triples-based structures, i.e., many triples of URI data that can be held in databases, or interchanged on the world Wide Web using a set of particular syntaxes developed especially for the task. These syntaxes are called "Resource Description Framework" syntaxes. URI - Uniform Resource Identifier

A URI is simply a Web identifier: like the strings starting with "http:" or "ftp:" that you often find on the World Wide Web. Anyone can create a URI, and the ownership of them is clearly delegated, so they form an ideal base technology with which to build a global Web on top of. In fact, the World Wide Web is such a thing: anything that has a URI is considered to be "on the Web".

The syntax of URIs is carefully governed by the IETF, who published RFC 2396 as the general URI specification. The W3C maintains a list of URI schemes.

title: Semantic Web/Introduction


text:
Semantic Web/Resource Description Framework

RDF - Resource Description Framework
A triple can simply be described as three URIs. A language which utilises three URIs in such a way is called RDF: the W3C have developed an XML serialization of RDF, the "Syntax" in the RDF Model and Syntax recommendation. RDF XML is considered to be the standard interchange format for RDF on the Semantic Web, although it is not the only format. For example, Notation3 (which we shall be going through later on in this article) is an excellent plain text alternative serialization.

Once information is in RDF form, it becomes easy to process it, since RDF is a generic format, which already has many parsers. XML RDF is quite a verbose specification, and it can take some getting used to (for example, to learn XML RDF properly, you need to understand a little about XML and namespaces beforehand...), but let's take a quick look at an example of XML RDF right now:-

Why RDF?
When people are confronted with XML RDF for the first time, they usually have two questions: "why use RDF rather than XML?", and "do we use XML Schema in conjunction with RDF?".

The answer to "why use RDF rather than XML?" is quite simple, and is twofold. Firstly, the benefit that one gets from drafting a language in RDF is that the information maps directly and unambiguously to a model, a model which is decentralized, and for which there are many generic parsers already available. This means that when you have an RDF application, you know which bits of data are the semantics of the application, and which bits are just syntactic fluff. And not only do you know that, everyone knows that, often implicitly without even reading a specification because RDF is so well known. The second part of the twofold answer is that we hope that RDF data will become a part of the Semantic Web, so the benefits of drafting your data in RDF now draws parallels with drafting your information in HTML in the early days of the Web.

The answer to "do we use XML Schema in conjunction with RDF?" is almost as brief. XML Schema is a language for restricting the syntax of XML applications. RDF already has a built in BNF that sets out how the language is to be used, so on the face of it the answer is a solid "no". However, using XML Schema in conjunction with RDF may be useful for creating datatypes and so on. Therefore the answer is "possibly", with a caveat that it is not really used to control the syntax of RDF. This is a common misunderstanding, perpetuated for too long now.


text:
Semantic Web/Screen Scraping, and Forms

For the Semantic Web to reach its full potential, many people need to start publishing data as RDF. Where is this information going to come from? A lot of it can be derived from many data publications that exist today, using a process called "screen scraping". Screen scraping is the act of literally getting the data from a source into a more manageable form (i.e., RDF) using whatever means come to hand. Two useful tools for screen scraping are XSLT (an XML transformations language), and regular expression (in Perl, Python, and so on).

However, screen scraping is often a tedious solution, so another way to approach it is to build proper RDF systems that take input from the user and then store it straight away in RDF. Data such as you may enter when signing up for a new mail account, buying some CDs online, or searching for a used car can all be stored as RDF and then used on the Semantic Web.

title: Semantic Web/Screen Scraping, and Forms


text:
Semantic Web/The Power Of Semantic Web Languages

The main power of Semantic Web languages is that any one can create one, simply by publishing some RDF that describes a set of URIs, what they do, and how they should be used. We have already seen that RDF Schema and DAML are very powerful languages for creating languages.

Because we use URIs for each of the terms in our languages, we can publish the languages easily without fear that they might get misinterpreted or stolen, and with the knowledge that anyone in the world that has a generic RDF processor can use them. The Principle Of Least Power

The Semantic Web works on a principle of least power: the fewer rules, the better. This means that the Semantic Web is essentially very unconstraining in what it lets one say, and hence it follows that anyone can say anything about anything. When you look at what the Semantic Web is trying to do, it becomes very obvious why this level of power is necessary... if we started constraining people, they wouldn't be able to build a full range of applications, and the Semantic Web would therefore become useless to some people. How Much Is Too Much?

However, it has been pointed out that this power will surely be too much... won't people be trying to process their shopping lists on an inference engine, and suddenly come up with a plan for world peace, or some strange and exciting new symphony?

The answer is (perhaps unfortunately!) no. Although the basic parts of the Semantic Web, RDF and the concepts behind it are very minimally constraining, applications that are built on top of the Semantic Web will be designed to perform specific tasks, and as such will be very well defined.

For example, take a simple server log program. One might want to record some server logs in RDF, and then build a program that can gather statistics from the logs that pertain to the site; how many visitors it had in a week, and so forth. That doesn't mean that it'll turn your floppy disc drive into a toaster or anything; it'll just process server logs. The power that you get from publishing your information in RDF is that once published in the public domain, it can be repurposed (used for other things) so much easier. Because RDF uses URIs, it is fully decentralized: you don't have to beg for some central authority to publish a language and all your data for you... you can do it yourself. It's Do It Yourself data management.


text:
Semantic Web/The Pedantic Web

Unfortunately, there is an air of academia and corporate thinking lingering in the Semantic Web community, which has led to the term "Pedantic Web" being coined, and a lot of mis/disinformation and unnecessary hype being disseminated. Note that this very document was devised to help clear up some common misconceptions that people may have about the Semantic Web.

For example, almost all beginners to RDF go through a sort of "identity crisis" phase, where they confuse people with their names, and documents with their titles. For example, it is common to see statements such as:-

 dc:creator "Bob".

However, Bob is just a literal string, so how can a literal string write a document? What the author really means is:-

 dc:creator _:b. _:b foaf:name "Bob".

i.e., that example.org was created by someone whose name is "Bob". Tips like these are being slowly collected, and some of them are being displayed in the SWTips guide, a collection of Semantic Web hints and tips maintained as a collaborative development project.

Education And Outreach

The move away from the "Pedantic Web", to some extent, is all part of a movement to bring the power of the Semantic Web to the people. This is a well documented need:-

RDF Schema and DAML+OIL are generally languages that need to be learned, however, so what is being done to accommodate people who have neither the time nor patience to read up on these things, and yet want to create Semantic Web applications? Thankfully, many Semantic Web applications will be lower end applications, so you'll no more need to have a knowledge of RDF than Amaya requires one to have a knowledge of (X)HTML. Trust and Proof

The next step in the architecture of the Semantic Web is trust and proof. Very little is written about this layer, which is a shame since it will become very important in the future.

In stark reality, the simplest way to put it is: if one person says that x is blue, and another says that x is not blue, doesn't the whole Semantic Web fall apart?

The answer is of course not, because a) applications on the Semantic Web at the moment generally depend upon context, and b) because applications in the future will generally contain proof checking mechanisms, and digital signatures. Context

Applications on the Semantic Web will depend on context generally to let people know whether or not they trust the data. If I get an RDF feed from a friend about some movies that he's seen, and how highly he rates them, I know that I trust that information. Moreover, I can then use that information and safely trust that it came from him, and then leave it down to my own judgement just to how much I trust his critiques of the films that he has reviewed.

Groups of people also operate on shared context. If one group is developing a Semantic Web depiction service, cataloguing who people are, what their names are, and where pictures of those people are, then my trust of that group is dependent upon how much I trust the people running it not to make spurious claims.

So context is a good thing because it lets us operate on local and medium scales intuitively, without having to rely on complex authentication and checking systems. However, what happens when there is a party that we know, but we don't know how to verify that a certain heap of RDF data came from them? That's where digital signatures come in.

In general, there are small- and large-scale systems, and interactions between the two will most likely form a huge part of the transactions that occur on the Semantic Web. Let's define what we mean by large-, medium-, and small-scale systems.

Large Scale

An example of a large-scale system is two companies that are undergoing a merger needing to combine their databases. Another example would be search engines compiling results based upon a huge range of data. Large-scale Semantic Web systems generally involve large databases, and heavy duty inference rules and processors are required to handle the databases. Medium Scale

Medium-scale Semantic Web systems attempt to make sense out of the larger-scale Semantic Web systems, or are examples of small-scale Semantic Web systems joined together. An example of the former is a company trying to partially understand two large-scale invoice formats enough to use them together. An example of the latter is of two address book language groups trying to create a super-address book language.

Small Scale

Small-scale Semantic Web systems are less widely discussed. By small-scale Semantic Web systems, we mean languages that will be used primarily offline, or piles of data that will only be transferred with a limited scope, perhaps between friends, departments, or even two companies.

Sharing data on a local level is a very powerful example of how the Semantic Web can be useful in a myriad of situations. In the next section on evolution we shall be finding out how interactions between the different sized systems will form a key part of the Semantic Web. SEM - SEmantic Memory

The concept of a SEmantic Memory was first proposed by Seth Russell, who suggested that personal database dumps of RDF that one has collected from the "rest" of the Semantic Web (a kind of Semantic Cloud) would be imperative for maintaining a coherent view of data. For example, a SEM would most likely be partitioned into data which is inherent to the whole Semantic Web (i.e., the schemata for the major languages such as XML RDF, RDF Schema, DAML+OIL, and so on), local data which is important for any Semantic Web applications that may be running (e.g. information about the logic namespace for CWM, which is currently built in), and data that the person has personally been using, is publishing, or that has been otherwise entered into the root context of the SEM.

The internal structure of a SEM will most likely go well beyond the usual triples structure of RDF, perhaps as far as quads or even pents. The extra fields are for contexts (an StID), and perhaps sequences. In other words, they are ways of grouping information within the SEM, for easy maintenance and update. For example, it should become simple to just delete any triple that was added into a certain context by removing all triples with that particular StID.

A lot of work on the Semantic Web has concentrated on making data stores (i.e., SEMs) interoperable, which is good, but that has lead to less work being conducted on what actually happens within the SEM itself, which is not good, because the representation of quads and pents in RDF is therefore up in the air. b developers to be investigating at this stage.

title: Semantic Web/The Pedantic Web


text:
Semantic Web/Evolution

Evolution
A very important concept on the Semantic Web is that of evolution: going from one system into another. Two key parts of evolvability are partial understanding and transformability. We will find out next how these manifest themselves naturally when changing the scale of a system. Partial Understanding: Large Scale to Medium Scale

The concept of partial understanding is a very important one on the Semantic Web, and can often be found in older documents that came out about the same time as the Semantic Web was first being theorized.

An example of partial understanding when moving a large-scale system to a medium-scale system is of a company trying to make sense out of two invoices, one from Company A and one from Company B. The knowledge that both of the companies use similar fields in their invoices is well known, so a company trying to make sense out of the invoices can easily compile a master list of expenditures by simply scraping the data from the two invoice languages. Neither Company A nor Company B need to know that this is going on.

Indeed, TimBL included this example in his XML 2000 keynote:-

title: Semantic Web/Evolution


text:
Semantic Web/Transformability: Small Scale to Medium Scale

Transformability: Small Scale to Medium Scale
An example of a small-scale Semantic Web system joined together to make a medium-sized Semantic Web system could be two groups that have published address book formats wanting to make a larger and better address book format by merging the two current formats together. Anyone using one of the old address book formats could probably convert them into the new format, and hence there would be a greater sense of interoperability. That's generally what happens when one goes from a small-scale Semantic Web system into a medium-scale Semantic Web system, although this is often not without some disadvantages and incompatibilities. The Semantic Web takes the sting out of it by automating 99% of the process (it can convert field A into field B, but it can't fill in any new data for you... of course, new fields can always be left empty for a while).


text:
Semantic Web/Facilitating Evolvability

How do we document the evolution of languages? This is a very important and indeed urgent question, and one which Tim Berners-Lee summarized quite neatly:- "Where for example a library of congress schema talks of an "author", and a British Library talks of a "creator", a small bit of RDF would be able to say that for any person x and any resource y, if x is the (LoC) author of y, then x is the (BL) creator of y. This is the sort of rule which solves the evolvability problems. Where would a processor find it? [...]"

One possible answer is: third-party databases. Very often, it is not practical to have (in Tim Berners-Lee's example) either the LoC or or BL record the fact that two of their fields are the same, so this information will have to be recorded by a reputable third party.

One such "third party" that was set up to investigate this is SWAG, the Semantic Web Agreement Group. Co-founded by Seth Russell, Sean B. Palmer, Aaron Swartz, and William Loughborough, the group aims to ensure interoperability on the Semantic Web. They set up what is possibly the first ever third-party Semantic Web dictionary, the WebNS SWAG Dictionary.

title: Semantic Web/Facilitating Evolvability


text:
Semantic Web/Intertwining: Difficult, But Important

Although the Semantic Web as a whole is still very much at a grassroots kind of level, people are starting to take notice; they're starting to publish information using RDF, and thereby making it fit for the Semantic Web.

However, not enough is being done to link information together... in other words, the "Semantic" part of the "Semantic Web" is coming along nicely, but where's the "Web"? People are not using other people's terms effectively; when they use other terms, they often do so because they're aimlessly trying to help, but just generating noise in the process. If you're going to use other people's data, try to find out what the advantage is in doing that beforehand. For example, just because you use the term "dc:title" in your RDF rather than a home brewed ":title", does that mean that suddenly a Dublin Core application is going to be able to "understand" your code? Of course not. What it does mean however is that if the "dc:title" property in your instance is being put to use in such a way that information may be need to repurposed from it in the near future, then you may gain some advantage because "dc:title" is such a commonly used term, you may be able to modify a current rules file, or whatever.

Another part of the problem may be due to a problem similar to the one that the early World Wide Web experienced: why bother publishing a Web site when there is no one else's site to link to or be linked to? Why bother publishing a Web site when so few people have browsers? Why bother writing a browser when there are so few Web sites? Some people have to make the leaps for it all to happen, and that's a slow process.

What can be done about the situation? Well, it may hopefully sort itself out. Another well-known principle that applies very well to Semantic Web applications is that there is no point in reinventing the wheel; viz., if someone has already invented a schema which contains a comprehensive and well understood and used set of terms that you also need to use in your application, then there is no point in trying to redo the work that they have done. At some points this may lead to a form of "schema war", but survival of the fittest should see to it that a core of the best schemata are put to the most use. This is probably what TimBL means when he says that terms will just "emerge" out of the Semantic Cloud, that when people keep using the term "zip", rather than just recording that my term "zip" is equivalent to your term "zip" which is equivalent to someone else's term "zip", we'll all just use the same URI, and hence interoperability will be vastly improved. Does It Work? What Semantic Web Applications Are There?

I addressed this in a previous article: The Semantic Web: Taking Form, but it does bear repeating: the Semantic Web already works, and people are using it.