File: relnotes.htm

package info (click to toggle)
icon 9.5.25a-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,624 kB
  • sloc: ansic: 28,692; cpp: 5,650; yacc: 926; makefile: 882; lisp: 873; sh: 319; sed: 13; php: 1
file content (277 lines) | stat: -rw-r--r-- 10,142 bytes parent folder | download | duplicates (2)
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
    <META NAME=viewport CONTENT="width=device-width, initial-scale=1">
    <TITLE>Cumulative Release Notes for 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> Cumulative Release Notes for 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/uguide/relnotes.htm
<BR> Last updated November 19, 2024</SMALL>


<H2> Introduction </H2>

<P> This page summarizes changes in
the official Arizona implementation of the Icon programming language:
<UL>
<LI>changes to the Icon source tree since the formal 9.5.1 release
<LI>cumulative earlier amendments of the Icon language and graphics books
</UL>

<P> Not all minor changes are listed here.
For an exhaustive list, review the Git history at
<A HREF="https://github.com/gtownsend/icon/commits/master">
https://github.com/gtownsend/icon/commits/master</A>.


<H2> Changes in the GitHub version of Icon </H2>

Changes since the last formal release of Icon (version 9.5.1) are noted here.

<H3> Minor enhancements </H3>

<P>The <A HREF="https://musl.libc.org/"><CODE>musl</CODE></A> C library
can be used to build Icon by manually defining <CODE>_MUSL</CODE>
in CFLAGS when configuring or by using the new
<CODE>linux_musl</CODE> configuration.

<P>A port to the <A HREF="https://www.haiku-os.org/">Haiku</A>
operating system is now included and can be selected by specifying
the <CODE>haiku</CODE> configuration.

<H3> Minor fixes </H3>

<P> For graphics programs, the environment variable <CODE>DISPLAY</CODE>
can now exceed 63 characters.  This bug was exposed by the release of
Mac OS 10.10 (&ldquo;Yosemite&rdquo;).

<P> Support for pre-1995 versions of the GNU C library was removed to
adapt to internal changes in version 2.28 of 2018.

<H3> Library changes </H3>

<P> The core library files remain stable.
Minor changes include:

<PRE>
procs/numbers	gcd(i,j) now allows all argument values except i=j=0.
procs/random	choose(k,n) returns a set of k distinct integers in [1..n].
</PRE>


<H2> Earlier feature additions </H2>

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

<H3> Execution profiling </H3>
<SMALL> (new with version 9.5.1 of Icon) </SMALL>

<P> An execution profile can be produced by setting the environment variable
<CODE>ICONPROFILE</CODE> at execution time to specify an output file.
For a separately built program, profiling must also be enabled during linking.

<P> For each line of the program that is executed, the profiler reports the
number of visits and also the number of timer ticks attributed to the line.

<P> The report is ordered by memory layout, which is based on linkage order.
To arrange by filename, use the Unix <CODE>sort</CODE> utility
with keys <CODE>&ndash;k3,3 &ndash;k4n</CODE>.
To see the CPU hotspots, use <CODE>sort &ndash;nr | head</CODE>.

<H3> External values </H3>
<SMALL> (new with version 9.5.0 of Icon) </SMALL>

<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.
See <A HREF="extlvals.htm">External Values</A> for more information.

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

<SMALL>
(This list has remained essentially unchanged for a quarter of a century.
<!-- At least.  See for example IPD 212 of 13 March 1993. -->
The remaining knotty problems relate to fundamental design decisions.) </SMALL>

<P> Icon deals strictly in 8-bit characters and expects a superset of ASCII
such as ISO 8859-1 (&ldquo;Latin 1&rdquo;).
It does not translate UTF-8 escape sequences and does not support Unicode.

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

<H3> Clarification </H3>

<P> When a comparison operation must convert its right operand for
type compatibility, the <EM>converted</EM> value is returned on success.
For example, the expression
<CODE> 2.5 < 3 </CODE> returns the value <CODE>3.0</CODE>.


<H2> Graphics system limitations, bugs, and problems </H2>

<P> Icon graphics facilities utilize only server-side fonts (those listed
by <CODE>xlsfonts</CODE>) and not the more modern client-side fonts.

<P> Now that graphics memory is cheap, very few platforms require or support
mutable colors.  Icon code for mutable colors is still present but untested.

<P> Windows are not always refreshed properly while a program is blocked
awaiting standard input.

<P> Depending on the window manager, values set and read back from the
<CODE>pos</CODE>, <CODE>posx</CODE>, and <CODE>posy</CODE> attributes
may be slightly inconsistent.

<P> The <CODE>$DISPLAY</CODE> bug (noted above as a minor fix)
exposed problems when a program uses multiple displays.
CopyArea() calls are not properly clipped,
and the management of colors is suspect.


<H2> Documentation </H2>

<P> See the <A HREF=index.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>
Steve Wampler suggested the <CODE>gcd</CODE> liberalization.
<BR>
Sean Jensen fixed an ancient bug in the lexer.
<BR>
Cheyenne Wills provided multiple fixes for various build problems.
<BR>
Arthur Eschenlauer provided the <CODE>linux_musl</CODE> configuration.
<BR>
The GitHub user &ldquo;turboencabulator&rdquo; noted and fixed
several questionable uses of signed values.
<BR>
He and Cheyenne Wills both, independently, isolated a nasty bug
in the string conversion of MinLong.
<BR>
Jason Martin supplied the Haiku port.

<HR>

</BODY>
</HTML>