418 lines
17 KiB
Plaintext
418 lines
17 KiB
Plaintext
|
Path: bloom-beacon.mit.edu!news.media.mit.edu!uhog.mit.edu!MathWorks.Com!yeshua.marcam.com!usc!nic-nac.CSU.net!news.Cerritos.edu!news.Arizona.EDU!math.arizona.edu!CS.Arizona.EDU!not-for-mail
|
||
|
From: icon-project@cs.arizona.edu
|
||
|
Newsgroups: comp.lang.icon,comp.answers,news.answers
|
||
|
Subject: Icon Programming Language FAQ
|
||
|
Followup-To: comp.lang.icon
|
||
|
Date: 6 May 1994 09:03:38 -0700
|
||
|
Organization: University of Arizona CS Department, Tucson AZ
|
||
|
Lines: 402
|
||
|
Sender: icon@CS.Arizona.EDU
|
||
|
Approved: news-answers-request@MIT.Edu
|
||
|
Message-ID: <2qdpoq$od2@optima.cs.arizona.edu>
|
||
|
Reply-To: icon-project@cs.arizona.edu
|
||
|
NNTP-Posting-Host: optima.cs.arizona.edu
|
||
|
Xref: bloom-beacon.mit.edu comp.lang.icon:961 comp.answers:5247 news.answers:19221
|
||
|
|
||
|
Archive-name: comp-lang-icon-faq
|
||
|
|
||
|
|
||
|
Frequently Asked Questions About The Icon Programming Language
|
||
|
|
||
|
last updated: 03/04/94
|
||
|
|
||
|
This FAQ answers various questions about the Icon programming language,
|
||
|
ranging from what it is to how you can get it. This first version of the
|
||
|
Icon FAQ is devoted to the issues that are likely to be of most interest
|
||
|
to persons who don't know anything about Icon or who are relatively
|
||
|
new to it. Future versions of this FAQ will answer questions from
|
||
|
more experienced Icon programmers.
|
||
|
|
||
|
This FAQ is written by Ralph Griswold with help from Cliff Hathaway,
|
||
|
Clint Jeffery, and Gregg Townsend.
|
||
|
|
||
|
Section I -- General Questions:
|
||
|
|
||
|
I.1. What is Icon?
|
||
|
I.2. What is Icon good for?
|
||
|
I.3. Where did Icon come from?
|
||
|
I.4. What does "Icon" stand for?
|
||
|
I.5. On what computers does Icon run?
|
||
|
I.6. Who did all these implementations?
|
||
|
I.7. Are there other implementations in the works?
|
||
|
I.8. Are there different versions of Icon?
|
||
|
I.9. Which implementations of Icon have graphics/window capabilities?
|
||
|
I.10. Where can I get Icon?
|
||
|
I.11. Where can I get documentation about Icon?
|
||
|
I.12. What is the Icon Project?
|
||
|
I.13. Where can I find examples of Icon programs?
|
||
|
I.14. What is Idol?
|
||
|
I.15. How often is material in Icon's FTP area updated?
|
||
|
I.16. How do I stay up to date with what's going on with Icon?
|
||
|
I.17. Why isn't the Icon Newsletter available electronically?
|
||
|
I.18. Is there a users' group for Icon?
|
||
|
I.19. How do I get technical support?
|
||
|
I.20. Is there an optimizing compiler for Icon?
|
||
|
I.21. What do I need to run the interpreter?
|
||
|
I.22. What do I need to run the compiler?
|
||
|
I.23. Can I build my own implementation of Icon for a new platform?
|
||
|
|
||
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||
|
|
||
|
I.1. What is Icon?
|
||
|
|
||
|
Icon is a very high level general-purpose programming language with
|
||
|
extensive features for processing strings (text) and data structures.
|
||
|
Icon is an imperative, procedural language with a syntax that is
|
||
|
reminiscent of C and Pascal, but its semantics are at a much higher level
|
||
|
than those languages.
|
||
|
|
||
|
Icon has a novel expression-evaluation mechanism that integrates goal-
|
||
|
directed evaluation and backtracking with conventional control structures.
|
||
|
It has a string scanning facility for pattern matching that avoids
|
||
|
the tedious details usually associated with analyzing strings. Icon's
|
||
|
built-in data structures include sets and tables with associative lookup,
|
||
|
lists that can be used as vectors or stacks and queues, and records.
|
||
|
|
||
|
Icon is a strongly, though not statically, typed language. It provides
|
||
|
transparent automatic type conversion. For example, if an integer is
|
||
|
used in an operation that requires a string, the integer is automatically
|
||
|
converted to a string.
|
||
|
|
||
|
Several implementations of Icon have high-level graphics facilities with
|
||
|
an easily programmed window interface.
|
||
|
|
||
|
Icon manages storage automatically. Objects are created as needed during
|
||
|
program execution and space is reclaimed by garbage collection as needed.
|
||
|
The sizes of strings and data structures are limited only by the amount
|
||
|
of available memory.
|
||
|
|
||
|
|
||
|
I.2. What is Icon good for?
|
||
|
|
||
|
As a general-purpose programming language with a large computational
|
||
|
repertoire, Icon can be used for most programming tasks. It's at
|
||
|
its best when used as a prototyping tool, for processing text, and when
|
||
|
ease of programming is needed for experimental and research applications.
|
||
|
|
||
|
Paradoxically, Icon is used most often for short, one-shot tasks and for very
|
||
|
complex applications.
|
||
|
|
||
|
Icon is designed to make programming easy; it emphasizes the value of
|
||
|
programmer's time and the importance of getting programs to work quickly.
|
||
|
This explains its usefulness for prototyping as well as the apparent
|
||
|
paradox of applicability to simple and complex applications.
|
||
|
|
||
|
|
||
|
I.3. Where did Icon come from?
|
||
|
|
||
|
Icon is the latest in a series of high-level programming languages designed
|
||
|
to facilitate programming tasks involving strings and structures. The
|
||
|
original language, SNOBOL, was developed at Bell Telephone Laboratories
|
||
|
in the early 60s. SNOBOL evolved into SNOBOL4, which is still in use.
|
||
|
Subsequent languages were developed at The University of Arizona with
|
||
|
support from the National Science Foundation.
|
||
|
|
||
|
Incidentally, Icon bears little physical resemblance to SNOBOL4, although
|
||
|
it has similar objectives and many similar capabilities.
|
||
|
|
||
|
|
||
|
I.4. What does "Icon" stand for?
|
||
|
|
||
|
The name Icon (which is not spelled ICON) is not an acronym nor does it
|
||
|
stand for anything in particular, although the word iconoclastic was
|
||
|
mentioned at the time the name was chosen. The name predates the now
|
||
|
common use of "icon" to refer to small images used in graphical user
|
||
|
interfaces. This latter usage sometimes causes persons to think mistakenly
|
||
|
that Icon is designed to create or manipulate icons. There's not much
|
||
|
that can be done about this.
|
||
|
|
||
|
|
||
|
I.5. On what computers does Icon run?
|
||
|
|
||
|
The implementation of Icon is highly portable. There are versions for
|
||
|
the Acorn Archimedes, the Amiga, the Atari ST, IBM CMS and MVS, the
|
||
|
Macintosh, MS-DOS, OS/2, UNIX, and VMS. Nearly 60 UNIX platforms are
|
||
|
supported.
|
||
|
Icon programs also are highly portable. Most Icon programs can run on
|
||
|
any platform that supports Icon.
|
||
|
|
||
|
|
||
|
I.6. Who did all these implementations?
|
||
|
|
||
|
The original implementation of Icon for UNIX was done at The University
|
||
|
of Arizona. Most of the other implementations originally were done
|
||
|
by volunteers scattered around the world.
|
||
|
|
||
|
It's worth noting that all implementations of Icon are based on the same
|
||
|
source code, which is written in C. This contributes to the portability
|
||
|
of Icon itself, as well as to the portability of programs written in Icon.
|
||
|
|
||
|
|
||
|
I.7. Are there other implementations in the works?
|
||
|
|
||
|
Yes, work is constantly underway on implementations of Icon for new
|
||
|
platforms. Present projects include Windows NT, Win32, the DEC Alpha
|
||
|
running under UNIX, and a new Macintosh implementation.
|
||
|
|
||
|
|
||
|
I.8. Are there different versions of Icon?
|
||
|
|
||
|
Icon has evolved through a series of versions with improved and extended
|
||
|
capabilities. The latest major version number is 8. Recent changes
|
||
|
and additions, notably in the graphics area, have brought the current
|
||
|
level to 8.10. (Version 8.11 is, of course, in the works.) Most
|
||
|
implementations are up to 8.10, although a few for less frequently
|
||
|
used platforms are still at 8.0. Almost all 8.0 programs will run
|
||
|
under 8.10.
|
||
|
|
||
|
|
||
|
I.9. Which implementations of Icon have graphics/window capabilities?
|
||
|
|
||
|
Icon's graphics facilities presently are supported on the OS/2, UNIX, and
|
||
|
VMS implementations. The UNIX and VMS implementations use X, while the
|
||
|
OS/2 implementation uses Presentation Manager.
|
||
|
|
||
|
The NT, Win32, and DEC Alpha implementations that are in progress
|
||
|
will support Icon's graphics facilities. A Macintosh
|
||
|
implementation to support graphics also is in the works.
|
||
|
|
||
|
|
||
|
I.10. Where can I get Icon?
|
||
|
|
||
|
Most implementations of Icon are available via anonymous FTP to
|
||
|
cs.arizona.edu in /icon. The directory /icon/binaries contains executable
|
||
|
versions of Icon for several systems, including several popular UNIX
|
||
|
platforms. The directory /icon/packages contains source code and
|
||
|
related material. All directories have READ.ME files with additional
|
||
|
information.
|
||
|
|
||
|
Icon also is available on a variety of physical media for prices ranging
|
||
|
from $15 to $50. Contact:
|
||
|
|
||
|
Icon Project
|
||
|
Department of Computer Science
|
||
|
The University of Arizona
|
||
|
Tucson, AZ 85721
|
||
|
|
||
|
602-621-8448 (voice)
|
||
|
602-621-4246 (fax)
|
||
|
|
||
|
icon-orders@cs.arizona.edu (e-mail)
|
||
|
|
||
|
f the Icon Newsletter for a listing of what's available
|
||
|
and what the prices are.
|
||
|
|
||
|
Purchases can be made by credit card (MasterCard, Visa, or Discover) or
|
||
|
by check drawn on a bank with a branch in the United States and made
|
||
|
payable to The University of Arizona.
|
||
|
|
||
|
|
||
|
I.11. Where can I get documentation about Icon?
|
||
|
|
||
|
The definitive work on Icon is the book
|
||
|
|
||
|
The Icon Programming Language, Griswold and Griswold,
|
||
|
Prentice-Hall, 1990, 368 pages, ISBN 0-13-447889-4.
|
||
|
|
||
|
This book is a complete description and reference manual for Version 8 of
|
||
|
Icon.
|
||
|
|
||
|
There also is a book on the implementation of Icon:
|
||
|
|
||
|
The Implementation of the Icon Programming Language, Griswold
|
||
|
and Griswold, Princeton University Press, 1986, 336 pages, ISBN
|
||
|
0-691-08431-9.
|
||
|
|
||
|
This book describes the implementation as of Version 6 of Icon. Although
|
||
|
the implementation has changed somewhat since then, the basic structure
|
||
|
is the same. Technical reports describing recent implementation changes
|
||
|
are included with books purchased from the Icon Project.
|
||
|
|
||
|
These books are available from the Icon Project or from any book store
|
||
|
that handles special orders.
|
||
|
|
||
|
Additional documentation is available via FTP in /icon/doc. Notable
|
||
|
documents are:
|
||
|
|
||
|
TR 90-6 an overview of Icon
|
||
|
TR 93-9 graphics/window facilities
|
||
|
IPD212 changes between Versions 8.0 and 8.10
|
||
|
|
||
|
There are manual pages for UNIX systems, but there is no complete
|
||
|
on-line documentation.
|
||
|
|
||
|
The Icon Newsletter, which includes topical material about Icon and
|
||
|
a list of material available from the Icon Project, is published three
|
||
|
times a year. Subscriptions are free; contact the Icon Project to get
|
||
|
a copy of the latest Newsletter and to be put on the mailing list.
|
||
|
|
||
|
The Icon Analyst, a technically oriented newsletter that features articles
|
||
|
about programming, is published six times a year. There is a subscription
|
||
|
fee for the Analyst. A sample copy is available on request.
|
||
|
|
||
|
All back issues of both newsletters are available for purchase.
|
||
|
|
||
|
|
||
|
I.12. What is the Icon Project?
|
||
|
|
||
|
The Icon Project is a name used by the group at The University of
|
||
|
Arizona that develops, implements, distributes, and supports the
|
||
|
Icon programming language.
|
||
|
|
||
|
The Icon Project is not commercial organization. It derives support
|
||
|
from The University of Arizona, grants, and (primarily) revenue from
|
||
|
the sale of program material and documentation.
|
||
|
|
||
|
|
||
|
I.13. Where can I find examples of Icon programs?
|
||
|
|
||
|
There is a large program library for Icon. It is an excellent resource
|
||
|
for both new and experienced programmers, containing numerous examples of
|
||
|
how to do things with Icon. The library also provides many useful
|
||
|
applications, as well as hundreds of procedures that supplement Icon's
|
||
|
built-in repertoire.
|
||
|
|
||
|
The library, like other Icon material, is available via FTP (cd /icon/library)
|
||
|
and on physical media from the Icon Project.
|
||
|
|
||
|
|
||
|
I.14. What is Idol?
|
||
|
|
||
|
Idol is an object-oriented extension to Icon that provides concepts such
|
||
|
as classes and multiple inheritance. Idol is written in Idol and is
|
||
|
distributed as part of the Icon program library. Idol runs on almost all
|
||
|
of the platforms that Icon runs on.
|
||
|
|
||
|
Additional Idol information is available from Clint Jeffery,
|
||
|
jeffery@ringer.cs.utsa.edu.
|
||
|
|
||
|
|
||
|
I.15. How often is material in Icon's FTP area updated?
|
||
|
|
||
|
New material is added when it's available. Established implementations
|
||
|
usually are only updated when there's a major new release. This typically
|
||
|
is every year or two. The Icon program library is updated on a similar
|
||
|
schedule.
|
||
|
|
||
|
|
||
|
I.16. How do I stay up to date with what's going on with Icon?
|
||
|
|
||
|
The best way to find out about developments related to Icon is to
|
||
|
subscribe to the Icon Newsletter. It's free, but it is distributed
|
||
|
only by postal mail, so you must provide a mailing address.
|
||
|
|
||
|
You can stay up to date on the source code, which is changed much more
|
||
|
frequently than the version on FTP is updated, by subscribing to the
|
||
|
source update service, which provides a new version about three times
|
||
|
a year.
|
||
|
|
||
|
There also is a subscription service for updates to the Icon program
|
||
|
library, which provides new material three or four times a year.
|
||
|
|
||
|
See the Icon Newsletter for information about subscribing to these
|
||
|
services.
|
||
|
|
||
|
|
||
|
I.17. Why isn't the Icon Newsletter available electronically?
|
||
|
|
||
|
The Icon Newsletter contains diagrams, images, and other material that
|
||
|
cannot be rendered in plain ASCII text. The Newsletter is prepared with
|
||
|
a desktop publishing system that produces PostScript, but the files are
|
||
|
enormous -- too large to include in the Icon FTP area. Selected articles
|
||
|
from the Newsletter are available by FTP in /icon/doc/articles.
|
||
|
|
||
|
|
||
|
I.18. Is there a users' group for Icon?
|
||
|
|
||
|
There is no official Icon users' group. The Icon Project maintains an
|
||
|
electronic mailing list, icon-group@cs.arizona.edu. Mail sent to this address
|
||
|
is forwarded to subscribers. To subscribe (or unsubscribe), send a
|
||
|
message to icon-group-request@cs.arizona.edu.
|
||
|
|
||
|
There is a gateway between icon-group and comp.lang.icon, an unmoderated
|
||
|
newsgroup for discussing issues related to Icon. The gateway, which
|
||
|
exchanges messages between the two systems, is imperfect and not under
|
||
|
the control of the Icon Project.
|
||
|
|
||
|
The newsgroup generally provides faster response than the mailing list.
|
||
|
The newsgroup is less intrusive, but it sometimes suffers from inappropriate
|
||
|
postings. The Icon Project usually sends messages of interest to the
|
||
|
Icon community to icon-group.
|
||
|
|
||
|
I.19. How do I get technical support?
|
||
|
|
||
|
Free technical support is available from the Icon Project via electronic
|
||
|
mail to icon-project@cs.arizona.edu or by fax, telephone, and postal mail
|
||
|
to the Icon Project as listed above.
|
||
|
|
||
|
Since the Icon Project is not a commercial organization, support is limited
|
||
|
to what it can provide with its available resources. If the Icon Project
|
||
|
cannot help with a problem (such as for a platform it doesn't have), it will
|
||
|
attempt to provide a contact with someone who can help.
|
||
|
|
||
|
|
||
|
I.20. Is there an optimizing compiler for Icon?
|
||
|
|
||
|
Yes. The original implementation was an interpreter. An optimizing
|
||
|
compiler was added a few years ago. The interpreter and compiler are
|
||
|
largely source-language compatible.
|
||
|
|
||
|
The interpreter is used by most Icon programmers because it gets into
|
||
|
execution quickly and runs fast enough for most applications. The compiler
|
||
|
is best suited for applications that require the fastest possible
|
||
|
execution time. In this case, it's generally best to develop the program
|
||
|
using the interpreter and then compile the final result for production use.
|
||
|
|
||
|
|
||
|
I.21. What do I need to run the interpreter?
|
||
|
|
||
|
The Icon interpreter will run on most computers. It requires a reasonable
|
||
|
amount of memory, however. Under MS-DOS, the Icon interpreter needs
|
||
|
500KB of application RAM to work well.
|
||
|
|
||
|
|
||
|
I.22. What do I need to run the compiler?
|
||
|
|
||
|
The Icon compiler is another matter. It requires a C compiler, a fast
|
||
|
CPU for tolerable compilation times, a considerable amount of disk
|
||
|
space, and a lot of memory -- at least several megabytes.
|
||
|
|
||
|
The Icon compiler generates C code, which must then be compiled to
|
||
|
produce an executable program. The flexibility that Icon provides to
|
||
|
programmers makes compilation technically difficult and the process
|
||
|
requires a large amount of memory. The C code it produces is voluminous
|
||
|
and stresses the most robust C compilers.
|
||
|
|
||
|
Generally speaking, the Icon compiler is practical for platforms in
|
||
|
the workstation class but not for most personal computers. Although
|
||
|
the compiler can be built and made to run on 286 platforms running
|
||
|
standard MS-DOS, only trivially small programs can be compiled. In
|
||
|
principle, the Icon compiler is practical on MS-DOS 386/486 platforms
|
||
|
with extended memory, but the limited availability of suitable 32-bit C
|
||
|
compilers for this environment has discouraged the use of the Icon compiler
|
||
|
on such platforms.
|
||
|
|
||
|
|
||
|
I.23. Can I build my own implementation of Icon for a new platform?
|
||
|
|
||
|
As mentioned above, Icon is written in C and the source code is available
|
||
|
via FTP and the Icon Project. The existing implementations are testament
|
||
|
to its portability. (a small amount of assembly-language code is
|
||
|
required for a context switch, but this is only needed for an optional
|
||
|
pressions -- that can be disabled without affecting most
|
||
|
of Icon.)
|
||
|
|
||
|
New ports involve platform-specific configuration parameters and, in
|
||
|
some cases, platform-specific code. The feasibility of a new port and
|
||
|
the amount of work it may take depends on the platform -- its architecture,
|
||
|
its C compiler, and its environment.
|
||
|
|
||
|
Ports to new UNIX platforms generally are easy, although novel architecture
|
||
|
may present problems. Ports to new operating systems generally are
|
||
|
more difficult, especially if Icon's graphics facilities are implemented.
|
||
|
|
||
|
The Icon Project provides what help it can with new ports. In return, it
|
||
|
asks that code related to the port to be returned to the Icon Project for
|
||
|
inclusion in future versions of the source code for Icon. This makes the
|
||
|
new port available to others as well as to the porter when Icon is updated.
|