summaryrefslogtreecommitdiff
path: root/doc/relnotes.htm
blob: 946680615706c3b49d3bf1333ccda0159bc40fc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
    <TITLE>Release Notes for Version 9.5 of Icon</TITLE>
    <LINK REL="STYLESHEET" TYPE="text/css" HREF="istyle.css">
    <LINK REL="SHORTCUT ICON" HREF="shortcut.gif">
</HEAD>
<BODY>

<P><A HREF="http://www.cs.arizona.edu/icon/"> <IMG SRC="wwwcube.gif"
ALT="[Icon home]" WIDTH=128 HEIGHT=144 BORDER=0 ALIGN=RIGHT> </A>

<H1> Release Notes for Version 9.5 of Icon </H1>

<P> Gregg M. Townsend
<BR> <SMALL> Department of Computer Science </SMALL>
<BR> <SMALL> The University of Arizona </SMALL>

<P> <SMALL> www.cs.arizona.edu/icon/v950/relnotes.htm
<BR> Last updated April 12, 2010</SMALL>
<!-- $Id: relnotes.htm,v 1.74 2010/04/12 20:39:24 gmt Exp $ -->


<H2> Introduction </H2>

<P> 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.


<H2> Changes in version 9.5 </H2>

<P> Notable changes in this latest version are listed here.
Some code cleanup work and documentation editing
has also been done.

<H3> External Values </H3>

<P> External code incorporated by <CODE>loadfunc()</CODE> 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 <A HREF=extlvals.htm>External Values</A> for more information.

<H3> Build Environment </H3>

<P> This version of Icon is the first to deliberately move beyond the
1989 C standard and make use of features of the 1999 C standard,
specifically the "struct hack".
Consequently, a C99 (or newer) compiler is now required to build Icon.

<H3> Cygwin Configuration </H3>

<P> The <CODE>cygwin</CODE> configuration has improved, partially through
removal of unneeded special cases now that Cygwin better approximates Unix.
External functions can now be loaded using <CODE>loadfunc()</CODE>.

<P> In addition to the <CODE>cygwin</CODE> configuration, which uses
Windows graphics, there is now a new <CODE>xcygwin</CODE> configuration
that uses the X window system.

<H3> Implementation Cleanup</H3>

<P> Large amounts of conditionalized dead code, including the old Icon
compiler, have been removed from the source code.

<P> All platforms now use POSIX threads for context switching instead of
system- and processor-dependent assembly language code.

<H3> Minor Fixes </H3>

<P> The <CODE>loadfunc()</CODE> implementation now specifies to the system
that C globals are to be shared with and among loaded functions.

<P> The command <CODE>icon nonexistent.icn</CODE> no longer leaves debris
in the /tmp directory.

<P> The maximum length of a file name has been increased from 256 to 512
characters.

<P> Table copying in the Sparc (Solaris) configuration was fixed by
coding a workaround to avoid a GCC 4.2.2 struct assignment bug.

<H3> Library changes </H3>

<P> As usual, some files in the Icon program library have been
added or edited, but the core library files remain stable.
Notable changes include:

<PRE>
procs/echo	New procedure for interpolating variables in strings.
procs/printf	Rewrite parts to fix several bugs, and add test.
procs/random	Improve thoroughness of randomize().

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/breakout	Make the ball large enough to see.
gprogs/gallery	Treat -wnnn and -hnnn options as *minimums*.
gprogs/gallery	Handle spaces embedded in JPEG filenames.
gprogs/kaleid	Add delay to prevent runaway on fast CPUs.
gprogs/spider	Add shortcuts, opt-in logging, congratulatory display.
gprogs/trkvu	Limit file legend to onscreen files.
gprogs/tron	New video game inspired by Tron.

packs/loadfuncpp	Add C++ interface package.
packs/icondb	Add MySQL interface package.

gpacks/weaving	Add "halftone" weaving program htweav.icn.
</PRE>

<H3> Documentation Additions </H3>

<P> Two new documentation pages, <A HREF="cfuncs.htm">Loading C functions</A>
and <A HREF="extlvals.htm">External Values</A>, have been added.


<H2> Earlier feature additions </H2>

