OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tcl/] [README] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
Tcl
2
 
3
RCS: @(#) $Id: README,v 1.1.1.1 2002-01-16 10:25:22 markom Exp $
4
 
5
1. Introduction
6
---------------
7
 
8
This directory and its descendants contain the sources and documentation
9
for Tcl, an embeddable scripting language.  The information here
10
corresponds to release 8.0.4, which is the fourth patch update for Tcl
11
8.0. This patch provides compatibility with [incr Tcl] 3.0.
12
Tcl 8.0 is a major new release that replaces the core of the
13
interpreter with an on-the-fly bytecode compiler to improve execution
14
speed.  It also includes several other new features such as namespaces
15
and binary I/O, plus many bug fixes.  The compiler introduces a few
16
incompatibilities that may affect existing Tcl scripts; the
17
incompatibilities are relatively obscure but may require modifications
18
to some old scripts before they can run with this version. The compiler
19
introduces many new C-level APIs, but the old APIs are still supported.
20
See below for more details.  This patch release fixes various bugs in
21
Tcl 8.0, plus it adds a few minor features to support the TclPro 1.0
22
tool set and [incr Tcl] 3.0.  Please check the changes file for details.
23
 
24
2. Documentation
25
----------------
26
 
27
The best way to get started with Tcl is to read one of the introductory
28
books on Tcl:
29
 
30
    Practical Programming in Tcl and Tk, 2nd Edition, by Brent Welch,
31
    Prentice-Hall, 1997, ISBN 0-13-616830-2
32
 
33
    Tcl and the Tk Toolkit, by John Ousterhout,
34
    Addison-Wesley, 1994, ISBN 0-201-63337-X
35
 
36
    Exploring Expect, by Don Libes,
37
    O'Reilly and Associates, 1995, ISBN 1-56592-090-2
38
 
39
Other books are listed at
40
http://www.scriptics.com/resource/doc/books/
41
http://www.tclconsortium.org/resources/books.html
42
 
43
The "doc" subdirectory in this release contains a complete set of reference
44
manual entries for Tcl.  Files with extension ".1" are for programs (for
45
example, tclsh.1); files with extension ".3" are for C library procedures;
46
and files with extension ".n" describe Tcl commands.  The file "doc/Tcl.n"
47
gives a quick summary of the Tcl language syntax.  To print any of the man
48
pages, cd to the "doc" directory and invoke your favorite variant of
49
troff using the normal -man macros, for example
50
 
51
                ditroff -man Tcl.n
52
 
53
to print Tcl.n.  If Tcl has been installed correctly and your "man"
54
program supports it, you should be able to access the Tcl manual entries
55
using the normal "man" mechanisms, such as
56
 
57
                man Tcl
58
 
59
There is also an official home for Tcl and Tk on the Web:
60
        http://www.scriptics.com
61
These Web pages include information about the latest releases, products
62
related to Tcl and Tk, reports on bug fixes and porting issues, HTML
63
versions of the manual pages, and pointers to many other Tcl/Tk Web
64
pages at other sites.  Check them out!
65
 
66
3. Compiling and installing Tcl
67
-------------------------------
68
 
69
This release contains everything you should need to compile and run
70
Tcl under UNIX, Macintoshes, and PCs (either Windows NT, Windows 95,
71
or Win 3.1 with Win32s).
72
 
73
Before trying to compile Tcl you should do the following things:
74
 
75
    (a) Check for a binary release.  Pre-compiled binary releases are
76
        available now for PCs, Macintoshes, and several flavors of UNIX.
77
        Binary releases are much easier to install than source releases.
78
        To find out whether a binary release is available for your
79
        platform, check the Scriptics Tcl Resource Center
80
        (http://www.scriptics.com/resource).  Also, check in
81
        the FTP directory from which you retrieved the base
82
        distribution.
83
 
84
    (b) Make sure you have the most recent patch release.  Look in the
85
        FTP directory from which you retrieved this distribution to see
86
        if it has been updated with patches.  Patch releases fix bugs
87
        without changing any features, so you should normally use the
88
        latest patch release for the version of Tcl that you want.
89
        Patch releases are available in two forms.  A file like
90
        tcl8.0.4.tar.Z is a complete release for patch level 4 of Tcl
91
        version 8.0.  If there is a file with a higher patch level than
92
        this release, just fetch the file with the highest patch level
93
        and use it.
94
 
95
        Patches are also available in the form of patch files that just
96
        contain the changes from one patch level to another.  These
97
        files will have names like tcl8.0p1.patch, tcl8.0p2.patch, etc.  They
98
        may also have .gz or .Z extensions to indicate compression.  To
99
        use one of these files, you apply it to an existing release with
100
        the "patch" program.  Patches must be applied in order:
101
        tcl8.0p1.patch must be applied to an unpatched Tcl 8.0 release
102
        to produce a Tcl 8.0p1 release;  tcl8.0p2.patch can then be
103
        applied to Tcl8.0p1 to produce Tcl 8.0p2, and so on. To apply an
104
        uncompressed patch file such as tcl8.0p1.patch, invoke a shell
105
        command like the following from the directory containing this
106
        file (some versions of patch require "-p0"):
107
            patch -p < tcl8.0p1.patch
108
        If the patch file has a .gz extension, invoke a command like the
109
        following:
110
            gunzip -c tcl8.0p1.patch.gz | patch -p
111
        If the patch file has a .Z extension, it was compressed with
112
        compress.  To apply it, invoke a command like the following:
113
            zcat tcl8.0p1.patch.Z | patch -p
114
        If you're applying a patch to a release that has already been
115
        compiled, then before applying the patch you should cd to the
116
        "unix" subdirectory and type "make distclean" to restore the
117
        directory to a pristine state.
118
 
119
Once you've done this, change to the "unix" subdirectory if you're
120
compiling under UNIX, "win" if you're compiling under Windows, or
121
"mac" if you're compiling on a Macintosh.  Then follow the instructions
122
in the README file in that directory for compiling Tcl, installing it,
123
and running the test suite.
124
 
125
4. Summary of changes in Tcl 8.0
126
--------------------------------
127
 
128
Here are the most significant changes in Tcl 8.0.  In addition to these
129
changes, there are several smaller changes and bug fixes.  See the file
130
"changes" for a complete list of all changes.
131
 
132
    1. Bytecode compiler.  The core of the Tcl interpreter has been
133
    replaced with an on-the-fly compiler that translates Tcl scripts to
134
    byte codes; a new interpreter then executes the byte codes. In
135
    earlier versions of Tcl, strings were used as a universal
136
    representation;  in Tcl 8.0 strings are replaced with Tcl_Obj
137
    structures ("objects") that can hold both a string value and an
138
    internal form such as a binary integer or compiled bytecodes.  The
139
    new objects make it possible to store information in efficient
140
    internal forms and avoid the constant translations to and from
141
    strings that occurred with the old interpreter.  We have not yet
142
    converted all of Tcl to take full advantage of the compiler and
143
    objects and have not converted any of Tk yet, but even so you
144
    should see speedups of 2-3x on many programs and you may see
145
    speedups as much as 10-20x in some cases (such as code that
146
    manipulates long lists).  Future releases should achieve even
147
    greater speedups.  The compiler introduces only a few minor changes
148
    at the level of Tcl scripts, but it introduces many new C APIs for
149
    managing objects.  See, for example, the manual entries doc/*Obj*.3.
150
 
151
    2. Namespaces.  There is a new namespace mechanism based on the
152
    namespace implementation by Michael McLennan of Lucent Technologies.
153
    This includes new "namespace" and "variable" commands.  There are
154
    many new C APIs associated with namespaces, but they will not be
155
    exported until Tcl 8.1.  Note: the syntax of the namespace command
156
    has been changed slightly since the b1 release.  See the changes
157
    file for details.
158
 
159
    3. Binary I/O.  The new object system in Tcl 8.0 supports binary
160
    strings (internally, strings are counted in addition to being null
161
    terminated).  There is a new "binary" command for inserting and
162
    extracting data to/from binary strings.  Commands such as "puts",
163
    "gets", and "read" commands now operate correctly on binary data.
164
    There is a new variable tcl_platform(byteOrder) to identify the
165
    native byte order for the current host.
166
 
167
    4. Random numbers.  The "expr" command now contains a random number
168
    generator, which can be accessed via the "rand()" and "srand()" math
169
    functions.
170
 
171
    5. Safe-Tcl enhancements.  There is a new "hidden command"
172
    mechanism, implemented with the Tcl commands "interp hide", "interp
173
    expose", "interp invokehidden", and "interp hidden" and the C APIs
174
    Tcl_HideCommand and Tcl_ExposeCommand.  There is now support for
175
    safe packages and extension loading, including new library
176
    procedures such as safe::interpCreate (see the manual entry safe.n
177
    for details).
178
 
179
    6. There is a new package "registry" available under Windows for
180
    accessing the Windows registry.
181
 
182
    7. There is a new command "file attributes" for getting and setting
183
    things like permissions and owner.  There is also a new command
184
    "file nativename" for getting back the platform-specific name for a
185
    particular file.
186
 
187
    8. There is a new "fcopy" command to copy data between channels.
188
    This replaces and improves upon the not-so-secret unsupported old
189
    command "unsupported0".
190
 
191
    9. There is a new package "http" for doing GET, POST, and HEAD
192
    requests via the HTTP/1.0 protocol.  See the manual entry http.n
193
    for details.
194
 
195
    10. There are new library procedures for finding word breaks in
196
    strings.  See the manual entry library.n for details.
197
 
198
    11. There are new C APIs Tcl_Finalize (for cleaning up before
199
    unloading the Tcl DLL) and Tcl_Ungets for pushing bytes back into a
200
    channel's input buffer.
201
 
202
    12. Tcl now supports serial I/O devices on Windows and Unix, with a
203
    new fconfigure -mode option.  The Windows driver does not yet
204
    support event-driven I/O.
205
 
206
    13. The lsort command has new options -dictionary and -index.  The
207
    -index option allows for very rapid sorting based on an element
208
    of a list.
209
 
210
    14. The event notifier has been completely rewritten (again).  It
211
    should now allow Tcl to use an external event loop (like Motif's)
212
    when it is embedded in other applications.  No script-level
213
    interfaces have changed, but many of the C APIs have.
214
 
215
Tcl 8.0 introduces the following incompatibilities that may affect Tcl
216
scripts that worked under Tcl 7.6 and earlier releases:
217
 
218
    1. Variable and command names may not include the character sequence
219
    "::" anymore: this sequence is now used as a namespace separator.
220
 
221
    2. The semantics of some Tcl commands have been changed slightly to
222
    maximize performance under the compiler.  These incompatibilities
223
    are documented on the Web so that we can keep the list up-to-date.
224
    See the URL http://www.sunlabs.com/research/tcl/compiler.html.
225
 
226
    3. 2-digit years are now parsed differently by the "clock" command
227
    to handle year 2000 issues better (years 00-38 are treated as
228
    2000-2038 instead of 1900-1938).
229
 
230
    4. The old Macintosh commands "cp", "mkdir", "mv", "rm", and "rmdir"
231
    are no longer supported; all of these features are now available on
232
    all platforms via the "file" command.
233
 
234
    5. The variable tcl_precision is now shared between interpreters
235
    and defaults to 12 digits instead of 6; safe interpreters cannot
236
    modify tcl_precision.  The new object system in Tcl 8.0 causes
237
    floating-to-string conversions (and the associated rounding) to
238
    occur much less often than in Tcl 7.6, which can sometimes cause
239
    behavioral changes.
240
 
241
    6. The C APIs associated with the notifier have changed substantially.
242
 
243
    7. The procedures Tcl_CreateModalTimeout and Tcl_DeleteModalTimeout
244
    have been removed.
245
 
246
    8. Tcl_CreateFileHandler and Tcl_DeleteFileHandler now take Unix
247
    fd's and are only supported on the Unix platform
248
 
249
    9. The C APIs for creating channel drivers have changed as part of
250
    the new notifier implementation.  The Tcl_File interfaces have been
251
    removed.  Tcl_GetChannelFile has been replaced with
252
    Tcl_GetChannelHandle.  Tcl_MakeFileChannel now takes a platform-
253
    specific file handle.  Tcl_DriverGetOptionProc procedures now take
254
    an additional interp argument.
255
 
256
5. Tcl newsgroup
257
-----------------
258
 
259
There is a network news group "comp.lang.tcl" intended for the exchange
260
of information about Tcl, Tk, and related applications.  Feel free to use
261
the newsgroup both for general information questions and for bug reports.
262
We read the newsgroup and will attempt to fix bugs and problems reported
263
to it.
264
 
265
When using comp.lang.tcl, please be sure that your e-mail return address
266
is correctly set in your postings.  This allows people to respond directly
267
to you, rather than the entire newsgroup, for answers that are not of
268
general interest.  A bad e-mail return address may prevent you from
269
getting answers to your questions.  You may have to reconfigure your news
270
reading software to ensure that it is supplying valid e-mail addresses.
271
 
272
6. Tcl contributed archive
273
--------------------------
274
 
275
Many people have created exciting packages and applications based on Tcl
276
and/or Tk and made them freely available to the Tcl community.  An archive
277
of these contributions is kept on the machine ftp.neosoft.com.  You
278
can access the archive using anonymous FTP;  the Tcl contributed archive is
279
in the directory "/pub/tcl".  The archive also contains several FAQ
280
("frequently asked questions") documents that provide solutions to problems
281
that are commonly encountered by TCL newcomers.
282
 
283
7. Tcl Resource Center
284
----------------------
285
Visit http://www.scritics.com/resource/ to see an annotated index of
286
many Tcl resources available on the World Wide Web.  This includes
287
papers, books, and FAQs, as well as extensions, applications, binary
288
releases, and patches.  You can contribute patches by sending them
289
to .  You can also recommend more URLs for the
290
resource center using the forms labeled "Add a Resource".
291
 
292
8. Mailing lists
293
----------------
294
 
295
A couple of  Mailing List have been set up to discuss Macintosh or
296
Windows related Tcl issues.  In order to use these Mailing Lists you
297
must have access to the internet.  To subscribe send a message to:
298
 
299
        wintcl-request@tclconsortium.org
300
        mactcl-request@tclconsortium.org
301
 
302
In the body of the message (the subject will be ignored) put:
303
 
304
        subscribe mactcl Joe Blow
305
 
306
Replacing Joe Blow with your real name, of course.  (Use wintcl
307
instead of mactcl if your interested in the Windows list.)  If you
308
would just like to receive more information about the list without
309
subscribing put the line:
310
 
311
        information mactcl
312
 
313
in the body instead (or wintcl).
314
 
315
9. Support and bug fixes
316
------------------------
317
 
318
We're very interested in receiving bug reports and suggestions for
319
improvements.  We prefer that you send this information to the
320
comp.lang.tcl newsgroup rather than to any of us at Scriptics.  We'll see
321
anything on comp.lang.tcl, and in addition someone else who reads
322
comp.lang.tcl may be able to offer a solution.  The normal turn-around
323
time for bugs is 3-6 weeks.  Enhancements may take longer and may not
324
happen at all unless there is widespread support for them (we're
325
trying to slow the rate at which Tcl turns into a kitchen sink).  It's
326
very difficult to make incompatible changes to Tcl at this point, due
327
to the size of the installed base.
328
 
329
When reporting bugs, please provide a short tclsh script that we can
330
use to reproduce the bug.  Make sure that the script runs with a
331
bare-bones tclsh and doesn't depend on any extensions or other
332
programs, particularly those that exist only at your site.  Also,
333
please include three additional pieces of information with the
334
script:
335
    (a) how do we use the script to make the problem happen (e.g.
336
        what things do we click on, in what order)?
337
    (b) what happens when you do these things (presumably this is
338
        undesirable)?
339
    (c) what did you expect to happen instead?
340
 
341
The Tcl community is too large for us to provide much individual
342
support for users.  If you need help we suggest that you post questions
343
to comp.lang.tcl.  We read the newsgroup and will attempt to answer
344
esoteric questions for which no-one else is likely to know the answer.
345
In addition, Tcl support and training are available commercially from
346
Scriptics (info@scriptics.com), NeoSoft (info@neosoft.com),
347
Computerized Processes Unlimited (gwl@cpu.com),
348
and Data Kinetics (education@dkl.com).
349
 
350
10. Tcl version numbers
351
----------------------
352
 
353
You can test the current version of Tcl by examining the
354
tcl_version and tcl_patchLevel variables.  The tcl_patchLevel
355
variable follows the naming rules outlined below (e.g., 8.0.4).
356
The tcl_version just has the major.minor numbers in it (e.g., 8.0)
357
 
358
Each Tcl release is identified by two numbers separated by a dot, e.g.
359
6.7 or 7.0.  If a new release contains changes that are likely to break
360
existing C code or Tcl scripts then the major release number increments
361
and the minor number resets to zero: 6.0, 7.0, etc.  If a new release
362
contains only bug fixes and compatible changes, then the minor number
363
increments without changing the major number, e.g. 7.1, 7.2, etc.  If
364
you have C code or Tcl scripts that work with release X.Y, then they
365
should also work with any release X.Z as long as Z > Y.
366
 
367
Alpha and beta releases have an additional suffix of the form a2 or b1.
368
For example, Tcl 7.0b1 is the first beta release of Tcl version 7.0,
369
Tcl 7.0b2 is the second beta release, and so on.  A beta release is an
370
initial version of a new release, used to fix bugs and bad features before
371
declaring the release stable.  An alpha release is like a beta release,
372
except it's likely to need even more work before it's "ready for prime
373
time".  New releases are normally preceded by one or more alpha and beta
374
releases.  We hope that lots of people will try out the alpha and beta
375
releases and report problems.  We'll make new alpha/beta releases to fix
376
the problems, until eventually there is a beta release that appears to
377
be stable.  Once this occurs we'll make the final release.
378
 
379
We can't promise to maintain compatibility among alpha and beta releases.
380
For example, release 7.1b2 may not be backward compatible with 7.1b1, even
381
though the final 7.1 release will be backward compatible with 7.0.  This
382
allows us to change new features as we find problems during beta testing.
383
We'll try to minimize incompatibilities between beta releases, but if
384
a major problem turns up then we'll fix it even if it introduces an
385
incompatibility.  Once the official release is made then there won't
386
be any more incompatibilities until the next release with a new major
387
version number.
388
 
389
(Note: This compatibility is true for Tcl scripts, but historically the Tcl
390
C APIs have changed enough between releases that you may need to work a bit to
391
upgrade extensions.)
392
 
393
Patch releases have a suffix such as p1 or p2.  These releases contain
394
bug fixes only.  A patch release (e.g Tcl 7.6p2) should be completely
395
compatible with the base release from which it is derived (e.g. Tcl
396
7.6), and you should normally use the highest available patch release.
397
 
398
As of 8.0.3, the patch releases use a second . instead of 'p'.  So, the
399
8.0 release went to 8.0p1, 8.0p2, 8.0.3, and 8.0.4.  The alphas and betas
400
will still use the 'a' and 'b' letters in their tcl_patchLevel.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.