Debian Codegraph @

doc/relnotes.htm

raw
1 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML>
3 <HEAD>
4 <META NAME=viewport CONTENT="width=device-width, initial-scale=1">
5 <TITLE>Cumulative Release Notes for Icon</TITLE>
6 <LINK REL="STYLESHEET" TYPE="text/css" HREF="istyle.css">
7 <LINK REL="SHORTCUT ICON" HREF="shortcut.gif">
8 </HEAD>
9 <BODY>
10
11 <P><A HREF="http://www.cs.arizona.edu/icon/"> <IMG SRC="wwwcube.gif"
12 ALT="[Icon home]" WIDTH=128 HEIGHT=144 BORDER=0 ALIGN=RIGHT> </A>
13
14 <H1> Cumulative Release Notes for Icon </H1>
15
16 <P> Gregg M. Townsend
17 <BR> <SMALL> Department of Computer Science </SMALL>
18 <BR> <SMALL> The University of Arizona </SMALL>
19
20 <P> <SMALL> www.cs.arizona.edu/icon/uguide/relnotes.htm
21 <BR> Last updated November 19, 2024</SMALL>
22
23
24 <H2> Introduction </H2>
25
26 <P> This page summarizes changes in
27 the official Arizona implementation of the Icon programming language:
28 <UL>
29 <LI>changes to the Icon source tree since the formal 9.5.1 release
30 <LI>cumulative earlier amendments of the Icon language and graphics books
31 </UL>
32
33 <P> Not all minor changes are listed here.
34 For an exhaustive list, review the Git history at
35 <A HREF="https://github.com/gtownsend/icon/commits/master">
36 https://github.com/gtownsend/icon/commits/master</A>.
37
38
39 <H2> Changes in the GitHub version of Icon </H2>
40
41 Changes since the last formal release of Icon (version 9.5.1) are noted here.
42
43 <H3> Minor enhancements </H3>
44
45 <P>The <A HREF="https://musl.libc.org/"><CODE>musl</CODE></A> C library
46 can be used to build Icon by manually defining <CODE>_MUSL</CODE>
47 in CFLAGS when configuring or by using the new
48 <CODE>linux_musl</CODE> configuration.
49
50 <P>A port to the <A HREF="https://www.haiku-os.org/">Haiku</A>
51 operating system is now included and can be selected by specifying
52 the <CODE>haiku</CODE> configuration.
53
54 <H3> Minor fixes </H3>
55
56 <P> For graphics programs, the environment variable <CODE>DISPLAY</CODE>
57 can now exceed 63 characters. This bug was exposed by the release of
58 Mac OS 10.10 (&ldquo;Yosemite&rdquo;).
59
60 <P> Support for pre-1995 versions of the GNU C library was removed to
61 adapt to internal changes in version 2.28 of 2018.
62
63 <H3> Library changes </H3>
64
65 <P> The core library files remain stable.
66 Minor changes include:
67
68 <PRE>
69 procs/numbers gcd(i,j) now allows all argument values except i=j=0.
70 procs/random choose(k,n) returns a set of k distinct integers in [1..n].
71 </PRE>
72
73
74 <H2> Earlier feature additions </H2>
75
76 <P> These features appeared in earlier releases of Icon
77 but subsequent to publication of the Icon books.
78
79 <H3> Execution profiling </H3>
80 <SMALL> (new with version 9.5.1 of Icon) </SMALL>
81
82 <P> An execution profile can be produced by setting the environment variable
83 <CODE>ICONPROFILE</CODE> at execution time to specify an output file.
84 For a separately built program, profiling must also be enabled during linking.
85
86 <P> For each line of the program that is executed, the profiler reports the
87 number of visits and also the number of timer ticks attributed to the line.
88
89 <P> The report is ordered by memory layout, which is based on linkage order.
90 To arrange by filename, use the Unix <CODE>sort</CODE> utility
91 with keys <CODE>&ndash;k3,3 &ndash;k4n</CODE>.
92 To see the CPU hotspots, use <CODE>sort &ndash;nr | head</CODE>.
93
94 <H3> External values </H3>
95 <SMALL> (new with version 9.5.0 of Icon) </SMALL>
96
97 <P> External code incorporated by <CODE>loadfunc()</CODE> can now create
98 and return to Icon code opaque values that can be stored and passed
99 on subsequent calls.
100 See <A HREF="extlvals.htm">External Values</A> for more information.
101
102 <H3> Millions of colors </H3>
103 <SMALL> (new with version 9.4.2 of Icon) </SMALL>
104
105 <P> Icon's X-windows interface no longer limits each window to
106 256 colors at one time.
107 Median-cut quantization selects image colors when writing a GIF file.
108
109 <H3> Scriptable source files </H3>
110 <SMALL> (new with version 9.4.1 of Icon) </SMALL>
111
112 <P> An Icon source file can be made executable under Unix by prefixing it
113 with a comment line
114 <BLOCKQUOTE><CODE>#!/usr/bin/env icon</CODE></BLOCKQUOTE>
115 and setting its execute permission bit.
116 This uses a new <A HREF="icon.txt"><CODE>icon</CODE></A> command,
117 which in another form allows a small Icon program to be embedded
118 within a shell script.
119 See the <A HREF="icon.txt">man page</A> for details.
120 The traditional <A HREF="icont.txt"><CODE>icont</CODE></A> command
121 remains available when more flexibility is needed.
122
123 <H3> Path searching </H3>
124 <SMALL> (new with version 9.4.0 of Icon) </SMALL>
125
126 <P> Under Unix, colons (<CODE>:</CODE>) may now separate directories in the
127 <CODE>LPATH</CODE> and <CODE>IPATH</CODE> environment variables as an
128 alternative to spaces.
129 The Icon translator and linker search these paths when looking for
130 <CODE>$include</CODE> and <CODE>link</CODE> files respectively.
131
132 <P> The Icon program library is now searched automatically, but
133 <CODE>LPATH</CODE> and <CODE>IPATH</CODE> can still be set to control
134 the search order.
135 The effective path in each case is:
136 <OL>
137 <LI> The current directory
138 <LI> Any directories named by the environment variable
139 <LI> The Icon library directory
140 </OL>
141
142 <P> Other changes affect the configuration of Icon at installation time
143 and the way executable Icon programs locate the interpreter.
144 These changes, which are transparent to most users, are discussed
145 in more detail on the <A HREF="files.htm">File Organization</A> page.
146
147 <H3> Reading directory contents </H3>
148 <SMALL> (new with version 9.3.2 of Icon) </SMALL>
149
150 <P> The files in a directory can be listed by opening the directory as a file.
151 Subsequent reads return the names of the files contained in the directory.
152 The names are returned in no particular order, and for Unix, the directories
153 <CODE>"."</CODE> and <CODE>".."</CODE> are included.
154
155 <H3> Reading foreign text files </H3>
156 <SMALL> (new with version 9.3.1 of Icon) </SMALL>
157
158 <P> The function <CODE>read()</CODE> recognizes
159 three kinds of line terminators when reading a file
160 opened in translated mode:
161 Windows (CR+LF), Macintosh (CR), or Unix (LF).
162 Consequently, text files created on one platform can be
163 read by an Icon program running on a different platform.
164
165
166 <H2> Limitations, bugs, and problems </H2>
167
168 <SMALL>
169 (This list has remained essentially unchanged for a quarter of a century.
170 <!-- At least. See for example IPD 212 of 13 March 1993. -->
171 The remaining knotty problems relate to fundamental design decisions.) </SMALL>
172
173 <P> Icon deals strictly in 8-bit characters and expects a superset of ASCII
174 such as ISO 8859-1 (&ldquo;Latin 1&rdquo;).
175 It does not translate UTF-8 escape sequences and does not support Unicode.
176
177 <P> Large integers cannot be used with <CODE>i to j</CODE>,
178 with <CODE>seq()</CODE>, or with integer-valued keywords.
179
180 <P> Large-integer literals are constructed at run-time, so such
181 literals are best kept outside of loops.
182
183 <P> Conversion of a large integer to a string is quadratic
184 in the length of the integer.
185 Conversion of a very large integer may take a long time.
186
187 <P> An "evaluation stack overflow" can occur when a procedure is called
188 with a huge number (thousands or more) of arguments.
189 The capacity can be increased by setting the environment variable
190 <CODE>MSTKSIZE</CODE> or <CODE>COEXPSIZE</CODE>, as appropriate.
191
192 <P> Stack overflow checking uses a heuristic that is not always effective.
193 Stack overflow in a co-expression is especially likely to escape
194 detection and cause a mysterious program malfunction.
195
196 <P> Pathologically nested structures can provoke a memory or segmentation
197 fault during garbage collection by reaching the stack limit.
198 The stack limit can be raised by the
199 <CODE>limit</CODE> or <CODE>ulimit</CODE> shell command.
200
201
202 <P> If an expression such as <CODE> x := create <VAR>expr</VAR></CODE>
203 is used in a loop, and <CODE>x</CODE> is not a global variable,
204 uncollectable co-expressions accumulate with each iteration.
205 This problem can be circumvented by making <CODE>x</CODE>
206 a global variable or by assigning a value to <CODE>x</CODE>
207 before the create operation, as in
208 <BLOCKQUOTE><CODE>
209 x := &amp;null <BR>
210 x := create <VAR>expr</VAR>
211 </CODE></BLOCKQUOTE>
212
213 <P> Integer overflow on exponentiation may not be detected during execution.
214 Such overflow may occur during type conversion.
215
216 <H3> Clarification </H3>
217
218 <P> When a comparison operation must convert its right operand for
219 type compatibility, the <EM>converted</EM> value is returned on success.
220 For example, the expression
221 <CODE> 2.5 < 3 </CODE> returns the value <CODE>3.0</CODE>.
222
223
224 <H2> Graphics system limitations, bugs, and problems </H2>
225
226 <P> Icon graphics facilities utilize only server-side fonts (those listed
227 by <CODE>xlsfonts</CODE>) and not the more modern client-side fonts.
228
229 <P> Now that graphics memory is cheap, very few platforms require or support
230 mutable colors. Icon code for mutable colors is still present but untested.
231
232 <P> Windows are not always refreshed properly while a program is blocked
233 awaiting standard input.
234
235 <P> Depending on the window manager, values set and read back from the
236 <CODE>pos</CODE>, <CODE>posx</CODE>, and <CODE>posy</CODE> attributes
237 may be slightly inconsistent.
238
239 <P> The <CODE>$DISPLAY</CODE> bug (noted above as a minor fix)
240 exposed problems when a program uses multiple displays.
241 CopyArea() calls are not properly clipped,
242 and the management of colors is suspect.
243
244
245 <H2> Documentation </H2>
246
247 <P> See the <A HREF=index.htm>documentation guide</A>
248 for an overview of the available Icon documentation.
249
250 <P> For installation instructions, see
251 <A HREF=install.htm>Installing Binaries</A> or
252 <A HREF=build.htm>Building from Source</A> as appropriate.
253
254
255 <H2> Acknowledgments </H2>
256
257 <P>
258 Steve Wampler suggested the <CODE>gcd</CODE> liberalization.
259 <BR>
260 Sean Jensen fixed an ancient bug in the lexer.
261 <BR>
262 Cheyenne Wills provided multiple fixes for various build problems.
263 <BR>
264 Arthur Eschenlauer provided the <CODE>linux_musl</CODE> configuration.
265 <BR>
266 The GitHub user &ldquo;turboencabulator&rdquo; noted and fixed
267 several questionable uses of signed values.
268 <BR>
269 He and Cheyenne Wills both, independently, isolated a nasty bug
270 in the string conversion of MinLong.
271 <BR>
272 Jason Martin supplied the Haiku port.
273
274 <HR>
275
276 </BODY>
277 </HTML>