Gregg M. Townsend
Department of Computer Science
The University of Arizona
www.cs.arizona.edu/icon/v950/relnotes.htm
Last updated March 11, 2008
These notes are preliminary and incomplete.
Version 9.5.0 of Icon is an update of version 9.4.3 of Icon. It incorporates configuration, documentation, and library changes. Some minor bugs have been fixed. Support has been added for "external values" created by user C functions.
Notable changes in this latest version are listed here. Some code cleanup work and documentation editing has also been done.
External code incorporated by loadfunc() can now create
and return to Icon code opaque values that can be stored and passed
on subsequent calls.
This is similar to a feature of the early Macintosh ProIcon implementation.
See External Values for more information.
The cygwin configuration has improved, partially through
removal of unneeded special cases now that Cygwin better approximates Unix.
External functions can now be loaded using loadfunc().
While the cygwin configuration uses Windows graphics, a new
xcygwin configuration uses the X window system.
The loadfunc() implementation now specifies to the system
that C globals are to be shared with and among loaded functions.
The command icon nonexistent.icn no longer leaves debris
in the /tmp directory.
As usual, some files in the Icon program library have been added or edited, but the core library files remain stable. Notable changes include:
procs/printf Rewrite parts to fix several bugs, and add test. progs/diffsum Handle output of "cvs diff". progs/unclog Handle CVS branches; fix indentation. progs/weblinks Add option to sort output by referencing page. gprogs/gallery Treat -wnnn and -hnnn options as *minimums*. gpacks/weaving Add "halftone" weaving program htweav.icn.
These features appeared in earlier releases of Icon but subsequent to publication of the Icon books.
Icon's X-windows interface no longer limits each window to 256 colors at one time. Median-cut quantization selects image colors when writing a GIF file.
An Icon source file can be made executable under Unix by prefixing it with a comment line
#!/usr/bin/env icon
and setting its execute permission bit.
This uses a new icon command,
which in another form allows a small Icon program to be embedded
within a shell script.
See the man page for details.
The traditional icont command
remains available when more flexibility is needed.
Under Unix, colons (:) may now separate directories in the
LPATH and IPATH environment variables as an
alternative to spaces.
The Icon translator and linker search these paths when looking for
$include and link files respectively.
The Icon program library is now searched automatically, but
LPATH and IPATH can still be set to control
the search order.
For version 9.4, the effective path in each case is:
Other changes affect the configuration of Icon at installation time and the way executable Icon programs locate the interpreter. These changes, which are transparent to most users, are discussed in more detail on the File Organization page.
The files in a directory can be listed by opening the directory as a file.
Subsequent reads return the names of the files contained in the directory.
The names are returned in no particular order, and for Unix, the directories
"." and ".." are included.
The function read() recognizes
three kinds of line terminators when reading a file
opened in translated mode:
Windows (CR+LF), Macintosh (CR), or Unix (LF).
Consequently, text files created on one platform can be
read by an Icon program running on a different platform.
Large integers cannot be used with i to j,
with seq(), or with integer-valued keywords.
Large-integer literals are constructed at run-time, so such literals are best kept outside of loops.
Conversion of a large integer to a string is quadratic in the length of the integer. Conversion of a very large integer may take a long time.
An "evaluation stack overflow" can occur when a procedure is called
with a huge number (thousands or more) of arguments.
The capacity can be increased by setting the environment variable
MSTKSIZE or COEXPSIZE, as appropriate.
Stack overflow checking uses a heuristic that is not always effective. Stack overflow in a co-expression is especially likely to escape detection and cause a mysterious program malfunction.
Pathologically nested structures can provoke a memory or segmentation
fault during garbage collection by reaching the stack limit.
The stack limit can be raised by the
limit or ulimit shell command.
If an expression such as x := create expr
is used in a loop, and x is not a global variable,
uncollectable co-expressions accumulate with each iteration.
This problem can be circumvented by making x
a global variable or by assigning a value to x
before the create operation, as in
x := &null
x := create expr
Integer overflow on exponentiation may not be detected during execution. Such overflow may occur during type conversion.
See the documentation guide for an overview of the available Icon documentation.
For installation instructions, see Installing Binaries or Building from Source as appropriate.
Carl Sturtivant inspired and participated in the development of external values. Carl Sturtivant and Steve Waldo supplied numerous Cygwin improvements.