<P> These features appeared in earlier releases of Icon
but subsequent to publication of the Icon books.

<H3> Millions of colors </H3>
<SMALL> (new with version 9.4.2 of Icon) </SMALL>

<P> 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.

<H3> Scriptable source files </H3>
<SMALL> (new with version 9.4.1 of Icon) </SMALL>

<P> An Icon source file can be made executable under Unix by prefixing it
with a comment line
<BLOCKQUOTE><CODE>#!/usr/bin/env icon</CODE></BLOCKQUOTE>
and setting its execute permission bit.
This uses a new <A HREF="icon.txt"><CODE>icon</CODE></A> command,
which in another form allows a small Icon program to be embedded
within a shell script.
See the <A HREF="icon.txt">man page</A> for details.
The traditional <A HREF="icont.txt"><CODE>icont</CODE></A> command
remains available when more flexibility is needed.

<H3> Path searching </H3>
<SMALL> (new with version 9.4.0 of Icon) </SMALL>

<P> Under Unix, colons (<CODE>:</CODE>) may now separate directories in the
<CODE>LPATH</CODE> and <CODE>IPATH</CODE> environment variables as an
alternative to spaces.
The Icon translator and linker search these paths when looking for
<CODE>$include</CODE> and <CODE>link</CODE> files respectively.

<P> The Icon program library is now searched automatically, but
<CODE>LPATH</CODE> and <CODE>IPATH</CODE> can still be set to control
the search order.
The effective path in each case is:
<OL>
	<LI> The current directory
	<LI> Any directories named by the environment variable
	<LI> The Icon library directory
</OL>

<P> 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 <A HREF="files.htm">File Organization</A> page.

<H3> Reading directory contents </H3>
<SMALL> (new with version 9.3.2 of Icon) </SMALL>

<P> 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 
<CODE>"."</CODE> and <CODE>".."</CODE> are included.

<H3> Reading foreign text files </H3> 
<SMALL> (new with version 9.3.1 of Icon) </SMALL>

<P> The function <CODE>read()</CODE> 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. 


<H2> Limitations, bugs, and problems </H2>

<P> Large integers cannot be used with <CODE>i to j</CODE>,
with <CODE>seq()</CODE>, or with integer-valued keywords.

<P> Large-integer literals are constructed at run-time, so such
literals are best kept outside of loops.

<P> 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.

<P> 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
<CODE>MSTKSIZE</CODE> or <CODE>COEXPSIZE</CODE>, as appropriate.

<P> 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. 

<P> 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 
<CODE>limit</CODE> or <CODE>ulimit</CODE> shell command.


<P> If an expression such as <CODE> x := create <VAR>expr</VAR></CODE>
is used in a loop, and <CODE>x</CODE> is not a global variable,
uncollectable co-expressions accumulate with each iteration.
This problem can be circumvented by making <CODE>x</CODE>
a global variable or by assigning a value to <CODE>x</CODE>
before the create operation, as in 
    <BLOCKQUOTE><CODE>
	x := &amp;null <BR>
	x := create <VAR>expr</VAR>
    </CODE></BLOCKQUOTE>

<P> Integer overflow on exponentiation may not be detected during execution.
Such overflow may occur during type conversion.


<H2> Documentation </H2>

<P> See the <A HREF=docguide.htm>documentation guide</A>
for an overview of the available Icon documentation.

<P> For installation instructions, see
<A HREF=install.htm>Installing Binaries</A> or
<A HREF=build.htm>Building from Source</A> as appropriate.


<H2> Acknowledgments </H2>

<P> Carl Sturtivant inspired and participated in the development
of external values. He also contributed the <CODE>loadfuncpp</CODE>
and <CODE>icondb</CODE> packages.
Eduardo Ochs contributed the <CODE>tron</CODE> game.
Charles L. Hethcoat III contributed the <CODE>echo</CODE> procedure.
Carl Sturtivant and Steve Waldo supplied numerous Cygwin improvements.
Cheyenne Wills improved the flexibility of the configuration process.
Clint Jeffery fixed an ancient linking bug.
Robert Shiplett and Jonathan Kaye helped with testing.

<P> <HR>

</BODY>
</HTML>